@stackable-labs/embeddables 1.98.0 → 1.99.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/components.js +1583 -1529
- package/dist/react.js +1936 -1856
- package/dist/stackable-widget.external.js +65 -60
- package/dist/stackable-widget.js +73 -68
- package/dist/ui/src/components/qr-code.d.ts +3 -3
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(u,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):(u=typeof globalThis<"u"?globalThis:u||self,be(u.jsxRuntime,u.ReactDOM,u.React,u.ReactDOM))})(this,(function(u,be,C,Kn){"use strict";var Xb=Object.defineProperty;var Zb=(u,be,C)=>be in u?Xb(u,be,{enumerable:!0,configurable:!0,writable:!0,value:C}):u[be]=C;var Bo=(u,be,C)=>Zb(u,typeof be!="symbol"?be+"":be,C);function Fo(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const h=Fo(C),Zt=Fo(Kn),Wc='/*! 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-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-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-ease: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;--ease-out:cubic-bezier(0, 0, .2, 1);--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}.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.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}.origin-bottom-right{transform-origin:100% 100%}.translate-y-0{--tw-translate-y:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-2{--tw-translate-y:calc(var(--spacing) * 2);translate:var(--tw-translate-x) var(--tw-translate-y)}.scale-95{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-100{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-115{--tw-scale-x:115%;--tw-scale-y:115%;--tw-scale-z:115%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-125{--tw-scale-x:125%;--tw-scale-y:125%;--tw-scale-z:125%;scale:var(--tw-scale-x) var(--tw-scale-y)}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-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-0{opacity:0}.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}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.running{animation-play-state:running}@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\\:scale-105:hover{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x) var(--tw-scale-y)}.hover\\: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-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-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}@property --tw-ease{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}',jc=()=>{try{return"c28b52a6-f0ef-4fb2-a512-b049462d0d33"}catch{return"dev"}},rt=new Map,qc=async(e,t)=>{const n=rt.get(e.id);if(n)return n;if(!e.bundleUrl)return console.warn(`[SandboxManager] Extension ${e.id} is missing bundleUrl — skipping sandbox creation`),null;const r=document.createElement("iframe");r.setAttribute("sandbox","allow-scripts allow-same-origin"),r.style.display="none",r.style.width="0",r.style.height="0",r.style.border="none";const o=e.bundleUrl.startsWith("http")&&!e.bundleUrl.endsWith(".js"),a=o?new URL(e.bundleUrl).origin:"null";if(o){const l=new URL(e.bundleUrl);l.searchParams.set("__extensionId",e.id),r.src=l.toString(),console.warn(`[SandboxManager] Creating dev sandbox for ${e.id}, injecting __extensionId via query param, url: ${l.toString()}`)}else{let l="";try{const f=jc();l=await(await fetch(`${e.bundleUrl}?_b=${f}`)).text()}catch(f){console.error(`[SandboxManager] Failed to fetch bundle for ${e.id}:`,f)}const d=`<!DOCTYPE html>
|
|
1
|
+
(function(u,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):(u=typeof globalThis<"u"?globalThis:u||self,be(u.jsxRuntime,u.ReactDOM,u.React,u.ReactDOM))})(this,(function(u,be,C,Kn){"use strict";var Qb=Object.defineProperty;var ew=(u,be,C)=>be in u?Qb(u,be,{enumerable:!0,configurable:!0,writable:!0,value:C}):u[be]=C;var Bo=(u,be,C)=>ew(u,typeof be!="symbol"?be+"":be,C);function Fo(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const p=Fo(C),Zt=Fo(Kn),Wc='/*! 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-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-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-ease: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;--ease-out:cubic-bezier(0, 0, .2, 1);--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}.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.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}.origin-bottom-right{transform-origin:100% 100%}.translate-y-0{--tw-translate-y:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-2{--tw-translate-y:calc(var(--spacing) * 2);translate:var(--tw-translate-x) var(--tw-translate-y)}.scale-95{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-100{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-115{--tw-scale-x:115%;--tw-scale-y:115%;--tw-scale-z:115%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-125{--tw-scale-x:125%;--tw-scale-y:125%;--tw-scale-z:125%;scale:var(--tw-scale-x) var(--tw-scale-y)}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-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-0{opacity:0}.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}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.running{animation-play-state:running}@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\\:scale-105:hover{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x) var(--tw-scale-y)}.hover\\: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-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-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}@property --tw-ease{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}',qc=()=>{try{return"bce01151-35e5-4f99-adcf-dae034fb7834"}catch{return"dev"}},ot=new Map,Gc=async(e,t)=>{const n=ot.get(e.id);if(n)return n;if(!e.bundleUrl)return console.warn(`[SandboxManager] Extension ${e.id} is missing bundleUrl — skipping sandbox creation`),null;const r=document.createElement("iframe");r.setAttribute("sandbox","allow-scripts allow-same-origin"),r.style.display="none",r.style.width="0",r.style.height="0",r.style.border="none";const o=e.bundleUrl.startsWith("http")&&!e.bundleUrl.endsWith(".js"),a=o?new URL(e.bundleUrl).origin:"null";if(o){const l=new URL(e.bundleUrl);l.searchParams.set("__extensionId",e.id),r.src=l.toString(),console.warn(`[SandboxManager] Creating dev sandbox for ${e.id}, injecting __extensionId via query param, url: ${l.toString()}`)}else{let l="";try{const f=qc();l=await(await fetch(`${e.bundleUrl}?_b=${f}`)).text()}catch(f){console.error(`[SandboxManager] Failed to fetch bundle for ${e.id}:`,f)}const d=`<!DOCTYPE html>
|
|
2
2
|
<html>
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="utf-8">
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<script>var __STACKABLE_EXTENSION_ID__ = ${JSON.stringify(e.id)}; var process = { env: { NODE_ENV: "production" } };<\/script>
|
|
10
10
|
<script type="module">${l}<\/script>
|
|
11
11
|
</body>
|
|
12
|
-
</html>`;r.srcdoc=d,console.warn(`[SandboxManager] Creating srcdoc sandbox for ${e.id}, srcdoc starts with: ${d.substring(0,300)}`)}t.appendChild(r);const s={manifest:e.manifest,extensionId:e.id,iframe:r,ready:!1,expectedOrigin:a,messageHandlers:new Set},i=l=>{if(l.origin!==s.expectedOrigin)return;const d=l.data;!d||typeof d!="object"||!("type"in d)||("extensionId"in d?d.extensionId:void 0)!==e.id||(d.type==="extension-ready"&&(s.ready=!0),s.messageHandlers.forEach(c=>c(d)))};return window.addEventListener("message",i),rt.set(e.id,s),s},Me=(e,t)=>{const n=rt.get(e);if(!(n!=null&&n.iframe.contentWindow)){console.warn(`Sandbox not found for extension: ${e}`);return}const r=n.expectedOrigin==="null"?"*":n.expectedOrigin;n.iframe.contentWindow.postMessage(t,r)},gt=e=>rt.get(e),Gc=e=>{const t=rt.get(e);t&&(t.iframe.remove(),t.messageHandlers.clear(),rt.delete(e))},mt=()=>rt,Xn=e=>e,Yc={SUPER_ADMIN:"super_admin"};new Set(Object.values(Yc));const $o={"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-qr-code":{description:"QR code rendered from a string payload",icon:"qr-code",category:"composite",attributes:["value","size","variant","level","alt","className"],attributeValues:{size:["sm","md","lg"],variant:["default","inverted"],level:["low","medium","quartile","high"]}},"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"]}},vt=$o,Bt=Object.keys($o),Kc=Object.fromEntries(Bt.map(e=>[e,vt[e].attributes]));Object.fromEntries(Bt.filter(e=>vt[e].attributeValues).map(e=>[e,vt[e].attributeValues]));const Ho=Object.fromEntries(Bt.filter(e=>vt[e].children).map(e=>[e,vt[e].children]));({...Ho},Object.fromEntries(Bt.map(e=>[e,vt[e].category])));const bt={NEW_CONVERSATION:"newConversation",SET_CONVERSATION_TAGS:"setConversationTags",SET_CONVERSATION_FIELDS:"setConversationFields"},Xc=["identity","messaging","settings"],Zc={"context.read":"context:read","data.query":"data:query","data.fetch":"data:fetch","actions.toast":"actions:toast","actions.invoke":"actions:invoke","extend.identity":"extend:identity"},Jc=e=>{const t=async n=>{const r=n.data;if((r==null?void 0:r.type)!=="capability-request")return;const o=r;console.warn("[CapabilityRPC] raw message data:",JSON.stringify(n.data));const a=o.extensionId;if(!a||!gt(a)){const l=[...mt().keys()];console.warn(`Received capability request from unknown source (extensionId: "${a??"undefined"}", registered: [${l.join(", ")}], capability: ${o.capability})`);return}const s=gt(a);if(!s)return;const i=Zc[o.capability];if(i&&!s.manifest.permissions.includes(i)){const l={type:"capability-response",id:o.id,success:!1,error:`Permission denied: '${i}' not granted for extension '${a}'`};Me(a,l);return}try{let l;switch(o.capability){case"data.query":l=await e["data.query"](o.payload);break;case"data.fetch":l=await e["data.fetch"](a,o.payload);break;case"actions.toast":l=await e["actions.toast"](a,o.payload);break;case"actions.invoke":l=await e["actions.invoke"](o.payload);break;case"context.read":l=await e["context.read"](a);break;case"extend.identity":l=e["extend.identity"]?await e["extend.identity"](a,o.payload):null;break;default:throw new Error(`Unknown capability: ${o.capability}`)}const d={type:"capability-response",id:o.id,success:!0,data:l};Me(a,d)}catch(l){const d={type:"capability-response",id:o.id,success:!1,error:l instanceof Error?l.message:"Unknown error"};Me(a,d)}};return window.addEventListener("message",t),()=>{window.removeEventListener("message",t)}},Vo=C.createContext({extensions:[],components:{},ready:!1}),Qc=({extensions:e,capabilityHandlers:t,components:n={},children:r})=>{const[o,a]=C.useState(!1),s=C.useRef(null),i=C.useRef(null),l=C.useRef(t);return l.current=t,C.useEffect(()=>{if(!s.current)return;let d=!1;return(async()=>{const c=s.current;if(!c)return;console.log("[ExtensionProvider] Initializing with",e.length,"extensions");const p=new Proxy({},{get:(g,v)=>l.current[v]});i.current=Jc(p);for(const g of e)g.enabled&&!d&&(console.log("[ExtensionProvider] Creating sandbox for",g.id,"bundleUrl:",g.bundleUrl),await qc(g,c),console.log("[ExtensionProvider] Sandbox created for",g.id));d||(console.log("[ExtensionProvider] Ready"),a(!0))})(),()=>{var c;d=!0;for(const p of e)Gc(p.id);(c=i.current)==null||c.call(i)}},[e]),u.jsxs(Vo.Provider,{value:{extensions:e,components:n,ready:o},children:[u.jsx("div",{ref:s,style:{display:"none"}}),r]})},Uo=()=>C.useContext(Vo),ed=e=>Bt.includes(e),td=(e,t={})=>{const{surfaceId:n,logPrefix:r="[NodeRenderer]"}=t,o=(a,s,i=0)=>{var g,v,m;if(a.type==="text")return a.text||null;if(!a.tag)return null;if(a.tag==="__fragment")return u.jsx(C.Fragment,{children:(g=a.children)==null?void 0:g.map((b,w)=>o(b,s,w))},i);if(!ed(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):u.jsx(C.Fragment,{children:(v=a.children)==null?void 0:v.map((b,w)=>o(b,s,w))},i);const{filtered:d,stripped:f}=nd(a.tag,a.attrs);f.length>0&&console.warn(`${r} Attributes not allowed on <${a.tag}>, stripped: ${f.join(", ")}`);const c=rd(a.tag,a.children);if(c.length>0&&console.warn(`${r} Invalid children in <${a.tag}>: ${c.join(", ")}`),a.actionId){const b=a.actionId;d.onClick=()=>{const w=s;w==null||w.postMessage({type:"action-invoke",surfaceId:n,actionId:b},"*")}}if(d["data-onchange-id"]){const b=d["data-onchange-id"];delete d["data-onchange-id"],d.onChange=w=>{const y=s;y==null||y.postMessage({type:"action-invoke",surfaceId:n,actionId:b,value:w.target.value},"*")}}const p=(m=a.children)==null?void 0:m.map((b,w)=>o(b,s,w));return C.createElement(l,{...d,key:i},p&&p.length>0?p:void 0)};return o},nd=(e,t)=>{const n={},r=[];if(!t)return{filtered:n,stripped:r};const o=Kc[e];for(const[a,s]of Object.entries(t)){if(a==="data-onchange-id"){n[a]=s;continue}o!=null&&o.includes(a)?n[a]=s:r.push(a)}return{filtered:n,stripped:r}},rd=(e,t)=>{const n=Ho[e];if(!n||!t)return[];const r=[];for(const o of t)o.type!=="text"&&(!o.tag||o.tag==="__fragment"||n.includes(o.tag)||r.push(o.tag));return r},od=e=>{const t={...e};for(const n of Xc)delete t[n];return t},Jt=({target:e,context:t,className:n,separator:r,fallback:o=null,render:a})=>{const{extensions:s,components:i,ready:l}=Uo(),[d,f]=C.useState({}),c=C.useRef(""),p=C.useMemo(()=>s.filter(b=>b.enabled&&b.manifest.targets.includes(e)),[s.map(b=>b.id).join(","),e]),g=C.useMemo(()=>td(i,{surfaceId:e,logPrefix:"[ExtensionSlot]"}),[e,i]);if(C.useEffect(()=>{const b=p.map(y=>y.id).join(",");if(c.current!==b&&(c.current=b,f({})),!l||p.length===0)return;const w=y=>{const x=y.data;if(!(!x||typeof x!="object"||!p.some(P=>{const E=gt(P.id);return E&&y.source===E.iframe.contentWindow}))){if(x.type==="surface-update"&&x.surfaceId===e){const P=p.find(N=>{const S=gt(N.id);return S&&y.source===S.iframe.contentWindow});if(!P)return;const E=g(x.tree,y.source??null);f(N=>({...N,[P.id]:E}))}if(x.type==="surface-ready"&&x.surfaceId===e&&t){const P=od(t);p.forEach(E=>{var S;const N=gt(E.id);(S=N==null?void 0:N.iframe.contentWindow)==null||S.postMessage({type:"context-update",surfaceId:e,context:P},"*")})}}};return window.addEventListener("message",w),p.forEach(y=>{var k;const x=gt(y.id);(k=x==null?void 0:x.iframe.contentWindow)==null||k.postMessage({type:"surface-render",surfaceId:e,context:t},"*")}),()=>{window.removeEventListener("message",w)}},[l,p,e,t,g]),!l)return null;if(p.length===0)return o?u.jsx("div",{"data-extension-slot":e,title:e,className:n,children:o}):null;const v=p.map(b=>({id:b.id,children:d[b.id]})).filter(b=>!!b.children),m=v.length>0?v.flatMap((b,w,y)=>{const x=a?a({extensionId:b.id,children:b.children,index:w,total:y.length}):u.jsx(C.Fragment,{children:b.children},b.id),k=u.jsx(C.Fragment,{children:x},`extension:${b.id}`);if(w===0||!r)return[k];const P=y[w-1],E=typeof r=="function"?r({index:w,total:y.length,previousExtensionId:P.id,extensionId:b.id}):r;return[u.jsx(C.Fragment,{children:E},`separator:${P.id}:${b.id}:${w}`),k]}):o;return u.jsx("div",{"data-extension-slot":e,title:e,className:n,children:m})};function ad(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const sd=e=>{switch(e){case"success":return cd;case"info":return ud;case"warning":return dd;case"error":return fd;default:return null}},id=Array(12).fill(0),ld=({visible:e,className:t})=>C.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},C.createElement("div",{className:"sonner-spinner"},id.map((n,r)=>C.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),cd=C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},C.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"})),dd=C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},C.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"})),ud=C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},C.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"})),fd=C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},C.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"})),pd=C.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"},C.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),C.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),hd=()=>{const[e,t]=C.useState(document.hidden);return C.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let Zn=1;class gd{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...o}=t,a=typeof(t==null?void 0:t.id)=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:Zn++,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,...o,dismissible:i,id:a}),a},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const o=Promise.resolve(t instanceof Function?t():t);let a=r!==void 0,s;const i=o.then(async d=>{if(s=["resolve",d],C.isValidElement(d))a=!1,this.create({id:r,type:"default",message:d});else if(vd(d)&&!d.ok){a=!1;const c=typeof n.error=="function"?await n.error(`HTTP error! status: ${d.status}`):n.error,p=typeof n.description=="function"?await n.description(`HTTP error! status: ${d.status}`):n.description,v=typeof c=="object"&&!C.isValidElement(c)?c:{message:c};this.create({id:r,type:"error",description:p,...v})}else if(d instanceof Error){a=!1;const c=typeof n.error=="function"?await n.error(d):n.error,p=typeof n.description=="function"?await n.description(d):n.description,v=typeof c=="object"&&!C.isValidElement(c)?c:{message:c};this.create({id:r,type:"error",description:p,...v})}else if(n.success!==void 0){a=!1;const c=typeof n.success=="function"?await n.success(d):n.success,p=typeof n.description=="function"?await n.description(d):n.description,v=typeof c=="object"&&!C.isValidElement(c)?c:{message:c};this.create({id:r,type:"success",description:p,...v})}}).catch(async d=>{if(s=["reject",d],n.error!==void 0){a=!1;const f=typeof n.error=="function"?await n.error(d):n.error,c=typeof n.description=="function"?await n.description(d):n.description,g=typeof f=="object"&&!C.isValidElement(f)?f:{message:f};this.create({id:r,type:"error",description:c,...g})}}).finally(()=>{a&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),l=()=>new Promise((d,f)=>i.then(()=>s[0]==="reject"?f(s[1]):d(s[1])).catch(f));return typeof r!="string"&&typeof r!="number"?{unwrap:l}:Object.assign(r,{unwrap:l})},this.custom=(t,n)=>{const r=(n==null?void 0:n.id)||Zn++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const ge=new gd,md=(e,t)=>{const n=(t==null?void 0:t.id)||Zn++;return ge.addToast({title:e,...t,id:n}),n},vd=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",bd=md,wd=()=>ge.toasts,yd=()=>ge.getActiveToasts(),wt=Object.assign(bd,{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:wd,getToasts:yd});ad("[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 Qt(e){return e.label!==void 0}const xd=3,Cd="24px",kd="16px",Ro=4e3,Sd=356,Ed=14,Nd=45,Td=200;function Le(...e){return e.filter(Boolean).join(" ")}function _d(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const Ad=e=>{var t,n,r,o,a,s,i,l,d;const{invert:f,toast:c,unstyled:p,interacting:g,setHeights:v,visibleToasts:m,heights:b,index:w,toasts:y,expanded:x,removeToast:k,defaultRichColors:P,closeButton:E,style:N,cancelButtonStyle:S,actionButtonStyle:A,className:z="",descriptionClassName:_="",duration:M,position:O,gap:I,expandByDefault:j,classNames:D,icons:$,closeButtonAriaLabel:q="Close toast"}=e,[L,T]=C.useState(null),[F,H]=C.useState(null),[B,V]=C.useState(!1),[U,X]=C.useState(!1),[R,W]=C.useState(!1),[Z,ee]=C.useState(!1),[ae,ne]=C.useState(!1),[ce,de]=C.useState(0),[pt,tt]=C.useState(0),Ae=C.useRef(c.duration||M||Ro),jn=C.useRef(null),ve=C.useRef(null),Hb=w===0,Vb=w+1<=m,xe=c.type,Ot=c.dismissible!==!1,Ub=c.className||"",Rb=c.descriptionClassName||"",qn=C.useMemo(()=>b.findIndex(te=>te.toastId===c.id)||0,[b,c.id]),Wb=C.useMemo(()=>{var te;return(te=c.closeButton)!=null?te:E},[c.closeButton,E]),Bc=C.useMemo(()=>c.duration||M||Ro,[c.duration,M]),zo=C.useRef(0),zt=C.useRef(0),Fc=C.useRef(0),Dt=C.useRef(null),[jb,qb]=O.split("-"),$c=C.useMemo(()=>b.reduce((te,ue,he)=>he>=qn?te:te+ue.height,0),[b,qn]),Hc=hd(),Gb=c.invert||f,Do=xe==="loading";zt.current=C.useMemo(()=>qn*I+$c,[qn,$c]),C.useEffect(()=>{Ae.current=Bc},[Bc]),C.useEffect(()=>{V(!0)},[]),C.useEffect(()=>{const te=ve.current;if(te){const ue=te.getBoundingClientRect().height;return tt(ue),v(he=>[{toastId:c.id,height:ue,position:c.position},...he]),()=>v(he=>he.filter(Ce=>Ce.toastId!==c.id))}},[v,c.id]),C.useLayoutEffect(()=>{if(!B)return;const te=ve.current,ue=te.style.height;te.style.height="auto";const he=te.getBoundingClientRect().height;te.style.height=ue,tt(he),v(Ce=>Ce.find(fe=>fe.toastId===c.id)?Ce.map(fe=>fe.toastId===c.id?{...fe,height:he}:fe):[{toastId:c.id,height:he,position:c.position},...Ce])},[B,c.title,c.description,v,c.id,c.jsx,c.action,c.cancel]);const nt=C.useCallback(()=>{X(!0),de(zt.current),v(te=>te.filter(ue=>ue.toastId!==c.id)),setTimeout(()=>{k(c)},Td)},[c,k,v,zt]);C.useEffect(()=>{if(c.promise&&xe==="loading"||c.duration===1/0||c.type==="loading")return;let te;return x||g||Hc?(()=>{if(Fc.current<zo.current){const Ce=new Date().getTime()-zo.current;Ae.current=Ae.current-Ce}Fc.current=new Date().getTime()})():(()=>{Ae.current!==1/0&&(zo.current=new Date().getTime(),te=setTimeout(()=>{c.onAutoClose==null||c.onAutoClose.call(c,c),nt()},Ae.current))})(),()=>clearTimeout(te)},[x,g,c,xe,Hc,nt]),C.useEffect(()=>{c.delete&&(nt(),c.onDismiss==null||c.onDismiss.call(c,c))},[nt,c.delete]);function Yb(){var te;if($!=null&&$.loading){var ue;return C.createElement("div",{className:Le(D==null?void 0:D.loader,c==null||(ue=c.classNames)==null?void 0:ue.loader,"sonner-loader"),"data-visible":xe==="loading"},$.loading)}return C.createElement(ld,{className:Le(D==null?void 0:D.loader,c==null||(te=c.classNames)==null?void 0:te.loader),visible:xe==="loading"})}const Kb=c.icon||($==null?void 0:$[xe])||sd(xe);var Vc,Uc;return C.createElement("li",{tabIndex:0,ref:ve,className:Le(z,Ub,D==null?void 0:D.toast,c==null||(t=c.classNames)==null?void 0:t.toast,D==null?void 0:D.default,D==null?void 0:D[xe],c==null||(n=c.classNames)==null?void 0:n[xe]),"data-sonner-toast":"","data-rich-colors":(Vc=c.richColors)!=null?Vc:P,"data-styled":!(c.jsx||c.unstyled||p),"data-mounted":B,"data-promise":!!c.promise,"data-swiped":ae,"data-removed":U,"data-visible":Vb,"data-y-position":jb,"data-x-position":qb,"data-index":w,"data-front":Hb,"data-swiping":R,"data-dismissible":Ot,"data-type":xe,"data-invert":Gb,"data-swipe-out":Z,"data-swipe-direction":F,"data-expanded":!!(x||j&&B),"data-testid":c.testId,style:{"--index":w,"--toasts-before":w,"--z-index":y.length-w,"--offset":`${U?ce:zt.current}px`,"--initial-height":j?"auto":`${pt}px`,...N,...c.style},onDragEnd:()=>{W(!1),T(null),Dt.current=null},onPointerDown:te=>{te.button!==2&&(Do||!Ot||(jn.current=new Date,de(zt.current),te.target.setPointerCapture(te.pointerId),te.target.tagName!=="BUTTON"&&(W(!0),Dt.current={x:te.clientX,y:te.clientY})))},onPointerUp:()=>{var te,ue,he;if(Z||!Ot)return;Dt.current=null;const Ce=Number(((te=ve.current)==null?void 0:te.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Gn=Number(((ue=ve.current)==null?void 0:ue.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),fe=new Date().getTime()-((he=jn.current)==null?void 0:he.getTime()),Se=L==="x"?Ce:Gn,Yn=Math.abs(Se)/fe;if(Math.abs(Se)>=Nd||Yn>.11){de(zt.current),c.onDismiss==null||c.onDismiss.call(c,c),H(L==="x"?Ce>0?"right":"left":Gn>0?"down":"up"),nt(),ee(!0);return}else{var Pe,Ie;(Pe=ve.current)==null||Pe.style.setProperty("--swipe-amount-x","0px"),(Ie=ve.current)==null||Ie.style.setProperty("--swipe-amount-y","0px")}ne(!1),W(!1),T(null)},onPointerMove:te=>{var ue,he,Ce;if(!Dt.current||!Ot||((ue=window.getSelection())==null?void 0:ue.toString().length)>0)return;const fe=te.clientY-Dt.current.y,Se=te.clientX-Dt.current.x;var Yn;const Pe=(Yn=e.swipeDirections)!=null?Yn:_d(O);!L&&(Math.abs(Se)>1||Math.abs(fe)>1)&&T(Math.abs(Se)>Math.abs(fe)?"x":"y");let Ie={x:0,y:0};const Rc=ht=>1/(1.5+Math.abs(ht)/20);if(L==="y"){if(Pe.includes("top")||Pe.includes("bottom"))if(Pe.includes("top")&&fe<0||Pe.includes("bottom")&&fe>0)Ie.y=fe;else{const ht=fe*Rc(fe);Ie.y=Math.abs(ht)<Math.abs(fe)?ht:fe}}else if(L==="x"&&(Pe.includes("left")||Pe.includes("right")))if(Pe.includes("left")&&Se<0||Pe.includes("right")&&Se>0)Ie.x=Se;else{const ht=Se*Rc(Se);Ie.x=Math.abs(ht)<Math.abs(Se)?ht:Se}(Math.abs(Ie.x)>0||Math.abs(Ie.y)>0)&&ne(!0),(he=ve.current)==null||he.style.setProperty("--swipe-amount-x",`${Ie.x}px`),(Ce=ve.current)==null||Ce.style.setProperty("--swipe-amount-y",`${Ie.y}px`)}},Wb&&!c.jsx&&xe!=="loading"?C.createElement("button",{"aria-label":q,"data-disabled":Do,"data-close-button":!0,onClick:Do||!Ot?()=>{}:()=>{nt(),c.onDismiss==null||c.onDismiss.call(c,c)},className:Le(D==null?void 0:D.closeButton,c==null||(r=c.classNames)==null?void 0:r.closeButton)},(Uc=$==null?void 0:$.close)!=null?Uc:pd):null,(xe||c.icon||c.promise)&&c.icon!==null&&(($==null?void 0:$[xe])!==null||c.icon)?C.createElement("div",{"data-icon":"",className:Le(D==null?void 0:D.icon,c==null||(o=c.classNames)==null?void 0:o.icon)},c.promise||c.type==="loading"&&!c.icon?c.icon||Yb():null,c.type!=="loading"?Kb:null):null,C.createElement("div",{"data-content":"",className:Le(D==null?void 0:D.content,c==null||(a=c.classNames)==null?void 0:a.content)},C.createElement("div",{"data-title":"",className:Le(D==null?void 0:D.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?C.createElement("div",{"data-description":"",className:Le(_,Rb,D==null?void 0:D.description,c==null||(i=c.classNames)==null?void 0:i.description)},typeof c.description=="function"?c.description():c.description):null),C.isValidElement(c.cancel)?c.cancel:c.cancel&&Qt(c.cancel)?C.createElement("button",{"data-button":!0,"data-cancel":!0,style:c.cancelButtonStyle||S,onClick:te=>{Qt(c.cancel)&&Ot&&(c.cancel.onClick==null||c.cancel.onClick.call(c.cancel,te),nt())},className:Le(D==null?void 0:D.cancelButton,c==null||(l=c.classNames)==null?void 0:l.cancelButton)},c.cancel.label):null,C.isValidElement(c.action)?c.action:c.action&&Qt(c.action)?C.createElement("button",{"data-button":!0,"data-action":!0,style:c.actionButtonStyle||A,onClick:te=>{Qt(c.action)&&(c.action.onClick==null||c.action.onClick.call(c.action,te),!te.defaultPrevented&&nt())},className:Le(D==null?void 0:D.actionButton,c==null||(d=c.classNames)==null?void 0:d.actionButton)},c.action.label):null)};function Wo(){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 Pd(e,t){const n={};return[e,t].forEach((r,o)=>{const a=o===1,s=a?"--mobile-offset":"--offset",i=a?kd:Cd;function l(d){["top","right","bottom","left"].forEach(f=>{n[`${s}-${f}`]=typeof d=="number"?`${d}px`:d})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(d=>{r[d]===void 0?n[`${s}-${d}`]=i:n[`${s}-${d}`]=typeof r[d]=="number"?`${r[d]}px`:r[d]}):l(i)}),n}const Id=C.forwardRef(function(t,n){const{id:r,invert:o,position:a="bottom-right",hotkey:s=["altKey","KeyT"],expand:i,closeButton:l,className:d,offset:f,mobileOffset:c,theme:p="light",richColors:g,duration:v,style:m,visibleToasts:b=xd,toastOptions:w,dir:y=Wo(),gap:x=Ed,icons:k,containerAriaLabel:P="Notifications"}=t,[E,N]=C.useState([]),S=C.useMemo(()=>r?E.filter(B=>B.toasterId===r):E.filter(B=>!B.toasterId),[E,r]),A=C.useMemo(()=>Array.from(new Set([a].concat(S.filter(B=>B.position).map(B=>B.position)))),[S,a]),[z,_]=C.useState([]),[M,O]=C.useState(!1),[I,j]=C.useState(!1),[D,$]=C.useState(p!=="system"?p:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),q=C.useRef(null),L=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),T=C.useRef(null),F=C.useRef(!1),H=C.useCallback(B=>{N(V=>{var U;return(U=V.find(X=>X.id===B.id))!=null&&U.delete||ge.dismiss(B.id),V.filter(({id:X})=>X!==B.id)})},[]);return C.useEffect(()=>ge.subscribe(B=>{if(B.dismiss){requestAnimationFrame(()=>{N(V=>V.map(U=>U.id===B.id?{...U,delete:!0}:U))});return}setTimeout(()=>{Kn.flushSync(()=>{N(V=>{const U=V.findIndex(X=>X.id===B.id);return U!==-1?[...V.slice(0,U),{...V[U],...B},...V.slice(U+1)]:[B,...V]})})})}),[E]),C.useEffect(()=>{if(p!=="system"){$(p);return}if(p==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?$("dark"):$("light")),typeof window>"u")return;const B=window.matchMedia("(prefers-color-scheme: dark)");try{B.addEventListener("change",({matches:V})=>{$(V?"dark":"light")})}catch{B.addListener(({matches:U})=>{try{$(U?"dark":"light")}catch(X){console.error(X)}})}},[p]),C.useEffect(()=>{E.length<=1&&O(!1)},[E]),C.useEffect(()=>{const B=V=>{var U;if(s.every(W=>V[W]||V.code===W)){var R;O(!0),(R=q.current)==null||R.focus()}V.code==="Escape"&&(document.activeElement===q.current||(U=q.current)!=null&&U.contains(document.activeElement))&&O(!1)};return document.addEventListener("keydown",B),()=>document.removeEventListener("keydown",B)},[s]),C.useEffect(()=>{if(q.current)return()=>{T.current&&(T.current.focus({preventScroll:!0}),T.current=null,F.current=!1)}},[q.current]),C.createElement("section",{ref:n,"aria-label":`${P} ${L}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},A.map((B,V)=>{var U;const[X,R]=B.split("-");return S.length?C.createElement("ol",{key:B,dir:y==="auto"?Wo():y,tabIndex:-1,ref:q,className:d,"data-sonner-toaster":!0,"data-sonner-theme":D,"data-y-position":X,"data-x-position":R,style:{"--front-toast-height":`${((U=z[0])==null?void 0:U.height)||0}px`,"--width":`${Sd}px`,"--gap":`${x}px`,...m,...Pd(f,c)},onBlur:W=>{F.current&&!W.currentTarget.contains(W.relatedTarget)&&(F.current=!1,T.current&&(T.current.focus({preventScroll:!0}),T.current=null))},onFocus:W=>{W.target instanceof HTMLElement&&W.target.dataset.dismissible==="false"||F.current||(F.current=!0,T.current=W.relatedTarget)},onMouseEnter:()=>O(!0),onMouseMove:()=>O(!0),onMouseLeave:()=>{I||O(!1)},onDragEnd:()=>O(!1),onPointerDown:W=>{W.target instanceof HTMLElement&&W.target.dataset.dismissible==="false"||j(!0)},onPointerUp:()=>j(!1)},S.filter(W=>!W.position&&V===0||W.position===B).map((W,Z)=>{var ee,ae;return C.createElement(Ad,{key:W.id,icons:k,index:Z,toast:W,defaultRichColors:g,duration:(ee=w==null?void 0:w.duration)!=null?ee:v,className:w==null?void 0:w.className,descriptionClassName:w==null?void 0:w.descriptionClassName,invert:o,visibleToasts:b,closeButton:(ae=w==null?void 0:w.closeButton)!=null?ae:l,interacting:I,position:B,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:H,toasts:S.filter(ne=>ne.position==W.position),heights:z.filter(ne=>ne.position==W.position),setHeights:_,expandByDefault:i,gap:x,expanded:M,swipeDirections:t.swipeDirections})})):null}))}),Md=e=>e.startsWith("http")&&!e.endsWith(".js"),jo=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}},Ld=e=>{const t=e.replace(/-/g,"+").replace(/_/g,"/"),n=t+"=".repeat((4-t.length%4)%4);return atob(n)},Od=(e,t)=>{const n=e.indexOf(":");if(n===-1)return;const r=e.slice(0,n),o=e.slice(n+1);if(!(!r||!o)){if(!o.startsWith("http")){try{const a=JSON.parse(Ld(o));if(a.url&&jo(a.url))return{extensionId:r,bundleUrl:a.url,mode:t,token:a.token}}catch{}return}if(jo(o))return{extensionId:r,bundleUrl:o,mode:t}}},qo=(e,t,n)=>{const r=e.getAll(t);if(r.length===0)return[];const o=[];for(const a of r){const s=a.split(",");for(const i of s){const l=Od(i,n);l&&o.push(l)}}return o},Go=e=>{const t=new URLSearchParams(e);try{const n=qo(t,"_stackable_dev","dev"),r=qo(t,"_stackable_staging","staging"),o=new Map;for(const a of n)o.set(a.extensionId,a);for(const a of r)o.set(a.extensionId,a);return Array.from(o.values())}catch{return[]}},zd=async(e,t)=>t.length===0?e:Promise.all(e.map(async n=>{const r=t.find(o=>o.extensionId===n.id);if(!r)return n;console.log(`[Stackable] Dev override active for ${n.id} → ${r.bundleUrl}`);try{const o=await fetch(`${r.bundleUrl}/manifest.json`);if(o.ok){const a=await o.json();return console.log(`[Stackable] Dev manifest loaded for ${n.id}`,a.permissions),{...n,bundleUrl:r.bundleUrl,manifest:a}}}catch{console.warn(`[Stackable] Could not fetch dev manifest for ${n.id}, using registry manifest`)}return{...n,bundleUrl:r.bundleUrl}}));/**
|
|
12
|
+
</html>`;r.srcdoc=d,console.warn(`[SandboxManager] Creating srcdoc sandbox for ${e.id}, srcdoc starts with: ${d.substring(0,300)}`)}t.appendChild(r);const s={manifest:e.manifest,extensionId:e.id,iframe:r,ready:!1,expectedOrigin:a,messageHandlers:new Set},i=l=>{if(l.origin!==s.expectedOrigin)return;const d=l.data;!d||typeof d!="object"||!("type"in d)||("extensionId"in d?d.extensionId:void 0)!==e.id||(d.type==="extension-ready"&&(s.ready=!0),s.messageHandlers.forEach(c=>c(d)))};return window.addEventListener("message",i),ot.set(e.id,s),s},Me=(e,t)=>{const n=ot.get(e);if(!(n!=null&&n.iframe.contentWindow)){console.warn(`Sandbox not found for extension: ${e}`);return}const r=n.expectedOrigin==="null"?"*":n.expectedOrigin;n.iframe.contentWindow.postMessage(t,r)},vt=e=>ot.get(e),Yc=e=>{const t=ot.get(e);t&&(t.iframe.remove(),t.messageHandlers.clear(),ot.delete(e))},bt=()=>ot,Xn=e=>e,Kc={SUPER_ADMIN:"super_admin"};new Set(Object.values(Kc));const $o={"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"],childOnly:!0},"ui-card-header":{description:"Header area within a Card",icon:"square",category:"layout",attributes:["className"],childOnly:!0},"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"],selfClosing:!0},"ui-textarea":{description:"Multi-line text input field",icon:"text",category:"input",attributes:["placeholder","value","onChange","disabled","rows","className","id"],selfClosing:!0},"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"],childOnly:!0},"ui-checkbox":{description:"Checkbox toggle for boolean values",icon:"square-check",category:"input",attributes:["checked","onChange","disabled","className","id"],selfClosing:!0},"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"]},selfClosing:!0},"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"],childOnly:!0},"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"],selfClosing:!0},"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"],childOnly:!0},"ui-tabs-trigger":{description:"Clickable tab label within TabsList",icon:"panel-top",category:"navigation",attributes:["value","className"],childOnly:!0},"ui-tabs-content":{description:"Content panel shown when its tab is active",icon:"panel-top",category:"navigation",attributes:["value","className"],childOnly:!0},"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"],selfClosing:!0},"ui-icon":{description:"Icon from the allowed icon set",icon:"sparkles",category:"composite",attributes:["name","size","className"],attributeValues:{size:["sm","md","lg"]},selfClosing:!0},"ui-qr-code":{description:"QR code rendered from a string payload",icon:"qr-code",category:"composite",attributes:["value","size","variant","level","alt","className"],attributeValues:{size:["md","sm","lg"],variant:["default","inverted"],level:["medium","low","quartile","high"]},selfClosing:!0},"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"],childOnly:!0},"ui-skeleton":{description:"Loading placeholder with shimmer effect",icon:"loader",category:"feedback",attributes:["width","height","className"],selfClosing:!0},"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"],selfClosing:!0},"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"],childOnly:!0},"ui-collapsible-content":{description:"Content revealed when Collapsible is open",icon:"chevrons-down-up",category:"composite",attributes:["className"],childOnly:!0}},We=$o,at=Object.keys($o),Xc=Object.fromEntries(at.map(e=>[e,We[e].attributes]));Object.fromEntries(at.filter(e=>We[e].attributeValues).map(e=>[e,We[e].attributeValues]));const Ho=Object.fromEntries(at.filter(e=>We[e].children).map(e=>[e,We[e].children]));({...Ho},new Set(at.filter(e=>We[e].selfClosing===!0))),new Set(at.filter(e=>We[e].childOnly===!0)),Object.fromEntries(at.map(e=>[e,We[e].category]));const wt={NEW_CONVERSATION:"newConversation",SET_CONVERSATION_TAGS:"setConversationTags",SET_CONVERSATION_FIELDS:"setConversationFields"},Zc=["identity","messaging","settings"],Jc={"context.read":"context:read","data.query":"data:query","data.fetch":"data:fetch","actions.toast":"actions:toast","actions.invoke":"actions:invoke","extend.identity":"extend:identity"},Qc=e=>{const t=async n=>{const r=n.data;if((r==null?void 0:r.type)!=="capability-request")return;const o=r;console.warn("[CapabilityRPC] raw message data:",JSON.stringify(n.data));const a=o.extensionId;if(!a||!vt(a)){const l=[...bt().keys()];console.warn(`Received capability request from unknown source (extensionId: "${a??"undefined"}", registered: [${l.join(", ")}], capability: ${o.capability})`);return}const s=vt(a);if(!s)return;const i=Jc[o.capability];if(i&&!s.manifest.permissions.includes(i)){const l={type:"capability-response",id:o.id,success:!1,error:`Permission denied: '${i}' not granted for extension '${a}'`};Me(a,l);return}try{let l;switch(o.capability){case"data.query":l=await e["data.query"](o.payload);break;case"data.fetch":l=await e["data.fetch"](a,o.payload);break;case"actions.toast":l=await e["actions.toast"](a,o.payload);break;case"actions.invoke":l=await e["actions.invoke"](o.payload);break;case"context.read":l=await e["context.read"](a);break;case"extend.identity":l=e["extend.identity"]?await e["extend.identity"](a,o.payload):null;break;default:throw new Error(`Unknown capability: ${o.capability}`)}const d={type:"capability-response",id:o.id,success:!0,data:l};Me(a,d)}catch(l){const d={type:"capability-response",id:o.id,success:!1,error:l instanceof Error?l.message:"Unknown error"};Me(a,d)}};return window.addEventListener("message",t),()=>{window.removeEventListener("message",t)}},Vo=C.createContext({extensions:[],components:{},ready:!1}),ed=({extensions:e,capabilityHandlers:t,components:n={},children:r})=>{const[o,a]=C.useState(!1),s=C.useRef(null),i=C.useRef(null),l=C.useRef(t);return l.current=t,C.useEffect(()=>{if(!s.current)return;let d=!1;return(async()=>{const c=s.current;if(!c)return;console.log("[ExtensionProvider] Initializing with",e.length,"extensions");const h=new Proxy({},{get:(g,v)=>l.current[v]});i.current=Qc(h);for(const g of e)g.enabled&&!d&&(console.log("[ExtensionProvider] Creating sandbox for",g.id,"bundleUrl:",g.bundleUrl),await Gc(g,c),console.log("[ExtensionProvider] Sandbox created for",g.id));d||(console.log("[ExtensionProvider] Ready"),a(!0))})(),()=>{var c;d=!0;for(const h of e)Yc(h.id);(c=i.current)==null||c.call(i)}},[e]),u.jsxs(Vo.Provider,{value:{extensions:e,components:n,ready:o},children:[u.jsx("div",{ref:s,style:{display:"none"}}),r]})},Uo=()=>C.useContext(Vo),td=e=>at.includes(e),nd=(e,t={})=>{const{surfaceId:n,logPrefix:r="[NodeRenderer]"}=t,o=(a,s,i=0)=>{var g,v,m;if(a.type==="text")return a.text||null;if(!a.tag)return null;if(a.tag==="__fragment")return u.jsx(C.Fragment,{children:(g=a.children)==null?void 0:g.map((b,w)=>o(b,s,w))},i);if(!td(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):u.jsx(C.Fragment,{children:(v=a.children)==null?void 0:v.map((b,w)=>o(b,s,w))},i);const{filtered:d,stripped:f}=rd(a.tag,a.attrs);f.length>0&&console.warn(`${r} Attributes not allowed on <${a.tag}>, stripped: ${f.join(", ")}`);const c=od(a.tag,a.children);if(c.length>0&&console.warn(`${r} Invalid children in <${a.tag}>: ${c.join(", ")}`),a.actionId){const b=a.actionId;d.onClick=()=>{const w=s;w==null||w.postMessage({type:"action-invoke",surfaceId:n,actionId:b},"*")}}if(d["data-onchange-id"]){const b=d["data-onchange-id"];delete d["data-onchange-id"],d.onChange=w=>{const y=s;y==null||y.postMessage({type:"action-invoke",surfaceId:n,actionId:b,value:w.target.value},"*")}}const h=(m=a.children)==null?void 0:m.map((b,w)=>o(b,s,w));return C.createElement(l,{...d,key:i},h&&h.length>0?h:void 0)};return o},rd=(e,t)=>{const n={},r=[];if(!t)return{filtered:n,stripped:r};const o=Xc[e];for(const[a,s]of Object.entries(t)){if(a==="data-onchange-id"){n[a]=s;continue}o!=null&&o.includes(a)?n[a]=s:r.push(a)}return{filtered:n,stripped:r}},od=(e,t)=>{const n=Ho[e];if(!n||!t)return[];const r=[];for(const o of t)o.type!=="text"&&(!o.tag||o.tag==="__fragment"||n.includes(o.tag)||r.push(o.tag));return r},ad=e=>{const t={...e};for(const n of Zc)delete t[n];return t},Jt=({target:e,context:t,className:n,separator:r,fallback:o=null,render:a})=>{const{extensions:s,components:i,ready:l}=Uo(),[d,f]=C.useState({}),c=C.useRef(""),h=C.useMemo(()=>s.filter(b=>b.enabled&&b.manifest.targets.includes(e)),[s.map(b=>b.id).join(","),e]),g=C.useMemo(()=>nd(i,{surfaceId:e,logPrefix:"[ExtensionSlot]"}),[e,i]);if(C.useEffect(()=>{const b=h.map(y=>y.id).join(",");if(c.current!==b&&(c.current=b,f({})),!l||h.length===0)return;const w=y=>{const x=y.data;if(!(!x||typeof x!="object"||!h.some(P=>{const E=vt(P.id);return E&&y.source===E.iframe.contentWindow}))){if(x.type==="surface-update"&&x.surfaceId===e){const P=h.find(N=>{const S=vt(N.id);return S&&y.source===S.iframe.contentWindow});if(!P)return;const E=g(x.tree,y.source??null);f(N=>({...N,[P.id]:E}))}if(x.type==="surface-ready"&&x.surfaceId===e&&t){const P=ad(t);h.forEach(E=>{var S;const N=vt(E.id);(S=N==null?void 0:N.iframe.contentWindow)==null||S.postMessage({type:"context-update",surfaceId:e,context:P},"*")})}}};return window.addEventListener("message",w),h.forEach(y=>{var k;const x=vt(y.id);(k=x==null?void 0:x.iframe.contentWindow)==null||k.postMessage({type:"surface-render",surfaceId:e,context:t},"*")}),()=>{window.removeEventListener("message",w)}},[l,h,e,t,g]),!l)return null;if(h.length===0)return o?u.jsx("div",{"data-extension-slot":e,title:e,className:n,children:o}):null;const v=h.map(b=>({id:b.id,children:d[b.id]})).filter(b=>!!b.children),m=v.length>0?v.flatMap((b,w,y)=>{const x=a?a({extensionId:b.id,children:b.children,index:w,total:y.length}):u.jsx(C.Fragment,{children:b.children},b.id),k=u.jsx(C.Fragment,{children:x},`extension:${b.id}`);if(w===0||!r)return[k];const P=y[w-1],E=typeof r=="function"?r({index:w,total:y.length,previousExtensionId:P.id,extensionId:b.id}):r;return[u.jsx(C.Fragment,{children:E},`separator:${P.id}:${b.id}:${w}`),k]}):o;return u.jsx("div",{"data-extension-slot":e,title:e,className:n,children:m})};function sd(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const id=e=>{switch(e){case"success":return dd;case"info":return fd;case"warning":return ud;case"error":return pd;default:return null}},ld=Array(12).fill(0),cd=({visible:e,className:t})=>C.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},C.createElement("div",{className:"sonner-spinner"},ld.map((n,r)=>C.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),dd=C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},C.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"})),ud=C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},C.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"})),fd=C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},C.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"})),pd=C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},C.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"})),hd=C.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"},C.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),C.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),gd=()=>{const[e,t]=C.useState(document.hidden);return C.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let Zn=1;class md{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...o}=t,a=typeof(t==null?void 0:t.id)=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:Zn++,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,...o,dismissible:i,id:a}),a},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const o=Promise.resolve(t instanceof Function?t():t);let a=r!==void 0,s;const i=o.then(async d=>{if(s=["resolve",d],C.isValidElement(d))a=!1,this.create({id:r,type:"default",message:d});else if(bd(d)&&!d.ok){a=!1;const c=typeof n.error=="function"?await n.error(`HTTP error! status: ${d.status}`):n.error,h=typeof n.description=="function"?await n.description(`HTTP error! status: ${d.status}`):n.description,v=typeof c=="object"&&!C.isValidElement(c)?c:{message:c};this.create({id:r,type:"error",description:h,...v})}else if(d instanceof Error){a=!1;const c=typeof n.error=="function"?await n.error(d):n.error,h=typeof n.description=="function"?await n.description(d):n.description,v=typeof c=="object"&&!C.isValidElement(c)?c:{message:c};this.create({id:r,type:"error",description:h,...v})}else if(n.success!==void 0){a=!1;const c=typeof n.success=="function"?await n.success(d):n.success,h=typeof n.description=="function"?await n.description(d):n.description,v=typeof c=="object"&&!C.isValidElement(c)?c:{message:c};this.create({id:r,type:"success",description:h,...v})}}).catch(async d=>{if(s=["reject",d],n.error!==void 0){a=!1;const f=typeof n.error=="function"?await n.error(d):n.error,c=typeof n.description=="function"?await n.description(d):n.description,g=typeof f=="object"&&!C.isValidElement(f)?f:{message:f};this.create({id:r,type:"error",description:c,...g})}}).finally(()=>{a&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),l=()=>new Promise((d,f)=>i.then(()=>s[0]==="reject"?f(s[1]):d(s[1])).catch(f));return typeof r!="string"&&typeof r!="number"?{unwrap:l}:Object.assign(r,{unwrap:l})},this.custom=(t,n)=>{const r=(n==null?void 0:n.id)||Zn++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const ge=new md,vd=(e,t)=>{const n=(t==null?void 0:t.id)||Zn++;return ge.addToast({title:e,...t,id:n}),n},bd=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",wd=vd,yd=()=>ge.toasts,xd=()=>ge.getActiveToasts(),yt=Object.assign(wd,{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:yd,getToasts:xd});sd("[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 Qt(e){return e.label!==void 0}const Cd=3,kd="24px",Sd="16px",Ro=4e3,Ed=356,Nd=14,Td=45,_d=200;function Le(...e){return e.filter(Boolean).join(" ")}function Ad(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const Pd=e=>{var t,n,r,o,a,s,i,l,d;const{invert:f,toast:c,unstyled:h,interacting:g,setHeights:v,visibleToasts:m,heights:b,index:w,toasts:y,expanded:x,removeToast:k,defaultRichColors:P,closeButton:E,style:N,cancelButtonStyle:S,actionButtonStyle:A,className:z="",descriptionClassName:_="",duration:M,position:O,gap:I,expandByDefault:W,classNames:D,icons:$,closeButtonAriaLabel:q="Close toast"}=e,[L,T]=C.useState(null),[F,H]=C.useState(null),[B,V]=C.useState(!1),[U,X]=C.useState(!1),[R,j]=C.useState(!1),[Z,ee]=C.useState(!1),[ae,ne]=C.useState(!1),[ce,de]=C.useState(0),[gt,nt]=C.useState(0),Ae=C.useRef(c.duration||M||Ro),Wn=C.useRef(null),ve=C.useRef(null),Rb=w===0,jb=w+1<=m,xe=c.type,zt=c.dismissible!==!1,Wb=c.className||"",qb=c.descriptionClassName||"",qn=C.useMemo(()=>b.findIndex(te=>te.toastId===c.id)||0,[b,c.id]),Gb=C.useMemo(()=>{var te;return(te=c.closeButton)!=null?te:E},[c.closeButton,E]),Fc=C.useMemo(()=>c.duration||M||Ro,[c.duration,M]),zo=C.useRef(0),Dt=C.useRef(0),$c=C.useRef(0),Bt=C.useRef(null),[Yb,Kb]=O.split("-"),Hc=C.useMemo(()=>b.reduce((te,ue,he)=>he>=qn?te:te+ue.height,0),[b,qn]),Vc=gd(),Xb=c.invert||f,Do=xe==="loading";Dt.current=C.useMemo(()=>qn*I+Hc,[qn,Hc]),C.useEffect(()=>{Ae.current=Fc},[Fc]),C.useEffect(()=>{V(!0)},[]),C.useEffect(()=>{const te=ve.current;if(te){const ue=te.getBoundingClientRect().height;return nt(ue),v(he=>[{toastId:c.id,height:ue,position:c.position},...he]),()=>v(he=>he.filter(Ce=>Ce.toastId!==c.id))}},[v,c.id]),C.useLayoutEffect(()=>{if(!B)return;const te=ve.current,ue=te.style.height;te.style.height="auto";const he=te.getBoundingClientRect().height;te.style.height=ue,nt(he),v(Ce=>Ce.find(fe=>fe.toastId===c.id)?Ce.map(fe=>fe.toastId===c.id?{...fe,height:he}:fe):[{toastId:c.id,height:he,position:c.position},...Ce])},[B,c.title,c.description,v,c.id,c.jsx,c.action,c.cancel]);const rt=C.useCallback(()=>{X(!0),de(Dt.current),v(te=>te.filter(ue=>ue.toastId!==c.id)),setTimeout(()=>{k(c)},_d)},[c,k,v,Dt]);C.useEffect(()=>{if(c.promise&&xe==="loading"||c.duration===1/0||c.type==="loading")return;let te;return x||g||Vc?(()=>{if($c.current<zo.current){const Ce=new Date().getTime()-zo.current;Ae.current=Ae.current-Ce}$c.current=new Date().getTime()})():(()=>{Ae.current!==1/0&&(zo.current=new Date().getTime(),te=setTimeout(()=>{c.onAutoClose==null||c.onAutoClose.call(c,c),rt()},Ae.current))})(),()=>clearTimeout(te)},[x,g,c,xe,Vc,rt]),C.useEffect(()=>{c.delete&&(rt(),c.onDismiss==null||c.onDismiss.call(c,c))},[rt,c.delete]);function Zb(){var te;if($!=null&&$.loading){var ue;return C.createElement("div",{className:Le(D==null?void 0:D.loader,c==null||(ue=c.classNames)==null?void 0:ue.loader,"sonner-loader"),"data-visible":xe==="loading"},$.loading)}return C.createElement(cd,{className:Le(D==null?void 0:D.loader,c==null||(te=c.classNames)==null?void 0:te.loader),visible:xe==="loading"})}const Jb=c.icon||($==null?void 0:$[xe])||id(xe);var Uc,Rc;return C.createElement("li",{tabIndex:0,ref:ve,className:Le(z,Wb,D==null?void 0:D.toast,c==null||(t=c.classNames)==null?void 0:t.toast,D==null?void 0:D.default,D==null?void 0:D[xe],c==null||(n=c.classNames)==null?void 0:n[xe]),"data-sonner-toast":"","data-rich-colors":(Uc=c.richColors)!=null?Uc:P,"data-styled":!(c.jsx||c.unstyled||h),"data-mounted":B,"data-promise":!!c.promise,"data-swiped":ae,"data-removed":U,"data-visible":jb,"data-y-position":Yb,"data-x-position":Kb,"data-index":w,"data-front":Rb,"data-swiping":R,"data-dismissible":zt,"data-type":xe,"data-invert":Xb,"data-swipe-out":Z,"data-swipe-direction":F,"data-expanded":!!(x||W&&B),"data-testid":c.testId,style:{"--index":w,"--toasts-before":w,"--z-index":y.length-w,"--offset":`${U?ce:Dt.current}px`,"--initial-height":W?"auto":`${gt}px`,...N,...c.style},onDragEnd:()=>{j(!1),T(null),Bt.current=null},onPointerDown:te=>{te.button!==2&&(Do||!zt||(Wn.current=new Date,de(Dt.current),te.target.setPointerCapture(te.pointerId),te.target.tagName!=="BUTTON"&&(j(!0),Bt.current={x:te.clientX,y:te.clientY})))},onPointerUp:()=>{var te,ue,he;if(Z||!zt)return;Bt.current=null;const Ce=Number(((te=ve.current)==null?void 0:te.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Gn=Number(((ue=ve.current)==null?void 0:ue.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),fe=new Date().getTime()-((he=Wn.current)==null?void 0:he.getTime()),Se=L==="x"?Ce:Gn,Yn=Math.abs(Se)/fe;if(Math.abs(Se)>=Td||Yn>.11){de(Dt.current),c.onDismiss==null||c.onDismiss.call(c,c),H(L==="x"?Ce>0?"right":"left":Gn>0?"down":"up"),rt(),ee(!0);return}else{var Pe,Ie;(Pe=ve.current)==null||Pe.style.setProperty("--swipe-amount-x","0px"),(Ie=ve.current)==null||Ie.style.setProperty("--swipe-amount-y","0px")}ne(!1),j(!1),T(null)},onPointerMove:te=>{var ue,he,Ce;if(!Bt.current||!zt||((ue=window.getSelection())==null?void 0:ue.toString().length)>0)return;const fe=te.clientY-Bt.current.y,Se=te.clientX-Bt.current.x;var Yn;const Pe=(Yn=e.swipeDirections)!=null?Yn:Ad(O);!L&&(Math.abs(Se)>1||Math.abs(fe)>1)&&T(Math.abs(Se)>Math.abs(fe)?"x":"y");let Ie={x:0,y:0};const jc=mt=>1/(1.5+Math.abs(mt)/20);if(L==="y"){if(Pe.includes("top")||Pe.includes("bottom"))if(Pe.includes("top")&&fe<0||Pe.includes("bottom")&&fe>0)Ie.y=fe;else{const mt=fe*jc(fe);Ie.y=Math.abs(mt)<Math.abs(fe)?mt:fe}}else if(L==="x"&&(Pe.includes("left")||Pe.includes("right")))if(Pe.includes("left")&&Se<0||Pe.includes("right")&&Se>0)Ie.x=Se;else{const mt=Se*jc(Se);Ie.x=Math.abs(mt)<Math.abs(Se)?mt:Se}(Math.abs(Ie.x)>0||Math.abs(Ie.y)>0)&&ne(!0),(he=ve.current)==null||he.style.setProperty("--swipe-amount-x",`${Ie.x}px`),(Ce=ve.current)==null||Ce.style.setProperty("--swipe-amount-y",`${Ie.y}px`)}},Gb&&!c.jsx&&xe!=="loading"?C.createElement("button",{"aria-label":q,"data-disabled":Do,"data-close-button":!0,onClick:Do||!zt?()=>{}:()=>{rt(),c.onDismiss==null||c.onDismiss.call(c,c)},className:Le(D==null?void 0:D.closeButton,c==null||(r=c.classNames)==null?void 0:r.closeButton)},(Rc=$==null?void 0:$.close)!=null?Rc:hd):null,(xe||c.icon||c.promise)&&c.icon!==null&&(($==null?void 0:$[xe])!==null||c.icon)?C.createElement("div",{"data-icon":"",className:Le(D==null?void 0:D.icon,c==null||(o=c.classNames)==null?void 0:o.icon)},c.promise||c.type==="loading"&&!c.icon?c.icon||Zb():null,c.type!=="loading"?Jb:null):null,C.createElement("div",{"data-content":"",className:Le(D==null?void 0:D.content,c==null||(a=c.classNames)==null?void 0:a.content)},C.createElement("div",{"data-title":"",className:Le(D==null?void 0:D.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?C.createElement("div",{"data-description":"",className:Le(_,qb,D==null?void 0:D.description,c==null||(i=c.classNames)==null?void 0:i.description)},typeof c.description=="function"?c.description():c.description):null),C.isValidElement(c.cancel)?c.cancel:c.cancel&&Qt(c.cancel)?C.createElement("button",{"data-button":!0,"data-cancel":!0,style:c.cancelButtonStyle||S,onClick:te=>{Qt(c.cancel)&&zt&&(c.cancel.onClick==null||c.cancel.onClick.call(c.cancel,te),rt())},className:Le(D==null?void 0:D.cancelButton,c==null||(l=c.classNames)==null?void 0:l.cancelButton)},c.cancel.label):null,C.isValidElement(c.action)?c.action:c.action&&Qt(c.action)?C.createElement("button",{"data-button":!0,"data-action":!0,style:c.actionButtonStyle||A,onClick:te=>{Qt(c.action)&&(c.action.onClick==null||c.action.onClick.call(c.action,te),!te.defaultPrevented&&rt())},className:Le(D==null?void 0:D.actionButton,c==null||(d=c.classNames)==null?void 0:d.actionButton)},c.action.label):null)};function jo(){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 Id(e,t){const n={};return[e,t].forEach((r,o)=>{const a=o===1,s=a?"--mobile-offset":"--offset",i=a?Sd:kd;function l(d){["top","right","bottom","left"].forEach(f=>{n[`${s}-${f}`]=typeof d=="number"?`${d}px`:d})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(d=>{r[d]===void 0?n[`${s}-${d}`]=i:n[`${s}-${d}`]=typeof r[d]=="number"?`${r[d]}px`:r[d]}):l(i)}),n}const Md=C.forwardRef(function(t,n){const{id:r,invert:o,position:a="bottom-right",hotkey:s=["altKey","KeyT"],expand:i,closeButton:l,className:d,offset:f,mobileOffset:c,theme:h="light",richColors:g,duration:v,style:m,visibleToasts:b=Cd,toastOptions:w,dir:y=jo(),gap:x=Nd,icons:k,containerAriaLabel:P="Notifications"}=t,[E,N]=C.useState([]),S=C.useMemo(()=>r?E.filter(B=>B.toasterId===r):E.filter(B=>!B.toasterId),[E,r]),A=C.useMemo(()=>Array.from(new Set([a].concat(S.filter(B=>B.position).map(B=>B.position)))),[S,a]),[z,_]=C.useState([]),[M,O]=C.useState(!1),[I,W]=C.useState(!1),[D,$]=C.useState(h!=="system"?h:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),q=C.useRef(null),L=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),T=C.useRef(null),F=C.useRef(!1),H=C.useCallback(B=>{N(V=>{var U;return(U=V.find(X=>X.id===B.id))!=null&&U.delete||ge.dismiss(B.id),V.filter(({id:X})=>X!==B.id)})},[]);return C.useEffect(()=>ge.subscribe(B=>{if(B.dismiss){requestAnimationFrame(()=>{N(V=>V.map(U=>U.id===B.id?{...U,delete:!0}:U))});return}setTimeout(()=>{Kn.flushSync(()=>{N(V=>{const U=V.findIndex(X=>X.id===B.id);return U!==-1?[...V.slice(0,U),{...V[U],...B},...V.slice(U+1)]:[B,...V]})})})}),[E]),C.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 B=window.matchMedia("(prefers-color-scheme: dark)");try{B.addEventListener("change",({matches:V})=>{$(V?"dark":"light")})}catch{B.addListener(({matches:U})=>{try{$(U?"dark":"light")}catch(X){console.error(X)}})}},[h]),C.useEffect(()=>{E.length<=1&&O(!1)},[E]),C.useEffect(()=>{const B=V=>{var U;if(s.every(j=>V[j]||V.code===j)){var R;O(!0),(R=q.current)==null||R.focus()}V.code==="Escape"&&(document.activeElement===q.current||(U=q.current)!=null&&U.contains(document.activeElement))&&O(!1)};return document.addEventListener("keydown",B),()=>document.removeEventListener("keydown",B)},[s]),C.useEffect(()=>{if(q.current)return()=>{T.current&&(T.current.focus({preventScroll:!0}),T.current=null,F.current=!1)}},[q.current]),C.createElement("section",{ref:n,"aria-label":`${P} ${L}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},A.map((B,V)=>{var U;const[X,R]=B.split("-");return S.length?C.createElement("ol",{key:B,dir:y==="auto"?jo():y,tabIndex:-1,ref:q,className:d,"data-sonner-toaster":!0,"data-sonner-theme":D,"data-y-position":X,"data-x-position":R,style:{"--front-toast-height":`${((U=z[0])==null?void 0:U.height)||0}px`,"--width":`${Ed}px`,"--gap":`${x}px`,...m,...Id(f,c)},onBlur:j=>{F.current&&!j.currentTarget.contains(j.relatedTarget)&&(F.current=!1,T.current&&(T.current.focus({preventScroll:!0}),T.current=null))},onFocus:j=>{j.target instanceof HTMLElement&&j.target.dataset.dismissible==="false"||F.current||(F.current=!0,T.current=j.relatedTarget)},onMouseEnter:()=>O(!0),onMouseMove:()=>O(!0),onMouseLeave:()=>{I||O(!1)},onDragEnd:()=>O(!1),onPointerDown:j=>{j.target instanceof HTMLElement&&j.target.dataset.dismissible==="false"||W(!0)},onPointerUp:()=>W(!1)},S.filter(j=>!j.position&&V===0||j.position===B).map((j,Z)=>{var ee,ae;return C.createElement(Pd,{key:j.id,icons:k,index:Z,toast:j,defaultRichColors:g,duration:(ee=w==null?void 0:w.duration)!=null?ee:v,className:w==null?void 0:w.className,descriptionClassName:w==null?void 0:w.descriptionClassName,invert:o,visibleToasts:b,closeButton:(ae=w==null?void 0:w.closeButton)!=null?ae:l,interacting:I,position:B,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:H,toasts:S.filter(ne=>ne.position==j.position),heights:z.filter(ne=>ne.position==j.position),setHeights:_,expandByDefault:i,gap:x,expanded:M,swipeDirections:t.swipeDirections})})):null}))}),Ld=e=>e.startsWith("http")&&!e.endsWith(".js"),Wo=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}},Od=e=>{const t=e.replace(/-/g,"+").replace(/_/g,"/"),n=t+"=".repeat((4-t.length%4)%4);return atob(n)},zd=(e,t)=>{const n=e.indexOf(":");if(n===-1)return;const r=e.slice(0,n),o=e.slice(n+1);if(!(!r||!o)){if(!o.startsWith("http")){try{const a=JSON.parse(Od(o));if(a.url&&Wo(a.url))return{extensionId:r,bundleUrl:a.url,mode:t,token:a.token}}catch{}return}if(Wo(o))return{extensionId:r,bundleUrl:o,mode:t}}},qo=(e,t,n)=>{const r=e.getAll(t);if(r.length===0)return[];const o=[];for(const a of r){const s=a.split(",");for(const i of s){const l=zd(i,n);l&&o.push(l)}}return o},Go=e=>{const t=new URLSearchParams(e);try{const n=qo(t,"_stackable_dev","dev"),r=qo(t,"_stackable_staging","staging"),o=new Map;for(const a of n)o.set(a.extensionId,a);for(const a of r)o.set(a.extensionId,a);return Array.from(o.values())}catch{return[]}},Dd=async(e,t)=>t.length===0?e:Promise.all(e.map(async n=>{const r=t.find(o=>o.extensionId===n.id);if(!r)return n;console.log(`[Stackable] Dev override active for ${n.id} → ${r.bundleUrl}`);try{const o=await fetch(`${r.bundleUrl}/manifest.json`);if(o.ok){const a=await o.json();return console.log(`[Stackable] Dev manifest loaded for ${n.id}`,a.permissions),{...n,bundleUrl:r.bundleUrl,manifest:a}}}catch{console.warn(`[Stackable] Could not fetch dev manifest for ${n.id}, using registry manifest`)}return{...n,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.
|
|
@@ -19,232 +19,237 @@
|
|
|
19
19
|
*
|
|
20
20
|
* This source code is licensed under the ISC license.
|
|
21
21
|
* See the LICENSE file in the root directory of this source tree.
|
|
22
|
-
*/const
|
|
22
|
+
*/const Bd=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
23
23
|
* @license lucide-react v0.577.0 - ISC
|
|
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
|
|
27
|
+
*/const Fd=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.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 Ko=e=>{const t=
|
|
32
|
+
*/const Ko=e=>{const t=Fd(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.
|
|
36
36
|
* See the LICENSE file in the root directory of this source tree.
|
|
37
|
-
*/var
|
|
37
|
+
*/var $d={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
38
38
|
* @license lucide-react v0.577.0 - ISC
|
|
39
39
|
*
|
|
40
40
|
* This source code is licensed under the ISC license.
|
|
41
41
|
* See the LICENSE file in the root directory of this source tree.
|
|
42
|
-
*/const
|
|
42
|
+
*/const Hd=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};/**
|
|
43
43
|
* @license lucide-react v0.577.0 - ISC
|
|
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
|
|
47
|
+
*/const Vd=C.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:a,iconNode:s,...i},l)=>C.createElement("svg",{ref:l,...$d,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Yo("lucide",o),...!a&&!Hd(i)&&{"aria-hidden":"true"},...i},[...s.map(([d,f])=>C.createElement(d,f)),...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
|
|
52
|
+
*/const re=(e,t)=>{const n=C.forwardRef(({className:r,...o},a)=>C.createElement(Vd,{ref:a,iconNode:t,className:Yo(`lucide-${Bd(Ko(e))}`,`lucide-${e}`,r),...o}));return n.displayName=Ko(e),n};/**
|
|
53
53
|
* @license lucide-react v0.577.0 - ISC
|
|
54
54
|
*
|
|
55
55
|
* This source code is licensed under the ISC license.
|
|
56
56
|
* See the LICENSE file in the root directory of this source tree.
|
|
57
|
-
*/const
|
|
57
|
+
*/const Ud=re("airplay",[["path",{d:"M5 17H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-1",key:"ns4c3b"}],["path",{d:"m12 15 5 6H7Z",key:"14qnn2"}]]);/**
|
|
58
58
|
* @license lucide-react v0.577.0 - ISC
|
|
59
59
|
*
|
|
60
60
|
* This source code is licensed under the ISC license.
|
|
61
61
|
* See the LICENSE file in the root directory of this source tree.
|
|
62
|
-
*/const
|
|
62
|
+
*/const Rd=re("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
|
|
63
63
|
* @license lucide-react v0.577.0 - ISC
|
|
64
64
|
*
|
|
65
65
|
* This source code is licensed under the ISC license.
|
|
66
66
|
* See the LICENSE file in the root directory of this source tree.
|
|
67
|
-
*/const
|
|
67
|
+
*/const jd=re("book-open",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/**
|
|
68
68
|
* @license lucide-react v0.577.0 - ISC
|
|
69
69
|
*
|
|
70
70
|
* This source code is licensed under the ISC license.
|
|
71
71
|
* See the LICENSE file in the root directory of this source tree.
|
|
72
|
-
*/const Wd=
|
|
72
|
+
*/const Wd=re("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
|
|
73
73
|
* @license lucide-react v0.577.0 - ISC
|
|
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 qd=re("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
|
|
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 Xo=
|
|
82
|
+
*/const Xo=re("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
83
83
|
* @license lucide-react v0.577.0 - ISC
|
|
84
84
|
*
|
|
85
85
|
* This source code is licensed under the ISC license.
|
|
86
86
|
* See the LICENSE file in the root directory of this source tree.
|
|
87
|
-
*/const Zo=
|
|
87
|
+
*/const Zo=re("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
88
88
|
* @license lucide-react v0.577.0 - ISC
|
|
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 Gd=re("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
|
|
93
93
|
* @license lucide-react v0.577.0 - ISC
|
|
94
94
|
*
|
|
95
95
|
* This source code is licensed under the ISC license.
|
|
96
96
|
* See the LICENSE file in the root directory of this source tree.
|
|
97
|
-
*/const Jn=
|
|
97
|
+
*/const Jn=re("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
98
98
|
* @license lucide-react v0.577.0 - ISC
|
|
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 Yd=re("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
|
|
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 Jo=
|
|
107
|
+
*/const Jo=re("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"}]]);/**
|
|
108
108
|
* @license lucide-react v0.577.0 - ISC
|
|
109
109
|
*
|
|
110
110
|
* This source code is licensed under the ISC license.
|
|
111
111
|
* See the LICENSE file in the root directory of this source tree.
|
|
112
|
-
*/const Qo=
|
|
112
|
+
*/const Qo=re("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
113
113
|
* @license lucide-react v0.577.0 - ISC
|
|
114
114
|
*
|
|
115
115
|
* This source code is licensed under the ISC license.
|
|
116
116
|
* See the LICENSE file in the root directory of this source tree.
|
|
117
|
-
*/const ea=
|
|
117
|
+
*/const ea=re("circle-question-mark",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
|
118
118
|
* @license lucide-react v0.577.0 - ISC
|
|
119
119
|
*
|
|
120
120
|
* This source code is licensed under the ISC license.
|
|
121
121
|
* See the LICENSE file in the root directory of this source tree.
|
|
122
|
-
*/const
|
|
122
|
+
*/const Kd=re("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
|
|
123
123
|
* @license lucide-react v0.577.0 - ISC
|
|
124
124
|
*
|
|
125
125
|
* This source code is licensed under the ISC license.
|
|
126
126
|
* See the LICENSE file in the root directory of this source tree.
|
|
127
|
-
*/const
|
|
127
|
+
*/const Xd=re("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
|
|
128
128
|
* @license lucide-react v0.577.0 - ISC
|
|
129
129
|
*
|
|
130
130
|
* This source code is licensed under the ISC license.
|
|
131
131
|
* See the LICENSE file in the root directory of this source tree.
|
|
132
|
-
*/const
|
|
132
|
+
*/const Zd=re("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]);/**
|
|
133
133
|
* @license lucide-react v0.577.0 - ISC
|
|
134
134
|
*
|
|
135
135
|
* This source code is licensed under the ISC license.
|
|
136
136
|
* See the LICENSE file in the root directory of this source tree.
|
|
137
|
-
*/const
|
|
137
|
+
*/const Jd=re("corner-right-down",[["path",{d:"m10 15 5 5 5-5",key:"1hpjnr"}],["path",{d:"M4 4h7a4 4 0 0 1 4 4v12",key:"wcbgct"}]]);/**
|
|
138
138
|
* @license lucide-react v0.577.0 - ISC
|
|
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 Qd=re("credit-card",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]);/**
|
|
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 eu=re("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
|
|
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 tu=re("headphones",[["path",{d:"M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3",key:"1xhozi"}]]);/**
|
|
153
153
|
* @license lucide-react v0.577.0 - ISC
|
|
154
154
|
*
|
|
155
155
|
* This source code is licensed under the ISC license.
|
|
156
156
|
* See the LICENSE file in the root directory of this source tree.
|
|
157
|
-
*/const
|
|
157
|
+
*/const ta=re("image-off",[["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}],["path",{d:"M10.41 10.41a2 2 0 1 1-2.83-2.83",key:"1bzlo9"}],["line",{x1:"13.5",x2:"6",y1:"13.5",y2:"21",key:"1q0aeu"}],["line",{x1:"18",x2:"21",y1:"12",y2:"15",key:"5mozeu"}],["path",{d:"M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59",key:"mmje98"}],["path",{d:"M21 15V5a2 2 0 0 0-2-2H9",key:"43el77"}]]);/**
|
|
158
158
|
* @license lucide-react v0.577.0 - ISC
|
|
159
159
|
*
|
|
160
160
|
* This source code is licensed under the ISC license.
|
|
161
161
|
* See the LICENSE file in the root directory of this source tree.
|
|
162
|
-
*/const en=
|
|
162
|
+
*/const en=re("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
|
|
163
163
|
* @license lucide-react v0.577.0 - ISC
|
|
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 Qn=
|
|
167
|
+
*/const Qn=re("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
|
|
168
168
|
* @license lucide-react v0.577.0 - ISC
|
|
169
169
|
*
|
|
170
170
|
* This source code is licensed under the ISC license.
|
|
171
171
|
* See the LICENSE file in the root directory of this source tree.
|
|
172
|
-
*/const er=
|
|
172
|
+
*/const er=re("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"}]]);/**
|
|
173
173
|
* @license lucide-react v0.577.0 - ISC
|
|
174
174
|
*
|
|
175
175
|
* This source code is licensed under the ISC license.
|
|
176
176
|
* See the LICENSE file in the root directory of this source tree.
|
|
177
|
-
*/const nu=
|
|
177
|
+
*/const nu=re("map-pin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/**
|
|
178
178
|
* @license lucide-react v0.577.0 - ISC
|
|
179
179
|
*
|
|
180
180
|
* This source code is licensed under the ISC license.
|
|
181
181
|
* See the LICENSE file in the root directory of this source tree.
|
|
182
|
-
*/const
|
|
182
|
+
*/const na=re("message-circle",[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]]);/**
|
|
183
183
|
* @license lucide-react v0.577.0 - ISC
|
|
184
184
|
*
|
|
185
185
|
* This source code is licensed under the ISC license.
|
|
186
186
|
* See the LICENSE file in the root directory of this source tree.
|
|
187
|
-
*/const tr=
|
|
187
|
+
*/const tr=re("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"}]]);/**
|
|
188
188
|
* @license lucide-react v0.577.0 - ISC
|
|
189
189
|
*
|
|
190
190
|
* This source code is licensed under the ISC license.
|
|
191
191
|
* See the LICENSE file in the root directory of this source tree.
|
|
192
|
-
*/const ru=
|
|
192
|
+
*/const ru=re("octagon-x",[["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
|
|
193
193
|
* @license lucide-react v0.577.0 - ISC
|
|
194
194
|
*
|
|
195
195
|
* This source code is licensed under the ISC license.
|
|
196
196
|
* See the LICENSE file in the root directory of this source tree.
|
|
197
|
-
*/const ou=
|
|
197
|
+
*/const ou=re("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);/**
|
|
198
198
|
* @license lucide-react v0.577.0 - ISC
|
|
199
199
|
*
|
|
200
200
|
* This source code is licensed under the ISC license.
|
|
201
201
|
* See the LICENSE file in the root directory of this source tree.
|
|
202
|
-
*/const au=
|
|
202
|
+
*/const au=re("phone",[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]]);/**
|
|
203
203
|
* @license lucide-react v0.577.0 - ISC
|
|
204
204
|
*
|
|
205
205
|
* This source code is licensed under the ISC license.
|
|
206
206
|
* See the LICENSE file in the root directory of this source tree.
|
|
207
|
-
*/const su=
|
|
207
|
+
*/const su=re("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
208
208
|
* @license lucide-react v0.577.0 - ISC
|
|
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 iu=
|
|
212
|
+
*/const iu=re("qr-code",[["rect",{width:"5",height:"5",x:"3",y:"3",rx:"1",key:"1tu5fj"}],["rect",{width:"5",height:"5",x:"16",y:"3",rx:"1",key:"1v8r4q"}],["rect",{width:"5",height:"5",x:"3",y:"16",rx:"1",key:"1x03jg"}],["path",{d:"M21 16h-3a2 2 0 0 0-2 2v3",key:"177gqh"}],["path",{d:"M21 21v.01",key:"ents32"}],["path",{d:"M12 7v3a2 2 0 0 1-2 2H7",key:"8crl2c"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M12 3h.01",key:"n36tog"}],["path",{d:"M12 16v.01",key:"133mhm"}],["path",{d:"M16 12h1",key:"1slzba"}],["path",{d:"M21 12v.01",key:"1lwtk9"}],["path",{d:"M12 21v-1",key:"1880an"}]]);/**
|
|
213
213
|
* @license lucide-react v0.577.0 - ISC
|
|
214
214
|
*
|
|
215
215
|
* This source code is licensed under the ISC license.
|
|
216
216
|
* See the LICENSE file in the root directory of this source tree.
|
|
217
|
-
*/const lu=
|
|
217
|
+
*/const lu=re("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);/**
|
|
218
218
|
* @license lucide-react v0.577.0 - ISC
|
|
219
219
|
*
|
|
220
220
|
* This source code is licensed under the ISC license.
|
|
221
221
|
* See the LICENSE file in the root directory of this source tree.
|
|
222
|
-
*/const
|
|
222
|
+
*/const cu=re("shopping-bag",[["path",{d:"M16 10a4 4 0 0 1-8 0",key:"1ltviw"}],["path",{d:"M3.103 6.034h17.794",key:"awc11p"}],["path",{d:"M3.4 5.467a2 2 0 0 0-.4 1.2V20a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6.667a2 2 0 0 0-.4-1.2l-2-2.667A2 2 0 0 0 17 2H7a2 2 0 0 0-1.6.8z",key:"o988cm"}]]);/**
|
|
223
223
|
* @license lucide-react v0.577.0 - ISC
|
|
224
224
|
*
|
|
225
225
|
* This source code is licensed under the ISC license.
|
|
226
226
|
* See the LICENSE file in the root directory of this source tree.
|
|
227
|
-
*/const
|
|
227
|
+
*/const ra=re("sparkles",[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]]);/**
|
|
228
228
|
* @license lucide-react v0.577.0 - ISC
|
|
229
229
|
*
|
|
230
230
|
* This source code is licensed under the ISC license.
|
|
231
231
|
* See the LICENSE file in the root directory of this source tree.
|
|
232
|
-
*/const du=
|
|
232
|
+
*/const du=re("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
|
233
233
|
* @license lucide-react v0.577.0 - ISC
|
|
234
234
|
*
|
|
235
235
|
* This source code is licensed under the ISC license.
|
|
236
236
|
* See the LICENSE file in the root directory of this source tree.
|
|
237
|
-
*/const
|
|
237
|
+
*/const uu=re("truck",[["path",{d:"M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2",key:"wrbu53"}],["path",{d:"M15 18H9",key:"1lyqi6"}],["path",{d:"M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.624l-3.48-4.35A1 1 0 0 0 17.52 8H14",key:"lysw3i"}],["circle",{cx:"17",cy:"18",r:"2",key:"332jqn"}],["circle",{cx:"7",cy:"18",r:"2",key:"19iecd"}]]);/**
|
|
238
238
|
* @license lucide-react v0.577.0 - ISC
|
|
239
239
|
*
|
|
240
240
|
* This source code is licensed under the ISC license.
|
|
241
241
|
* See the LICENSE file in the root directory of this source tree.
|
|
242
|
-
*/const uu=oe("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);function oa(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=oa(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function aa(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=oa(e))&&(r&&(r+=" "),r+=t);return r}const fu=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},pu=(e,t)=>({classGroupId:e,validator:t}),sa=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),tn="-",ia=[],hu="arbitrary..",gu=e=>{const t=vu(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return mu(s);const i=s.split(tn),l=i[0]===""&&i.length>1?1:0;return la(i,l,t)},getConflictingClassGroupIds:(s,i)=>{if(i){const l=r[s],d=n[s];return l?d?fu(d,l):l:d||ia}return n[s]||ia}}},la=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],a=n.nextPart.get(o);if(a){const d=la(e,t+1,a);if(d)return d}const s=n.validators;if(s===null)return;const i=t===0?e.join(tn):e.slice(t).join(tn),l=s.length;for(let d=0;d<l;d++){const f=s[d];if(f.validator(i))return f.classGroupId}},mu=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?hu+r:void 0})(),vu=e=>{const{theme:t,classGroups:n}=e;return bu(n,t)},bu=(e,t)=>{const n=sa();for(const r in e){const o=e[r];nr(o,n,r,t)}return n},nr=(e,t,n,r)=>{const o=e.length;for(let a=0;a<o;a++){const s=e[a];wu(s,t,n,r)}},wu=(e,t,n,r)=>{if(typeof e=="string"){yu(e,t,n);return}if(typeof e=="function"){xu(e,t,n,r);return}Cu(e,t,n,r)},yu=(e,t,n)=>{const r=e===""?t:ca(t,e);r.classGroupId=n},xu=(e,t,n,r)=>{if(ku(e)){nr(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(pu(n,e))},Cu=(e,t,n,r)=>{const o=Object.entries(e),a=o.length;for(let s=0;s<a;s++){const[i,l]=o[s];nr(l,ca(t,i),n,r)}},ca=(e,t)=>{let n=e;const r=t.split(tn),o=r.length;for(let a=0;a<o;a++){const s=r[a];let i=n.nextPart.get(s);i||(i=sa(),n.nextPart.set(s,i)),n=i}return n},ku=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Su=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(a,s)=>{n[a]=s,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(a){let s=n[a];if(s!==void 0)return s;if((s=r[a])!==void 0)return o(a,s),s},set(a,s){a in n?n[a]=s:o(a,s)}}},rr="!",da=":",Eu=[],ua=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),Nu=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const a=[];let s=0,i=0,l=0,d;const f=o.length;for(let m=0;m<f;m++){const b=o[m];if(s===0&&i===0){if(b===da){a.push(o.slice(l,m)),l=m+1;continue}if(b==="/"){d=m;continue}}b==="["?s++:b==="]"?s--:b==="("?i++:b===")"&&i--}const c=a.length===0?o:o.slice(l);let p=c,g=!1;c.endsWith(rr)?(p=c.slice(0,-1),g=!0):c.startsWith(rr)&&(p=c.slice(1),g=!0);const v=d&&d>l?d-l:void 0;return ua(a,g,p,v)};if(t){const o=t+da,a=r;r=s=>s.startsWith(o)?a(s.slice(o.length)):ua(Eu,!1,s,void 0,!0)}if(n){const o=r;r=a=>n({className:a,parseClassName:o})}return r},Tu=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let a=0;a<n.length;a++){const s=n[a],i=s[0]==="[",l=t.has(s);i||l?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(s)):o.push(s)}return o.length>0&&(o.sort(),r.push(...o)),r}},_u=e=>({cache:Su(e.cacheSize),parseClassName:Nu(e),sortModifiers:Tu(e),...gu(e)}),Au=/\s+/,Pu=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:a}=t,s=[],i=e.trim().split(Au);let l="";for(let d=i.length-1;d>=0;d-=1){const f=i[d],{isExternal:c,modifiers:p,hasImportantModifier:g,baseClassName:v,maybePostfixModifierPosition:m}=n(f);if(c){l=f+(l.length>0?" "+l:l);continue}let b=!!m,w=r(b?v.substring(0,m):v);if(!w){if(!b){l=f+(l.length>0?" "+l:l);continue}if(w=r(v),!w){l=f+(l.length>0?" "+l:l);continue}b=!1}const y=p.length===0?"":p.length===1?p[0]:a(p).join(":"),x=g?y+rr:y,k=x+w;if(s.indexOf(k)>-1)continue;s.push(k);const P=o(w,b);for(let E=0;E<P.length;++E){const N=P[E];s.push(x+N)}l=f+(l.length>0?" "+l:l)}return l},Iu=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=fa(n))&&(o&&(o+=" "),o+=r);return o},fa=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=fa(e[r]))&&(n&&(n+=" "),n+=t);return n},Mu=(e,...t)=>{let n,r,o,a;const s=l=>{const d=t.reduce((f,c)=>c(f),e());return n=_u(d),r=n.cache.get,o=n.cache.set,a=i,i(l)},i=l=>{const d=r(l);if(d)return d;const f=Pu(l,n);return o(l,f),f};return a=s,(...l)=>a(Iu(...l))},Lu=[],le=e=>{const t=n=>n[e]||Lu;return t.isThemeGetter=!0,t},pa=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ha=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Ou=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,zu=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Du=/\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$/,Bu=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Fu=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,$u=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,je=e=>Ou.test(e),re=e=>!!e&&!Number.isNaN(Number(e)),qe=e=>!!e&&Number.isInteger(Number(e)),or=e=>e.endsWith("%")&&re(e.slice(0,-1)),He=e=>zu.test(e),ga=()=>!0,Hu=e=>Du.test(e)&&!Bu.test(e),ar=()=>!1,Vu=e=>Fu.test(e),Uu=e=>$u.test(e),Ru=e=>!G(e)&&!Y(e),Wu=e=>Ge(e,xa,ar),G=e=>pa.test(e),ot=e=>Ge(e,Ca,Hu),ma=e=>Ge(e,Ju,re),ju=e=>Ge(e,Sa,ga),qu=e=>Ge(e,ka,ar),va=e=>Ge(e,wa,ar),Gu=e=>Ge(e,ya,Uu),nn=e=>Ge(e,Ea,Vu),Y=e=>ha.test(e),Ft=e=>at(e,Ca),Yu=e=>at(e,ka),ba=e=>at(e,wa),Ku=e=>at(e,xa),Xu=e=>at(e,ya),rn=e=>at(e,Ea,!0),Zu=e=>at(e,Sa,!0),Ge=(e,t,n)=>{const r=pa.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},at=(e,t,n=!1)=>{const r=ha.exec(e);return r?r[1]?t(r[1]):n:!1},wa=e=>e==="position"||e==="percentage",ya=e=>e==="image"||e==="url",xa=e=>e==="length"||e==="size"||e==="bg-size",Ca=e=>e==="length",Ju=e=>e==="number",ka=e=>e==="family-name",Sa=e=>e==="number"||e==="weight",Ea=e=>e==="shadow",Qu=Mu(()=>{const e=le("color"),t=le("font"),n=le("text"),r=le("font-weight"),o=le("tracking"),a=le("leading"),s=le("breakpoint"),i=le("container"),l=le("spacing"),d=le("radius"),f=le("shadow"),c=le("inset-shadow"),p=le("text-shadow"),g=le("drop-shadow"),v=le("blur"),m=le("perspective"),b=le("aspect"),w=le("ease"),y=le("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],k=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],P=()=>[...k(),Y,G],E=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto","contain","none"],S=()=>[Y,G,l],A=()=>[je,"full","auto",...S()],z=()=>[qe,"none","subgrid",Y,G],_=()=>["auto",{span:["full",qe,Y,G]},qe,Y,G],M=()=>[qe,"auto",Y,G],O=()=>["auto","min","max","fr",Y,G],I=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],j=()=>["start","end","center","stretch","center-safe","end-safe"],D=()=>["auto",...S()],$=()=>[je,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...S()],q=()=>[je,"screen","full","dvw","lvw","svw","min","max","fit",...S()],L=()=>[je,"screen","full","lh","dvh","lvh","svh","min","max","fit",...S()],T=()=>[e,Y,G],F=()=>[...k(),ba,va,{position:[Y,G]}],H=()=>["no-repeat",{repeat:["","x","y","space","round"]}],B=()=>["auto","cover","contain",Ku,Wu,{size:[Y,G]}],V=()=>[or,Ft,ot],U=()=>["","none","full",d,Y,G],X=()=>["",re,Ft,ot],R=()=>["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"],Z=()=>[re,or,ba,va],ee=()=>["","none",v,Y,G],ae=()=>["none",re,Y,G],ne=()=>["none",re,Y,G],ce=()=>[re,Y,G],de=()=>[je,"full",...S()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[He],breakpoint:[He],color:[ga],container:[He],"drop-shadow":[He],ease:["in","out","in-out"],font:[Ru],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[He],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[He],shadow:[He],spacing:["px",re],text:[He],"text-shadow":[He],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",je,G,Y,b]}],container:["container"],columns:[{columns:[re,G,Y,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:P()}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:A()}],"inset-x":[{"inset-x":A()}],"inset-y":[{"inset-y":A()}],start:[{"inset-s":A(),start:A()}],end:[{"inset-e":A(),end:A()}],"inset-bs":[{"inset-bs":A()}],"inset-be":[{"inset-be":A()}],top:[{top:A()}],right:[{right:A()}],bottom:[{bottom:A()}],left:[{left:A()}],visibility:["visible","invisible","collapse"],z:[{z:[qe,"auto",Y,G]}],basis:[{basis:[je,"full","auto",i,...S()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[re,je,"auto","initial","none",G]}],grow:[{grow:["",re,Y,G]}],shrink:[{shrink:["",re,Y,G]}],order:[{order:[qe,"first","last","none",Y,G]}],"grid-cols":[{"grid-cols":z()}],"col-start-end":[{col:_()}],"col-start":[{"col-start":M()}],"col-end":[{"col-end":M()}],"grid-rows":[{"grid-rows":z()}],"row-start-end":[{row:_()}],"row-start":[{"row-start":M()}],"row-end":[{"row-end":M()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":O()}],"auto-rows":[{"auto-rows":O()}],gap:[{gap:S()}],"gap-x":[{"gap-x":S()}],"gap-y":[{"gap-y":S()}],"justify-content":[{justify:[...I(),"normal"]}],"justify-items":[{"justify-items":[...j(),"normal"]}],"justify-self":[{"justify-self":["auto",...j()]}],"align-content":[{content:["normal",...I()]}],"align-items":[{items:[...j(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...j(),{baseline:["","last"]}]}],"place-content":[{"place-content":I()}],"place-items":[{"place-items":[...j(),"baseline"]}],"place-self":[{"place-self":["auto",...j()]}],p:[{p:S()}],px:[{px:S()}],py:[{py:S()}],ps:[{ps:S()}],pe:[{pe:S()}],pbs:[{pbs:S()}],pbe:[{pbe:S()}],pt:[{pt:S()}],pr:[{pr:S()}],pb:[{pb:S()}],pl:[{pl:S()}],m:[{m:D()}],mx:[{mx:D()}],my:[{my:D()}],ms:[{ms:D()}],me:[{me:D()}],mbs:[{mbs:D()}],mbe:[{mbe:D()}],mt:[{mt:D()}],mr:[{mr:D()}],mb:[{mb:D()}],ml:[{ml:D()}],"space-x":[{"space-x":S()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":S()}],"space-y-reverse":["space-y-reverse"],size:[{size:$()}],"inline-size":[{inline:["auto",...q()]}],"min-inline-size":[{"min-inline":["auto",...q()]}],"max-inline-size":[{"max-inline":["none",...q()]}],"block-size":[{block:["auto",...L()]}],"min-block-size":[{"min-block":["auto",...L()]}],"max-block-size":[{"max-block":["none",...L()]}],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",n,Ft,ot]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Zu,ju]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",or,G]}],"font-family":[{font:[Yu,qu,t]}],"font-features":[{"font-features":[G]}],"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:[o,Y,G]}],"line-clamp":[{"line-clamp":[re,"none",Y,ma]}],leading:[{leading:[a,...S()]}],"list-image":[{"list-image":["none",Y,G]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Y,G]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:T()}],"text-color":[{text:T()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...R(),"wavy"]}],"text-decoration-thickness":[{decoration:[re,"from-font","auto",Y,ot]}],"text-decoration-color":[{decoration:T()}],"underline-offset":[{"underline-offset":[re,"auto",Y,G]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:S()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Y,G]}],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",Y,G]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:F()}],"bg-repeat":[{bg:H()}],"bg-size":[{bg:B()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},qe,Y,G],radial:["",Y,G],conic:[qe,Y,G]},Xu,Gu]}],"bg-color":[{bg:T()}],"gradient-from-pos":[{from:V()}],"gradient-via-pos":[{via:V()}],"gradient-to-pos":[{to:V()}],"gradient-from":[{from:T()}],"gradient-via":[{via:T()}],"gradient-to":[{to:T()}],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:X()}],"border-w-x":[{"border-x":X()}],"border-w-y":[{"border-y":X()}],"border-w-s":[{"border-s":X()}],"border-w-e":[{"border-e":X()}],"border-w-bs":[{"border-bs":X()}],"border-w-be":[{"border-be":X()}],"border-w-t":[{"border-t":X()}],"border-w-r":[{"border-r":X()}],"border-w-b":[{"border-b":X()}],"border-w-l":[{"border-l":X()}],"divide-x":[{"divide-x":X()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":X()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...R(),"hidden","none"]}],"divide-style":[{divide:[...R(),"hidden","none"]}],"border-color":[{border:T()}],"border-color-x":[{"border-x":T()}],"border-color-y":[{"border-y":T()}],"border-color-s":[{"border-s":T()}],"border-color-e":[{"border-e":T()}],"border-color-bs":[{"border-bs":T()}],"border-color-be":[{"border-be":T()}],"border-color-t":[{"border-t":T()}],"border-color-r":[{"border-r":T()}],"border-color-b":[{"border-b":T()}],"border-color-l":[{"border-l":T()}],"divide-color":[{divide:T()}],"outline-style":[{outline:[...R(),"none","hidden"]}],"outline-offset":[{"outline-offset":[re,Y,G]}],"outline-w":[{outline:["",re,Ft,ot]}],"outline-color":[{outline:T()}],shadow:[{shadow:["","none",f,rn,nn]}],"shadow-color":[{shadow:T()}],"inset-shadow":[{"inset-shadow":["none",c,rn,nn]}],"inset-shadow-color":[{"inset-shadow":T()}],"ring-w":[{ring:X()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:T()}],"ring-offset-w":[{"ring-offset":[re,ot]}],"ring-offset-color":[{"ring-offset":T()}],"inset-ring-w":[{"inset-ring":X()}],"inset-ring-color":[{"inset-ring":T()}],"text-shadow":[{"text-shadow":["none",p,rn,nn]}],"text-shadow-color":[{"text-shadow":T()}],opacity:[{opacity:[re,Y,G]}],"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":[re]}],"mask-image-linear-from-pos":[{"mask-linear-from":Z()}],"mask-image-linear-to-pos":[{"mask-linear-to":Z()}],"mask-image-linear-from-color":[{"mask-linear-from":T()}],"mask-image-linear-to-color":[{"mask-linear-to":T()}],"mask-image-t-from-pos":[{"mask-t-from":Z()}],"mask-image-t-to-pos":[{"mask-t-to":Z()}],"mask-image-t-from-color":[{"mask-t-from":T()}],"mask-image-t-to-color":[{"mask-t-to":T()}],"mask-image-r-from-pos":[{"mask-r-from":Z()}],"mask-image-r-to-pos":[{"mask-r-to":Z()}],"mask-image-r-from-color":[{"mask-r-from":T()}],"mask-image-r-to-color":[{"mask-r-to":T()}],"mask-image-b-from-pos":[{"mask-b-from":Z()}],"mask-image-b-to-pos":[{"mask-b-to":Z()}],"mask-image-b-from-color":[{"mask-b-from":T()}],"mask-image-b-to-color":[{"mask-b-to":T()}],"mask-image-l-from-pos":[{"mask-l-from":Z()}],"mask-image-l-to-pos":[{"mask-l-to":Z()}],"mask-image-l-from-color":[{"mask-l-from":T()}],"mask-image-l-to-color":[{"mask-l-to":T()}],"mask-image-x-from-pos":[{"mask-x-from":Z()}],"mask-image-x-to-pos":[{"mask-x-to":Z()}],"mask-image-x-from-color":[{"mask-x-from":T()}],"mask-image-x-to-color":[{"mask-x-to":T()}],"mask-image-y-from-pos":[{"mask-y-from":Z()}],"mask-image-y-to-pos":[{"mask-y-to":Z()}],"mask-image-y-from-color":[{"mask-y-from":T()}],"mask-image-y-to-color":[{"mask-y-to":T()}],"mask-image-radial":[{"mask-radial":[Y,G]}],"mask-image-radial-from-pos":[{"mask-radial-from":Z()}],"mask-image-radial-to-pos":[{"mask-radial-to":Z()}],"mask-image-radial-from-color":[{"mask-radial-from":T()}],"mask-image-radial-to-color":[{"mask-radial-to":T()}],"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":k()}],"mask-image-conic-pos":[{"mask-conic":[re]}],"mask-image-conic-from-pos":[{"mask-conic-from":Z()}],"mask-image-conic-to-pos":[{"mask-conic-to":Z()}],"mask-image-conic-from-color":[{"mask-conic-from":T()}],"mask-image-conic-to-color":[{"mask-conic-to":T()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:F()}],"mask-repeat":[{mask:H()}],"mask-size":[{mask:B()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Y,G]}],filter:[{filter:["","none",Y,G]}],blur:[{blur:ee()}],brightness:[{brightness:[re,Y,G]}],contrast:[{contrast:[re,Y,G]}],"drop-shadow":[{"drop-shadow":["","none",g,rn,nn]}],"drop-shadow-color":[{"drop-shadow":T()}],grayscale:[{grayscale:["",re,Y,G]}],"hue-rotate":[{"hue-rotate":[re,Y,G]}],invert:[{invert:["",re,Y,G]}],saturate:[{saturate:[re,Y,G]}],sepia:[{sepia:["",re,Y,G]}],"backdrop-filter":[{"backdrop-filter":["","none",Y,G]}],"backdrop-blur":[{"backdrop-blur":ee()}],"backdrop-brightness":[{"backdrop-brightness":[re,Y,G]}],"backdrop-contrast":[{"backdrop-contrast":[re,Y,G]}],"backdrop-grayscale":[{"backdrop-grayscale":["",re,Y,G]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[re,Y,G]}],"backdrop-invert":[{"backdrop-invert":["",re,Y,G]}],"backdrop-opacity":[{"backdrop-opacity":[re,Y,G]}],"backdrop-saturate":[{"backdrop-saturate":[re,Y,G]}],"backdrop-sepia":[{"backdrop-sepia":["",re,Y,G]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":S()}],"border-spacing-x":[{"border-spacing-x":S()}],"border-spacing-y":[{"border-spacing-y":S()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Y,G]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[re,"initial",Y,G]}],ease:[{ease:["linear","initial",w,Y,G]}],delay:[{delay:[re,Y,G]}],animate:[{animate:["none",y,Y,G]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,Y,G]}],"perspective-origin":[{"perspective-origin":P()}],rotate:[{rotate:ae()}],"rotate-x":[{"rotate-x":ae()}],"rotate-y":[{"rotate-y":ae()}],"rotate-z":[{"rotate-z":ae()}],scale:[{scale:ne()}],"scale-x":[{"scale-x":ne()}],"scale-y":[{"scale-y":ne()}],"scale-z":[{"scale-z":ne()}],"scale-3d":["scale-3d"],skew:[{skew:ce()}],"skew-x":[{"skew-x":ce()}],"skew-y":[{"skew-y":ce()}],transform:[{transform:[Y,G,"","none","gpu","cpu"]}],"transform-origin":[{origin:P()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:de()}],"translate-x":[{"translate-x":de()}],"translate-y":[{"translate-y":de()}],"translate-z":[{"translate-z":de()}],"translate-none":["translate-none"],accent:[{accent:T()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:T()}],"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",Y,G]}],"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":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mbs":[{"scroll-mbs":S()}],"scroll-mbe":[{"scroll-mbe":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pbs":[{"scroll-pbs":S()}],"scroll-pbe":[{"scroll-pbe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"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",Y,G]}],fill:[{fill:["none",...T()]}],"stroke-w":[{stroke:[re,Ft,ot,ma]}],stroke:[{stroke:["none",...T()]}],"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"]}}),K=(...e)=>Qu(aa(e));function $t({className:e,...t}){return u.jsx("div",{"data-slot":"card",className:K("flex flex-col gap-6 rounded-xl border bg-card py-6 text-card-foreground shadow-sm",e),...t})}function ef({className:e,...t}){return u.jsx("div",{"data-slot":"card-header",className:K("@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 Ht({className:e,...t}){return u.jsx("div",{"data-slot":"card-content",className:K("px-6",e),...t})}const Na=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Ta=aa,on=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Ta(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:a}=t,s=Object.keys(o).map(d=>{const f=n==null?void 0:n[d],c=a==null?void 0:a[d];if(f===null)return null;const p=Na(f)||Na(c);return o[d][p]}),i=n&&Object.entries(n).reduce((d,f)=>{let[c,p]=f;return p===void 0||(d[c]=p),d},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((d,f)=>{let{class:c,className:p,...g}=f;return Object.entries(g).every(v=>{let[m,b]=v;return Array.isArray(b)?b.includes({...a,...i}[m]):{...a,...i}[m]===b})?[...d,c,p]:d},[]);return Ta(e,s,l,n==null?void 0:n.class,n==null?void 0:n.className)};function _a(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Aa(...e){return t=>{let n=!1;const r=e.map(o=>{const a=_a(o,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let o=0;o<r.length;o++){const a=r[o];typeof a=="function"?a():_a(e[o],null)}}}}function se(...e){return h.useCallback(Aa(...e),e)}function Vt(e){const t=tf(e),n=h.forwardRef((r,o)=>{const{children:a,...s}=r,i=h.Children.toArray(a),l=i.find(rf);if(l){const d=l.props.children,f=i.map(c=>c===l?h.Children.count(d)>1?h.Children.only(null):h.isValidElement(d)?d.props.children:null:c);return u.jsx(t,{...s,ref:o,children:h.isValidElement(d)?h.cloneElement(d,void 0,f):null})}return u.jsx(t,{...s,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}var Pa=Vt("Slot");function tf(e){const t=h.forwardRef((n,r)=>{const{children:o,...a}=n;if(h.isValidElement(o)){const s=af(o),i=of(a,o.props);return o.type!==h.Fragment&&(i.ref=r?Aa(r,s):s),h.cloneElement(o,i)}return h.Children.count(o)>1?h.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ia=Symbol("radix.slottable");function nf(e){const t=({children:n})=>u.jsx(u.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Ia,t}function rf(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ia}function of(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...i)=>{const l=a(...i);return o(...i),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function af(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var sf=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],J=sf.reduce((e,t)=>{const n=Vt(`Primitive.${t}`),r=h.forwardRef((o,a)=>{const{asChild:s,...i}=o,l=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(l,{...i,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function lf(e,t){e&&Zt.flushSync(()=>e.dispatchEvent(t))}var Ma=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"}),cf="VisuallyHidden",La=h.forwardRef((e,t)=>u.jsx(J.span,{...e,ref:t,style:{...Ma,...e.style}}));La.displayName=cf;var df=La;function me(e,t=[]){let n=[];function r(a,s){const i=h.createContext(s),l=n.length;n=[...n,s];const d=c=>{var w;const{scope:p,children:g,...v}=c,m=((w=p==null?void 0:p[e])==null?void 0:w[l])||i,b=h.useMemo(()=>v,Object.values(v));return u.jsx(m.Provider,{value:b,children:g})};d.displayName=a+"Provider";function f(c,p){var m;const g=((m=p==null?void 0:p[e])==null?void 0:m[l])||i,v=h.useContext(g);if(v)return v;if(s!==void 0)return s;throw new Error(`\`${c}\` must be used within \`${a}\``)}return[d,f]}const o=()=>{const a=n.map(s=>h.createContext(s));return function(i){const l=(i==null?void 0:i[e])||a;return h.useMemo(()=>({[`__scope${e}`]:{...i,[e]:l}}),[i,l])}};return o.scopeName=e,[r,uf(o,...t)]}function uf(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const s=r.reduce((i,{useScope:l,scopeName:d})=>{const c=l(a)[`__scope${d}`];return{...i,...c}},{});return h.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function Oa(e){const t=e+"CollectionProvider",[n,r]=me(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=m=>{const{scope:b,children:w}=m,y=C.useRef(null),x=C.useRef(new Map).current;return u.jsx(o,{scope:b,itemMap:x,collectionRef:y,children:w})};s.displayName=t;const i=e+"CollectionSlot",l=Vt(i),d=C.forwardRef((m,b)=>{const{scope:w,children:y}=m,x=a(i,w),k=se(b,x.collectionRef);return u.jsx(l,{ref:k,children:y})});d.displayName=i;const f=e+"CollectionItemSlot",c="data-radix-collection-item",p=Vt(f),g=C.forwardRef((m,b)=>{const{scope:w,children:y,...x}=m,k=C.useRef(null),P=se(b,k),E=a(f,w);return C.useEffect(()=>(E.itemMap.set(k,{ref:k,...x}),()=>void E.itemMap.delete(k))),u.jsx(p,{[c]:"",ref:P,children:y})});g.displayName=f;function v(m){const b=a(e+"CollectionConsumer",m);return C.useCallback(()=>{const y=b.collectionRef.current;if(!y)return[];const x=Array.from(y.querySelectorAll(`[${c}]`));return Array.from(b.itemMap.values()).sort((E,N)=>x.indexOf(E.ref.current)-x.indexOf(N.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:s,Slot:d,ItemSlot:g},v,r]}function Q(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}var ie=globalThis!=null&&globalThis.document?h.useLayoutEffect:()=>{},ff=h[" useInsertionEffect ".trim().toString()]||ie;function Ve({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,a,s]=pf({defaultProp:t,onChange:n}),i=e!==void 0,l=i?e:o;{const f=h.useRef(e!==void 0);h.useEffect(()=>{const c=f.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.`),f.current=i},[i,r])}const d=h.useCallback(f=>{var c;if(i){const p=hf(f)?f(e):f;p!==e&&((c=s.current)==null||c.call(s,p))}else a(f)},[i,e,a,s]);return[l,d]}function pf({defaultProp:e,onChange:t}){const[n,r]=h.useState(e),o=h.useRef(n),a=h.useRef(t);return ff(()=>{a.current=t},[t]),h.useEffect(()=>{var s;o.current!==n&&((s=a.current)==null||s.call(a,n),o.current=n)},[n,o]),[n,r,a]}function hf(e){return typeof e=="function"}function gf(e,t){return h.useReducer((n,r)=>t[n][r]??n,e)}var Ee=e=>{const{present:t,children:n}=e,r=mf(t),o=typeof n=="function"?n({present:r.isPresent}):h.Children.only(n),a=se(r.ref,vf(o));return typeof n=="function"||r.isPresent?h.cloneElement(o,{ref:a}):null};Ee.displayName="Presence";function mf(e){const[t,n]=h.useState(),r=h.useRef(null),o=h.useRef(e),a=h.useRef("none"),s=e?"mounted":"unmounted",[i,l]=gf(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return h.useEffect(()=>{const d=an(r.current);a.current=i==="mounted"?d:"none"},[i]),ie(()=>{const d=r.current,f=o.current;if(f!==e){const p=a.current,g=an(d);e?l("MOUNT"):g==="none"||(d==null?void 0:d.display)==="none"?l("UNMOUNT"):l(f&&p!==g?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),ie(()=>{if(t){let d;const f=t.ownerDocument.defaultView??window,c=g=>{const m=an(r.current).includes(CSS.escape(g.animationName));if(g.target===t&&m&&(l("ANIMATION_END"),!o.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",d=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},p=g=>{g.target===t&&(a.current=an(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{f.clearTimeout(d),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:h.useCallback(d=>{r.current=d?getComputedStyle(d):null,n(d)},[])}}function an(e){return(e==null?void 0:e.animationName)||"none"}function vf(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var bf=h[" useId ".trim().toString()]||(()=>{}),wf=0;function st(e){const[t,n]=h.useState(bf());return ie(()=>{n(r=>r??String(wf++))},[e]),e||(t?`radix-${t}`:"")}var sn="Collapsible",[yf]=me(sn),[xf,sr]=yf(sn),za=h.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:a,onOpenChange:s,...i}=e,[l,d]=Ve({prop:r,defaultProp:o??!1,onChange:s,caller:sn});return u.jsx(xf,{scope:n,disabled:a,contentId:st(),open:l,onOpenToggle:h.useCallback(()=>d(f=>!f),[d]),children:u.jsx(J.div,{"data-state":lr(l),"data-disabled":a?"":void 0,...i,ref:t})})});za.displayName=sn;var Da="CollapsibleTrigger",Ba=h.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=sr(Da,n);return u.jsx(J.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":lr(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:Q(e.onClick,o.onOpenToggle)})});Ba.displayName=Da;var ir="CollapsibleContent",Fa=h.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=sr(ir,e.__scopeCollapsible);return u.jsx(Ee,{present:n||o.open,children:({present:a})=>u.jsx(Cf,{...r,ref:t,present:a})})});Fa.displayName=ir;var Cf=h.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...a}=e,s=sr(ir,n),[i,l]=h.useState(r),d=h.useRef(null),f=se(t,d),c=h.useRef(0),p=c.current,g=h.useRef(0),v=g.current,m=s.open||i,b=h.useRef(m),w=h.useRef(void 0);return h.useEffect(()=>{const y=requestAnimationFrame(()=>b.current=!1);return()=>cancelAnimationFrame(y)},[]),ie(()=>{const y=d.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,g.current=x.width,b.current||(y.style.transitionDuration=w.current.transitionDuration,y.style.animationName=w.current.animationName),l(r)}},[s.open,r]),u.jsx(J.div,{"data-state":lr(s.open),"data-disabled":s.disabled?"":void 0,id:s.contentId,hidden:!m,...a,ref:f,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":v?`${v}px`:void 0,...e.style},children:m&&o})});function lr(e){return e?"open":"closed"}var kf=za,Sf=h.createContext(void 0);function Ut(e){const t=h.useContext(Sf);return e||t||"ltr"}function pe(e){const t=h.useRef(e);return h.useEffect(()=>{t.current=e}),h.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Ef(e,t=globalThis==null?void 0:globalThis.document){const n=pe(e);h.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Nf="DismissableLayer",cr="dismissableLayer.update",Tf="dismissableLayer.pointerDownOutside",_f="dismissableLayer.focusOutside",$a,Ha=h.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),dr=h.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:i,...l}=e,d=h.useContext(Ha),[f,c]=h.useState(null),p=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=h.useState({}),v=se(t,N=>c(N)),m=Array.from(d.layers),[b]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),w=m.indexOf(b),y=f?m.indexOf(f):-1,x=d.layersWithOutsidePointerEventsDisabled.size>0,k=y>=w,P=If(N=>{const S=N.target,A=[...d.branches].some(z=>z.contains(S));!k||A||(o==null||o(N),s==null||s(N),N.defaultPrevented||i==null||i())},p),E=Mf(N=>{const S=N.target;[...d.branches].some(z=>z.contains(S))||(a==null||a(N),s==null||s(N),N.defaultPrevented||i==null||i())},p);return Ef(N=>{y===d.layers.size-1&&(r==null||r(N),!N.defaultPrevented&&i&&(N.preventDefault(),i()))},p),h.useEffect(()=>{if(f)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&($a=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),Va(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=$a)}},[f,p,n,d]),h.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),Va())},[f,d]),h.useEffect(()=>{const N=()=>g({});return document.addEventListener(cr,N),()=>document.removeEventListener(cr,N)},[]),u.jsx(J.div,{...l,ref:v,style:{pointerEvents:x?k?"auto":"none":void 0,...e.style},onFocusCapture:Q(e.onFocusCapture,E.onFocusCapture),onBlurCapture:Q(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:Q(e.onPointerDownCapture,P.onPointerDownCapture)})});dr.displayName=Nf;var Af="DismissableLayerBranch",Pf=h.forwardRef((e,t)=>{const n=h.useContext(Ha),r=h.useRef(null),o=se(t,r);return h.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),u.jsx(J.div,{...e,ref:o})});Pf.displayName=Af;function If(e,t=globalThis==null?void 0:globalThis.document){const n=pe(e),r=h.useRef(!1),o=h.useRef(()=>{});return h.useEffect(()=>{const a=i=>{if(i.target&&!r.current){let l=function(){Ua(Tf,n,d,{discrete:!0})};const d={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Mf(e,t=globalThis==null?void 0:globalThis.document){const n=pe(e),r=h.useRef(!1);return h.useEffect(()=>{const o=a=>{a.target&&!r.current&&Ua(_f,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Va(){const e=new CustomEvent(cr);document.dispatchEvent(e)}function Ua(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?lf(o,a):o.dispatchEvent(a)}var ur="focusScope.autoFocusOnMount",fr="focusScope.autoFocusOnUnmount",Ra={bubbles:!1,cancelable:!0},Lf="FocusScope",Wa=h.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...s}=e,[i,l]=h.useState(null),d=pe(o),f=pe(a),c=h.useRef(null),p=se(t,m=>l(m)),g=h.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;h.useEffect(()=>{if(r){let m=function(x){if(g.paused||!i)return;const k=x.target;i.contains(k)?c.current=k:Ye(c.current,{select:!0})},b=function(x){if(g.paused||!i)return;const k=x.relatedTarget;k!==null&&(i.contains(k)||Ye(c.current,{select:!0}))},w=function(x){if(document.activeElement===document.body)for(const P of x)P.removedNodes.length>0&&Ye(i)};document.addEventListener("focusin",m),document.addEventListener("focusout",b);const y=new MutationObserver(w);return i&&y.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",b),y.disconnect()}}},[r,i,g.paused]),h.useEffect(()=>{if(i){Ga.add(g);const m=document.activeElement;if(!i.contains(m)){const w=new CustomEvent(ur,Ra);i.addEventListener(ur,d),i.dispatchEvent(w),w.defaultPrevented||(Of($f(ja(i)),{select:!0}),document.activeElement===m&&Ye(i))}return()=>{i.removeEventListener(ur,d),setTimeout(()=>{const w=new CustomEvent(fr,Ra);i.addEventListener(fr,f),i.dispatchEvent(w),w.defaultPrevented||Ye(m??document.body,{select:!0}),i.removeEventListener(fr,f),Ga.remove(g)},0)}}},[i,d,f,g]);const v=h.useCallback(m=>{if(!n&&!r||g.paused)return;const b=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,w=document.activeElement;if(b&&w){const y=m.currentTarget,[x,k]=zf(y);x&&k?!m.shiftKey&&w===k?(m.preventDefault(),n&&Ye(x,{select:!0})):m.shiftKey&&w===x&&(m.preventDefault(),n&&Ye(k,{select:!0})):w===y&&m.preventDefault()}},[n,r,g.paused]);return u.jsx(J.div,{tabIndex:-1,...s,ref:p,onKeyDown:v})});Wa.displayName=Lf;function Of(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Ye(r,{select:t}),document.activeElement!==n)return}function zf(e){const t=ja(e),n=qa(t,e),r=qa(t.reverse(),e);return[n,r]}function ja(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function qa(e,t){for(const n of e)if(!Df(n,{upTo:t}))return n}function Df(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 Bf(e){return e instanceof HTMLInputElement&&"select"in e}function Ye(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Bf(e)&&t&&e.select()}}var Ga=Ff();function Ff(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Ya(e,t),e.unshift(t)},remove(t){var n;e=Ya(e,t),(n=e[0])==null||n.resume()}}}function Ya(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function $f(e){return e.filter(t=>t.tagName!=="A")}var Hf="Portal",pr=h.forwardRef((e,t)=>{var i;const{container:n,...r}=e,[o,a]=h.useState(!1);ie(()=>a(!0),[]);const s=n||o&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return s?Kn.createPortal(u.jsx(J.div,{...r,ref:t}),s):null});pr.displayName=Hf;var hr=0;function Vf(){h.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Ka()),document.body.insertAdjacentElement("beforeend",e[1]??Ka()),hr++,()=>{hr===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),hr--}},[])}function Ka(){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 n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},Oe.apply(this,arguments)};function Xa(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Uf(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,a;r<o;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 ln="right-scroll-bar-position",cn="width-before-scroll-bar",Rf="with-scroll-bars-hidden",Wf="--removed-body-scroll-bar-size";function gr(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function jf(e,t){var n=C.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var qf=typeof window<"u"?h.useLayoutEffect:h.useEffect,Za=new WeakMap;function Gf(e,t){var n=jf(null,function(r){return e.forEach(function(o){return gr(o,r)})});return qf(function(){var r=Za.get(n);if(r){var o=new Set(r),a=new Set(e),s=n.current;o.forEach(function(i){a.has(i)||gr(i,null)}),a.forEach(function(i){o.has(i)||gr(i,s)})}Za.set(n,e)},[e]),n}function Yf(e){return e}function Kf(e,t){t===void 0&&(t=Yf);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var s=t(a,r);return n.push(s),function(){n=n.filter(function(i){return i!==s})}},assignSyncMedium:function(a){for(r=!0;n.length;){var s=n;n=[],s.forEach(a)}n={push:function(i){return a(i)},filter:function(){return n}}},assignMedium:function(a){r=!0;var s=[];if(n.length){var i=n;n=[],i.forEach(a),s=n}var l=function(){var f=s;s=[],f.forEach(a)},d=function(){return Promise.resolve().then(l)};d(),n={push:function(f){s.push(f),d()},filter:function(f){return s=s.filter(f),n}}}};return o}function Xf(e){e===void 0&&(e={});var t=Kf(null);return t.options=Oe({async:!0,ssr:!1},e),t}var Ja=function(e){var t=e.sideCar,n=Xa(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 h.createElement(r,Oe({},n))};Ja.isSideCarExport=!0;function Zf(e,t){return e.useMedium(t),Ja}var Qa=Xf(),mr=function(){},dn=h.forwardRef(function(e,t){var n=h.useRef(null),r=h.useState({onScrollCapture:mr,onWheelCapture:mr,onTouchMoveCapture:mr}),o=r[0],a=r[1],s=e.forwardProps,i=e.children,l=e.className,d=e.removeScrollBar,f=e.enabled,c=e.shards,p=e.sideCar,g=e.noRelative,v=e.noIsolation,m=e.inert,b=e.allowPinchZoom,w=e.as,y=w===void 0?"div":w,x=e.gapMode,k=Xa(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),P=p,E=Gf([n,t]),N=Oe(Oe({},k),o);return h.createElement(h.Fragment,null,f&&h.createElement(P,{sideCar:Qa,removeScrollBar:d,shards:c,noRelative:g,noIsolation:v,inert:m,setCallbacks:a,allowPinchZoom:!!b,lockRef:n,gapMode:x}),s?h.cloneElement(h.Children.only(i),Oe(Oe({},N),{ref:E})):h.createElement(y,Oe({},N,{className:l,ref:E}),i))});dn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},dn.classNames={fullWidth:cn,zeroRight:ln};var Jf=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Qf(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Jf();return t&&e.setAttribute("nonce",t),e}function ep(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function tp(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var np=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Qf())&&(ep(t,n),tp(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},rp=function(){var e=np();return function(t,n){h.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},es=function(){var e=rp(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},op={left:0,top:0,right:0,gap:0},vr=function(e){return parseInt(e||"",10)||0},ap=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[vr(n),vr(r),vr(o)]},sp=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return op;var t=ap(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},ip=es(),yt="data-scroll-locked",lp=function(e,t,n,r){var o=e.left,a=e.top,s=e.right,i=e.gap;return n===void 0&&(n="margin"),`
|
|
243
|
-
|
|
242
|
+
*/const oa=re("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"}]]);/**
|
|
243
|
+
* @license lucide-react v0.577.0 - ISC
|
|
244
|
+
*
|
|
245
|
+
* This source code is licensed under the ISC license.
|
|
246
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
247
|
+
*/const fu=re("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);function aa(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=aa(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function sa(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=aa(e))&&(r&&(r+=" "),r+=t);return r}const pu=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},hu=(e,t)=>({classGroupId:e,validator:t}),ia=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),tn="-",la=[],gu="arbitrary..",mu=e=>{const t=bu(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return vu(s);const i=s.split(tn),l=i[0]===""&&i.length>1?1:0;return ca(i,l,t)},getConflictingClassGroupIds:(s,i)=>{if(i){const l=r[s],d=n[s];return l?d?pu(d,l):l:d||la}return n[s]||la}}},ca=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],a=n.nextPart.get(o);if(a){const d=ca(e,t+1,a);if(d)return d}const s=n.validators;if(s===null)return;const i=t===0?e.join(tn):e.slice(t).join(tn),l=s.length;for(let d=0;d<l;d++){const f=s[d];if(f.validator(i))return f.classGroupId}},vu=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?gu+r:void 0})(),bu=e=>{const{theme:t,classGroups:n}=e;return wu(n,t)},wu=(e,t)=>{const n=ia();for(const r in e){const o=e[r];nr(o,n,r,t)}return n},nr=(e,t,n,r)=>{const o=e.length;for(let a=0;a<o;a++){const s=e[a];yu(s,t,n,r)}},yu=(e,t,n,r)=>{if(typeof e=="string"){xu(e,t,n);return}if(typeof e=="function"){Cu(e,t,n,r);return}ku(e,t,n,r)},xu=(e,t,n)=>{const r=e===""?t:da(t,e);r.classGroupId=n},Cu=(e,t,n,r)=>{if(Su(e)){nr(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(hu(n,e))},ku=(e,t,n,r)=>{const o=Object.entries(e),a=o.length;for(let s=0;s<a;s++){const[i,l]=o[s];nr(l,da(t,i),n,r)}},da=(e,t)=>{let n=e;const r=t.split(tn),o=r.length;for(let a=0;a<o;a++){const s=r[a];let i=n.nextPart.get(s);i||(i=ia(),n.nextPart.set(s,i)),n=i}return n},Su=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Eu=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(a,s)=>{n[a]=s,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(a){let s=n[a];if(s!==void 0)return s;if((s=r[a])!==void 0)return o(a,s),s},set(a,s){a in n?n[a]=s:o(a,s)}}},rr="!",ua=":",Nu=[],fa=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),Tu=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const a=[];let s=0,i=0,l=0,d;const f=o.length;for(let m=0;m<f;m++){const b=o[m];if(s===0&&i===0){if(b===ua){a.push(o.slice(l,m)),l=m+1;continue}if(b==="/"){d=m;continue}}b==="["?s++:b==="]"?s--:b==="("?i++:b===")"&&i--}const c=a.length===0?o:o.slice(l);let h=c,g=!1;c.endsWith(rr)?(h=c.slice(0,-1),g=!0):c.startsWith(rr)&&(h=c.slice(1),g=!0);const v=d&&d>l?d-l:void 0;return fa(a,g,h,v)};if(t){const o=t+ua,a=r;r=s=>s.startsWith(o)?a(s.slice(o.length)):fa(Nu,!1,s,void 0,!0)}if(n){const o=r;r=a=>n({className:a,parseClassName:o})}return r},_u=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let a=0;a<n.length;a++){const s=n[a],i=s[0]==="[",l=t.has(s);i||l?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(s)):o.push(s)}return o.length>0&&(o.sort(),r.push(...o)),r}},Au=e=>({cache:Eu(e.cacheSize),parseClassName:Tu(e),sortModifiers:_u(e),...mu(e)}),Pu=/\s+/,Iu=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:a}=t,s=[],i=e.trim().split(Pu);let l="";for(let d=i.length-1;d>=0;d-=1){const f=i[d],{isExternal:c,modifiers:h,hasImportantModifier:g,baseClassName:v,maybePostfixModifierPosition:m}=n(f);if(c){l=f+(l.length>0?" "+l:l);continue}let b=!!m,w=r(b?v.substring(0,m):v);if(!w){if(!b){l=f+(l.length>0?" "+l:l);continue}if(w=r(v),!w){l=f+(l.length>0?" "+l:l);continue}b=!1}const y=h.length===0?"":h.length===1?h[0]:a(h).join(":"),x=g?y+rr:y,k=x+w;if(s.indexOf(k)>-1)continue;s.push(k);const P=o(w,b);for(let E=0;E<P.length;++E){const N=P[E];s.push(x+N)}l=f+(l.length>0?" "+l:l)}return l},Mu=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=pa(n))&&(o&&(o+=" "),o+=r);return o},pa=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=pa(e[r]))&&(n&&(n+=" "),n+=t);return n},Lu=(e,...t)=>{let n,r,o,a;const s=l=>{const d=t.reduce((f,c)=>c(f),e());return n=Au(d),r=n.cache.get,o=n.cache.set,a=i,i(l)},i=l=>{const d=r(l);if(d)return d;const f=Iu(l,n);return o(l,f),f};return a=s,(...l)=>a(Mu(...l))},Ou=[],le=e=>{const t=n=>n[e]||Ou;return t.isThemeGetter=!0,t},ha=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ga=/^\((?:(\w[\w-]*):)?(.+)\)$/i,zu=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Du=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Bu=/\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$/,Fu=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,$u=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Hu=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,qe=e=>zu.test(e),oe=e=>!!e&&!Number.isNaN(Number(e)),Ge=e=>!!e&&Number.isInteger(Number(e)),or=e=>e.endsWith("%")&&oe(e.slice(0,-1)),He=e=>Du.test(e),ma=()=>!0,Vu=e=>Bu.test(e)&&!Fu.test(e),ar=()=>!1,Uu=e=>$u.test(e),Ru=e=>Hu.test(e),ju=e=>!G(e)&&!Y(e),Wu=e=>Ye(e,Ca,ar),G=e=>ha.test(e),st=e=>Ye(e,ka,Vu),va=e=>Ye(e,Qu,oe),qu=e=>Ye(e,Ea,ma),Gu=e=>Ye(e,Sa,ar),ba=e=>Ye(e,ya,ar),Yu=e=>Ye(e,xa,Ru),nn=e=>Ye(e,Na,Uu),Y=e=>ga.test(e),Ft=e=>it(e,ka),Ku=e=>it(e,Sa),wa=e=>it(e,ya),Xu=e=>it(e,Ca),Zu=e=>it(e,xa),rn=e=>it(e,Na,!0),Ju=e=>it(e,Ea,!0),Ye=(e,t,n)=>{const r=ha.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},it=(e,t,n=!1)=>{const r=ga.exec(e);return r?r[1]?t(r[1]):n:!1},ya=e=>e==="position"||e==="percentage",xa=e=>e==="image"||e==="url",Ca=e=>e==="length"||e==="size"||e==="bg-size",ka=e=>e==="length",Qu=e=>e==="number",Sa=e=>e==="family-name",Ea=e=>e==="number"||e==="weight",Na=e=>e==="shadow",ef=Lu(()=>{const e=le("color"),t=le("font"),n=le("text"),r=le("font-weight"),o=le("tracking"),a=le("leading"),s=le("breakpoint"),i=le("container"),l=le("spacing"),d=le("radius"),f=le("shadow"),c=le("inset-shadow"),h=le("text-shadow"),g=le("drop-shadow"),v=le("blur"),m=le("perspective"),b=le("aspect"),w=le("ease"),y=le("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],k=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],P=()=>[...k(),Y,G],E=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto","contain","none"],S=()=>[Y,G,l],A=()=>[qe,"full","auto",...S()],z=()=>[Ge,"none","subgrid",Y,G],_=()=>["auto",{span:["full",Ge,Y,G]},Ge,Y,G],M=()=>[Ge,"auto",Y,G],O=()=>["auto","min","max","fr",Y,G],I=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],W=()=>["start","end","center","stretch","center-safe","end-safe"],D=()=>["auto",...S()],$=()=>[qe,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...S()],q=()=>[qe,"screen","full","dvw","lvw","svw","min","max","fit",...S()],L=()=>[qe,"screen","full","lh","dvh","lvh","svh","min","max","fit",...S()],T=()=>[e,Y,G],F=()=>[...k(),wa,ba,{position:[Y,G]}],H=()=>["no-repeat",{repeat:["","x","y","space","round"]}],B=()=>["auto","cover","contain",Xu,Wu,{size:[Y,G]}],V=()=>[or,Ft,st],U=()=>["","none","full",d,Y,G],X=()=>["",oe,Ft,st],R=()=>["solid","dashed","dotted","double"],j=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Z=()=>[oe,or,wa,ba],ee=()=>["","none",v,Y,G],ae=()=>["none",oe,Y,G],ne=()=>["none",oe,Y,G],ce=()=>[oe,Y,G],de=()=>[qe,"full",...S()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[He],breakpoint:[He],color:[ma],container:[He],"drop-shadow":[He],ease:["in","out","in-out"],font:[ju],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[He],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[He],shadow:[He],spacing:["px",oe],text:[He],"text-shadow":[He],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",qe,G,Y,b]}],container:["container"],columns:[{columns:[oe,G,Y,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:P()}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:A()}],"inset-x":[{"inset-x":A()}],"inset-y":[{"inset-y":A()}],start:[{"inset-s":A(),start:A()}],end:[{"inset-e":A(),end:A()}],"inset-bs":[{"inset-bs":A()}],"inset-be":[{"inset-be":A()}],top:[{top:A()}],right:[{right:A()}],bottom:[{bottom:A()}],left:[{left:A()}],visibility:["visible","invisible","collapse"],z:[{z:[Ge,"auto",Y,G]}],basis:[{basis:[qe,"full","auto",i,...S()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[oe,qe,"auto","initial","none",G]}],grow:[{grow:["",oe,Y,G]}],shrink:[{shrink:["",oe,Y,G]}],order:[{order:[Ge,"first","last","none",Y,G]}],"grid-cols":[{"grid-cols":z()}],"col-start-end":[{col:_()}],"col-start":[{"col-start":M()}],"col-end":[{"col-end":M()}],"grid-rows":[{"grid-rows":z()}],"row-start-end":[{row:_()}],"row-start":[{"row-start":M()}],"row-end":[{"row-end":M()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":O()}],"auto-rows":[{"auto-rows":O()}],gap:[{gap:S()}],"gap-x":[{"gap-x":S()}],"gap-y":[{"gap-y":S()}],"justify-content":[{justify:[...I(),"normal"]}],"justify-items":[{"justify-items":[...W(),"normal"]}],"justify-self":[{"justify-self":["auto",...W()]}],"align-content":[{content:["normal",...I()]}],"align-items":[{items:[...W(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...W(),{baseline:["","last"]}]}],"place-content":[{"place-content":I()}],"place-items":[{"place-items":[...W(),"baseline"]}],"place-self":[{"place-self":["auto",...W()]}],p:[{p:S()}],px:[{px:S()}],py:[{py:S()}],ps:[{ps:S()}],pe:[{pe:S()}],pbs:[{pbs:S()}],pbe:[{pbe:S()}],pt:[{pt:S()}],pr:[{pr:S()}],pb:[{pb:S()}],pl:[{pl:S()}],m:[{m:D()}],mx:[{mx:D()}],my:[{my:D()}],ms:[{ms:D()}],me:[{me:D()}],mbs:[{mbs:D()}],mbe:[{mbe:D()}],mt:[{mt:D()}],mr:[{mr:D()}],mb:[{mb:D()}],ml:[{ml:D()}],"space-x":[{"space-x":S()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":S()}],"space-y-reverse":["space-y-reverse"],size:[{size:$()}],"inline-size":[{inline:["auto",...q()]}],"min-inline-size":[{"min-inline":["auto",...q()]}],"max-inline-size":[{"max-inline":["none",...q()]}],"block-size":[{block:["auto",...L()]}],"min-block-size":[{"min-block":["auto",...L()]}],"max-block-size":[{"max-block":["none",...L()]}],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",n,Ft,st]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Ju,qu]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",or,G]}],"font-family":[{font:[Ku,Gu,t]}],"font-features":[{"font-features":[G]}],"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:[o,Y,G]}],"line-clamp":[{"line-clamp":[oe,"none",Y,va]}],leading:[{leading:[a,...S()]}],"list-image":[{"list-image":["none",Y,G]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Y,G]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:T()}],"text-color":[{text:T()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...R(),"wavy"]}],"text-decoration-thickness":[{decoration:[oe,"from-font","auto",Y,st]}],"text-decoration-color":[{decoration:T()}],"underline-offset":[{"underline-offset":[oe,"auto",Y,G]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:S()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Y,G]}],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",Y,G]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:F()}],"bg-repeat":[{bg:H()}],"bg-size":[{bg:B()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ge,Y,G],radial:["",Y,G],conic:[Ge,Y,G]},Zu,Yu]}],"bg-color":[{bg:T()}],"gradient-from-pos":[{from:V()}],"gradient-via-pos":[{via:V()}],"gradient-to-pos":[{to:V()}],"gradient-from":[{from:T()}],"gradient-via":[{via:T()}],"gradient-to":[{to:T()}],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:X()}],"border-w-x":[{"border-x":X()}],"border-w-y":[{"border-y":X()}],"border-w-s":[{"border-s":X()}],"border-w-e":[{"border-e":X()}],"border-w-bs":[{"border-bs":X()}],"border-w-be":[{"border-be":X()}],"border-w-t":[{"border-t":X()}],"border-w-r":[{"border-r":X()}],"border-w-b":[{"border-b":X()}],"border-w-l":[{"border-l":X()}],"divide-x":[{"divide-x":X()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":X()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...R(),"hidden","none"]}],"divide-style":[{divide:[...R(),"hidden","none"]}],"border-color":[{border:T()}],"border-color-x":[{"border-x":T()}],"border-color-y":[{"border-y":T()}],"border-color-s":[{"border-s":T()}],"border-color-e":[{"border-e":T()}],"border-color-bs":[{"border-bs":T()}],"border-color-be":[{"border-be":T()}],"border-color-t":[{"border-t":T()}],"border-color-r":[{"border-r":T()}],"border-color-b":[{"border-b":T()}],"border-color-l":[{"border-l":T()}],"divide-color":[{divide:T()}],"outline-style":[{outline:[...R(),"none","hidden"]}],"outline-offset":[{"outline-offset":[oe,Y,G]}],"outline-w":[{outline:["",oe,Ft,st]}],"outline-color":[{outline:T()}],shadow:[{shadow:["","none",f,rn,nn]}],"shadow-color":[{shadow:T()}],"inset-shadow":[{"inset-shadow":["none",c,rn,nn]}],"inset-shadow-color":[{"inset-shadow":T()}],"ring-w":[{ring:X()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:T()}],"ring-offset-w":[{"ring-offset":[oe,st]}],"ring-offset-color":[{"ring-offset":T()}],"inset-ring-w":[{"inset-ring":X()}],"inset-ring-color":[{"inset-ring":T()}],"text-shadow":[{"text-shadow":["none",h,rn,nn]}],"text-shadow-color":[{"text-shadow":T()}],opacity:[{opacity:[oe,Y,G]}],"mix-blend":[{"mix-blend":[...j(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":j()}],"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":[oe]}],"mask-image-linear-from-pos":[{"mask-linear-from":Z()}],"mask-image-linear-to-pos":[{"mask-linear-to":Z()}],"mask-image-linear-from-color":[{"mask-linear-from":T()}],"mask-image-linear-to-color":[{"mask-linear-to":T()}],"mask-image-t-from-pos":[{"mask-t-from":Z()}],"mask-image-t-to-pos":[{"mask-t-to":Z()}],"mask-image-t-from-color":[{"mask-t-from":T()}],"mask-image-t-to-color":[{"mask-t-to":T()}],"mask-image-r-from-pos":[{"mask-r-from":Z()}],"mask-image-r-to-pos":[{"mask-r-to":Z()}],"mask-image-r-from-color":[{"mask-r-from":T()}],"mask-image-r-to-color":[{"mask-r-to":T()}],"mask-image-b-from-pos":[{"mask-b-from":Z()}],"mask-image-b-to-pos":[{"mask-b-to":Z()}],"mask-image-b-from-color":[{"mask-b-from":T()}],"mask-image-b-to-color":[{"mask-b-to":T()}],"mask-image-l-from-pos":[{"mask-l-from":Z()}],"mask-image-l-to-pos":[{"mask-l-to":Z()}],"mask-image-l-from-color":[{"mask-l-from":T()}],"mask-image-l-to-color":[{"mask-l-to":T()}],"mask-image-x-from-pos":[{"mask-x-from":Z()}],"mask-image-x-to-pos":[{"mask-x-to":Z()}],"mask-image-x-from-color":[{"mask-x-from":T()}],"mask-image-x-to-color":[{"mask-x-to":T()}],"mask-image-y-from-pos":[{"mask-y-from":Z()}],"mask-image-y-to-pos":[{"mask-y-to":Z()}],"mask-image-y-from-color":[{"mask-y-from":T()}],"mask-image-y-to-color":[{"mask-y-to":T()}],"mask-image-radial":[{"mask-radial":[Y,G]}],"mask-image-radial-from-pos":[{"mask-radial-from":Z()}],"mask-image-radial-to-pos":[{"mask-radial-to":Z()}],"mask-image-radial-from-color":[{"mask-radial-from":T()}],"mask-image-radial-to-color":[{"mask-radial-to":T()}],"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":k()}],"mask-image-conic-pos":[{"mask-conic":[oe]}],"mask-image-conic-from-pos":[{"mask-conic-from":Z()}],"mask-image-conic-to-pos":[{"mask-conic-to":Z()}],"mask-image-conic-from-color":[{"mask-conic-from":T()}],"mask-image-conic-to-color":[{"mask-conic-to":T()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:F()}],"mask-repeat":[{mask:H()}],"mask-size":[{mask:B()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Y,G]}],filter:[{filter:["","none",Y,G]}],blur:[{blur:ee()}],brightness:[{brightness:[oe,Y,G]}],contrast:[{contrast:[oe,Y,G]}],"drop-shadow":[{"drop-shadow":["","none",g,rn,nn]}],"drop-shadow-color":[{"drop-shadow":T()}],grayscale:[{grayscale:["",oe,Y,G]}],"hue-rotate":[{"hue-rotate":[oe,Y,G]}],invert:[{invert:["",oe,Y,G]}],saturate:[{saturate:[oe,Y,G]}],sepia:[{sepia:["",oe,Y,G]}],"backdrop-filter":[{"backdrop-filter":["","none",Y,G]}],"backdrop-blur":[{"backdrop-blur":ee()}],"backdrop-brightness":[{"backdrop-brightness":[oe,Y,G]}],"backdrop-contrast":[{"backdrop-contrast":[oe,Y,G]}],"backdrop-grayscale":[{"backdrop-grayscale":["",oe,Y,G]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[oe,Y,G]}],"backdrop-invert":[{"backdrop-invert":["",oe,Y,G]}],"backdrop-opacity":[{"backdrop-opacity":[oe,Y,G]}],"backdrop-saturate":[{"backdrop-saturate":[oe,Y,G]}],"backdrop-sepia":[{"backdrop-sepia":["",oe,Y,G]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":S()}],"border-spacing-x":[{"border-spacing-x":S()}],"border-spacing-y":[{"border-spacing-y":S()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Y,G]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[oe,"initial",Y,G]}],ease:[{ease:["linear","initial",w,Y,G]}],delay:[{delay:[oe,Y,G]}],animate:[{animate:["none",y,Y,G]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,Y,G]}],"perspective-origin":[{"perspective-origin":P()}],rotate:[{rotate:ae()}],"rotate-x":[{"rotate-x":ae()}],"rotate-y":[{"rotate-y":ae()}],"rotate-z":[{"rotate-z":ae()}],scale:[{scale:ne()}],"scale-x":[{"scale-x":ne()}],"scale-y":[{"scale-y":ne()}],"scale-z":[{"scale-z":ne()}],"scale-3d":["scale-3d"],skew:[{skew:ce()}],"skew-x":[{"skew-x":ce()}],"skew-y":[{"skew-y":ce()}],transform:[{transform:[Y,G,"","none","gpu","cpu"]}],"transform-origin":[{origin:P()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:de()}],"translate-x":[{"translate-x":de()}],"translate-y":[{"translate-y":de()}],"translate-z":[{"translate-z":de()}],"translate-none":["translate-none"],accent:[{accent:T()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:T()}],"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",Y,G]}],"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":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mbs":[{"scroll-mbs":S()}],"scroll-mbe":[{"scroll-mbe":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pbs":[{"scroll-pbs":S()}],"scroll-pbe":[{"scroll-pbe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"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",Y,G]}],fill:[{fill:["none",...T()]}],"stroke-w":[{stroke:[oe,Ft,st,va]}],stroke:[{stroke:["none",...T()]}],"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"]}}),K=(...e)=>ef(sa(e));function $t({className:e,...t}){return u.jsx("div",{"data-slot":"card",className:K("flex flex-col gap-6 rounded-xl border bg-card py-6 text-card-foreground shadow-sm",e),...t})}function tf({className:e,...t}){return u.jsx("div",{"data-slot":"card-header",className:K("@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 Ht({className:e,...t}){return u.jsx("div",{"data-slot":"card-content",className:K("px-6",e),...t})}const Ta=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,_a=sa,on=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return _a(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:a}=t,s=Object.keys(o).map(d=>{const f=n==null?void 0:n[d],c=a==null?void 0:a[d];if(f===null)return null;const h=Ta(f)||Ta(c);return o[d][h]}),i=n&&Object.entries(n).reduce((d,f)=>{let[c,h]=f;return h===void 0||(d[c]=h),d},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((d,f)=>{let{class:c,className:h,...g}=f;return Object.entries(g).every(v=>{let[m,b]=v;return Array.isArray(b)?b.includes({...a,...i}[m]):{...a,...i}[m]===b})?[...d,c,h]:d},[]);return _a(e,s,l,n==null?void 0:n.class,n==null?void 0:n.className)};function Aa(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Pa(...e){return t=>{let n=!1;const r=e.map(o=>{const a=Aa(o,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let o=0;o<r.length;o++){const a=r[o];typeof a=="function"?a():Aa(e[o],null)}}}}function se(...e){return p.useCallback(Pa(...e),e)}function Vt(e){const t=nf(e),n=p.forwardRef((r,o)=>{const{children:a,...s}=r,i=p.Children.toArray(a),l=i.find(of);if(l){const d=l.props.children,f=i.map(c=>c===l?p.Children.count(d)>1?p.Children.only(null):p.isValidElement(d)?d.props.children:null:c);return u.jsx(t,{...s,ref:o,children:p.isValidElement(d)?p.cloneElement(d,void 0,f):null})}return u.jsx(t,{...s,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}var Ia=Vt("Slot");function nf(e){const t=p.forwardRef((n,r)=>{const{children:o,...a}=n;if(p.isValidElement(o)){const s=sf(o),i=af(a,o.props);return o.type!==p.Fragment&&(i.ref=r?Pa(r,s):s),p.cloneElement(o,i)}return p.Children.count(o)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ma=Symbol("radix.slottable");function rf(e){const t=({children:n})=>u.jsx(u.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Ma,t}function of(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ma}function af(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...i)=>{const l=a(...i);return o(...i),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function sf(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var lf=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],J=lf.reduce((e,t)=>{const n=Vt(`Primitive.${t}`),r=p.forwardRef((o,a)=>{const{asChild:s,...i}=o,l=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(l,{...i,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function cf(e,t){e&&Zt.flushSync(()=>e.dispatchEvent(t))}var La=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"}),df="VisuallyHidden",Oa=p.forwardRef((e,t)=>u.jsx(J.span,{...e,ref:t,style:{...La,...e.style}}));Oa.displayName=df;var uf=Oa;function me(e,t=[]){let n=[];function r(a,s){const i=p.createContext(s),l=n.length;n=[...n,s];const d=c=>{var w;const{scope:h,children:g,...v}=c,m=((w=h==null?void 0:h[e])==null?void 0:w[l])||i,b=p.useMemo(()=>v,Object.values(v));return u.jsx(m.Provider,{value:b,children:g})};d.displayName=a+"Provider";function f(c,h){var m;const g=((m=h==null?void 0:h[e])==null?void 0:m[l])||i,v=p.useContext(g);if(v)return v;if(s!==void 0)return s;throw new Error(`\`${c}\` must be used within \`${a}\``)}return[d,f]}const o=()=>{const a=n.map(s=>p.createContext(s));return function(i){const l=(i==null?void 0:i[e])||a;return p.useMemo(()=>({[`__scope${e}`]:{...i,[e]:l}}),[i,l])}};return o.scopeName=e,[r,ff(o,...t)]}function ff(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const s=r.reduce((i,{useScope:l,scopeName:d})=>{const c=l(a)[`__scope${d}`];return{...i,...c}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function za(e){const t=e+"CollectionProvider",[n,r]=me(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=m=>{const{scope:b,children:w}=m,y=C.useRef(null),x=C.useRef(new Map).current;return u.jsx(o,{scope:b,itemMap:x,collectionRef:y,children:w})};s.displayName=t;const i=e+"CollectionSlot",l=Vt(i),d=C.forwardRef((m,b)=>{const{scope:w,children:y}=m,x=a(i,w),k=se(b,x.collectionRef);return u.jsx(l,{ref:k,children:y})});d.displayName=i;const f=e+"CollectionItemSlot",c="data-radix-collection-item",h=Vt(f),g=C.forwardRef((m,b)=>{const{scope:w,children:y,...x}=m,k=C.useRef(null),P=se(b,k),E=a(f,w);return C.useEffect(()=>(E.itemMap.set(k,{ref:k,...x}),()=>void E.itemMap.delete(k))),u.jsx(h,{[c]:"",ref:P,children:y})});g.displayName=f;function v(m){const b=a(e+"CollectionConsumer",m);return C.useCallback(()=>{const y=b.collectionRef.current;if(!y)return[];const x=Array.from(y.querySelectorAll(`[${c}]`));return Array.from(b.itemMap.values()).sort((E,N)=>x.indexOf(E.ref.current)-x.indexOf(N.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:s,Slot:d,ItemSlot:g},v,r]}function Q(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}var ie=globalThis!=null&&globalThis.document?p.useLayoutEffect:()=>{},pf=p[" useInsertionEffect ".trim().toString()]||ie;function Ve({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,a,s]=hf({defaultProp:t,onChange:n}),i=e!==void 0,l=i?e:o;{const f=p.useRef(e!==void 0);p.useEffect(()=>{const c=f.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.`),f.current=i},[i,r])}const d=p.useCallback(f=>{var c;if(i){const h=gf(f)?f(e):f;h!==e&&((c=s.current)==null||c.call(s,h))}else a(f)},[i,e,a,s]);return[l,d]}function hf({defaultProp:e,onChange:t}){const[n,r]=p.useState(e),o=p.useRef(n),a=p.useRef(t);return pf(()=>{a.current=t},[t]),p.useEffect(()=>{var s;o.current!==n&&((s=a.current)==null||s.call(a,n),o.current=n)},[n,o]),[n,r,a]}function gf(e){return typeof e=="function"}function mf(e,t){return p.useReducer((n,r)=>t[n][r]??n,e)}var Ee=e=>{const{present:t,children:n}=e,r=vf(t),o=typeof n=="function"?n({present:r.isPresent}):p.Children.only(n),a=se(r.ref,bf(o));return typeof n=="function"||r.isPresent?p.cloneElement(o,{ref:a}):null};Ee.displayName="Presence";function vf(e){const[t,n]=p.useState(),r=p.useRef(null),o=p.useRef(e),a=p.useRef("none"),s=e?"mounted":"unmounted",[i,l]=mf(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect(()=>{const d=an(r.current);a.current=i==="mounted"?d:"none"},[i]),ie(()=>{const d=r.current,f=o.current;if(f!==e){const h=a.current,g=an(d);e?l("MOUNT"):g==="none"||(d==null?void 0:d.display)==="none"?l("UNMOUNT"):l(f&&h!==g?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),ie(()=>{if(t){let d;const f=t.ownerDocument.defaultView??window,c=g=>{const m=an(r.current).includes(CSS.escape(g.animationName));if(g.target===t&&m&&(l("ANIMATION_END"),!o.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",d=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},h=g=>{g.target===t&&(a.current=an(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{f.clearTimeout(d),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:p.useCallback(d=>{r.current=d?getComputedStyle(d):null,n(d)},[])}}function an(e){return(e==null?void 0:e.animationName)||"none"}function bf(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var wf=p[" useId ".trim().toString()]||(()=>{}),yf=0;function lt(e){const[t,n]=p.useState(wf());return ie(()=>{n(r=>r??String(yf++))},[e]),e||(t?`radix-${t}`:"")}var sn="Collapsible",[xf]=me(sn),[Cf,sr]=xf(sn),Da=p.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:a,onOpenChange:s,...i}=e,[l,d]=Ve({prop:r,defaultProp:o??!1,onChange:s,caller:sn});return u.jsx(Cf,{scope:n,disabled:a,contentId:lt(),open:l,onOpenToggle:p.useCallback(()=>d(f=>!f),[d]),children:u.jsx(J.div,{"data-state":lr(l),"data-disabled":a?"":void 0,...i,ref:t})})});Da.displayName=sn;var Ba="CollapsibleTrigger",Fa=p.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=sr(Ba,n);return u.jsx(J.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":lr(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:Q(e.onClick,o.onOpenToggle)})});Fa.displayName=Ba;var ir="CollapsibleContent",$a=p.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=sr(ir,e.__scopeCollapsible);return u.jsx(Ee,{present:n||o.open,children:({present:a})=>u.jsx(kf,{...r,ref:t,present:a})})});$a.displayName=ir;var kf=p.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...a}=e,s=sr(ir,n),[i,l]=p.useState(r),d=p.useRef(null),f=se(t,d),c=p.useRef(0),h=c.current,g=p.useRef(0),v=g.current,m=s.open||i,b=p.useRef(m),w=p.useRef(void 0);return p.useEffect(()=>{const y=requestAnimationFrame(()=>b.current=!1);return()=>cancelAnimationFrame(y)},[]),ie(()=>{const y=d.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,g.current=x.width,b.current||(y.style.transitionDuration=w.current.transitionDuration,y.style.animationName=w.current.animationName),l(r)}},[s.open,r]),u.jsx(J.div,{"data-state":lr(s.open),"data-disabled":s.disabled?"":void 0,id:s.contentId,hidden:!m,...a,ref:f,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":v?`${v}px`:void 0,...e.style},children:m&&o})});function lr(e){return e?"open":"closed"}var Sf=Da,Ef=p.createContext(void 0);function Ut(e){const t=p.useContext(Ef);return e||t||"ltr"}function pe(e){const t=p.useRef(e);return p.useEffect(()=>{t.current=e}),p.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Nf(e,t=globalThis==null?void 0:globalThis.document){const n=pe(e);p.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Tf="DismissableLayer",cr="dismissableLayer.update",_f="dismissableLayer.pointerDownOutside",Af="dismissableLayer.focusOutside",Ha,Va=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),dr=p.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:i,...l}=e,d=p.useContext(Va),[f,c]=p.useState(null),h=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=p.useState({}),v=se(t,N=>c(N)),m=Array.from(d.layers),[b]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),w=m.indexOf(b),y=f?m.indexOf(f):-1,x=d.layersWithOutsidePointerEventsDisabled.size>0,k=y>=w,P=Mf(N=>{const S=N.target,A=[...d.branches].some(z=>z.contains(S));!k||A||(o==null||o(N),s==null||s(N),N.defaultPrevented||i==null||i())},h),E=Lf(N=>{const S=N.target;[...d.branches].some(z=>z.contains(S))||(a==null||a(N),s==null||s(N),N.defaultPrevented||i==null||i())},h);return Nf(N=>{y===d.layers.size-1&&(r==null||r(N),!N.defaultPrevented&&i&&(N.preventDefault(),i()))},h),p.useEffect(()=>{if(f)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(Ha=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),Ua(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Ha)}},[f,h,n,d]),p.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),Ua())},[f,d]),p.useEffect(()=>{const N=()=>g({});return document.addEventListener(cr,N),()=>document.removeEventListener(cr,N)},[]),u.jsx(J.div,{...l,ref:v,style:{pointerEvents:x?k?"auto":"none":void 0,...e.style},onFocusCapture:Q(e.onFocusCapture,E.onFocusCapture),onBlurCapture:Q(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:Q(e.onPointerDownCapture,P.onPointerDownCapture)})});dr.displayName=Tf;var Pf="DismissableLayerBranch",If=p.forwardRef((e,t)=>{const n=p.useContext(Va),r=p.useRef(null),o=se(t,r);return p.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),u.jsx(J.div,{...e,ref:o})});If.displayName=Pf;function Mf(e,t=globalThis==null?void 0:globalThis.document){const n=pe(e),r=p.useRef(!1),o=p.useRef(()=>{});return p.useEffect(()=>{const a=i=>{if(i.target&&!r.current){let l=function(){Ra(_f,n,d,{discrete:!0})};const d={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Lf(e,t=globalThis==null?void 0:globalThis.document){const n=pe(e),r=p.useRef(!1);return p.useEffect(()=>{const o=a=>{a.target&&!r.current&&Ra(Af,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Ua(){const e=new CustomEvent(cr);document.dispatchEvent(e)}function Ra(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?cf(o,a):o.dispatchEvent(a)}var ur="focusScope.autoFocusOnMount",fr="focusScope.autoFocusOnUnmount",ja={bubbles:!1,cancelable:!0},Of="FocusScope",Wa=p.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...s}=e,[i,l]=p.useState(null),d=pe(o),f=pe(a),c=p.useRef(null),h=se(t,m=>l(m)),g=p.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;p.useEffect(()=>{if(r){let m=function(x){if(g.paused||!i)return;const k=x.target;i.contains(k)?c.current=k:Ke(c.current,{select:!0})},b=function(x){if(g.paused||!i)return;const k=x.relatedTarget;k!==null&&(i.contains(k)||Ke(c.current,{select:!0}))},w=function(x){if(document.activeElement===document.body)for(const P of x)P.removedNodes.length>0&&Ke(i)};document.addEventListener("focusin",m),document.addEventListener("focusout",b);const y=new MutationObserver(w);return i&&y.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",b),y.disconnect()}}},[r,i,g.paused]),p.useEffect(()=>{if(i){Ya.add(g);const m=document.activeElement;if(!i.contains(m)){const w=new CustomEvent(ur,ja);i.addEventListener(ur,d),i.dispatchEvent(w),w.defaultPrevented||(zf(Hf(qa(i)),{select:!0}),document.activeElement===m&&Ke(i))}return()=>{i.removeEventListener(ur,d),setTimeout(()=>{const w=new CustomEvent(fr,ja);i.addEventListener(fr,f),i.dispatchEvent(w),w.defaultPrevented||Ke(m??document.body,{select:!0}),i.removeEventListener(fr,f),Ya.remove(g)},0)}}},[i,d,f,g]);const v=p.useCallback(m=>{if(!n&&!r||g.paused)return;const b=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,w=document.activeElement;if(b&&w){const y=m.currentTarget,[x,k]=Df(y);x&&k?!m.shiftKey&&w===k?(m.preventDefault(),n&&Ke(x,{select:!0})):m.shiftKey&&w===x&&(m.preventDefault(),n&&Ke(k,{select:!0})):w===y&&m.preventDefault()}},[n,r,g.paused]);return u.jsx(J.div,{tabIndex:-1,...s,ref:h,onKeyDown:v})});Wa.displayName=Of;function zf(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Ke(r,{select:t}),document.activeElement!==n)return}function Df(e){const t=qa(e),n=Ga(t,e),r=Ga(t.reverse(),e);return[n,r]}function qa(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Ga(e,t){for(const n of e)if(!Bf(n,{upTo:t}))return n}function Bf(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 Ff(e){return e instanceof HTMLInputElement&&"select"in e}function Ke(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Ff(e)&&t&&e.select()}}var Ya=$f();function $f(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Ka(e,t),e.unshift(t)},remove(t){var n;e=Ka(e,t),(n=e[0])==null||n.resume()}}}function Ka(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Hf(e){return e.filter(t=>t.tagName!=="A")}var Vf="Portal",pr=p.forwardRef((e,t)=>{var i;const{container:n,...r}=e,[o,a]=p.useState(!1);ie(()=>a(!0),[]);const s=n||o&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return s?Kn.createPortal(u.jsx(J.div,{...r,ref:t}),s):null});pr.displayName=Vf;var hr=0;function Uf(){p.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Xa()),document.body.insertAdjacentElement("beforeend",e[1]??Xa()),hr++,()=>{hr===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),hr--}},[])}function Xa(){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 n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},Oe.apply(this,arguments)};function Za(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Rf(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,a;r<o;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 ln="right-scroll-bar-position",cn="width-before-scroll-bar",jf="with-scroll-bars-hidden",Wf="--removed-body-scroll-bar-size";function gr(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function qf(e,t){var n=C.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var Gf=typeof window<"u"?p.useLayoutEffect:p.useEffect,Ja=new WeakMap;function Yf(e,t){var n=qf(null,function(r){return e.forEach(function(o){return gr(o,r)})});return Gf(function(){var r=Ja.get(n);if(r){var o=new Set(r),a=new Set(e),s=n.current;o.forEach(function(i){a.has(i)||gr(i,null)}),a.forEach(function(i){o.has(i)||gr(i,s)})}Ja.set(n,e)},[e]),n}function Kf(e){return e}function Xf(e,t){t===void 0&&(t=Kf);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var s=t(a,r);return n.push(s),function(){n=n.filter(function(i){return i!==s})}},assignSyncMedium:function(a){for(r=!0;n.length;){var s=n;n=[],s.forEach(a)}n={push:function(i){return a(i)},filter:function(){return n}}},assignMedium:function(a){r=!0;var s=[];if(n.length){var i=n;n=[],i.forEach(a),s=n}var l=function(){var f=s;s=[],f.forEach(a)},d=function(){return Promise.resolve().then(l)};d(),n={push:function(f){s.push(f),d()},filter:function(f){return s=s.filter(f),n}}}};return o}function Zf(e){e===void 0&&(e={});var t=Xf(null);return t.options=Oe({async:!0,ssr:!1},e),t}var Qa=function(e){var t=e.sideCar,n=Za(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 p.createElement(r,Oe({},n))};Qa.isSideCarExport=!0;function Jf(e,t){return e.useMedium(t),Qa}var es=Zf(),mr=function(){},dn=p.forwardRef(function(e,t){var n=p.useRef(null),r=p.useState({onScrollCapture:mr,onWheelCapture:mr,onTouchMoveCapture:mr}),o=r[0],a=r[1],s=e.forwardProps,i=e.children,l=e.className,d=e.removeScrollBar,f=e.enabled,c=e.shards,h=e.sideCar,g=e.noRelative,v=e.noIsolation,m=e.inert,b=e.allowPinchZoom,w=e.as,y=w===void 0?"div":w,x=e.gapMode,k=Za(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),P=h,E=Yf([n,t]),N=Oe(Oe({},k),o);return p.createElement(p.Fragment,null,f&&p.createElement(P,{sideCar:es,removeScrollBar:d,shards:c,noRelative:g,noIsolation:v,inert:m,setCallbacks:a,allowPinchZoom:!!b,lockRef:n,gapMode:x}),s?p.cloneElement(p.Children.only(i),Oe(Oe({},N),{ref:E})):p.createElement(y,Oe({},N,{className:l,ref:E}),i))});dn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},dn.classNames={fullWidth:cn,zeroRight:ln};var Qf=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function ep(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Qf();return t&&e.setAttribute("nonce",t),e}function tp(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function np(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var rp=function(){var e=0,t=null;return{add:function(n){e==0&&(t=ep())&&(tp(t,n),np(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},op=function(){var e=rp();return function(t,n){p.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},ts=function(){var e=op(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},ap={left:0,top:0,right:0,gap:0},vr=function(e){return parseInt(e||"",10)||0},sp=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[vr(n),vr(r),vr(o)]},ip=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return ap;var t=sp(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},lp=ts(),xt="data-scroll-locked",cp=function(e,t,n,r){var o=e.left,a=e.top,s=e.right,i=e.gap;return n===void 0&&(n="margin"),`
|
|
248
|
+
.`.concat(jf,` {
|
|
244
249
|
overflow: hidden `).concat(r,`;
|
|
245
250
|
padding-right: `).concat(i,"px ").concat(r,`;
|
|
246
251
|
}
|
|
247
|
-
body[`).concat(
|
|
252
|
+
body[`).concat(xt,`] {
|
|
248
253
|
overflow: hidden `).concat(r,`;
|
|
249
254
|
overscroll-behavior: contain;
|
|
250
255
|
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
@@ -273,13 +278,13 @@
|
|
|
273
278
|
margin-right: 0 `).concat(r,`;
|
|
274
279
|
}
|
|
275
280
|
|
|
276
|
-
body[`).concat(
|
|
281
|
+
body[`).concat(xt,`] {
|
|
277
282
|
`).concat(Wf,": ").concat(i,`px;
|
|
278
283
|
}
|
|
279
|
-
`)},
|
|
284
|
+
`)},ns=function(){var e=parseInt(document.body.getAttribute(xt)||"0",10);return isFinite(e)?e:0},dp=function(){p.useEffect(function(){return document.body.setAttribute(xt,(ns()+1).toString()),function(){var e=ns()-1;e<=0?document.body.removeAttribute(xt):document.body.setAttribute(xt,e.toString())}},[])},up=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;dp();var a=p.useMemo(function(){return ip(o)},[o]);return p.createElement(lp,{styles:cp(a,!t,o,n?"":"!important")})},br=!1;if(typeof window<"u")try{var un=Object.defineProperty({},"passive",{get:function(){return br=!0,!0}});window.addEventListener("test",un,un),window.removeEventListener("test",un,un)}catch{br=!1}var Ct=br?{passive:!1}:!1,fp=function(e){return e.tagName==="TEXTAREA"},rs=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!fp(e)&&n[t]==="visible")},pp=function(e){return rs(e,"overflowY")},hp=function(e){return rs(e,"overflowX")},os=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=as(e,r);if(o){var a=ss(e,r),s=a[1],i=a[2];if(s>i)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},gp=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},mp=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},as=function(e,t){return e==="v"?pp(t):hp(t)},ss=function(e,t){return e==="v"?gp(t):mp(t)},vp=function(e,t){return e==="h"&&t==="rtl"?-1:1},bp=function(e,t,n,r,o){var a=vp(e,window.getComputedStyle(t).direction),s=a*r,i=n.target,l=t.contains(i),d=!1,f=s>0,c=0,h=0;do{if(!i)break;var g=ss(e,i),v=g[0],m=g[1],b=g[2],w=m-b-a*v;(v||w)&&as(e,i)&&(c+=w,h+=v);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(f&&Math.abs(c)<1||!f&&Math.abs(h)<1)&&(d=!0),d},fn=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},is=function(e){return[e.deltaX,e.deltaY]},ls=function(e){return e&&"current"in e?e.current:e},wp=function(e,t){return e[0]===t[0]&&e[1]===t[1]},yp=function(e){return`
|
|
280
285
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
281
286
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
282
|
-
`)},
|
|
287
|
+
`)},xp=0,kt=[];function Cp(e){var t=p.useRef([]),n=p.useRef([0,0]),r=p.useRef(),o=p.useState(xp++)[0],a=p.useState(ts)[0],s=p.useRef(e);p.useEffect(function(){s.current=e},[e]),p.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var m=Rf([e.lockRef.current],(e.shards||[]).map(ls),!0).filter(Boolean);return m.forEach(function(b){return b.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),m.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var i=p.useCallback(function(m,b){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!s.current.allowPinchZoom;var w=fn(m),y=n.current,x="deltaX"in m?m.deltaX:y[0]-w[0],k="deltaY"in m?m.deltaY:y[1]-w[1],P,E=m.target,N=Math.abs(x)>Math.abs(k)?"h":"v";if("touches"in m&&N==="h"&&E.type==="range")return!1;var S=window.getSelection(),A=S&&S.anchorNode,z=A?A===E||A.contains(E):!1;if(z)return!1;var _=os(N,E);if(!_)return!0;if(_?P=N:(P=N==="v"?"h":"v",_=os(N,E)),!_)return!1;if(!r.current&&"changedTouches"in m&&(x||k)&&(r.current=P),!P)return!0;var M=r.current||P;return bp(M,b,m,M==="h"?x:k)},[]),l=p.useCallback(function(m){var b=m;if(!(!kt.length||kt[kt.length-1]!==a)){var w="deltaY"in b?is(b):fn(b),y=t.current.filter(function(P){return P.name===b.type&&(P.target===b.target||b.target===P.shadowParent)&&wp(P.delta,w)})[0];if(y&&y.should){b.cancelable&&b.preventDefault();return}if(!y){var x=(s.current.shards||[]).map(ls).filter(Boolean).filter(function(P){return P.contains(b.target)}),k=x.length>0?i(b,x[0]):!s.current.noIsolation;k&&b.cancelable&&b.preventDefault()}}},[]),d=p.useCallback(function(m,b,w,y){var x={name:m,delta:b,target:w,should:y,shadowParent:kp(w)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(k){return k!==x})},1)},[]),f=p.useCallback(function(m){n.current=fn(m),r.current=void 0},[]),c=p.useCallback(function(m){d(m.type,is(m),m.target,i(m,e.lockRef.current))},[]),h=p.useCallback(function(m){d(m.type,fn(m),m.target,i(m,e.lockRef.current))},[]);p.useEffect(function(){return kt.push(a),e.setCallbacks({onScrollCapture:c,onWheelCapture:c,onTouchMoveCapture:h}),document.addEventListener("wheel",l,Ct),document.addEventListener("touchmove",l,Ct),document.addEventListener("touchstart",f,Ct),function(){kt=kt.filter(function(m){return m!==a}),document.removeEventListener("wheel",l,Ct),document.removeEventListener("touchmove",l,Ct),document.removeEventListener("touchstart",f,Ct)}},[]);var g=e.removeScrollBar,v=e.inert;return p.createElement(p.Fragment,null,v?p.createElement(a,{styles:yp(o)}):null,g?p.createElement(up,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function kp(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Sp=Jf(es,Cp);var cs=p.forwardRef(function(e,t){return p.createElement(dn,Oe({},e,{ref:t,sideCar:Sp}))});cs.classNames=dn.classNames;var Ep=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},St=new WeakMap,pn=new WeakMap,hn={},wr=0,ds=function(e){return e&&(e.host||ds(e.parentNode))},Np=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=ds(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Tp=function(e,t,n,r){var o=Np(t,Array.isArray(e)?e:[e]);hn[n]||(hn[n]=new WeakMap);var a=hn[n],s=[],i=new Set,l=new Set(o),d=function(c){!c||i.has(c)||(i.add(c),d(c.parentNode))};o.forEach(d);var f=function(c){!c||l.has(c)||Array.prototype.forEach.call(c.children,function(h){if(i.has(h))f(h);else try{var g=h.getAttribute(r),v=g!==null&&g!=="false",m=(St.get(h)||0)+1,b=(a.get(h)||0)+1;St.set(h,m),a.set(h,b),s.push(h),m===1&&v&&pn.set(h,!0),b===1&&h.setAttribute(n,"true"),v||h.setAttribute(r,"true")}catch(w){console.error("aria-hidden: cannot operate on ",h,w)}})};return f(t),i.clear(),wr++,function(){s.forEach(function(c){var h=St.get(c)-1,g=a.get(c)-1;St.set(c,h),a.set(c,g),h||(pn.has(c)||c.removeAttribute(r),pn.delete(c)),g||c.removeAttribute(n)}),wr--,wr||(St=new WeakMap,St=new WeakMap,pn=new WeakMap,hn={})}},_p=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Ep(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),Tp(r,o,n,"aria-hidden")):function(){return null}};function Ap(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var yr={exports:{}},xr={};/**
|
|
283
288
|
* @license React
|
|
284
289
|
* use-sync-external-store-shim.production.js
|
|
285
290
|
*
|
|
@@ -287,23 +292,23 @@
|
|
|
287
292
|
*
|
|
288
293
|
* This source code is licensed under the MIT license found in the
|
|
289
294
|
* LICENSE file in the root directory of this source tree.
|
|
290
|
-
*/var ds;function Ap(){if(ds)return xr;ds=1;var e=C;function t(c,p){return c===p&&(c!==0||1/c===1/p)||c!==c&&p!==p}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,a=e.useLayoutEffect,s=e.useDebugValue;function i(c,p){var g=p(),v=r({inst:{value:g,getSnapshot:p}}),m=v[0].inst,b=v[1];return a(function(){m.value=g,m.getSnapshot=p,l(m)&&b({inst:m})},[c,g,p]),o(function(){return l(m)&&b({inst:m}),c(function(){l(m)&&b({inst:m})})},[c]),s(g),g}function l(c){var p=c.getSnapshot;c=c.value;try{var g=p();return!n(c,g)}catch{return!0}}function d(c,p){return p()}var f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:i;return xr.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:f,xr}var us;function Pp(){return us||(us=1,yr.exports=Ap()),yr.exports}var Ip=Pp();function Mp(){return Ip.useSyncExternalStore(Lp,()=>!0,()=>!1)}function Lp(){return()=>{}}var Cr="Avatar",[Op]=me(Cr),[zp,fs]=Op(Cr),ps=h.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[o,a]=h.useState("idle");return u.jsx(zp,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:a,children:u.jsx(J.span,{...r,ref:t})})});ps.displayName=Cr;var hs="AvatarImage",gs=h.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:o=()=>{},...a}=e,s=fs(hs,n),i=Dp(r,a),l=pe(d=>{o(d),s.onImageLoadingStatusChange(d)});return ie(()=>{i!=="idle"&&l(i)},[i,l]),i==="loaded"?u.jsx(J.img,{...a,ref:t,src:r}):null});gs.displayName=hs;var ms="AvatarFallback",vs=h.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...o}=e,a=fs(ms,n),[s,i]=h.useState(r===void 0);return h.useEffect(()=>{if(r!==void 0){const l=window.setTimeout(()=>i(!0),r);return()=>window.clearTimeout(l)}},[r]),s&&a.imageLoadingStatus!=="loaded"?u.jsx(J.span,{...o,ref:t}):null});vs.displayName=ms;function bs(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function Dp(e,{referrerPolicy:t,crossOrigin:n}){const r=Mp(),o=h.useRef(null),a=r?(o.current||(o.current=new window.Image),o.current):null,[s,i]=h.useState(()=>bs(a,e));return ie(()=>{i(bs(a,e))},[a,e]),ie(()=>{const l=c=>()=>{i(c)};if(!a)return;const d=l("loaded"),f=l("error");return a.addEventListener("load",d),a.addEventListener("error",f),t&&(a.referrerPolicy=t),typeof n=="string"&&(a.crossOrigin=n),()=>{a.removeEventListener("load",d),a.removeEventListener("error",f)}},[a,n,t]),s}var Bp=ps,Fp=gs,$p=vs;function gn(e){const t=h.useRef({value:e,previous:e});return h.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function mn(e){const[t,n]=h.useState(void 0);return ie(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let s,i;if("borderBoxSize"in a){const l=a.borderBoxSize,d=Array.isArray(l)?l[0]:l;s=d.inlineSize,i=d.blockSize}else s=e.offsetWidth,i=e.offsetHeight;n({width:s,height:i})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var vn="Checkbox",[Hp]=me(vn),[Vp,kr]=Hp(vn);function Up(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:o,disabled:a,form:s,name:i,onCheckedChange:l,required:d,value:f="on",internal_do_not_use_render:c}=e,[p,g]=Ve({prop:n,defaultProp:o??!1,onChange:l,caller:vn}),[v,m]=h.useState(null),[b,w]=h.useState(null),y=h.useRef(!1),x=v?!!s||!!v.closest("form"):!0,k={checked:p,disabled:a,setChecked:g,control:v,setControl:m,name:i,form:s,value:f,hasConsumerStoppedPropagationRef:y,required:d,defaultChecked:Ke(o)?!1:o,isFormControl:x,bubbleInput:b,setBubbleInput:w};return u.jsx(Vp,{scope:t,...k,children:Rp(c)?c(k):r})}var ws="CheckboxTrigger",ys=h.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},o)=>{const{control:a,value:s,disabled:i,checked:l,required:d,setControl:f,setChecked:c,hasConsumerStoppedPropagationRef:p,isFormControl:g,bubbleInput:v}=kr(ws,e),m=se(o,f),b=h.useRef(l);return h.useEffect(()=>{const w=a==null?void 0:a.form;if(w){const y=()=>c(b.current);return w.addEventListener("reset",y),()=>w.removeEventListener("reset",y)}},[a,c]),u.jsx(J.button,{type:"button",role:"checkbox","aria-checked":Ke(l)?"mixed":l,"aria-required":d,"data-state":Ns(l),"data-disabled":i?"":void 0,disabled:i,value:s,...r,ref:m,onKeyDown:Q(t,w=>{w.key==="Enter"&&w.preventDefault()}),onClick:Q(n,w=>{c(y=>Ke(y)?!0:!y),v&&g&&(p.current=w.isPropagationStopped(),p.current||w.stopPropagation())})})});ys.displayName=ws;var xs=h.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:a,required:s,disabled:i,value:l,onCheckedChange:d,form:f,...c}=e;return u.jsx(Up,{__scopeCheckbox:n,checked:o,defaultChecked:a,disabled:i,required:s,onCheckedChange:d,name:r,form:f,value:l,internal_do_not_use_render:({isFormControl:p})=>u.jsxs(u.Fragment,{children:[u.jsx(ys,{...c,ref:t,__scopeCheckbox:n}),p&&u.jsx(Es,{__scopeCheckbox:n})]})})});xs.displayName=vn;var Cs="CheckboxIndicator",ks=h.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,a=kr(Cs,n);return u.jsx(Ee,{present:r||Ke(a.checked)||a.checked===!0,children:u.jsx(J.span,{"data-state":Ns(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});ks.displayName=Cs;var Ss="CheckboxBubbleInput",Es=h.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:o,checked:a,defaultChecked:s,required:i,disabled:l,name:d,value:f,form:c,bubbleInput:p,setBubbleInput:g}=kr(Ss,e),v=se(n,g),m=gn(a),b=mn(r);h.useEffect(()=>{const y=p;if(!y)return;const x=window.HTMLInputElement.prototype,P=Object.getOwnPropertyDescriptor(x,"checked").set,E=!o.current;if(m!==a&&P){const N=new Event("click",{bubbles:E});y.indeterminate=Ke(a),P.call(y,Ke(a)?!1:a),y.dispatchEvent(N)}},[p,m,a,o]);const w=h.useRef(Ke(a)?!1:a);return u.jsx(J.input,{type:"checkbox","aria-hidden":!0,defaultChecked:s??w.current,required:i,disabled:l,name:d,value:f,form:c,...t,tabIndex:-1,ref:v,style:{...t.style,...b,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Es.displayName=Ss;function Rp(e){return typeof e=="function"}function Ke(e){return e==="indeterminate"}function Ns(e){return Ke(e)?"indeterminate":e?"checked":"unchecked"}const Wp=["top","right","bottom","left"],Xe=Math.min,we=Math.max,bn=Math.round,wn=Math.floor,ze=e=>({x:e,y:e}),jp={left:"right",right:"left",bottom:"top",top:"bottom"};function Sr(e,t,n){return we(e,Xe(t,n))}function Ue(e,t){return typeof e=="function"?e(t):e}function Re(e){return e.split("-")[0]}function St(e){return e.split("-")[1]}function Er(e){return e==="x"?"y":"x"}function Nr(e){return e==="y"?"height":"width"}function De(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Tr(e){return Er(De(e))}function qp(e,t,n){n===void 0&&(n=!1);const r=St(e),o=Tr(e),a=Nr(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=yn(s)),[s,yn(s)]}function Gp(e){const t=yn(e);return[_r(e),t,_r(t)]}function _r(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Ts=["left","right"],_s=["right","left"],Yp=["top","bottom"],Kp=["bottom","top"];function Xp(e,t,n){switch(e){case"top":case"bottom":return n?t?_s:Ts:t?Ts:_s;case"left":case"right":return t?Yp:Kp;default:return[]}}function Zp(e,t,n,r){const o=St(e);let a=Xp(Re(e),n==="start",r);return o&&(a=a.map(s=>s+"-"+o),t&&(a=a.concat(a.map(_r)))),a}function yn(e){const t=Re(e);return jp[t]+e.slice(t.length)}function Jp(e){return{top:0,right:0,bottom:0,left:0,...e}}function As(e){return typeof e!="number"?Jp(e):{top:e,right:e,bottom:e,left:e}}function xn(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Ps(e,t,n){let{reference:r,floating:o}=e;const a=De(t),s=Tr(t),i=Nr(s),l=Re(t),d=a==="y",f=r.x+r.width/2-o.width/2,c=r.y+r.height/2-o.height/2,p=r[i]/2-o[i]/2;let g;switch(l){case"top":g={x:f,y:r.y-o.height};break;case"bottom":g={x:f,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:c};break;case"left":g={x:r.x-o.width,y:c};break;default:g={x:r.x,y:r.y}}switch(St(t)){case"start":g[s]-=p*(n&&d?-1:1);break;case"end":g[s]+=p*(n&&d?-1:1);break}return g}async function Qp(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:s,elements:i,strategy:l}=e,{boundary:d="clippingAncestors",rootBoundary:f="viewport",elementContext:c="floating",altBoundary:p=!1,padding:g=0}=Ue(t,e),v=As(g),b=i[p?c==="floating"?"reference":"floating":c],w=xn(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(b)))==null||n?b:b.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(i.floating)),boundary:d,rootBoundary:f,strategy:l})),y=c==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,x=await(a.getOffsetParent==null?void 0:a.getOffsetParent(i.floating)),k=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},P=xn(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:y,offsetParent:x,strategy:l}):y);return{top:(w.top-P.top+v.top)/k.y,bottom:(P.bottom-w.bottom+v.bottom)/k.y,left:(w.left-P.left+v.left)/k.x,right:(P.right-w.right+v.right)/k.x}}const eh=50,th=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:s}=n,i=s.detectOverflow?s:{...s,detectOverflow:Qp},l=await(s.isRTL==null?void 0:s.isRTL(t));let d=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:c}=Ps(d,r,l),p=r,g=0;const v={};for(let m=0;m<a.length;m++){const b=a[m];if(!b)continue;const{name:w,fn:y}=b,{x,y:k,data:P,reset:E}=await y({x:f,y:c,initialPlacement:r,placement:p,strategy:o,middlewareData:v,rects:d,platform:i,elements:{reference:e,floating:t}});f=x??f,c=k??c,v[w]={...v[w],...P},E&&g<eh&&(g++,typeof E=="object"&&(E.placement&&(p=E.placement),E.rects&&(d=E.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):E.rects),{x:f,y:c}=Ps(d,p,l)),m=-1)}return{x:f,y:c,placement:p,strategy:o,middlewareData:v}},nh=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:a,platform:s,elements:i,middlewareData:l}=t,{element:d,padding:f=0}=Ue(e,t)||{};if(d==null)return{};const c=As(f),p={x:n,y:r},g=Tr(o),v=Nr(g),m=await s.getDimensions(d),b=g==="y",w=b?"top":"left",y=b?"bottom":"right",x=b?"clientHeight":"clientWidth",k=a.reference[v]+a.reference[g]-p[g]-a.floating[v],P=p[g]-a.reference[g],E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(d));let N=E?E[x]:0;(!N||!await(s.isElement==null?void 0:s.isElement(E)))&&(N=i.floating[x]||a.floating[v]);const S=k/2-P/2,A=N/2-m[v]/2-1,z=Xe(c[w],A),_=Xe(c[y],A),M=z,O=N-m[v]-_,I=N/2-m[v]/2+S,j=Sr(M,I,O),D=!l.arrow&&St(o)!=null&&I!==j&&a.reference[v]/2-(I<M?z:_)-m[v]/2<0,$=D?I<M?I-M:I-O:0;return{[g]:p[g]+$,data:{[g]:j,centerOffset:I-j-$,...D&&{alignmentOffset:$}},reset:D}}}),rh=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:a,rects:s,initialPlacement:i,platform:l,elements:d}=t,{mainAxis:f=!0,crossAxis:c=!0,fallbackPlacements:p,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:m=!0,...b}=Ue(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const w=Re(o),y=De(i),x=Re(i)===i,k=await(l.isRTL==null?void 0:l.isRTL(d.floating)),P=p||(x||!m?[yn(i)]:Gp(i)),E=v!=="none";!p&&E&&P.push(...Zp(i,m,v,k));const N=[i,...P],S=await l.detectOverflow(t,b),A=[];let z=((r=a.flip)==null?void 0:r.overflows)||[];if(f&&A.push(S[w]),c){const I=qp(o,s,k);A.push(S[I[0]],S[I[1]])}if(z=[...z,{placement:o,overflows:A}],!A.every(I=>I<=0)){var _,M;const I=(((_=a.flip)==null?void 0:_.index)||0)+1,j=N[I];if(j&&(!(c==="alignment"?y!==De(j):!1)||z.every(q=>De(q.placement)===y?q.overflows[0]>0:!0)))return{data:{index:I,overflows:z},reset:{placement:j}};let D=(M=z.filter($=>$.overflows[0]<=0).sort(($,q)=>$.overflows[1]-q.overflows[1])[0])==null?void 0:M.placement;if(!D)switch(g){case"bestFit":{var O;const $=(O=z.filter(q=>{if(E){const L=De(q.placement);return L===y||L==="y"}return!0}).map(q=>[q.placement,q.overflows.filter(L=>L>0).reduce((L,T)=>L+T,0)]).sort((q,L)=>q[1]-L[1])[0])==null?void 0:O[0];$&&(D=$);break}case"initialPlacement":D=i;break}if(o!==D)return{reset:{placement:D}}}return{}}}};function Is(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ms(e){return Wp.some(t=>e[t]>=0)}const oh=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...a}=Ue(e,t);switch(o){case"referenceHidden":{const s=await r.detectOverflow(t,{...a,elementContext:"reference"}),i=Is(s,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Ms(i)}}}case"escaped":{const s=await r.detectOverflow(t,{...a,altBoundary:!0}),i=Is(s,n.floating);return{data:{escapedOffsets:i,escaped:Ms(i)}}}default:return{}}}}},Ls=new Set(["left","top"]);async function ah(e,t){const{placement:n,platform:r,elements:o}=e,a=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=Re(n),i=St(n),l=De(n)==="y",d=Ls.has(s)?-1:1,f=a&&l?-1:1,c=Ue(t,e);let{mainAxis:p,crossAxis:g,alignmentAxis:v}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return i&&typeof v=="number"&&(g=i==="end"?v*-1:v),l?{x:g*f,y:p*d}:{x:p*d,y:g*f}}const sh=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:a,placement:s,middlewareData:i}=t,l=await ah(t,e);return s===((n=i.offset)==null?void 0:n.placement)&&(r=i.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:a+l.y,data:{...l,placement:s}}}}},ih=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:a}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:l={fn:w=>{let{x:y,y:x}=w;return{x:y,y:x}}},...d}=Ue(e,t),f={x:n,y:r},c=await a.detectOverflow(t,d),p=De(Re(o)),g=Er(p);let v=f[g],m=f[p];if(s){const w=g==="y"?"top":"left",y=g==="y"?"bottom":"right",x=v+c[w],k=v-c[y];v=Sr(x,v,k)}if(i){const w=p==="y"?"top":"left",y=p==="y"?"bottom":"right",x=m+c[w],k=m-c[y];m=Sr(x,m,k)}const b=l.fn({...t,[g]:v,[p]:m});return{...b,data:{x:b.x-n,y:b.y-r,enabled:{[g]:s,[p]:i}}}}}},lh=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:s}=t,{offset:i=0,mainAxis:l=!0,crossAxis:d=!0}=Ue(e,t),f={x:n,y:r},c=De(o),p=Er(c);let g=f[p],v=f[c];const m=Ue(i,t),b=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const x=p==="y"?"height":"width",k=a.reference[p]-a.floating[x]+b.mainAxis,P=a.reference[p]+a.reference[x]-b.mainAxis;g<k?g=k:g>P&&(g=P)}if(d){var w,y;const x=p==="y"?"width":"height",k=Ls.has(Re(o)),P=a.reference[c]-a.floating[x]+(k&&((w=s.offset)==null?void 0:w[c])||0)+(k?0:b.crossAxis),E=a.reference[c]+a.reference[x]+(k?0:((y=s.offset)==null?void 0:y[c])||0)-(k?b.crossAxis:0);v<P?v=P:v>E&&(v=E)}return{[p]:g,[c]:v}}}},ch=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:a,platform:s,elements:i}=t,{apply:l=()=>{},...d}=Ue(e,t),f=await s.detectOverflow(t,d),c=Re(o),p=St(o),g=De(o)==="y",{width:v,height:m}=a.floating;let b,w;c==="top"||c==="bottom"?(b=c,w=p===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(w=c,b=p==="end"?"top":"bottom");const y=m-f.top-f.bottom,x=v-f.left-f.right,k=Xe(m-f[b],y),P=Xe(v-f[w],x),E=!t.middlewareData.shift;let N=k,S=P;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(S=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(N=y),E&&!p){const z=we(f.left,0),_=we(f.right,0),M=we(f.top,0),O=we(f.bottom,0);g?S=v-2*(z!==0||_!==0?z+_:we(f.left,f.right)):N=m-2*(M!==0||O!==0?M+O:we(f.top,f.bottom))}await l({...t,availableWidth:S,availableHeight:N});const A=await s.getDimensions(i.floating);return v!==A.width||m!==A.height?{reset:{rects:!0}}:{}}}};function Cn(){return typeof window<"u"}function Et(e){return Os(e)?(e.nodeName||"").toLowerCase():"#document"}function ye(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Be(e){var t;return(t=(Os(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Os(e){return Cn()?e instanceof Node||e instanceof ye(e).Node:!1}function Ne(e){return Cn()?e instanceof Element||e instanceof ye(e).Element:!1}function We(e){return Cn()?e instanceof HTMLElement||e instanceof ye(e).HTMLElement:!1}function zs(e){return!Cn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ye(e).ShadowRoot}function Rt(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Te(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function dh(e){return/^(table|td|th)$/.test(Et(e))}function kn(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const uh=/transform|translate|scale|rotate|perspective|filter/,fh=/paint|layout|strict|content/,it=e=>!!e&&e!=="none";let Ar;function Pr(e){const t=Ne(e)?Te(e):e;return it(t.transform)||it(t.translate)||it(t.scale)||it(t.rotate)||it(t.perspective)||!Ir()&&(it(t.backdropFilter)||it(t.filter))||uh.test(t.willChange||"")||fh.test(t.contain||"")}function ph(e){let t=Ze(e);for(;We(t)&&!Nt(t);){if(Pr(t))return t;if(kn(t))return null;t=Ze(t)}return null}function Ir(){return Ar==null&&(Ar=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ar}function Nt(e){return/^(html|body|#document)$/.test(Et(e))}function Te(e){return ye(e).getComputedStyle(e)}function Sn(e){return Ne(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ze(e){if(Et(e)==="html")return e;const t=e.assignedSlot||e.parentNode||zs(e)&&e.host||Be(e);return zs(t)?t.host:t}function Ds(e){const t=Ze(e);return Nt(t)?e.ownerDocument?e.ownerDocument.body:e.body:We(t)&&Rt(t)?t:Ds(t)}function Wt(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Ds(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),s=ye(o);if(a){const i=Mr(s);return t.concat(s,s.visualViewport||[],Rt(o)?o:[],i&&n?Wt(i):[])}else return t.concat(o,Wt(o,[],n))}function Mr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Bs(e){const t=Te(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=We(e),a=o?e.offsetWidth:n,s=o?e.offsetHeight:r,i=bn(n)!==a||bn(r)!==s;return i&&(n=a,r=s),{width:n,height:r,$:i}}function Lr(e){return Ne(e)?e:e.contextElement}function Tt(e){const t=Lr(e);if(!We(t))return ze(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=Bs(t);let s=(a?bn(n.width):n.width)/r,i=(a?bn(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!i||!Number.isFinite(i))&&(i=1),{x:s,y:i}}const hh=ze(0);function Fs(e){const t=ye(e);return!Ir()||!t.visualViewport?hh:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function gh(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ye(e)?!1:t}function lt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=Lr(e);let s=ze(1);t&&(r?Ne(r)&&(s=Tt(r)):s=Tt(e));const i=gh(a,n,r)?Fs(a):ze(0);let l=(o.left+i.x)/s.x,d=(o.top+i.y)/s.y,f=o.width/s.x,c=o.height/s.y;if(a){const p=ye(a),g=r&&Ne(r)?ye(r):r;let v=p,m=Mr(v);for(;m&&r&&g!==v;){const b=Tt(m),w=m.getBoundingClientRect(),y=Te(m),x=w.left+(m.clientLeft+parseFloat(y.paddingLeft))*b.x,k=w.top+(m.clientTop+parseFloat(y.paddingTop))*b.y;l*=b.x,d*=b.y,f*=b.x,c*=b.y,l+=x,d+=k,v=ye(m),m=Mr(v)}}return xn({width:f,height:c,x:l,y:d})}function En(e,t){const n=Sn(e).scrollLeft;return t?t.left+n:lt(Be(e)).left+n}function $s(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-En(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function mh(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",s=Be(r),i=t?kn(t.floating):!1;if(r===s||i&&a)return n;let l={scrollLeft:0,scrollTop:0},d=ze(1);const f=ze(0),c=We(r);if((c||!c&&!a)&&((Et(r)!=="body"||Rt(s))&&(l=Sn(r)),c)){const g=lt(r);d=Tt(r),f.x=g.x+r.clientLeft,f.y=g.y+r.clientTop}const p=s&&!c&&!a?$s(s,l):ze(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-l.scrollLeft*d.x+f.x+p.x,y:n.y*d.y-l.scrollTop*d.y+f.y+p.y}}function vh(e){return Array.from(e.getClientRects())}function bh(e){const t=Be(e),n=Sn(e),r=e.ownerDocument.body,o=we(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=we(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+En(e);const i=-n.scrollTop;return Te(r).direction==="rtl"&&(s+=we(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:s,y:i}}const Hs=25;function wh(e,t){const n=ye(e),r=Be(e),o=n.visualViewport;let a=r.clientWidth,s=r.clientHeight,i=0,l=0;if(o){a=o.width,s=o.height;const f=Ir();(!f||f&&t==="fixed")&&(i=o.offsetLeft,l=o.offsetTop)}const d=En(r);if(d<=0){const f=r.ownerDocument,c=f.body,p=getComputedStyle(c),g=f.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,v=Math.abs(r.clientWidth-c.clientWidth-g);v<=Hs&&(a-=v)}else d<=Hs&&(a+=d);return{width:a,height:s,x:i,y:l}}function yh(e,t){const n=lt(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=We(e)?Tt(e):ze(1),s=e.clientWidth*a.x,i=e.clientHeight*a.y,l=o*a.x,d=r*a.y;return{width:s,height:i,x:l,y:d}}function Vs(e,t,n){let r;if(t==="viewport")r=wh(e,n);else if(t==="document")r=bh(Be(e));else if(Ne(t))r=yh(t,n);else{const o=Fs(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return xn(r)}function Us(e,t){const n=Ze(e);return n===t||!Ne(n)||Nt(n)?!1:Te(n).position==="fixed"||Us(n,t)}function xh(e,t){const n=t.get(e);if(n)return n;let r=Wt(e,[],!1).filter(i=>Ne(i)&&Et(i)!=="body"),o=null;const a=Te(e).position==="fixed";let s=a?Ze(e):e;for(;Ne(s)&&!Nt(s);){const i=Te(s),l=Pr(s);!l&&i.position==="fixed"&&(o=null),(a?!l&&!o:!l&&i.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||Rt(s)&&!l&&Us(e,s))?r=r.filter(f=>f!==s):o=i,s=Ze(s)}return t.set(e,r),r}function Ch(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?kn(t)?[]:xh(t,this._c):[].concat(n),r],i=Vs(t,s[0],o);let l=i.top,d=i.right,f=i.bottom,c=i.left;for(let p=1;p<s.length;p++){const g=Vs(t,s[p],o);l=we(g.top,l),d=Xe(g.right,d),f=Xe(g.bottom,f),c=we(g.left,c)}return{width:d-c,height:f-l,x:c,y:l}}function kh(e){const{width:t,height:n}=Bs(e);return{width:t,height:n}}function Sh(e,t,n){const r=We(t),o=Be(t),a=n==="fixed",s=lt(e,!0,a,t);let i={scrollLeft:0,scrollTop:0};const l=ze(0);function d(){l.x=En(o)}if(r||!r&&!a)if((Et(t)!=="body"||Rt(o))&&(i=Sn(t)),r){const g=lt(t,!0,a,t);l.x=g.x+t.clientLeft,l.y=g.y+t.clientTop}else o&&d();a&&!r&&o&&d();const f=o&&!r&&!a?$s(o,i):ze(0),c=s.left+i.scrollLeft-l.x-f.x,p=s.top+i.scrollTop-l.y-f.y;return{x:c,y:p,width:s.width,height:s.height}}function Or(e){return Te(e).position==="static"}function Rs(e,t){if(!We(e)||Te(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Be(e)===n&&(n=n.ownerDocument.body),n}function Ws(e,t){const n=ye(e);if(kn(e))return n;if(!We(e)){let o=Ze(e);for(;o&&!Nt(o);){if(Ne(o)&&!Or(o))return o;o=Ze(o)}return n}let r=Rs(e,t);for(;r&&dh(r)&&Or(r);)r=Rs(r,t);return r&&Nt(r)&&Or(r)&&!Pr(r)?n:r||ph(e)||n}const Eh=async function(e){const t=this.getOffsetParent||Ws,n=this.getDimensions,r=await n(e.floating);return{reference:Sh(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Nh(e){return Te(e).direction==="rtl"}const Th={convertOffsetParentRelativeRectToViewportRelativeRect:mh,getDocumentElement:Be,getClippingRect:Ch,getOffsetParent:Ws,getElementRects:Eh,getClientRects:vh,getDimensions:kh,getScale:Tt,isElement:Ne,isRTL:Nh};function js(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function _h(e,t){let n=null,r;const o=Be(e);function a(){var i;clearTimeout(r),(i=n)==null||i.disconnect(),n=null}function s(i,l){i===void 0&&(i=!1),l===void 0&&(l=1),a();const d=e.getBoundingClientRect(),{left:f,top:c,width:p,height:g}=d;if(i||t(),!p||!g)return;const v=wn(c),m=wn(o.clientWidth-(f+p)),b=wn(o.clientHeight-(c+g)),w=wn(f),x={rootMargin:-v+"px "+-m+"px "+-b+"px "+-w+"px",threshold:we(0,Xe(1,l))||1};let k=!0;function P(E){const N=E[0].intersectionRatio;if(N!==l){if(!k)return s();N?s(!1,N):r=setTimeout(()=>{s(!1,1e-7)},1e3)}N===1&&!js(d,e.getBoundingClientRect())&&s(),k=!1}try{n=new IntersectionObserver(P,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(P,x)}n.observe(e)}return s(!0),a}function Ah(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,d=Lr(e),f=o||a?[...d?Wt(d):[],...t?Wt(t):[]]:[];f.forEach(w=>{o&&w.addEventListener("scroll",n,{passive:!0}),a&&w.addEventListener("resize",n)});const c=d&&i?_h(d,n):null;let p=-1,g=null;s&&(g=new ResizeObserver(w=>{let[y]=w;y&&y.target===d&&g&&t&&(g.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var x;(x=g)==null||x.observe(t)})),n()}),d&&!l&&g.observe(d),t&&g.observe(t));let v,m=l?lt(e):null;l&&b();function b(){const w=lt(e);m&&!js(m,w)&&n(),m=w,v=requestAnimationFrame(b)}return n(),()=>{var w;f.forEach(y=>{o&&y.removeEventListener("scroll",n),a&&y.removeEventListener("resize",n)}),c==null||c(),(w=g)==null||w.disconnect(),g=null,l&&cancelAnimationFrame(v)}}const Ph=sh,Ih=ih,Mh=rh,Lh=ch,Oh=oh,qs=nh,zh=lh,Dh=(e,t,n)=>{const r=new Map,o={platform:Th,...n},a={...o.platform,_c:r};return th(e,t,{...o,platform:a})};var Bh=typeof document<"u",Fh=function(){},Nn=Bh?C.useLayoutEffect:Fh;function Tn(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 n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Tn(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const a=o[r];if(!(a==="_owner"&&e.$$typeof)&&!Tn(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function Gs(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ys(e,t){const n=Gs(e);return Math.round(t*n)/n}function zr(e){const t=h.useRef(e);return Nn(()=>{t.current=e}),t}function $h(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:a,floating:s}={},transform:i=!0,whileElementsMounted:l,open:d}=e,[f,c]=h.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,g]=h.useState(r);Tn(p,r)||g(r);const[v,m]=h.useState(null),[b,w]=h.useState(null),y=h.useCallback(q=>{q!==E.current&&(E.current=q,m(q))},[]),x=h.useCallback(q=>{q!==N.current&&(N.current=q,w(q))},[]),k=a||v,P=s||b,E=h.useRef(null),N=h.useRef(null),S=h.useRef(f),A=l!=null,z=zr(l),_=zr(o),M=zr(d),O=h.useCallback(()=>{if(!E.current||!N.current)return;const q={placement:t,strategy:n,middleware:p};_.current&&(q.platform=_.current),Dh(E.current,N.current,q).then(L=>{const T={...L,isPositioned:M.current!==!1};I.current&&!Tn(S.current,T)&&(S.current=T,Zt.flushSync(()=>{c(T)}))})},[p,t,n,_,M]);Nn(()=>{d===!1&&S.current.isPositioned&&(S.current.isPositioned=!1,c(q=>({...q,isPositioned:!1})))},[d]);const I=h.useRef(!1);Nn(()=>(I.current=!0,()=>{I.current=!1}),[]),Nn(()=>{if(k&&(E.current=k),P&&(N.current=P),k&&P){if(z.current)return z.current(k,P,O);O()}},[k,P,O,z,A]);const j=h.useMemo(()=>({reference:E,floating:N,setReference:y,setFloating:x}),[y,x]),D=h.useMemo(()=>({reference:k,floating:P}),[k,P]),$=h.useMemo(()=>{const q={position:n,left:0,top:0};if(!D.floating)return q;const L=Ys(D.floating,f.x),T=Ys(D.floating,f.y);return i?{...q,transform:"translate("+L+"px, "+T+"px)",...Gs(D.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:L,top:T}},[n,i,D.floating,f.x,f.y]);return h.useMemo(()=>({...f,update:O,refs:j,elements:D,floatingStyles:$}),[f,O,j,D,$])}const Hh=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?qs({element:r.current,padding:o}).fn(n):{}:r?qs({element:r,padding:o}).fn(n):{}}}},Vh=(e,t)=>{const n=Ph(e);return{name:n.name,fn:n.fn,options:[e,t]}},Uh=(e,t)=>{const n=Ih(e);return{name:n.name,fn:n.fn,options:[e,t]}},Rh=(e,t)=>({fn:zh(e).fn,options:[e,t]}),Wh=(e,t)=>{const n=Mh(e);return{name:n.name,fn:n.fn,options:[e,t]}},jh=(e,t)=>{const n=Lh(e);return{name:n.name,fn:n.fn,options:[e,t]}},qh=(e,t)=>{const n=Oh(e);return{name:n.name,fn:n.fn,options:[e,t]}},Gh=(e,t)=>{const n=Hh(e);return{name:n.name,fn:n.fn,options:[e,t]}};var Yh="Arrow",Ks=h.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...a}=e;return u.jsx(J.svg,{...a,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:u.jsx("polygon",{points:"0,0 30,0 15,10"})})});Ks.displayName=Yh;var Kh=Ks,Dr="Popper",[Xs,_n]=me(Dr),[Xh,Zs]=Xs(Dr),Js=e=>{const{__scopePopper:t,children:n}=e,[r,o]=h.useState(null);return u.jsx(Xh,{scope:t,anchor:r,onAnchorChange:o,children:n})};Js.displayName=Dr;var Qs="PopperAnchor",ei=h.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=Zs(Qs,n),s=h.useRef(null),i=se(t,s),l=h.useRef(null);return h.useEffect(()=>{const d=l.current;l.current=(r==null?void 0:r.current)||s.current,d!==l.current&&a.onAnchorChange(l.current)}),r?null:u.jsx(J.div,{...o,ref:i})});ei.displayName=Qs;var Br="PopperContent",[Zh,Jh]=Xs(Br),ti=h.forwardRef((e,t)=>{var R,W,Z,ee,ae,ne;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:a="center",alignOffset:s=0,arrowPadding:i=0,avoidCollisions:l=!0,collisionBoundary:d=[],collisionPadding:f=0,sticky:c="partial",hideWhenDetached:p=!1,updatePositionStrategy:g="optimized",onPlaced:v,...m}=e,b=Zs(Br,n),[w,y]=h.useState(null),x=se(t,ce=>y(ce)),[k,P]=h.useState(null),E=mn(k),N=(E==null?void 0:E.width)??0,S=(E==null?void 0:E.height)??0,A=r+(a!=="center"?"-"+a:""),z=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},_=Array.isArray(d)?d:[d],M=_.length>0,O={padding:z,boundary:_.filter(eg),altBoundary:M},{refs:I,floatingStyles:j,placement:D,isPositioned:$,middlewareData:q}=$h({strategy:"fixed",placement:A,whileElementsMounted:(...ce)=>Ah(...ce,{animationFrame:g==="always"}),elements:{reference:b.anchor},middleware:[Vh({mainAxis:o+S,alignmentAxis:s}),l&&Uh({mainAxis:!0,crossAxis:!1,limiter:c==="partial"?Rh():void 0,...O}),l&&Wh({...O}),jh({...O,apply:({elements:ce,rects:de,availableWidth:pt,availableHeight:tt})=>{const{width:Ae,height:jn}=de.reference,ve=ce.floating.style;ve.setProperty("--radix-popper-available-width",`${pt}px`),ve.setProperty("--radix-popper-available-height",`${tt}px`),ve.setProperty("--radix-popper-anchor-width",`${Ae}px`),ve.setProperty("--radix-popper-anchor-height",`${jn}px`)}}),k&&Gh({element:k,padding:i}),tg({arrowWidth:N,arrowHeight:S}),p&&qh({strategy:"referenceHidden",...O})]}),[L,T]=oi(D),F=pe(v);ie(()=>{$&&(F==null||F())},[$,F]);const H=(R=q.arrow)==null?void 0:R.x,B=(W=q.arrow)==null?void 0:W.y,V=((Z=q.arrow)==null?void 0:Z.centerOffset)!==0,[U,X]=h.useState();return ie(()=>{w&&X(window.getComputedStyle(w).zIndex)},[w]),u.jsx("div",{ref:I.setFloating,"data-radix-popper-content-wrapper":"",style:{...j,transform:$?j.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:U,"--radix-popper-transform-origin":[(ee=q.transformOrigin)==null?void 0:ee.x,(ae=q.transformOrigin)==null?void 0:ae.y].join(" "),...((ne=q.hide)==null?void 0:ne.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:u.jsx(Zh,{scope:n,placedSide:L,onArrowChange:P,arrowX:H,arrowY:B,shouldHideArrow:V,children:u.jsx(J.div,{"data-side":L,"data-align":T,...m,ref:x,style:{...m.style,animation:$?void 0:"none"}})})})});ti.displayName=Br;var ni="PopperArrow",Qh={top:"bottom",right:"left",bottom:"top",left:"right"},ri=h.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,a=Jh(ni,r),s=Qh[a.placedSide];return u.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:u.jsx(Kh,{...o,ref:n,style:{...o.style,display:"block"}})})});ri.displayName=ni;function eg(e){return e!==null}var tg=e=>({name:"transformOrigin",options:e,fn(t){var b,w,y;const{placement:n,rects:r,middlewareData:o}=t,s=((b=o.arrow)==null?void 0:b.centerOffset)!==0,i=s?0:e.arrowWidth,l=s?0:e.arrowHeight,[d,f]=oi(n),c={start:"0%",center:"50%",end:"100%"}[f],p=(((w=o.arrow)==null?void 0:w.x)??0)+i/2,g=(((y=o.arrow)==null?void 0:y.y)??0)+l/2;let v="",m="";return d==="bottom"?(v=s?c:`${p}px`,m=`${-l}px`):d==="top"?(v=s?c:`${p}px`,m=`${r.floating.height+l}px`):d==="right"?(v=`${-l}px`,m=s?c:`${g}px`):d==="left"&&(v=`${r.floating.width+l}px`,m=s?c:`${g}px`),{data:{x:v,y:m}}}});function oi(e){const[t,n="center"]=e.split("-");return[t,n]}var ai=Js,si=ei,ii=ti,li=ri,Fr="rovingFocusGroup.onEntryFocus",ng={bubbles:!1,cancelable:!0},jt="RovingFocusGroup",[$r,ci,rg]=Oa(jt),[og,An]=me(jt,[rg]),[ag,sg]=og(jt),di=h.forwardRef((e,t)=>u.jsx($r.Provider,{scope:e.__scopeRovingFocusGroup,children:u.jsx($r.Slot,{scope:e.__scopeRovingFocusGroup,children:u.jsx(ig,{...e,ref:t})})}));di.displayName=jt;var ig=h.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:l,onEntryFocus:d,preventScrollOnEntryFocus:f=!1,...c}=e,p=h.useRef(null),g=se(t,p),v=Ut(a),[m,b]=Ve({prop:s,defaultProp:i??null,onChange:l,caller:jt}),[w,y]=h.useState(!1),x=pe(d),k=ci(n),P=h.useRef(!1),[E,N]=h.useState(0);return h.useEffect(()=>{const S=p.current;if(S)return S.addEventListener(Fr,x),()=>S.removeEventListener(Fr,x)},[x]),u.jsx(ag,{scope:n,orientation:r,dir:v,loop:o,currentTabStopId:m,onItemFocus:h.useCallback(S=>b(S),[b]),onItemShiftTab:h.useCallback(()=>y(!0),[]),onFocusableItemAdd:h.useCallback(()=>N(S=>S+1),[]),onFocusableItemRemove:h.useCallback(()=>N(S=>S-1),[]),children:u.jsx(J.div,{tabIndex:w||E===0?-1:0,"data-orientation":r,...c,ref:g,style:{outline:"none",...e.style},onMouseDown:Q(e.onMouseDown,()=>{P.current=!0}),onFocus:Q(e.onFocus,S=>{const A=!P.current;if(S.target===S.currentTarget&&A&&!w){const z=new CustomEvent(Fr,ng);if(S.currentTarget.dispatchEvent(z),!z.defaultPrevented){const _=k().filter(D=>D.focusable),M=_.find(D=>D.active),O=_.find(D=>D.id===m),j=[M,O,..._].filter(Boolean).map(D=>D.ref.current);pi(j,f)}}P.current=!1}),onBlur:Q(e.onBlur,()=>y(!1))})})}),ui="RovingFocusGroupItem",fi=h.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,children:s,...i}=e,l=st(),d=a||l,f=sg(ui,n),c=f.currentTabStopId===d,p=ci(n),{onFocusableItemAdd:g,onFocusableItemRemove:v,currentTabStopId:m}=f;return h.useEffect(()=>{if(r)return g(),()=>v()},[r,g,v]),u.jsx($r.ItemSlot,{scope:n,id:d,focusable:r,active:o,children:u.jsx(J.span,{tabIndex:c?0:-1,"data-orientation":f.orientation,...i,ref:t,onMouseDown:Q(e.onMouseDown,b=>{r?f.onItemFocus(d):b.preventDefault()}),onFocus:Q(e.onFocus,()=>f.onItemFocus(d)),onKeyDown:Q(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){f.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const w=dg(b,f.orientation,f.dir);if(w!==void 0){if(b.metaKey||b.ctrlKey||b.altKey||b.shiftKey)return;b.preventDefault();let x=p().filter(k=>k.focusable).map(k=>k.ref.current);if(w==="last")x.reverse();else if(w==="prev"||w==="next"){w==="prev"&&x.reverse();const k=x.indexOf(b.currentTarget);x=f.loop?ug(x,k+1):x.slice(k+1)}setTimeout(()=>pi(x))}}),children:typeof s=="function"?s({isCurrentTabStop:c,hasTabStop:m!=null}):s})})});fi.displayName=ui;var lg={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function cg(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function dg(e,t,n){const r=cg(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return lg[r]}function pi(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function ug(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var hi=di,gi=fi,fg="Label",mi=h.forwardRef((e,t)=>u.jsx(J.label,{...e,ref:t,onMouseDown:n=>{var o;n.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));mi.displayName=fg;var pg=mi;function Hr(e,[t,n]){return Math.min(n,Math.max(t,e))}var Vr="Progress",Ur=100,[hg]=me(Vr),[gg,mg]=hg(Vr),vi=h.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:a=vg,...s}=e;(o||o===0)&&!xi(o)&&console.error(bg(`${o}`,"Progress"));const i=xi(o)?o:Ur;r!==null&&!Ci(r,i)&&console.error(wg(`${r}`,"Progress"));const l=Ci(r,i)?r:null,d=Pn(l)?a(l,i):void 0;return u.jsx(gg,{scope:n,value:l,max:i,children:u.jsx(J.div,{"aria-valuemax":i,"aria-valuemin":0,"aria-valuenow":Pn(l)?l:void 0,"aria-valuetext":d,role:"progressbar","data-state":yi(l,i),"data-value":l??void 0,"data-max":i,...s,ref:t})})});vi.displayName=Vr;var bi="ProgressIndicator",wi=h.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=mg(bi,n);return u.jsx(J.div,{"data-state":yi(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});wi.displayName=bi;function vg(e,t){return`${Math.round(e/t*100)}%`}function yi(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Pn(e){return typeof e=="number"}function xi(e){return Pn(e)&&!isNaN(e)&&e>0}function Ci(e,t){return Pn(e)&&!isNaN(e)&&e<=t&&e>=0}function bg(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Ur}\`.`}function wg(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
295
|
+
*/var us;function Pp(){if(us)return xr;us=1;var e=C;function t(c,h){return c===h&&(c!==0||1/c===1/h)||c!==c&&h!==h}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,a=e.useLayoutEffect,s=e.useDebugValue;function i(c,h){var g=h(),v=r({inst:{value:g,getSnapshot:h}}),m=v[0].inst,b=v[1];return a(function(){m.value=g,m.getSnapshot=h,l(m)&&b({inst:m})},[c,g,h]),o(function(){return l(m)&&b({inst:m}),c(function(){l(m)&&b({inst:m})})},[c]),s(g),g}function l(c){var h=c.getSnapshot;c=c.value;try{var g=h();return!n(c,g)}catch{return!0}}function d(c,h){return h()}var f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:i;return xr.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:f,xr}var fs;function Ip(){return fs||(fs=1,yr.exports=Pp()),yr.exports}var Mp=Ip();function Lp(){return Mp.useSyncExternalStore(Op,()=>!0,()=>!1)}function Op(){return()=>{}}var Cr="Avatar",[zp]=me(Cr),[Dp,ps]=zp(Cr),hs=p.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[o,a]=p.useState("idle");return u.jsx(Dp,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:a,children:u.jsx(J.span,{...r,ref:t})})});hs.displayName=Cr;var gs="AvatarImage",ms=p.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:o=()=>{},...a}=e,s=ps(gs,n),i=Bp(r,a),l=pe(d=>{o(d),s.onImageLoadingStatusChange(d)});return ie(()=>{i!=="idle"&&l(i)},[i,l]),i==="loaded"?u.jsx(J.img,{...a,ref:t,src:r}):null});ms.displayName=gs;var vs="AvatarFallback",bs=p.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...o}=e,a=ps(vs,n),[s,i]=p.useState(r===void 0);return p.useEffect(()=>{if(r!==void 0){const l=window.setTimeout(()=>i(!0),r);return()=>window.clearTimeout(l)}},[r]),s&&a.imageLoadingStatus!=="loaded"?u.jsx(J.span,{...o,ref:t}):null});bs.displayName=vs;function ws(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function Bp(e,{referrerPolicy:t,crossOrigin:n}){const r=Lp(),o=p.useRef(null),a=r?(o.current||(o.current=new window.Image),o.current):null,[s,i]=p.useState(()=>ws(a,e));return ie(()=>{i(ws(a,e))},[a,e]),ie(()=>{const l=c=>()=>{i(c)};if(!a)return;const d=l("loaded"),f=l("error");return a.addEventListener("load",d),a.addEventListener("error",f),t&&(a.referrerPolicy=t),typeof n=="string"&&(a.crossOrigin=n),()=>{a.removeEventListener("load",d),a.removeEventListener("error",f)}},[a,n,t]),s}var Fp=hs,$p=ms,Hp=bs;function gn(e){const t=p.useRef({value:e,previous:e});return p.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function mn(e){const[t,n]=p.useState(void 0);return ie(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let s,i;if("borderBoxSize"in a){const l=a.borderBoxSize,d=Array.isArray(l)?l[0]:l;s=d.inlineSize,i=d.blockSize}else s=e.offsetWidth,i=e.offsetHeight;n({width:s,height:i})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var vn="Checkbox",[Vp]=me(vn),[Up,kr]=Vp(vn);function Rp(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:o,disabled:a,form:s,name:i,onCheckedChange:l,required:d,value:f="on",internal_do_not_use_render:c}=e,[h,g]=Ve({prop:n,defaultProp:o??!1,onChange:l,caller:vn}),[v,m]=p.useState(null),[b,w]=p.useState(null),y=p.useRef(!1),x=v?!!s||!!v.closest("form"):!0,k={checked:h,disabled:a,setChecked:g,control:v,setControl:m,name:i,form:s,value:f,hasConsumerStoppedPropagationRef:y,required:d,defaultChecked:Xe(o)?!1:o,isFormControl:x,bubbleInput:b,setBubbleInput:w};return u.jsx(Up,{scope:t,...k,children:jp(c)?c(k):r})}var ys="CheckboxTrigger",xs=p.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},o)=>{const{control:a,value:s,disabled:i,checked:l,required:d,setControl:f,setChecked:c,hasConsumerStoppedPropagationRef:h,isFormControl:g,bubbleInput:v}=kr(ys,e),m=se(o,f),b=p.useRef(l);return p.useEffect(()=>{const w=a==null?void 0:a.form;if(w){const y=()=>c(b.current);return w.addEventListener("reset",y),()=>w.removeEventListener("reset",y)}},[a,c]),u.jsx(J.button,{type:"button",role:"checkbox","aria-checked":Xe(l)?"mixed":l,"aria-required":d,"data-state":Ts(l),"data-disabled":i?"":void 0,disabled:i,value:s,...r,ref:m,onKeyDown:Q(t,w=>{w.key==="Enter"&&w.preventDefault()}),onClick:Q(n,w=>{c(y=>Xe(y)?!0:!y),v&&g&&(h.current=w.isPropagationStopped(),h.current||w.stopPropagation())})})});xs.displayName=ys;var Cs=p.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:a,required:s,disabled:i,value:l,onCheckedChange:d,form:f,...c}=e;return u.jsx(Rp,{__scopeCheckbox:n,checked:o,defaultChecked:a,disabled:i,required:s,onCheckedChange:d,name:r,form:f,value:l,internal_do_not_use_render:({isFormControl:h})=>u.jsxs(u.Fragment,{children:[u.jsx(xs,{...c,ref:t,__scopeCheckbox:n}),h&&u.jsx(Ns,{__scopeCheckbox:n})]})})});Cs.displayName=vn;var ks="CheckboxIndicator",Ss=p.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,a=kr(ks,n);return u.jsx(Ee,{present:r||Xe(a.checked)||a.checked===!0,children:u.jsx(J.span,{"data-state":Ts(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});Ss.displayName=ks;var Es="CheckboxBubbleInput",Ns=p.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:o,checked:a,defaultChecked:s,required:i,disabled:l,name:d,value:f,form:c,bubbleInput:h,setBubbleInput:g}=kr(Es,e),v=se(n,g),m=gn(a),b=mn(r);p.useEffect(()=>{const y=h;if(!y)return;const x=window.HTMLInputElement.prototype,P=Object.getOwnPropertyDescriptor(x,"checked").set,E=!o.current;if(m!==a&&P){const N=new Event("click",{bubbles:E});y.indeterminate=Xe(a),P.call(y,Xe(a)?!1:a),y.dispatchEvent(N)}},[h,m,a,o]);const w=p.useRef(Xe(a)?!1:a);return u.jsx(J.input,{type:"checkbox","aria-hidden":!0,defaultChecked:s??w.current,required:i,disabled:l,name:d,value:f,form:c,...t,tabIndex:-1,ref:v,style:{...t.style,...b,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Ns.displayName=Es;function jp(e){return typeof e=="function"}function Xe(e){return e==="indeterminate"}function Ts(e){return Xe(e)?"indeterminate":e?"checked":"unchecked"}const Wp=["top","right","bottom","left"],Ze=Math.min,we=Math.max,bn=Math.round,wn=Math.floor,ze=e=>({x:e,y:e}),qp={left:"right",right:"left",bottom:"top",top:"bottom"};function Sr(e,t,n){return we(e,Ze(t,n))}function Ue(e,t){return typeof e=="function"?e(t):e}function Re(e){return e.split("-")[0]}function Et(e){return e.split("-")[1]}function Er(e){return e==="x"?"y":"x"}function Nr(e){return e==="y"?"height":"width"}function De(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Tr(e){return Er(De(e))}function Gp(e,t,n){n===void 0&&(n=!1);const r=Et(e),o=Tr(e),a=Nr(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=yn(s)),[s,yn(s)]}function Yp(e){const t=yn(e);return[_r(e),t,_r(t)]}function _r(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const _s=["left","right"],As=["right","left"],Kp=["top","bottom"],Xp=["bottom","top"];function Zp(e,t,n){switch(e){case"top":case"bottom":return n?t?As:_s:t?_s:As;case"left":case"right":return t?Kp:Xp;default:return[]}}function Jp(e,t,n,r){const o=Et(e);let a=Zp(Re(e),n==="start",r);return o&&(a=a.map(s=>s+"-"+o),t&&(a=a.concat(a.map(_r)))),a}function yn(e){const t=Re(e);return qp[t]+e.slice(t.length)}function Qp(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ps(e){return typeof e!="number"?Qp(e):{top:e,right:e,bottom:e,left:e}}function xn(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Is(e,t,n){let{reference:r,floating:o}=e;const a=De(t),s=Tr(t),i=Nr(s),l=Re(t),d=a==="y",f=r.x+r.width/2-o.width/2,c=r.y+r.height/2-o.height/2,h=r[i]/2-o[i]/2;let g;switch(l){case"top":g={x:f,y:r.y-o.height};break;case"bottom":g={x:f,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:c};break;case"left":g={x:r.x-o.width,y:c};break;default:g={x:r.x,y:r.y}}switch(Et(t)){case"start":g[s]-=h*(n&&d?-1:1);break;case"end":g[s]+=h*(n&&d?-1:1);break}return g}async function eh(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:s,elements:i,strategy:l}=e,{boundary:d="clippingAncestors",rootBoundary:f="viewport",elementContext:c="floating",altBoundary:h=!1,padding:g=0}=Ue(t,e),v=Ps(g),b=i[h?c==="floating"?"reference":"floating":c],w=xn(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(b)))==null||n?b:b.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(i.floating)),boundary:d,rootBoundary:f,strategy:l})),y=c==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,x=await(a.getOffsetParent==null?void 0:a.getOffsetParent(i.floating)),k=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},P=xn(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:y,offsetParent:x,strategy:l}):y);return{top:(w.top-P.top+v.top)/k.y,bottom:(P.bottom-w.bottom+v.bottom)/k.y,left:(w.left-P.left+v.left)/k.x,right:(P.right-w.right+v.right)/k.x}}const th=50,nh=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:s}=n,i=s.detectOverflow?s:{...s,detectOverflow:eh},l=await(s.isRTL==null?void 0:s.isRTL(t));let d=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:c}=Is(d,r,l),h=r,g=0;const v={};for(let m=0;m<a.length;m++){const b=a[m];if(!b)continue;const{name:w,fn:y}=b,{x,y:k,data:P,reset:E}=await y({x:f,y:c,initialPlacement:r,placement:h,strategy:o,middlewareData:v,rects:d,platform:i,elements:{reference:e,floating:t}});f=x??f,c=k??c,v[w]={...v[w],...P},E&&g<th&&(g++,typeof E=="object"&&(E.placement&&(h=E.placement),E.rects&&(d=E.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):E.rects),{x:f,y:c}=Is(d,h,l)),m=-1)}return{x:f,y:c,placement:h,strategy:o,middlewareData:v}},rh=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:a,platform:s,elements:i,middlewareData:l}=t,{element:d,padding:f=0}=Ue(e,t)||{};if(d==null)return{};const c=Ps(f),h={x:n,y:r},g=Tr(o),v=Nr(g),m=await s.getDimensions(d),b=g==="y",w=b?"top":"left",y=b?"bottom":"right",x=b?"clientHeight":"clientWidth",k=a.reference[v]+a.reference[g]-h[g]-a.floating[v],P=h[g]-a.reference[g],E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(d));let N=E?E[x]:0;(!N||!await(s.isElement==null?void 0:s.isElement(E)))&&(N=i.floating[x]||a.floating[v]);const S=k/2-P/2,A=N/2-m[v]/2-1,z=Ze(c[w],A),_=Ze(c[y],A),M=z,O=N-m[v]-_,I=N/2-m[v]/2+S,W=Sr(M,I,O),D=!l.arrow&&Et(o)!=null&&I!==W&&a.reference[v]/2-(I<M?z:_)-m[v]/2<0,$=D?I<M?I-M:I-O:0;return{[g]:h[g]+$,data:{[g]:W,centerOffset:I-W-$,...D&&{alignmentOffset:$}},reset:D}}}),oh=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:a,rects:s,initialPlacement:i,platform:l,elements:d}=t,{mainAxis:f=!0,crossAxis:c=!0,fallbackPlacements:h,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:m=!0,...b}=Ue(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const w=Re(o),y=De(i),x=Re(i)===i,k=await(l.isRTL==null?void 0:l.isRTL(d.floating)),P=h||(x||!m?[yn(i)]:Yp(i)),E=v!=="none";!h&&E&&P.push(...Jp(i,m,v,k));const N=[i,...P],S=await l.detectOverflow(t,b),A=[];let z=((r=a.flip)==null?void 0:r.overflows)||[];if(f&&A.push(S[w]),c){const I=Gp(o,s,k);A.push(S[I[0]],S[I[1]])}if(z=[...z,{placement:o,overflows:A}],!A.every(I=>I<=0)){var _,M;const I=(((_=a.flip)==null?void 0:_.index)||0)+1,W=N[I];if(W&&(!(c==="alignment"?y!==De(W):!1)||z.every(q=>De(q.placement)===y?q.overflows[0]>0:!0)))return{data:{index:I,overflows:z},reset:{placement:W}};let D=(M=z.filter($=>$.overflows[0]<=0).sort(($,q)=>$.overflows[1]-q.overflows[1])[0])==null?void 0:M.placement;if(!D)switch(g){case"bestFit":{var O;const $=(O=z.filter(q=>{if(E){const L=De(q.placement);return L===y||L==="y"}return!0}).map(q=>[q.placement,q.overflows.filter(L=>L>0).reduce((L,T)=>L+T,0)]).sort((q,L)=>q[1]-L[1])[0])==null?void 0:O[0];$&&(D=$);break}case"initialPlacement":D=i;break}if(o!==D)return{reset:{placement:D}}}return{}}}};function Ms(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ls(e){return Wp.some(t=>e[t]>=0)}const ah=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...a}=Ue(e,t);switch(o){case"referenceHidden":{const s=await r.detectOverflow(t,{...a,elementContext:"reference"}),i=Ms(s,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Ls(i)}}}case"escaped":{const s=await r.detectOverflow(t,{...a,altBoundary:!0}),i=Ms(s,n.floating);return{data:{escapedOffsets:i,escaped:Ls(i)}}}default:return{}}}}},Os=new Set(["left","top"]);async function sh(e,t){const{placement:n,platform:r,elements:o}=e,a=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=Re(n),i=Et(n),l=De(n)==="y",d=Os.has(s)?-1:1,f=a&&l?-1:1,c=Ue(t,e);let{mainAxis:h,crossAxis:g,alignmentAxis:v}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return i&&typeof v=="number"&&(g=i==="end"?v*-1:v),l?{x:g*f,y:h*d}:{x:h*d,y:g*f}}const ih=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:a,placement:s,middlewareData:i}=t,l=await sh(t,e);return s===((n=i.offset)==null?void 0:n.placement)&&(r=i.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:a+l.y,data:{...l,placement:s}}}}},lh=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:a}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:l={fn:w=>{let{x:y,y:x}=w;return{x:y,y:x}}},...d}=Ue(e,t),f={x:n,y:r},c=await a.detectOverflow(t,d),h=De(Re(o)),g=Er(h);let v=f[g],m=f[h];if(s){const w=g==="y"?"top":"left",y=g==="y"?"bottom":"right",x=v+c[w],k=v-c[y];v=Sr(x,v,k)}if(i){const w=h==="y"?"top":"left",y=h==="y"?"bottom":"right",x=m+c[w],k=m-c[y];m=Sr(x,m,k)}const b=l.fn({...t,[g]:v,[h]:m});return{...b,data:{x:b.x-n,y:b.y-r,enabled:{[g]:s,[h]:i}}}}}},ch=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:s}=t,{offset:i=0,mainAxis:l=!0,crossAxis:d=!0}=Ue(e,t),f={x:n,y:r},c=De(o),h=Er(c);let g=f[h],v=f[c];const m=Ue(i,t),b=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const x=h==="y"?"height":"width",k=a.reference[h]-a.floating[x]+b.mainAxis,P=a.reference[h]+a.reference[x]-b.mainAxis;g<k?g=k:g>P&&(g=P)}if(d){var w,y;const x=h==="y"?"width":"height",k=Os.has(Re(o)),P=a.reference[c]-a.floating[x]+(k&&((w=s.offset)==null?void 0:w[c])||0)+(k?0:b.crossAxis),E=a.reference[c]+a.reference[x]+(k?0:((y=s.offset)==null?void 0:y[c])||0)-(k?b.crossAxis:0);v<P?v=P:v>E&&(v=E)}return{[h]:g,[c]:v}}}},dh=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:a,platform:s,elements:i}=t,{apply:l=()=>{},...d}=Ue(e,t),f=await s.detectOverflow(t,d),c=Re(o),h=Et(o),g=De(o)==="y",{width:v,height:m}=a.floating;let b,w;c==="top"||c==="bottom"?(b=c,w=h===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(w=c,b=h==="end"?"top":"bottom");const y=m-f.top-f.bottom,x=v-f.left-f.right,k=Ze(m-f[b],y),P=Ze(v-f[w],x),E=!t.middlewareData.shift;let N=k,S=P;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(S=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(N=y),E&&!h){const z=we(f.left,0),_=we(f.right,0),M=we(f.top,0),O=we(f.bottom,0);g?S=v-2*(z!==0||_!==0?z+_:we(f.left,f.right)):N=m-2*(M!==0||O!==0?M+O:we(f.top,f.bottom))}await l({...t,availableWidth:S,availableHeight:N});const A=await s.getDimensions(i.floating);return v!==A.width||m!==A.height?{reset:{rects:!0}}:{}}}};function Cn(){return typeof window<"u"}function Nt(e){return zs(e)?(e.nodeName||"").toLowerCase():"#document"}function ye(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Be(e){var t;return(t=(zs(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function zs(e){return Cn()?e instanceof Node||e instanceof ye(e).Node:!1}function Ne(e){return Cn()?e instanceof Element||e instanceof ye(e).Element:!1}function je(e){return Cn()?e instanceof HTMLElement||e instanceof ye(e).HTMLElement:!1}function Ds(e){return!Cn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ye(e).ShadowRoot}function Rt(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Te(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function uh(e){return/^(table|td|th)$/.test(Nt(e))}function kn(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const fh=/transform|translate|scale|rotate|perspective|filter/,ph=/paint|layout|strict|content/,ct=e=>!!e&&e!=="none";let Ar;function Pr(e){const t=Ne(e)?Te(e):e;return ct(t.transform)||ct(t.translate)||ct(t.scale)||ct(t.rotate)||ct(t.perspective)||!Ir()&&(ct(t.backdropFilter)||ct(t.filter))||fh.test(t.willChange||"")||ph.test(t.contain||"")}function hh(e){let t=Je(e);for(;je(t)&&!Tt(t);){if(Pr(t))return t;if(kn(t))return null;t=Je(t)}return null}function Ir(){return Ar==null&&(Ar=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ar}function Tt(e){return/^(html|body|#document)$/.test(Nt(e))}function Te(e){return ye(e).getComputedStyle(e)}function Sn(e){return Ne(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Je(e){if(Nt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ds(e)&&e.host||Be(e);return Ds(t)?t.host:t}function Bs(e){const t=Je(e);return Tt(t)?e.ownerDocument?e.ownerDocument.body:e.body:je(t)&&Rt(t)?t:Bs(t)}function jt(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Bs(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),s=ye(o);if(a){const i=Mr(s);return t.concat(s,s.visualViewport||[],Rt(o)?o:[],i&&n?jt(i):[])}else return t.concat(o,jt(o,[],n))}function Mr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Fs(e){const t=Te(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=je(e),a=o?e.offsetWidth:n,s=o?e.offsetHeight:r,i=bn(n)!==a||bn(r)!==s;return i&&(n=a,r=s),{width:n,height:r,$:i}}function Lr(e){return Ne(e)?e:e.contextElement}function _t(e){const t=Lr(e);if(!je(t))return ze(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=Fs(t);let s=(a?bn(n.width):n.width)/r,i=(a?bn(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!i||!Number.isFinite(i))&&(i=1),{x:s,y:i}}const gh=ze(0);function $s(e){const t=ye(e);return!Ir()||!t.visualViewport?gh:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function mh(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ye(e)?!1:t}function dt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=Lr(e);let s=ze(1);t&&(r?Ne(r)&&(s=_t(r)):s=_t(e));const i=mh(a,n,r)?$s(a):ze(0);let l=(o.left+i.x)/s.x,d=(o.top+i.y)/s.y,f=o.width/s.x,c=o.height/s.y;if(a){const h=ye(a),g=r&&Ne(r)?ye(r):r;let v=h,m=Mr(v);for(;m&&r&&g!==v;){const b=_t(m),w=m.getBoundingClientRect(),y=Te(m),x=w.left+(m.clientLeft+parseFloat(y.paddingLeft))*b.x,k=w.top+(m.clientTop+parseFloat(y.paddingTop))*b.y;l*=b.x,d*=b.y,f*=b.x,c*=b.y,l+=x,d+=k,v=ye(m),m=Mr(v)}}return xn({width:f,height:c,x:l,y:d})}function En(e,t){const n=Sn(e).scrollLeft;return t?t.left+n:dt(Be(e)).left+n}function Hs(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-En(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function vh(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",s=Be(r),i=t?kn(t.floating):!1;if(r===s||i&&a)return n;let l={scrollLeft:0,scrollTop:0},d=ze(1);const f=ze(0),c=je(r);if((c||!c&&!a)&&((Nt(r)!=="body"||Rt(s))&&(l=Sn(r)),c)){const g=dt(r);d=_t(r),f.x=g.x+r.clientLeft,f.y=g.y+r.clientTop}const h=s&&!c&&!a?Hs(s,l):ze(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-l.scrollLeft*d.x+f.x+h.x,y:n.y*d.y-l.scrollTop*d.y+f.y+h.y}}function bh(e){return Array.from(e.getClientRects())}function wh(e){const t=Be(e),n=Sn(e),r=e.ownerDocument.body,o=we(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=we(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+En(e);const i=-n.scrollTop;return Te(r).direction==="rtl"&&(s+=we(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:s,y:i}}const Vs=25;function yh(e,t){const n=ye(e),r=Be(e),o=n.visualViewport;let a=r.clientWidth,s=r.clientHeight,i=0,l=0;if(o){a=o.width,s=o.height;const f=Ir();(!f||f&&t==="fixed")&&(i=o.offsetLeft,l=o.offsetTop)}const d=En(r);if(d<=0){const f=r.ownerDocument,c=f.body,h=getComputedStyle(c),g=f.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,v=Math.abs(r.clientWidth-c.clientWidth-g);v<=Vs&&(a-=v)}else d<=Vs&&(a+=d);return{width:a,height:s,x:i,y:l}}function xh(e,t){const n=dt(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=je(e)?_t(e):ze(1),s=e.clientWidth*a.x,i=e.clientHeight*a.y,l=o*a.x,d=r*a.y;return{width:s,height:i,x:l,y:d}}function Us(e,t,n){let r;if(t==="viewport")r=yh(e,n);else if(t==="document")r=wh(Be(e));else if(Ne(t))r=xh(t,n);else{const o=$s(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return xn(r)}function Rs(e,t){const n=Je(e);return n===t||!Ne(n)||Tt(n)?!1:Te(n).position==="fixed"||Rs(n,t)}function Ch(e,t){const n=t.get(e);if(n)return n;let r=jt(e,[],!1).filter(i=>Ne(i)&&Nt(i)!=="body"),o=null;const a=Te(e).position==="fixed";let s=a?Je(e):e;for(;Ne(s)&&!Tt(s);){const i=Te(s),l=Pr(s);!l&&i.position==="fixed"&&(o=null),(a?!l&&!o:!l&&i.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||Rt(s)&&!l&&Rs(e,s))?r=r.filter(f=>f!==s):o=i,s=Je(s)}return t.set(e,r),r}function kh(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?kn(t)?[]:Ch(t,this._c):[].concat(n),r],i=Us(t,s[0],o);let l=i.top,d=i.right,f=i.bottom,c=i.left;for(let h=1;h<s.length;h++){const g=Us(t,s[h],o);l=we(g.top,l),d=Ze(g.right,d),f=Ze(g.bottom,f),c=we(g.left,c)}return{width:d-c,height:f-l,x:c,y:l}}function Sh(e){const{width:t,height:n}=Fs(e);return{width:t,height:n}}function Eh(e,t,n){const r=je(t),o=Be(t),a=n==="fixed",s=dt(e,!0,a,t);let i={scrollLeft:0,scrollTop:0};const l=ze(0);function d(){l.x=En(o)}if(r||!r&&!a)if((Nt(t)!=="body"||Rt(o))&&(i=Sn(t)),r){const g=dt(t,!0,a,t);l.x=g.x+t.clientLeft,l.y=g.y+t.clientTop}else o&&d();a&&!r&&o&&d();const f=o&&!r&&!a?Hs(o,i):ze(0),c=s.left+i.scrollLeft-l.x-f.x,h=s.top+i.scrollTop-l.y-f.y;return{x:c,y:h,width:s.width,height:s.height}}function Or(e){return Te(e).position==="static"}function js(e,t){if(!je(e)||Te(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Be(e)===n&&(n=n.ownerDocument.body),n}function Ws(e,t){const n=ye(e);if(kn(e))return n;if(!je(e)){let o=Je(e);for(;o&&!Tt(o);){if(Ne(o)&&!Or(o))return o;o=Je(o)}return n}let r=js(e,t);for(;r&&uh(r)&&Or(r);)r=js(r,t);return r&&Tt(r)&&Or(r)&&!Pr(r)?n:r||hh(e)||n}const Nh=async function(e){const t=this.getOffsetParent||Ws,n=this.getDimensions,r=await n(e.floating);return{reference:Eh(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Th(e){return Te(e).direction==="rtl"}const _h={convertOffsetParentRelativeRectToViewportRelativeRect:vh,getDocumentElement:Be,getClippingRect:kh,getOffsetParent:Ws,getElementRects:Nh,getClientRects:bh,getDimensions:Sh,getScale:_t,isElement:Ne,isRTL:Th};function qs(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ah(e,t){let n=null,r;const o=Be(e);function a(){var i;clearTimeout(r),(i=n)==null||i.disconnect(),n=null}function s(i,l){i===void 0&&(i=!1),l===void 0&&(l=1),a();const d=e.getBoundingClientRect(),{left:f,top:c,width:h,height:g}=d;if(i||t(),!h||!g)return;const v=wn(c),m=wn(o.clientWidth-(f+h)),b=wn(o.clientHeight-(c+g)),w=wn(f),x={rootMargin:-v+"px "+-m+"px "+-b+"px "+-w+"px",threshold:we(0,Ze(1,l))||1};let k=!0;function P(E){const N=E[0].intersectionRatio;if(N!==l){if(!k)return s();N?s(!1,N):r=setTimeout(()=>{s(!1,1e-7)},1e3)}N===1&&!qs(d,e.getBoundingClientRect())&&s(),k=!1}try{n=new IntersectionObserver(P,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(P,x)}n.observe(e)}return s(!0),a}function Ph(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,d=Lr(e),f=o||a?[...d?jt(d):[],...t?jt(t):[]]:[];f.forEach(w=>{o&&w.addEventListener("scroll",n,{passive:!0}),a&&w.addEventListener("resize",n)});const c=d&&i?Ah(d,n):null;let h=-1,g=null;s&&(g=new ResizeObserver(w=>{let[y]=w;y&&y.target===d&&g&&t&&(g.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var x;(x=g)==null||x.observe(t)})),n()}),d&&!l&&g.observe(d),t&&g.observe(t));let v,m=l?dt(e):null;l&&b();function b(){const w=dt(e);m&&!qs(m,w)&&n(),m=w,v=requestAnimationFrame(b)}return n(),()=>{var w;f.forEach(y=>{o&&y.removeEventListener("scroll",n),a&&y.removeEventListener("resize",n)}),c==null||c(),(w=g)==null||w.disconnect(),g=null,l&&cancelAnimationFrame(v)}}const Ih=ih,Mh=lh,Lh=oh,Oh=dh,zh=ah,Gs=rh,Dh=ch,Bh=(e,t,n)=>{const r=new Map,o={platform:_h,...n},a={...o.platform,_c:r};return nh(e,t,{...o,platform:a})};var Fh=typeof document<"u",$h=function(){},Nn=Fh?C.useLayoutEffect:$h;function Tn(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 n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Tn(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const a=o[r];if(!(a==="_owner"&&e.$$typeof)&&!Tn(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function Ys(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ks(e,t){const n=Ys(e);return Math.round(t*n)/n}function zr(e){const t=p.useRef(e);return Nn(()=>{t.current=e}),t}function Hh(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:a,floating:s}={},transform:i=!0,whileElementsMounted:l,open:d}=e,[f,c]=p.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,g]=p.useState(r);Tn(h,r)||g(r);const[v,m]=p.useState(null),[b,w]=p.useState(null),y=p.useCallback(q=>{q!==E.current&&(E.current=q,m(q))},[]),x=p.useCallback(q=>{q!==N.current&&(N.current=q,w(q))},[]),k=a||v,P=s||b,E=p.useRef(null),N=p.useRef(null),S=p.useRef(f),A=l!=null,z=zr(l),_=zr(o),M=zr(d),O=p.useCallback(()=>{if(!E.current||!N.current)return;const q={placement:t,strategy:n,middleware:h};_.current&&(q.platform=_.current),Bh(E.current,N.current,q).then(L=>{const T={...L,isPositioned:M.current!==!1};I.current&&!Tn(S.current,T)&&(S.current=T,Zt.flushSync(()=>{c(T)}))})},[h,t,n,_,M]);Nn(()=>{d===!1&&S.current.isPositioned&&(S.current.isPositioned=!1,c(q=>({...q,isPositioned:!1})))},[d]);const I=p.useRef(!1);Nn(()=>(I.current=!0,()=>{I.current=!1}),[]),Nn(()=>{if(k&&(E.current=k),P&&(N.current=P),k&&P){if(z.current)return z.current(k,P,O);O()}},[k,P,O,z,A]);const W=p.useMemo(()=>({reference:E,floating:N,setReference:y,setFloating:x}),[y,x]),D=p.useMemo(()=>({reference:k,floating:P}),[k,P]),$=p.useMemo(()=>{const q={position:n,left:0,top:0};if(!D.floating)return q;const L=Ks(D.floating,f.x),T=Ks(D.floating,f.y);return i?{...q,transform:"translate("+L+"px, "+T+"px)",...Ys(D.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:L,top:T}},[n,i,D.floating,f.x,f.y]);return p.useMemo(()=>({...f,update:O,refs:W,elements:D,floatingStyles:$}),[f,O,W,D,$])}const Vh=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Gs({element:r.current,padding:o}).fn(n):{}:r?Gs({element:r,padding:o}).fn(n):{}}}},Uh=(e,t)=>{const n=Ih(e);return{name:n.name,fn:n.fn,options:[e,t]}},Rh=(e,t)=>{const n=Mh(e);return{name:n.name,fn:n.fn,options:[e,t]}},jh=(e,t)=>({fn:Dh(e).fn,options:[e,t]}),Wh=(e,t)=>{const n=Lh(e);return{name:n.name,fn:n.fn,options:[e,t]}},qh=(e,t)=>{const n=Oh(e);return{name:n.name,fn:n.fn,options:[e,t]}},Gh=(e,t)=>{const n=zh(e);return{name:n.name,fn:n.fn,options:[e,t]}},Yh=(e,t)=>{const n=Vh(e);return{name:n.name,fn:n.fn,options:[e,t]}};var Kh="Arrow",Xs=p.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...a}=e;return u.jsx(J.svg,{...a,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:u.jsx("polygon",{points:"0,0 30,0 15,10"})})});Xs.displayName=Kh;var Xh=Xs,Dr="Popper",[Zs,_n]=me(Dr),[Zh,Js]=Zs(Dr),Qs=e=>{const{__scopePopper:t,children:n}=e,[r,o]=p.useState(null);return u.jsx(Zh,{scope:t,anchor:r,onAnchorChange:o,children:n})};Qs.displayName=Dr;var ei="PopperAnchor",ti=p.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=Js(ei,n),s=p.useRef(null),i=se(t,s),l=p.useRef(null);return p.useEffect(()=>{const d=l.current;l.current=(r==null?void 0:r.current)||s.current,d!==l.current&&a.onAnchorChange(l.current)}),r?null:u.jsx(J.div,{...o,ref:i})});ti.displayName=ei;var Br="PopperContent",[Jh,Qh]=Zs(Br),ni=p.forwardRef((e,t)=>{var R,j,Z,ee,ae,ne;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:a="center",alignOffset:s=0,arrowPadding:i=0,avoidCollisions:l=!0,collisionBoundary:d=[],collisionPadding:f=0,sticky:c="partial",hideWhenDetached:h=!1,updatePositionStrategy:g="optimized",onPlaced:v,...m}=e,b=Js(Br,n),[w,y]=p.useState(null),x=se(t,ce=>y(ce)),[k,P]=p.useState(null),E=mn(k),N=(E==null?void 0:E.width)??0,S=(E==null?void 0:E.height)??0,A=r+(a!=="center"?"-"+a:""),z=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},_=Array.isArray(d)?d:[d],M=_.length>0,O={padding:z,boundary:_.filter(tg),altBoundary:M},{refs:I,floatingStyles:W,placement:D,isPositioned:$,middlewareData:q}=Hh({strategy:"fixed",placement:A,whileElementsMounted:(...ce)=>Ph(...ce,{animationFrame:g==="always"}),elements:{reference:b.anchor},middleware:[Uh({mainAxis:o+S,alignmentAxis:s}),l&&Rh({mainAxis:!0,crossAxis:!1,limiter:c==="partial"?jh():void 0,...O}),l&&Wh({...O}),qh({...O,apply:({elements:ce,rects:de,availableWidth:gt,availableHeight:nt})=>{const{width:Ae,height:Wn}=de.reference,ve=ce.floating.style;ve.setProperty("--radix-popper-available-width",`${gt}px`),ve.setProperty("--radix-popper-available-height",`${nt}px`),ve.setProperty("--radix-popper-anchor-width",`${Ae}px`),ve.setProperty("--radix-popper-anchor-height",`${Wn}px`)}}),k&&Yh({element:k,padding:i}),ng({arrowWidth:N,arrowHeight:S}),h&&Gh({strategy:"referenceHidden",...O})]}),[L,T]=ai(D),F=pe(v);ie(()=>{$&&(F==null||F())},[$,F]);const H=(R=q.arrow)==null?void 0:R.x,B=(j=q.arrow)==null?void 0:j.y,V=((Z=q.arrow)==null?void 0:Z.centerOffset)!==0,[U,X]=p.useState();return ie(()=>{w&&X(window.getComputedStyle(w).zIndex)},[w]),u.jsx("div",{ref:I.setFloating,"data-radix-popper-content-wrapper":"",style:{...W,transform:$?W.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:U,"--radix-popper-transform-origin":[(ee=q.transformOrigin)==null?void 0:ee.x,(ae=q.transformOrigin)==null?void 0:ae.y].join(" "),...((ne=q.hide)==null?void 0:ne.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:u.jsx(Jh,{scope:n,placedSide:L,onArrowChange:P,arrowX:H,arrowY:B,shouldHideArrow:V,children:u.jsx(J.div,{"data-side":L,"data-align":T,...m,ref:x,style:{...m.style,animation:$?void 0:"none"}})})})});ni.displayName=Br;var ri="PopperArrow",eg={top:"bottom",right:"left",bottom:"top",left:"right"},oi=p.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,a=Qh(ri,r),s=eg[a.placedSide];return u.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:u.jsx(Xh,{...o,ref:n,style:{...o.style,display:"block"}})})});oi.displayName=ri;function tg(e){return e!==null}var ng=e=>({name:"transformOrigin",options:e,fn(t){var b,w,y;const{placement:n,rects:r,middlewareData:o}=t,s=((b=o.arrow)==null?void 0:b.centerOffset)!==0,i=s?0:e.arrowWidth,l=s?0:e.arrowHeight,[d,f]=ai(n),c={start:"0%",center:"50%",end:"100%"}[f],h=(((w=o.arrow)==null?void 0:w.x)??0)+i/2,g=(((y=o.arrow)==null?void 0:y.y)??0)+l/2;let v="",m="";return d==="bottom"?(v=s?c:`${h}px`,m=`${-l}px`):d==="top"?(v=s?c:`${h}px`,m=`${r.floating.height+l}px`):d==="right"?(v=`${-l}px`,m=s?c:`${g}px`):d==="left"&&(v=`${r.floating.width+l}px`,m=s?c:`${g}px`),{data:{x:v,y:m}}}});function ai(e){const[t,n="center"]=e.split("-");return[t,n]}var si=Qs,ii=ti,li=ni,ci=oi,Fr="rovingFocusGroup.onEntryFocus",rg={bubbles:!1,cancelable:!0},Wt="RovingFocusGroup",[$r,di,og]=za(Wt),[ag,An]=me(Wt,[og]),[sg,ig]=ag(Wt),ui=p.forwardRef((e,t)=>u.jsx($r.Provider,{scope:e.__scopeRovingFocusGroup,children:u.jsx($r.Slot,{scope:e.__scopeRovingFocusGroup,children:u.jsx(lg,{...e,ref:t})})}));ui.displayName=Wt;var lg=p.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:l,onEntryFocus:d,preventScrollOnEntryFocus:f=!1,...c}=e,h=p.useRef(null),g=se(t,h),v=Ut(a),[m,b]=Ve({prop:s,defaultProp:i??null,onChange:l,caller:Wt}),[w,y]=p.useState(!1),x=pe(d),k=di(n),P=p.useRef(!1),[E,N]=p.useState(0);return p.useEffect(()=>{const S=h.current;if(S)return S.addEventListener(Fr,x),()=>S.removeEventListener(Fr,x)},[x]),u.jsx(sg,{scope:n,orientation:r,dir:v,loop:o,currentTabStopId:m,onItemFocus:p.useCallback(S=>b(S),[b]),onItemShiftTab:p.useCallback(()=>y(!0),[]),onFocusableItemAdd:p.useCallback(()=>N(S=>S+1),[]),onFocusableItemRemove:p.useCallback(()=>N(S=>S-1),[]),children:u.jsx(J.div,{tabIndex:w||E===0?-1:0,"data-orientation":r,...c,ref:g,style:{outline:"none",...e.style},onMouseDown:Q(e.onMouseDown,()=>{P.current=!0}),onFocus:Q(e.onFocus,S=>{const A=!P.current;if(S.target===S.currentTarget&&A&&!w){const z=new CustomEvent(Fr,rg);if(S.currentTarget.dispatchEvent(z),!z.defaultPrevented){const _=k().filter(D=>D.focusable),M=_.find(D=>D.active),O=_.find(D=>D.id===m),W=[M,O,..._].filter(Boolean).map(D=>D.ref.current);hi(W,f)}}P.current=!1}),onBlur:Q(e.onBlur,()=>y(!1))})})}),fi="RovingFocusGroupItem",pi=p.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,children:s,...i}=e,l=lt(),d=a||l,f=ig(fi,n),c=f.currentTabStopId===d,h=di(n),{onFocusableItemAdd:g,onFocusableItemRemove:v,currentTabStopId:m}=f;return p.useEffect(()=>{if(r)return g(),()=>v()},[r,g,v]),u.jsx($r.ItemSlot,{scope:n,id:d,focusable:r,active:o,children:u.jsx(J.span,{tabIndex:c?0:-1,"data-orientation":f.orientation,...i,ref:t,onMouseDown:Q(e.onMouseDown,b=>{r?f.onItemFocus(d):b.preventDefault()}),onFocus:Q(e.onFocus,()=>f.onItemFocus(d)),onKeyDown:Q(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){f.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const w=ug(b,f.orientation,f.dir);if(w!==void 0){if(b.metaKey||b.ctrlKey||b.altKey||b.shiftKey)return;b.preventDefault();let x=h().filter(k=>k.focusable).map(k=>k.ref.current);if(w==="last")x.reverse();else if(w==="prev"||w==="next"){w==="prev"&&x.reverse();const k=x.indexOf(b.currentTarget);x=f.loop?fg(x,k+1):x.slice(k+1)}setTimeout(()=>hi(x))}}),children:typeof s=="function"?s({isCurrentTabStop:c,hasTabStop:m!=null}):s})})});pi.displayName=fi;var cg={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function dg(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function ug(e,t,n){const r=dg(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return cg[r]}function hi(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function fg(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var gi=ui,mi=pi,pg="Label",vi=p.forwardRef((e,t)=>u.jsx(J.label,{...e,ref:t,onMouseDown:n=>{var o;n.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));vi.displayName=pg;var hg=vi;function Hr(e,[t,n]){return Math.min(n,Math.max(t,e))}var Vr="Progress",Ur=100,[gg]=me(Vr),[mg,vg]=gg(Vr),bi=p.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:a=bg,...s}=e;(o||o===0)&&!Ci(o)&&console.error(wg(`${o}`,"Progress"));const i=Ci(o)?o:Ur;r!==null&&!ki(r,i)&&console.error(yg(`${r}`,"Progress"));const l=ki(r,i)?r:null,d=Pn(l)?a(l,i):void 0;return u.jsx(mg,{scope:n,value:l,max:i,children:u.jsx(J.div,{"aria-valuemax":i,"aria-valuemin":0,"aria-valuenow":Pn(l)?l:void 0,"aria-valuetext":d,role:"progressbar","data-state":xi(l,i),"data-value":l??void 0,"data-max":i,...s,ref:t})})});bi.displayName=Vr;var wi="ProgressIndicator",yi=p.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=vg(wi,n);return u.jsx(J.div,{"data-state":xi(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});yi.displayName=wi;function bg(e,t){return`${Math.round(e/t*100)}%`}function xi(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Pn(e){return typeof e=="number"}function Ci(e){return Pn(e)&&!isNaN(e)&&e>0}function ki(e,t){return Pn(e)&&!isNaN(e)&&e<=t&&e>=0}function wg(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Ur}\`.`}function yg(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
291
296
|
- a positive number
|
|
292
297
|
- less than the value passed to \`max\` (or ${Ur} if no \`max\` prop is set)
|
|
293
298
|
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
294
299
|
|
|
295
|
-
Defaulting to \`null\`.`}var yg=vi,xg=wi,Rr="Radio",[Cg,ki]=me(Rr),[kg,Sg]=Cg(Rr),Si=h.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:a,disabled:s,value:i="on",onCheck:l,form:d,...f}=e,[c,p]=h.useState(null),g=se(t,b=>p(b)),v=h.useRef(!1),m=c?d||!!c.closest("form"):!0;return u.jsxs(kg,{scope:n,checked:o,disabled:s,children:[u.jsx(J.button,{type:"button",role:"radio","aria-checked":o,"data-state":_i(o),"data-disabled":s?"":void 0,disabled:s,value:i,...f,ref:g,onClick:Q(e.onClick,b=>{o||l==null||l(),m&&(v.current=b.isPropagationStopped(),v.current||b.stopPropagation())})}),m&&u.jsx(Ti,{control:c,bubbles:!v.current,name:r,value:i,checked:o,required:a,disabled:s,form:d,style:{transform:"translateX(-100%)"}})]})});Si.displayName=Rr;var Ei="RadioIndicator",Ni=h.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,a=Sg(Ei,n);return u.jsx(Ee,{present:r||a.checked,children:u.jsx(J.span,{"data-state":_i(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t})})});Ni.displayName=Ei;var Eg="RadioBubbleInput",Ti=h.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...o},a)=>{const s=h.useRef(null),i=se(s,a),l=gn(n),d=mn(t);return h.useEffect(()=>{const f=s.current;if(!f)return;const c=window.HTMLInputElement.prototype,g=Object.getOwnPropertyDescriptor(c,"checked").set;if(l!==n&&g){const v=new Event("click",{bubbles:r});g.call(f,n),f.dispatchEvent(v)}},[l,n,r]),u.jsx(J.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:i,style:{...o.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Ti.displayName=Eg;function _i(e){return e?"checked":"unchecked"}var Ng=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],In="RadioGroup",[Tg]=me(In,[An,ki]),Ai=An(),Pi=ki(),[_g,Ag]=Tg(In),Ii=h.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:a,required:s=!1,disabled:i=!1,orientation:l,dir:d,loop:f=!0,onValueChange:c,...p}=e,g=Ai(n),v=Ut(d),[m,b]=Ve({prop:a,defaultProp:o??null,onChange:c,caller:In});return u.jsx(_g,{scope:n,name:r,required:s,disabled:i,value:m,onValueChange:b,children:u.jsx(hi,{asChild:!0,...g,orientation:l,dir:v,loop:f,children:u.jsx(J.div,{role:"radiogroup","aria-required":s,"aria-orientation":l,"data-disabled":i?"":void 0,dir:v,...p,ref:t})})})});Ii.displayName=In;var Mi="RadioGroupItem",Li=h.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,a=Ag(Mi,n),s=a.disabled||r,i=Ai(n),l=Pi(n),d=h.useRef(null),f=se(t,d),c=a.value===o.value,p=h.useRef(!1);return h.useEffect(()=>{const g=m=>{Ng.includes(m.key)&&(p.current=!0)},v=()=>p.current=!1;return document.addEventListener("keydown",g),document.addEventListener("keyup",v),()=>{document.removeEventListener("keydown",g),document.removeEventListener("keyup",v)}},[]),u.jsx(gi,{asChild:!0,...i,focusable:!s,active:c,children:u.jsx(Si,{disabled:s,required:a.required,checked:c,...l,...o,name:a.name,ref:f,onCheck:()=>a.onValueChange(o.value),onKeyDown:Q(g=>{g.key==="Enter"&&g.preventDefault()}),onFocus:Q(o.onFocus,()=>{var g;p.current&&((g=d.current)==null||g.click())})})})});Li.displayName=Mi;var Pg="RadioGroupIndicator",Oi=h.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=Pi(n);return u.jsx(Ni,{...o,...r,ref:t})});Oi.displayName=Pg;var Ig=Ii,Mg=Li,Lg=Oi;function Og(e,t){return h.useReducer((n,r)=>t[n][r]??n,e)}var Wr="ScrollArea",[zi]=me(Wr),[zg,ke]=zi(Wr),Di=h.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:o,scrollHideDelay:a=600,...s}=e,[i,l]=h.useState(null),[d,f]=h.useState(null),[c,p]=h.useState(null),[g,v]=h.useState(null),[m,b]=h.useState(null),[w,y]=h.useState(0),[x,k]=h.useState(0),[P,E]=h.useState(!1),[N,S]=h.useState(!1),A=se(t,_=>l(_)),z=Ut(o);return u.jsx(zg,{scope:n,type:r,dir:z,scrollHideDelay:a,scrollArea:i,viewport:d,onViewportChange:f,content:c,onContentChange:p,scrollbarX:g,onScrollbarXChange:v,scrollbarXEnabled:P,onScrollbarXEnabledChange:E,scrollbarY:m,onScrollbarYChange:b,scrollbarYEnabled:N,onScrollbarYEnabledChange:S,onCornerWidthChange:y,onCornerHeightChange:k,children:u.jsx(J.div,{dir:z,...s,ref:A,style:{position:"relative","--radix-scroll-area-corner-width":w+"px","--radix-scroll-area-corner-height":x+"px",...e.style}})})});Di.displayName=Wr;var Bi="ScrollAreaViewport",Fi=h.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:o,...a}=e,s=ke(Bi,n),i=h.useRef(null),l=se(t,i,s.onViewportChange);return u.jsxs(u.Fragment,{children:[u.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:o}),u.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:u.jsx("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});Fi.displayName=Bi;var Fe="ScrollAreaScrollbar",$i=h.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=ke(Fe,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:s}=o,i=e.orientation==="horizontal";return h.useEffect(()=>(i?a(!0):s(!0),()=>{i?a(!1):s(!1)}),[i,a,s]),o.type==="hover"?u.jsx(Dg,{...r,ref:t,forceMount:n}):o.type==="scroll"?u.jsx(Bg,{...r,ref:t,forceMount:n}):o.type==="auto"?u.jsx(Hi,{...r,ref:t,forceMount:n}):o.type==="always"?u.jsx(jr,{...r,ref:t}):null});$i.displayName=Fe;var Dg=h.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=ke(Fe,e.__scopeScrollArea),[a,s]=h.useState(!1);return h.useEffect(()=>{const i=o.scrollArea;let l=0;if(i){const d=()=>{window.clearTimeout(l),s(!0)},f=()=>{l=window.setTimeout(()=>s(!1),o.scrollHideDelay)};return i.addEventListener("pointerenter",d),i.addEventListener("pointerleave",f),()=>{window.clearTimeout(l),i.removeEventListener("pointerenter",d),i.removeEventListener("pointerleave",f)}}},[o.scrollArea,o.scrollHideDelay]),u.jsx(Ee,{present:n||a,children:u.jsx(Hi,{"data-state":a?"visible":"hidden",...r,ref:t})})}),Bg=h.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=ke(Fe,e.__scopeScrollArea),a=e.orientation==="horizontal",s=zn(()=>l("SCROLL_END"),100),[i,l]=Og("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 h.useEffect(()=>{if(i==="idle"){const d=window.setTimeout(()=>l("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(d)}},[i,o.scrollHideDelay,l]),h.useEffect(()=>{const d=o.viewport,f=a?"scrollLeft":"scrollTop";if(d){let c=d[f];const p=()=>{const g=d[f];c!==g&&(l("SCROLL"),s()),c=g};return d.addEventListener("scroll",p),()=>d.removeEventListener("scroll",p)}},[o.viewport,a,l,s]),u.jsx(Ee,{present:n||i!=="hidden",children:u.jsx(jr,{"data-state":i==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:Q(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:Q(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),Hi=h.forwardRef((e,t)=>{const n=ke(Fe,e.__scopeScrollArea),{forceMount:r,...o}=e,[a,s]=h.useState(!1),i=e.orientation==="horizontal",l=zn(()=>{if(n.viewport){const d=n.viewport.offsetWidth<n.viewport.scrollWidth,f=n.viewport.offsetHeight<n.viewport.scrollHeight;s(i?d:f)}},10);return _t(n.viewport,l),_t(n.content,l),u.jsx(Ee,{present:r||a,children:u.jsx(jr,{"data-state":a?"visible":"hidden",...o,ref:t})})}),jr=h.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,o=ke(Fe,e.__scopeScrollArea),a=h.useRef(null),s=h.useRef(0),[i,l]=h.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),d=ji(i.viewport,i.content),f={...r,sizes:i,onSizesChange:l,hasThumb:d>0&&d<1,onThumbChange:p=>a.current=p,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:p=>s.current=p};function c(p,g){return Rg(p,s.current,i,g)}return n==="horizontal"?u.jsx(Fg,{...f,ref:t,onThumbPositionChange:()=>{if(o.viewport&&a.current){const p=o.viewport.scrollLeft,g=qi(p,i,o.dir);a.current.style.transform=`translate3d(${g}px, 0, 0)`}},onWheelScroll:p=>{o.viewport&&(o.viewport.scrollLeft=p)},onDragScroll:p=>{o.viewport&&(o.viewport.scrollLeft=c(p,o.dir))}}):n==="vertical"?u.jsx($g,{...f,ref:t,onThumbPositionChange:()=>{if(o.viewport&&a.current){const p=o.viewport.scrollTop,g=qi(p,i);a.current.style.transform=`translate3d(0, ${g}px, 0)`}},onWheelScroll:p=>{o.viewport&&(o.viewport.scrollTop=p)},onDragScroll:p=>{o.viewport&&(o.viewport.scrollTop=c(p))}}):null}),Fg=h.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,a=ke(Fe,e.__scopeScrollArea),[s,i]=h.useState(),l=h.useRef(null),d=se(t,l,a.onScrollbarXChange);return h.useEffect(()=>{l.current&&i(getComputedStyle(l.current))},[l]),u.jsx(Ui,{"data-orientation":"horizontal",...o,ref:d,sizes:n,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":On(n)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.x),onDragScroll:f=>e.onDragScroll(f.x),onWheelScroll:(f,c)=>{if(a.viewport){const p=a.viewport.scrollLeft+f.deltaX;e.onWheelScroll(p),Yi(p,c)&&f.preventDefault()}},onResize:()=>{l.current&&a.viewport&&s&&r({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:Ln(s.paddingLeft),paddingEnd:Ln(s.paddingRight)}})}})}),$g=h.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,a=ke(Fe,e.__scopeScrollArea),[s,i]=h.useState(),l=h.useRef(null),d=se(t,l,a.onScrollbarYChange);return h.useEffect(()=>{l.current&&i(getComputedStyle(l.current))},[l]),u.jsx(Ui,{"data-orientation":"vertical",...o,ref:d,sizes:n,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":On(n)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.y),onDragScroll:f=>e.onDragScroll(f.y),onWheelScroll:(f,c)=>{if(a.viewport){const p=a.viewport.scrollTop+f.deltaY;e.onWheelScroll(p),Yi(p,c)&&f.preventDefault()}},onResize:()=>{l.current&&a.viewport&&s&&r({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:Ln(s.paddingTop),paddingEnd:Ln(s.paddingBottom)}})}})}),[Hg,Vi]=zi(Fe),Ui=h.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:o,onThumbChange:a,onThumbPointerUp:s,onThumbPointerDown:i,onThumbPositionChange:l,onDragScroll:d,onWheelScroll:f,onResize:c,...p}=e,g=ke(Fe,n),[v,m]=h.useState(null),b=se(t,A=>m(A)),w=h.useRef(null),y=h.useRef(""),x=g.viewport,k=r.content-r.viewport,P=pe(f),E=pe(l),N=zn(c,10);function S(A){if(w.current){const z=A.clientX-w.current.left,_=A.clientY-w.current.top;d({x:z,y:_})}}return h.useEffect(()=>{const A=z=>{const _=z.target;(v==null?void 0:v.contains(_))&&P(z,k)};return document.addEventListener("wheel",A,{passive:!1}),()=>document.removeEventListener("wheel",A,{passive:!1})},[x,v,k,P]),h.useEffect(E,[r,E]),_t(v,N),_t(g.content,N),u.jsx(Hg,{scope:n,scrollbar:v,hasThumb:o,onThumbChange:pe(a),onThumbPointerUp:pe(s),onThumbPositionChange:E,onThumbPointerDown:pe(i),children:u.jsx(J.div,{...p,ref:b,style:{position:"absolute",...p.style},onPointerDown:Q(e.onPointerDown,A=>{A.button===0&&(A.target.setPointerCapture(A.pointerId),w.current=v.getBoundingClientRect(),y.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",g.viewport&&(g.viewport.style.scrollBehavior="auto"),S(A))}),onPointerMove:Q(e.onPointerMove,S),onPointerUp:Q(e.onPointerUp,A=>{const z=A.target;z.hasPointerCapture(A.pointerId)&&z.releasePointerCapture(A.pointerId),document.body.style.webkitUserSelect=y.current,g.viewport&&(g.viewport.style.scrollBehavior=""),w.current=null})})})}),Mn="ScrollAreaThumb",Ri=h.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Vi(Mn,e.__scopeScrollArea);return u.jsx(Ee,{present:n||o.hasThumb,children:u.jsx(Vg,{ref:t,...r})})}),Vg=h.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...o}=e,a=ke(Mn,n),s=Vi(Mn,n),{onThumbPositionChange:i}=s,l=se(t,c=>s.onThumbChange(c)),d=h.useRef(void 0),f=zn(()=>{d.current&&(d.current(),d.current=void 0)},100);return h.useEffect(()=>{const c=a.viewport;if(c){const p=()=>{if(f(),!d.current){const g=Wg(c,i);d.current=g,i()}};return i(),c.addEventListener("scroll",p),()=>c.removeEventListener("scroll",p)}},[a.viewport,f,i]),u.jsx(J.div,{"data-state":s.hasThumb?"visible":"hidden",...o,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:Q(e.onPointerDownCapture,c=>{const g=c.target.getBoundingClientRect(),v=c.clientX-g.left,m=c.clientY-g.top;s.onThumbPointerDown({x:v,y:m})}),onPointerUp:Q(e.onPointerUp,s.onThumbPointerUp)})});Ri.displayName=Mn;var qr="ScrollAreaCorner",Wi=h.forwardRef((e,t)=>{const n=ke(qr,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?u.jsx(Ug,{...e,ref:t}):null});Wi.displayName=qr;var Ug=h.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,o=ke(qr,n),[a,s]=h.useState(0),[i,l]=h.useState(0),d=!!(a&&i);return _t(o.scrollbarX,()=>{var c;const f=((c=o.scrollbarX)==null?void 0:c.offsetHeight)||0;o.onCornerHeightChange(f),l(f)}),_t(o.scrollbarY,()=>{var c;const f=((c=o.scrollbarY)==null?void 0:c.offsetWidth)||0;o.onCornerWidthChange(f),s(f)}),d?u.jsx(J.div,{...r,ref:t,style:{width:a,height:i,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Ln(e){return e?parseInt(e,10):0}function ji(e,t){const n=e/t;return isNaN(n)?0:n}function On(e){const t=ji(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function Rg(e,t,n,r="ltr"){const o=On(n),a=o/2,s=t||a,i=o-s,l=n.scrollbar.paddingStart+s,d=n.scrollbar.size-n.scrollbar.paddingEnd-i,f=n.content-n.viewport,c=r==="ltr"?[0,f]:[f*-1,0];return Gi([l,d],c)(e)}function qi(e,t,n="ltr"){const r=On(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-o,s=t.content-t.viewport,i=a-r,l=n==="ltr"?[0,s]:[s*-1,0],d=Hr(e,l);return Gi([0,s],[0,i])(d)}function Gi(e,t){return n=>{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*(n-e[0])}}function Yi(e,t){return e>0&&e<t}var Wg=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function o(){const a={left:e.scrollLeft,top:e.scrollTop},s=n.left!==a.left,i=n.top!==a.top;(s||i)&&t(),n=a,r=window.requestAnimationFrame(o)})(),()=>window.cancelAnimationFrame(r)};function zn(e,t){const n=pe(e),r=h.useRef(0);return h.useEffect(()=>()=>window.clearTimeout(r.current),[]),h.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function _t(e,t){const n=pe(t);ie(()=>{let r=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return o.observe(e),()=>{window.cancelAnimationFrame(r),o.unobserve(e)}}},[e,n])}var jg=Di,qg=Fi,Gg=Wi,Yg=[" ","Enter","ArrowUp","ArrowDown"],Kg=[" ","Enter"],ct="Select",[Dn,Bn,Xg]=Oa(ct),[At]=me(ct,[Xg,_n]),Fn=_n(),[Zg,Je]=At(ct),[Jg,Qg]=At(ct),Ki=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:a,value:s,defaultValue:i,onValueChange:l,dir:d,name:f,autoComplete:c,disabled:p,required:g,form:v}=e,m=Fn(t),[b,w]=h.useState(null),[y,x]=h.useState(null),[k,P]=h.useState(!1),E=Ut(d),[N,S]=Ve({prop:r,defaultProp:o??!1,onChange:a,caller:ct}),[A,z]=Ve({prop:s,defaultProp:i,onChange:l,caller:ct}),_=h.useRef(null),M=b?v||!!b.closest("form"):!0,[O,I]=h.useState(new Set),j=Array.from(O).map(D=>D.props.value).join(";");return u.jsx(ai,{...m,children:u.jsxs(Zg,{required:g,scope:t,trigger:b,onTriggerChange:w,valueNode:y,onValueNodeChange:x,valueNodeHasChildren:k,onValueNodeHasChildrenChange:P,contentId:st(),value:A,onValueChange:z,open:N,onOpenChange:S,dir:E,triggerPointerDownPosRef:_,disabled:p,children:[u.jsx(Dn.Provider,{scope:t,children:u.jsx(Jg,{scope:e.__scopeSelect,onNativeOptionAdd:h.useCallback(D=>{I($=>new Set($).add(D))},[]),onNativeOptionRemove:h.useCallback(D=>{I($=>{const q=new Set($);return q.delete(D),q})},[]),children:n})}),M?u.jsxs(vl,{"aria-hidden":!0,required:g,tabIndex:-1,name:f,autoComplete:c,value:A,onChange:D=>z(D.target.value),disabled:p,form:v,children:[A===void 0?u.jsx("option",{value:""}):null,Array.from(O)]},j):null]})})};Ki.displayName=ct;var Xi="SelectTrigger",Zi=h.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,a=Fn(n),s=Je(Xi,n),i=s.disabled||r,l=se(t,s.onTriggerChange),d=Bn(n),f=h.useRef("touch"),[c,p,g]=wl(m=>{const b=d().filter(x=>!x.disabled),w=b.find(x=>x.value===s.value),y=yl(b,m,w);y!==void 0&&s.onValueChange(y.value)}),v=m=>{i||(s.onOpenChange(!0),g()),m&&(s.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return u.jsx(si,{asChild:!0,...a,children:u.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":bl(s.value)?"":void 0,...o,ref:l,onClick:Q(o.onClick,m=>{m.currentTarget.focus(),f.current!=="mouse"&&v(m)}),onPointerDown:Q(o.onPointerDown,m=>{f.current=m.pointerType;const b=m.target;b.hasPointerCapture(m.pointerId)&&b.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(v(m),m.preventDefault())}),onKeyDown:Q(o.onKeyDown,m=>{const b=c.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&p(m.key),!(b&&m.key===" ")&&Yg.includes(m.key)&&(v(),m.preventDefault())})})})});Zi.displayName=Xi;var Ji="SelectValue",Qi=h.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:a,placeholder:s="",...i}=e,l=Je(Ji,n),{onValueNodeHasChildrenChange:d}=l,f=a!==void 0,c=se(t,l.onValueNodeChange);return ie(()=>{d(f)},[d,f]),u.jsx(J.span,{...i,ref:c,style:{pointerEvents:"none"},children:bl(l.value)?u.jsx(u.Fragment,{children:s}):a})});Qi.displayName=Ji;var em="SelectIcon",el=h.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return u.jsx(J.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});el.displayName=em;var tm="SelectPortal",tl=e=>u.jsx(pr,{asChild:!0,...e});tl.displayName=tm;var dt="SelectContent",nl=h.forwardRef((e,t)=>{const n=Je(dt,e.__scopeSelect),[r,o]=h.useState();if(ie(()=>{o(new DocumentFragment)},[]),!n.open){const a=r;return a?Zt.createPortal(u.jsx(rl,{scope:e.__scopeSelect,children:u.jsx(Dn.Slot,{scope:e.__scopeSelect,children:u.jsx("div",{children:e.children})})}),a):null}return u.jsx(ol,{...e,ref:t})});nl.displayName=dt;var _e=10,[rl,Qe]=At(dt),nm="SelectContentImpl",rm=Vt("SelectContent.RemoveScroll"),ol=h.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:a,onPointerDownOutside:s,side:i,sideOffset:l,align:d,alignOffset:f,arrowPadding:c,collisionBoundary:p,collisionPadding:g,sticky:v,hideWhenDetached:m,avoidCollisions:b,...w}=e,y=Je(dt,n),[x,k]=h.useState(null),[P,E]=h.useState(null),N=se(t,R=>k(R)),[S,A]=h.useState(null),[z,_]=h.useState(null),M=Bn(n),[O,I]=h.useState(!1),j=h.useRef(!1);h.useEffect(()=>{if(x)return Tp(x)},[x]),Vf();const D=h.useCallback(R=>{const[W,...Z]=M().map(ne=>ne.ref.current),[ee]=Z.slice(-1),ae=document.activeElement;for(const ne of R)if(ne===ae||(ne==null||ne.scrollIntoView({block:"nearest"}),ne===W&&P&&(P.scrollTop=0),ne===ee&&P&&(P.scrollTop=P.scrollHeight),ne==null||ne.focus(),document.activeElement!==ae))return},[M,P]),$=h.useCallback(()=>D([S,x]),[D,S,x]);h.useEffect(()=>{O&&$()},[O,$]);const{onOpenChange:q,triggerPointerDownPosRef:L}=y;h.useEffect(()=>{if(x){let R={x:0,y:0};const W=ee=>{var ae,ne;R={x:Math.abs(Math.round(ee.pageX)-(((ae=L.current)==null?void 0:ae.x)??0)),y:Math.abs(Math.round(ee.pageY)-(((ne=L.current)==null?void 0:ne.y)??0))}},Z=ee=>{R.x<=10&&R.y<=10?ee.preventDefault():x.contains(ee.target)||q(!1),document.removeEventListener("pointermove",W),L.current=null};return L.current!==null&&(document.addEventListener("pointermove",W),document.addEventListener("pointerup",Z,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",W),document.removeEventListener("pointerup",Z,{capture:!0})}}},[x,q,L]),h.useEffect(()=>{const R=()=>q(!1);return window.addEventListener("blur",R),window.addEventListener("resize",R),()=>{window.removeEventListener("blur",R),window.removeEventListener("resize",R)}},[q]);const[T,F]=wl(R=>{const W=M().filter(ae=>!ae.disabled),Z=W.find(ae=>ae.ref.current===document.activeElement),ee=yl(W,R,Z);ee&&setTimeout(()=>ee.ref.current.focus())}),H=h.useCallback((R,W,Z)=>{const ee=!j.current&&!Z;(y.value!==void 0&&y.value===W||ee)&&(A(R),ee&&(j.current=!0))},[y.value]),B=h.useCallback(()=>x==null?void 0:x.focus(),[x]),V=h.useCallback((R,W,Z)=>{const ee=!j.current&&!Z;(y.value!==void 0&&y.value===W||ee)&&_(R)},[y.value]),U=r==="popper"?Gr:al,X=U===Gr?{side:i,sideOffset:l,align:d,alignOffset:f,arrowPadding:c,collisionBoundary:p,collisionPadding:g,sticky:v,hideWhenDetached:m,avoidCollisions:b}:{};return u.jsx(rl,{scope:n,content:x,viewport:P,onViewportChange:E,itemRefCallback:H,selectedItem:S,onItemLeave:B,itemTextRefCallback:V,focusSelectedItem:$,selectedItemText:z,position:r,isPositioned:O,searchRef:T,children:u.jsx(ls,{as:rm,allowPinchZoom:!0,children:u.jsx(Wa,{asChild:!0,trapped:y.open,onMountAutoFocus:R=>{R.preventDefault()},onUnmountAutoFocus:Q(o,R=>{var W;(W=y.trigger)==null||W.focus({preventScroll:!0}),R.preventDefault()}),children:u.jsx(dr,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:R=>R.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:u.jsx(U,{role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:R=>R.preventDefault(),...w,...X,onPlaced:()=>I(!0),ref:N,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:Q(w.onKeyDown,R=>{const W=R.ctrlKey||R.altKey||R.metaKey;if(R.key==="Tab"&&R.preventDefault(),!W&&R.key.length===1&&F(R.key),["ArrowUp","ArrowDown","Home","End"].includes(R.key)){let ee=M().filter(ae=>!ae.disabled).map(ae=>ae.ref.current);if(["ArrowUp","End"].includes(R.key)&&(ee=ee.slice().reverse()),["ArrowUp","ArrowDown"].includes(R.key)){const ae=R.target,ne=ee.indexOf(ae);ee=ee.slice(ne+1)}setTimeout(()=>D(ee)),R.preventDefault()}})})})})})})});ol.displayName=nm;var om="SelectItemAlignedPosition",al=h.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,a=Je(dt,n),s=Qe(dt,n),[i,l]=h.useState(null),[d,f]=h.useState(null),c=se(t,N=>f(N)),p=Bn(n),g=h.useRef(!1),v=h.useRef(!0),{viewport:m,selectedItem:b,selectedItemText:w,focusSelectedItem:y}=s,x=h.useCallback(()=>{if(a.trigger&&a.valueNode&&i&&d&&m&&b&&w){const N=a.trigger.getBoundingClientRect(),S=d.getBoundingClientRect(),A=a.valueNode.getBoundingClientRect(),z=w.getBoundingClientRect();if(a.dir!=="rtl"){const ae=z.left-S.left,ne=A.left-ae,ce=N.left-ne,de=N.width+ce,pt=Math.max(de,S.width),tt=window.innerWidth-_e,Ae=Hr(ne,[_e,Math.max(_e,tt-pt)]);i.style.minWidth=de+"px",i.style.left=Ae+"px"}else{const ae=S.right-z.right,ne=window.innerWidth-A.right-ae,ce=window.innerWidth-N.right-ne,de=N.width+ce,pt=Math.max(de,S.width),tt=window.innerWidth-_e,Ae=Hr(ne,[_e,Math.max(_e,tt-pt)]);i.style.minWidth=de+"px",i.style.right=Ae+"px"}const _=p(),M=window.innerHeight-_e*2,O=m.scrollHeight,I=window.getComputedStyle(d),j=parseInt(I.borderTopWidth,10),D=parseInt(I.paddingTop,10),$=parseInt(I.borderBottomWidth,10),q=parseInt(I.paddingBottom,10),L=j+D+O+q+$,T=Math.min(b.offsetHeight*5,L),F=window.getComputedStyle(m),H=parseInt(F.paddingTop,10),B=parseInt(F.paddingBottom,10),V=N.top+N.height/2-_e,U=M-V,X=b.offsetHeight/2,R=b.offsetTop+X,W=j+D+R,Z=L-W;if(W<=V){const ae=_.length>0&&b===_[_.length-1].ref.current;i.style.bottom="0px";const ne=d.clientHeight-m.offsetTop-m.offsetHeight,ce=Math.max(U,X+(ae?B:0)+ne+$),de=W+ce;i.style.height=de+"px"}else{const ae=_.length>0&&b===_[0].ref.current;i.style.top="0px";const ce=Math.max(V,j+m.offsetTop+(ae?H:0)+X)+Z;i.style.height=ce+"px",m.scrollTop=W-V+m.offsetTop}i.style.margin=`${_e}px 0`,i.style.minHeight=T+"px",i.style.maxHeight=M+"px",r==null||r(),requestAnimationFrame(()=>g.current=!0)}},[p,a.trigger,a.valueNode,i,d,m,b,w,a.dir,r]);ie(()=>x(),[x]);const[k,P]=h.useState();ie(()=>{d&&P(window.getComputedStyle(d).zIndex)},[d]);const E=h.useCallback(N=>{N&&v.current===!0&&(x(),y==null||y(),v.current=!1)},[x,y]);return u.jsx(sm,{scope:n,contentWrapper:i,shouldExpandOnScrollRef:g,onScrollButtonChange:E,children:u.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:k},children:u.jsx(J.div,{...o,ref:c,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});al.displayName=om;var am="SelectPopperPosition",Gr=h.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=_e,...a}=e,s=Fn(n);return u.jsx(ii,{...s,...a,ref:t,align:r,collisionPadding:o,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)"}})});Gr.displayName=am;var[sm,Yr]=At(dt,{}),Kr="SelectViewport",sl=h.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,a=Qe(Kr,n),s=Yr(Kr,n),i=se(t,a.onViewportChange),l=h.useRef(0);return u.jsxs(u.Fragment,{children:[u.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}),u.jsx(Dn.Slot,{scope:n,children:u.jsx(J.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:i,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:Q(o.onScroll,d=>{const f=d.currentTarget,{contentWrapper:c,shouldExpandOnScrollRef:p}=s;if(p!=null&&p.current&&c){const g=Math.abs(l.current-f.scrollTop);if(g>0){const v=window.innerHeight-_e*2,m=parseFloat(c.style.minHeight),b=parseFloat(c.style.height),w=Math.max(m,b);if(w<v){const y=w+g,x=Math.min(v,y),k=y-x;c.style.height=x+"px",c.style.bottom==="0px"&&(f.scrollTop=k>0?k:0,c.style.justifyContent="flex-end")}}}l.current=f.scrollTop})})})]})});sl.displayName=Kr;var il="SelectGroup",[im,lm]=At(il),cm=h.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=st();return u.jsx(im,{scope:n,id:o,children:u.jsx(J.div,{role:"group","aria-labelledby":o,...r,ref:t})})});cm.displayName=il;var ll="SelectLabel",dm=h.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=lm(ll,n);return u.jsx(J.div,{id:o.id,...r,ref:t})});dm.displayName=ll;var $n="SelectItem",[um,cl]=At($n),dl=h.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:a,...s}=e,i=Je($n,n),l=Qe($n,n),d=i.value===r,[f,c]=h.useState(a??""),[p,g]=h.useState(!1),v=se(t,y=>{var x;return(x=l.itemRefCallback)==null?void 0:x.call(l,y,r,o)}),m=st(),b=h.useRef("touch"),w=()=>{o||(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 u.jsx(um,{scope:n,value:r,disabled:o,textId:m,isSelected:d,onItemTextChange:h.useCallback(y=>{c(x=>x||((y==null?void 0:y.textContent)??"").trim())},[]),children:u.jsx(Dn.ItemSlot,{scope:n,value:r,disabled:o,textValue:f,children:u.jsx(J.div,{role:"option","aria-labelledby":m,"data-highlighted":p?"":void 0,"aria-selected":d&&p,"data-state":d?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...s,ref:v,onFocus:Q(s.onFocus,()=>g(!0)),onBlur:Q(s.onBlur,()=>g(!1)),onClick:Q(s.onClick,()=>{b.current!=="mouse"&&w()}),onPointerUp:Q(s.onPointerUp,()=>{b.current==="mouse"&&w()}),onPointerDown:Q(s.onPointerDown,y=>{b.current=y.pointerType}),onPointerMove:Q(s.onPointerMove,y=>{var x;b.current=y.pointerType,o?(x=l.onItemLeave)==null||x.call(l):b.current==="mouse"&&y.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Q(s.onPointerLeave,y=>{var x;y.currentTarget===document.activeElement&&((x=l.onItemLeave)==null||x.call(l))}),onKeyDown:Q(s.onKeyDown,y=>{var k;((k=l.searchRef)==null?void 0:k.current)!==""&&y.key===" "||(Kg.includes(y.key)&&w(),y.key===" "&&y.preventDefault())})})})})});dl.displayName=$n;var qt="SelectItemText",ul=h.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...a}=e,s=Je(qt,n),i=Qe(qt,n),l=cl(qt,n),d=Qg(qt,n),[f,c]=h.useState(null),p=se(t,w=>c(w),l.onItemTextChange,w=>{var y;return(y=i.itemTextRefCallback)==null?void 0:y.call(i,w,l.value,l.disabled)}),g=f==null?void 0:f.textContent,v=h.useMemo(()=>u.jsx("option",{value:l.value,disabled:l.disabled,children:g},l.value),[l.disabled,l.value,g]),{onNativeOptionAdd:m,onNativeOptionRemove:b}=d;return ie(()=>(m(v),()=>b(v)),[m,b,v]),u.jsxs(u.Fragment,{children:[u.jsx(J.span,{id:l.textId,...a,ref:p}),l.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Zt.createPortal(a.children,s.valueNode):null]})});ul.displayName=qt;var fl="SelectItemIndicator",pl=h.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return cl(fl,n).isSelected?u.jsx(J.span,{"aria-hidden":!0,...r,ref:t}):null});pl.displayName=fl;var Xr="SelectScrollUpButton",hl=h.forwardRef((e,t)=>{const n=Qe(Xr,e.__scopeSelect),r=Yr(Xr,e.__scopeSelect),[o,a]=h.useState(!1),s=se(t,r.onScrollButtonChange);return ie(()=>{if(n.viewport&&n.isPositioned){let i=function(){const d=l.scrollTop>0;a(d)};const l=n.viewport;return i(),l.addEventListener("scroll",i),()=>l.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),o?u.jsx(ml,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:l}=n;i&&l&&(i.scrollTop=i.scrollTop-l.offsetHeight)}}):null});hl.displayName=Xr;var Zr="SelectScrollDownButton",gl=h.forwardRef((e,t)=>{const n=Qe(Zr,e.__scopeSelect),r=Yr(Zr,e.__scopeSelect),[o,a]=h.useState(!1),s=se(t,r.onScrollButtonChange);return ie(()=>{if(n.viewport&&n.isPositioned){let i=function(){const d=l.scrollHeight-l.clientHeight,f=Math.ceil(l.scrollTop)<d;a(f)};const l=n.viewport;return i(),l.addEventListener("scroll",i),()=>l.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),o?u.jsx(ml,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:l}=n;i&&l&&(i.scrollTop=i.scrollTop+l.offsetHeight)}}):null});gl.displayName=Zr;var ml=h.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,a=Qe("SelectScrollButton",n),s=h.useRef(null),i=Bn(n),l=h.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return h.useEffect(()=>()=>l(),[l]),ie(()=>{var f;const d=i().find(c=>c.ref.current===document.activeElement);(f=d==null?void 0:d.ref.current)==null||f.scrollIntoView({block:"nearest"})},[i]),u.jsx(J.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:Q(o.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(r,50))}),onPointerMove:Q(o.onPointerMove,()=>{var d;(d=a.onItemLeave)==null||d.call(a),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:Q(o.onPointerLeave,()=>{l()})})}),fm="SelectSeparator",pm=h.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return u.jsx(J.div,{"aria-hidden":!0,...r,ref:t})});pm.displayName=fm;var Jr="SelectArrow",hm=h.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Fn(n),a=Je(Jr,n),s=Qe(Jr,n);return a.open&&s.position==="popper"?u.jsx(li,{...o,...r,ref:t}):null});hm.displayName=Jr;var gm="SelectBubbleInput",vl=h.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=h.useRef(null),a=se(r,o),s=gn(t);return h.useEffect(()=>{const i=o.current;if(!i)return;const l=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(l,"value").set;if(s!==t&&f){const c=new Event("change",{bubbles:!0});f.call(i,t),i.dispatchEvent(c)}},[s,t]),u.jsx(J.select,{...n,style:{...Ma,...n.style},ref:a,defaultValue:t})});vl.displayName=gm;function bl(e){return e===""||e===void 0}function wl(e){const t=pe(e),n=h.useRef(""),r=h.useRef(0),o=h.useCallback(s=>{const i=n.current+s;t(i),(function l(d){n.current=d,window.clearTimeout(r.current),d!==""&&(r.current=window.setTimeout(()=>l(""),1e3))})(i)},[t]),a=h.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return h.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,a]}function yl(e,t,n){const o=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let s=mm(e,Math.max(a,0));o.length===1&&(s=s.filter(d=>d!==n));const l=s.find(d=>d.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function mm(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var vm=Ki,bm=Zi,wm=Qi,ym=el,xm=tl,Cm=nl,km=sl,Sm=dl,Em=ul,Nm=pl,Tm=hl,_m=gl,Am="Separator",xl="horizontal",Pm=["horizontal","vertical"],Cl=h.forwardRef((e,t)=>{const{decorative:n,orientation:r=xl,...o}=e,a=Im(r)?r:xl,i=n?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return u.jsx(J.div,{"data-orientation":a,...i,...o,ref:t})});Cl.displayName=Am;function Im(e){return Pm.includes(e)}var Mm=Cl,Hn="Switch",[Lm]=me(Hn),[Om,zm]=Lm(Hn),kl=h.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:a,required:s,disabled:i,value:l="on",onCheckedChange:d,form:f,...c}=e,[p,g]=h.useState(null),v=se(t,x=>g(x)),m=h.useRef(!1),b=p?f||!!p.closest("form"):!0,[w,y]=Ve({prop:o,defaultProp:a??!1,onChange:d,caller:Hn});return u.jsxs(Om,{scope:n,checked:w,disabled:i,children:[u.jsx(J.button,{type:"button",role:"switch","aria-checked":w,"aria-required":s,"data-state":Tl(w),"data-disabled":i?"":void 0,disabled:i,value:l,...c,ref:v,onClick:Q(e.onClick,x=>{y(k=>!k),b&&(m.current=x.isPropagationStopped(),m.current||x.stopPropagation())})}),b&&u.jsx(Nl,{control:p,bubbles:!m.current,name:r,value:l,checked:w,required:s,disabled:i,form:f,style:{transform:"translateX(-100%)"}})]})});kl.displayName=Hn;var Sl="SwitchThumb",El=h.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=zm(Sl,n);return u.jsx(J.span,{"data-state":Tl(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});El.displayName=Sl;var Dm="SwitchBubbleInput",Nl=h.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...o},a)=>{const s=h.useRef(null),i=se(s,a),l=gn(n),d=mn(t);return h.useEffect(()=>{const f=s.current;if(!f)return;const c=window.HTMLInputElement.prototype,g=Object.getOwnPropertyDescriptor(c,"checked").set;if(l!==n&&g){const v=new Event("click",{bubbles:r});g.call(f,n),f.dispatchEvent(v)}},[l,n,r]),u.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:i,style:{...o.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Nl.displayName=Dm;function Tl(e){return e?"checked":"unchecked"}var Bm=kl,Fm=El,Vn="Tabs",[$m]=me(Vn,[An]),_l=An(),[Hm,Qr]=$m(Vn),Al=h.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:a,orientation:s="horizontal",dir:i,activationMode:l="automatic",...d}=e,f=Ut(i),[c,p]=Ve({prop:r,onChange:o,defaultProp:a??"",caller:Vn});return u.jsx(Hm,{scope:n,baseId:st(),value:c,onValueChange:p,orientation:s,dir:f,activationMode:l,children:u.jsx(J.div,{dir:f,"data-orientation":s,...d,ref:t})})});Al.displayName=Vn;var Pl="TabsList",Il=h.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,a=Qr(Pl,n),s=_l(n);return u.jsx(hi,{asChild:!0,...s,orientation:a.orientation,dir:a.dir,loop:r,children:u.jsx(J.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:t})})});Il.displayName=Pl;var Ml="TabsTrigger",Ll=h.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...a}=e,s=Qr(Ml,n),i=_l(n),l=Dl(s.baseId,r),d=Bl(s.baseId,r),f=r===s.value;return u.jsx(gi,{asChild:!0,...i,focusable:!o,active:f,children:u.jsx(J.button,{type:"button",role:"tab","aria-selected":f,"aria-controls":d,"data-state":f?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:l,...a,ref:t,onMouseDown:Q(e.onMouseDown,c=>{!o&&c.button===0&&c.ctrlKey===!1?s.onValueChange(r):c.preventDefault()}),onKeyDown:Q(e.onKeyDown,c=>{[" ","Enter"].includes(c.key)&&s.onValueChange(r)}),onFocus:Q(e.onFocus,()=>{const c=s.activationMode!=="manual";!f&&!o&&c&&s.onValueChange(r)})})})});Ll.displayName=Ml;var Ol="TabsContent",zl=h.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:a,...s}=e,i=Qr(Ol,n),l=Dl(i.baseId,r),d=Bl(i.baseId,r),f=r===i.value,c=h.useRef(f);return h.useEffect(()=>{const p=requestAnimationFrame(()=>c.current=!1);return()=>cancelAnimationFrame(p)},[]),u.jsx(Ee,{present:o||f,children:({present:p})=>u.jsx(J.div,{"data-state":f?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":l,hidden:!p,id:d,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:c.current?"0s":void 0},children:p&&a})})});zl.displayName=Ol;function Dl(e,t){return`${e}-trigger-${t}`}function Bl(e,t){return`${e}-content-${t}`}var Vm=Al,Um=Il,Rm=Ll,Wm=zl,[Un]=me("Tooltip",[_n]),Rn=_n(),Fl="TooltipProvider",jm=700,eo="tooltip.open",[qm,to]=Un(Fl),$l=e=>{const{__scopeTooltip:t,delayDuration:n=jm,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:a}=e,s=h.useRef(!0),i=h.useRef(!1),l=h.useRef(0);return h.useEffect(()=>{const d=l.current;return()=>window.clearTimeout(d)},[]),u.jsx(qm,{scope:t,isOpenDelayedRef:s,delayDuration:n,onOpen:h.useCallback(()=>{window.clearTimeout(l.current),s.current=!1},[]),onClose:h.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.current=!0,r)},[r]),isPointerInTransitRef:i,onPointerInTransitChange:h.useCallback(d=>{i.current=d},[]),disableHoverableContent:o,children:a})};$l.displayName=Fl;var Gt="Tooltip",[Gm,Yt]=Un(Gt),Hl=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:a,disableHoverableContent:s,delayDuration:i}=e,l=to(Gt,e.__scopeTooltip),d=Rn(t),[f,c]=h.useState(null),p=st(),g=h.useRef(0),v=s??l.disableHoverableContent,m=i??l.delayDuration,b=h.useRef(!1),[w,y]=Ve({prop:r,defaultProp:o??!1,onChange:N=>{N?(l.onOpen(),document.dispatchEvent(new CustomEvent(eo))):l.onClose(),a==null||a(N)},caller:Gt}),x=h.useMemo(()=>w?b.current?"delayed-open":"instant-open":"closed",[w]),k=h.useCallback(()=>{window.clearTimeout(g.current),g.current=0,b.current=!1,y(!0)},[y]),P=h.useCallback(()=>{window.clearTimeout(g.current),g.current=0,y(!1)},[y]),E=h.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{b.current=!0,y(!0),g.current=0},m)},[m,y]);return h.useEffect(()=>()=>{g.current&&(window.clearTimeout(g.current),g.current=0)},[]),u.jsx(ai,{...d,children:u.jsx(Gm,{scope:t,contentId:p,open:w,stateAttribute:x,trigger:f,onTriggerChange:c,onTriggerEnter:h.useCallback(()=>{l.isOpenDelayedRef.current?E():k()},[l.isOpenDelayedRef,E,k]),onTriggerLeave:h.useCallback(()=>{v?P():(window.clearTimeout(g.current),g.current=0)},[P,v]),onOpen:k,onClose:P,disableHoverableContent:v,children:n})})};Hl.displayName=Gt;var no="TooltipTrigger",Vl=h.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Yt(no,n),a=to(no,n),s=Rn(n),i=h.useRef(null),l=se(t,i,o.onTriggerChange),d=h.useRef(!1),f=h.useRef(!1),c=h.useCallback(()=>d.current=!1,[]);return h.useEffect(()=>()=>document.removeEventListener("pointerup",c),[c]),u.jsx(si,{asChild:!0,...s,children:u.jsx(J.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:l,onPointerMove:Q(e.onPointerMove,p=>{p.pointerType!=="touch"&&!f.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:Q(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:Q(e.onPointerDown,()=>{o.open&&o.onClose(),d.current=!0,document.addEventListener("pointerup",c,{once:!0})}),onFocus:Q(e.onFocus,()=>{d.current||o.onOpen()}),onBlur:Q(e.onBlur,o.onClose),onClick:Q(e.onClick,o.onClose)})})});Vl.displayName=no;var ro="TooltipPortal",[Ym,Km]=Un(ro,{forceMount:void 0}),Ul=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,a=Yt(ro,t);return u.jsx(Ym,{scope:t,forceMount:n,children:u.jsx(Ee,{present:n||a.open,children:u.jsx(pr,{asChild:!0,container:o,children:r})})})};Ul.displayName=ro;var Pt="TooltipContent",Rl=h.forwardRef((e,t)=>{const n=Km(Pt,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,s=Yt(Pt,e.__scopeTooltip);return u.jsx(Ee,{present:r||s.open,children:s.disableHoverableContent?u.jsx(Wl,{side:o,...a,ref:t}):u.jsx(Xm,{side:o,...a,ref:t})})}),Xm=h.forwardRef((e,t)=>{const n=Yt(Pt,e.__scopeTooltip),r=to(Pt,e.__scopeTooltip),o=h.useRef(null),a=se(t,o),[s,i]=h.useState(null),{trigger:l,onClose:d}=n,f=o.current,{onPointerInTransitChange:c}=r,p=h.useCallback(()=>{i(null),c(!1)},[c]),g=h.useCallback((v,m)=>{const b=v.currentTarget,w={x:v.clientX,y:v.clientY},y=e0(w,b.getBoundingClientRect()),x=t0(w,y),k=n0(m.getBoundingClientRect()),P=o0([...x,...k]);i(P),c(!0)},[c]);return h.useEffect(()=>()=>p(),[p]),h.useEffect(()=>{if(l&&f){const v=b=>g(b,f),m=b=>g(b,l);return l.addEventListener("pointerleave",v),f.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",v),f.removeEventListener("pointerleave",m)}}},[l,f,g,p]),h.useEffect(()=>{if(s){const v=m=>{const b=m.target,w={x:m.clientX,y:m.clientY},y=(l==null?void 0:l.contains(b))||(f==null?void 0:f.contains(b)),x=!r0(w,s);y?p():x&&(p(),d())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[l,f,s,d,p]),u.jsx(Wl,{...e,ref:a})}),[Zm,Jm]=Un(Gt,{isInside:!1}),Qm=nf("TooltipContent"),Wl=h.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:s,...i}=e,l=Yt(Pt,n),d=Rn(n),{onClose:f}=l;return h.useEffect(()=>(document.addEventListener(eo,f),()=>document.removeEventListener(eo,f)),[f]),h.useEffect(()=>{if(l.trigger){const c=p=>{const g=p.target;g!=null&&g.contains(l.trigger)&&f()};return window.addEventListener("scroll",c,{capture:!0}),()=>window.removeEventListener("scroll",c,{capture:!0})}},[l.trigger,f]),u.jsx(dr,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:c=>c.preventDefault(),onDismiss:f,children:u.jsxs(ii,{"data-state":l.stateAttribute,...d,...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:[u.jsx(Qm,{children:r}),u.jsx(Zm,{scope:n,isInside:!0,children:u.jsx(df,{id:l.contentId,role:"tooltip",children:o||r})})]})})});Rl.displayName=Pt;var jl="TooltipArrow",ql=h.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Rn(n);return Jm(jl,n).isInside?null:u.jsx(li,{...o,...r,ref:t})});ql.displayName=jl;function e0(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,o,a)){case a:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function t0(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function n0(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function r0(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const i=t[a],l=t[s],d=i.x,f=i.y,c=l.x,p=l.y;f>r!=p>r&&n<(c-d)*(r-f)/(p-f)+d&&(o=!o)}return o}function o0(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),a0(t)}function a0(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const a=t[t.length-1],s=t[t.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const a=n[n.length-1],s=n[n.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var s0=$l,i0=Hl,l0=Vl,c0=Ul,d0=Rl,u0=ql;const f0=on("inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all 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 Gl({className:e,variant:t="default",size:n="default",asChild:r=!1,...o}){const a=r?Pa:"button";return u.jsx(a,{"data-slot":"button","data-variant":t,"data-size":n,className:K(f0({variant:t,size:n,className:e})),...o})}const p0={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"},h0=on("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 g0({className:e,variant:t="default",hue:n,asChild:r=!1,...o}){const a=r?Pa:"span",s=n?p0[n]:void 0;return u.jsx(a,{"data-slot":"badge","data-variant":t,className:K(h0({variant:t}),s,e),...o})}function m0({className:e,type:t,...n}){return u.jsx("input",{type:t,"data-slot":"input",className:K("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),...n})}function v0({className:e,...t}){return u.jsx("textarea",{"data-slot":"textarea",className:K("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 b0({...e}){return u.jsx(vm,{"data-slot":"select",...e})}function w0({...e}){return u.jsx(wm,{"data-slot":"select-value",...e})}function y0({className:e,size:t="default",children:n,...r}){return u.jsxs(bm,{"data-slot":"select-trigger","data-size":t,className:K("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:[n,u.jsx(ym,{asChild:!0,children:u.jsx(Zo,{className:"size-4 opacity-50"})})]})}function x0({className:e,children:t,position:n="item-aligned",align:r="center",...o}){return u.jsx(xm,{children:u.jsxs(Cm,{"data-slot":"select-content",className:K("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",n==="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:n,align:r,...o,children:[u.jsx(k0,{}),u.jsx(km,{className:K("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),u.jsx(S0,{})]})})}function C0({className:e,children:t,...n}){return u.jsxs(Sm,{"data-slot":"select-item",className:K("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),...n,children:[u.jsx("span",{"data-slot":"select-item-indicator",className:"absolute right-2 flex size-3.5 items-center justify-center",children:u.jsx(Nm,{children:u.jsx(Xo,{className:"size-4"})})}),u.jsx(Em,{children:t})]})}function k0({className:e,...t}){return u.jsx(Tm,{"data-slot":"select-scroll-up-button",className:K("flex cursor-default items-center justify-center py-1",e),...t,children:u.jsx(Gd,{className:"size-4"})})}function S0({className:e,...t}){return u.jsx(_m,{"data-slot":"select-scroll-down-button",className:K("flex cursor-default items-center justify-center py-1",e),...t,children:u.jsx(Zo,{className:"size-4"})})}function E0({className:e,...t}){return u.jsx(xs,{"data-slot":"checkbox",className:K("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:u.jsx(ks,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none",children:u.jsx(Xo,{className:"size-3.5"})})})}function N0({className:e,size:t="default",...n}){return u.jsx(Bm,{"data-slot":"switch","data-size":t,className:K("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),...n,children:u.jsx(Fm,{"data-slot":"switch-thumb",className:K("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 T0({className:e,...t}){return u.jsx(pg,{"data-slot":"label",className:K("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 _0({className:e,...t}){return u.jsx(Ig,{"data-slot":"radio-group",className:K("grid gap-3",e),...t})}function A0({className:e,...t}){return u.jsx(Mg,{"data-slot":"radio-group-item",className:K("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:u.jsx(Lg,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:u.jsx(Kd,{className:"absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 fill-primary"})})})}function P0({className:e,orientation:t="horizontal",decorative:n=!0,...r}){return u.jsx(Mm,{"data-slot":"separator",decorative:n,orientation:t,className:K("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 I0({className:e,orientation:t="horizontal",...n}){return u.jsx(Vm,{"data-slot":"tabs","data-orientation":t,orientation:t,className:K("group/tabs flex gap-2 data-[orientation=horizontal]:flex-col",e),...n})}const M0=on("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 L0({className:e,variant:t="default",...n}){return u.jsx(Um,{"data-slot":"tabs-list","data-variant":t,className:K(M0({variant:t}),e),...n})}function O0({className:e,...t}){return u.jsx(Rm,{"data-slot":"tabs-trigger",className:K("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 z0({className:e,...t}){return u.jsx(Wm,{"data-slot":"tabs-content",className:K("flex-1 outline-none",e),...t})}function D0({className:e,children:t,...n}){return u.jsxs(jg,{"data-slot":"scroll-area",className:K("relative",e),...n,children:[u.jsx(qg,{"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}),u.jsx(B0,{}),u.jsx(Gg,{})]})}function B0({className:e,orientation:t="vertical",...n}){return u.jsx($i,{"data-slot":"scroll-area-scrollbar",orientation:t,className:K("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),...n,children:u.jsx(Ri,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"})})}function oo({className:e,size:t="default",...n}){return u.jsx(Bp,{"data-slot":"avatar","data-size":t,className:K("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),...n})}function ao({className:e,...t}){return u.jsx(Fp,{"data-slot":"avatar-image",className:K("aspect-square size-full",e),...t})}function so({className:e,...t}){return u.jsx($p,{"data-slot":"avatar-fallback",className:K("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})}var It={},io,Yl;function F0(){return Yl||(Yl=1,io=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),io}var lo={},et={},Kl;function ut(){if(Kl)return et;Kl=1;let e;const t=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return et.getSymbolSize=function(r){if(!r)throw new Error('"version" cannot be null or undefined');if(r<1||r>40)throw new Error('"version" should be in range from 1 to 40');return r*4+17},et.getSymbolTotalCodewords=function(r){return t[r]},et.getBCHDigit=function(n){let r=0;for(;n!==0;)r++,n>>>=1;return r},et.setToSJISFunction=function(r){if(typeof r!="function")throw new Error('"toSJISFunc" is not a valid function.');e=r},et.isKanjiModeEnabled=function(){return typeof e<"u"},et.toSJIS=function(r){return e(r)},et}var co={},Xl;function uo(){return Xl||(Xl=1,(function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+n)}}e.isValid=function(r){return r&&typeof r.bit<"u"&&r.bit>=0&&r.bit<4},e.from=function(r,o){if(e.isValid(r))return r;try{return t(r)}catch{return o}}})(co)),co}var fo,Zl;function $0(){if(Zl)return fo;Zl=1;function e(){this.buffer=[],this.length=0}return e.prototype={get:function(t){const n=Math.floor(t/8);return(this.buffer[n]>>>7-t%8&1)===1},put:function(t,n){for(let r=0;r<n;r++)this.putBit((t>>>n-r-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){const n=Math.floor(this.length/8);this.buffer.length<=n&&this.buffer.push(0),t&&(this.buffer[n]|=128>>>this.length%8),this.length++}},fo=e,fo}var po,Jl;function H0(){if(Jl)return po;Jl=1;function e(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}return e.prototype.set=function(t,n,r,o){const a=t*this.size+n;this.data[a]=r,o&&(this.reservedBit[a]=!0)},e.prototype.get=function(t,n){return this.data[t*this.size+n]},e.prototype.xor=function(t,n,r){this.data[t*this.size+n]^=r},e.prototype.isReserved=function(t,n){return this.reservedBit[t*this.size+n]},po=e,po}var ho={},Ql;function V0(){return Ql||(Ql=1,(function(e){const t=ut().getSymbolSize;e.getRowColCoords=function(r){if(r===1)return[];const o=Math.floor(r/7)+2,a=t(r),s=a===145?26:Math.ceil((a-13)/(2*o-2))*2,i=[a-7];for(let l=1;l<o-1;l++)i[l]=i[l-1]-s;return i.push(6),i.reverse()},e.getPositions=function(r){const o=[],a=e.getRowColCoords(r),s=a.length;for(let i=0;i<s;i++)for(let l=0;l<s;l++)i===0&&l===0||i===0&&l===s-1||i===s-1&&l===0||o.push([a[i],a[l]]);return o}})(ho)),ho}var go={},ec;function U0(){if(ec)return go;ec=1;const e=ut().getSymbolSize,t=7;return go.getPositions=function(r){const o=e(r);return[[0,0],[o-t,0],[0,o-t]]},go}var mo={},tc;function R0(){return tc||(tc=1,(function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const t={N1:3,N2:3,N3:40,N4:10};e.isValid=function(o){return o!=null&&o!==""&&!isNaN(o)&&o>=0&&o<=7},e.from=function(o){return e.isValid(o)?parseInt(o,10):void 0},e.getPenaltyN1=function(o){const a=o.size;let s=0,i=0,l=0,d=null,f=null;for(let c=0;c<a;c++){i=l=0,d=f=null;for(let p=0;p<a;p++){let g=o.get(c,p);g===d?i++:(i>=5&&(s+=t.N1+(i-5)),d=g,i=1),g=o.get(p,c),g===f?l++:(l>=5&&(s+=t.N1+(l-5)),f=g,l=1)}i>=5&&(s+=t.N1+(i-5)),l>=5&&(s+=t.N1+(l-5))}return s},e.getPenaltyN2=function(o){const a=o.size;let s=0;for(let i=0;i<a-1;i++)for(let l=0;l<a-1;l++){const d=o.get(i,l)+o.get(i,l+1)+o.get(i+1,l)+o.get(i+1,l+1);(d===4||d===0)&&s++}return s*t.N2},e.getPenaltyN3=function(o){const a=o.size;let s=0,i=0,l=0;for(let d=0;d<a;d++){i=l=0;for(let f=0;f<a;f++)i=i<<1&2047|o.get(d,f),f>=10&&(i===1488||i===93)&&s++,l=l<<1&2047|o.get(f,d),f>=10&&(l===1488||l===93)&&s++}return s*t.N3},e.getPenaltyN4=function(o){let a=0;const s=o.data.length;for(let l=0;l<s;l++)a+=o.data[l];return Math.abs(Math.ceil(a*100/s/5)-10)*t.N4};function n(r,o,a){switch(r){case e.Patterns.PATTERN000:return(o+a)%2===0;case e.Patterns.PATTERN001:return o%2===0;case e.Patterns.PATTERN010:return a%3===0;case e.Patterns.PATTERN011:return(o+a)%3===0;case e.Patterns.PATTERN100:return(Math.floor(o/2)+Math.floor(a/3))%2===0;case e.Patterns.PATTERN101:return o*a%2+o*a%3===0;case e.Patterns.PATTERN110:return(o*a%2+o*a%3)%2===0;case e.Patterns.PATTERN111:return(o*a%3+(o+a)%2)%2===0;default:throw new Error("bad maskPattern:"+r)}}e.applyMask=function(o,a){const s=a.size;for(let i=0;i<s;i++)for(let l=0;l<s;l++)a.isReserved(l,i)||a.xor(l,i,n(o,l,i))},e.getBestMask=function(o,a){const s=Object.keys(e.Patterns).length;let i=0,l=1/0;for(let d=0;d<s;d++){a(d),e.applyMask(d,o);const f=e.getPenaltyN1(o)+e.getPenaltyN2(o)+e.getPenaltyN3(o)+e.getPenaltyN4(o);e.applyMask(d,o),f<l&&(l=f,i=d)}return i}})(mo)),mo}var Wn={},nc;function rc(){if(nc)return Wn;nc=1;const e=uo(),t=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],n=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return Wn.getBlocksCount=function(o,a){switch(a){case e.L:return t[(o-1)*4+0];case e.M:return t[(o-1)*4+1];case e.Q:return t[(o-1)*4+2];case e.H:return t[(o-1)*4+3];default:return}},Wn.getTotalCodewordsCount=function(o,a){switch(a){case e.L:return n[(o-1)*4+0];case e.M:return n[(o-1)*4+1];case e.Q:return n[(o-1)*4+2];case e.H:return n[(o-1)*4+3];default:return}},Wn}var vo={},Kt={},oc;function W0(){if(oc)return Kt;oc=1;const e=new Uint8Array(512),t=new Uint8Array(256);return(function(){let r=1;for(let o=0;o<255;o++)e[o]=r,t[r]=o,r<<=1,r&256&&(r^=285);for(let o=255;o<512;o++)e[o]=e[o-255]})(),Kt.log=function(r){if(r<1)throw new Error("log("+r+")");return t[r]},Kt.exp=function(r){return e[r]},Kt.mul=function(r,o){return r===0||o===0?0:e[t[r]+t[o]]},Kt}var ac;function j0(){return ac||(ac=1,(function(e){const t=W0();e.mul=function(r,o){const a=new Uint8Array(r.length+o.length-1);for(let s=0;s<r.length;s++)for(let i=0;i<o.length;i++)a[s+i]^=t.mul(r[s],o[i]);return a},e.mod=function(r,o){let a=new Uint8Array(r);for(;a.length-o.length>=0;){const s=a[0];for(let l=0;l<o.length;l++)a[l]^=t.mul(o[l],s);let i=0;for(;i<a.length&&a[i]===0;)i++;a=a.slice(i)}return a},e.generateECPolynomial=function(r){let o=new Uint8Array([1]);for(let a=0;a<r;a++)o=e.mul(o,new Uint8Array([1,t.exp(a)]));return o}})(vo)),vo}var bo,sc;function q0(){if(sc)return bo;sc=1;const e=j0();function t(n){this.genPoly=void 0,this.degree=n,this.degree&&this.initialize(this.degree)}return t.prototype.initialize=function(r){this.degree=r,this.genPoly=e.generateECPolynomial(this.degree)},t.prototype.encode=function(r){if(!this.genPoly)throw new Error("Encoder not initialized");const o=new Uint8Array(r.length+this.degree);o.set(r);const a=e.mod(o,this.genPoly),s=this.degree-a.length;if(s>0){const i=new Uint8Array(this.degree);return i.set(a,s),i}return a},bo=t,bo}var wo={},yo={},xo={},ic;function lc(){return ic||(ic=1,xo.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}),xo}var $e={},cc;function dc(){if(cc)return $e;cc=1;const e="[0-9]+",t="[A-Z $%*+\\-./:]+";let n="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";n=n.replace(/u/g,"\\u");const r="(?:(?![A-Z0-9 $%*+\\-./:]|"+n+`)(?:.|[\r
|
|
296
|
-
]))+`;$e.KANJI=new RegExp(n,"g"),$e.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),$e.BYTE=new RegExp(r,"g"),$e.NUMERIC=new RegExp(e,"g"),$e.ALPHANUMERIC=new RegExp(t,"g");const o=new RegExp("^"+n+"$"),a=new RegExp("^"+e+"$"),s=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return $e.testKanji=function(l){return o.test(l)},$e.testNumeric=function(l){return a.test(l)},$e.testAlphanumeric=function(l){return s.test(l)},$e}var
|
|
297
|
-
Make sure your charset is UTF-8`);a=(a>>>8&255)*192+(a&255),r.put(a,13)}},To=n,To}var _o={exports:{}},
|
|
298
|
-
Suggested mode is: `+t.toString(k));switch(x===t.KANJI&&!i.isKanjiModeEnabled()&&(x=t.BYTE),x){case t.NUMERIC:return new n(w);case t.ALPHANUMERIC:return new r(w);case t.KANJI:return new a(w);case t.BYTE:return new o(w)}}e.fromArray=function(y){return y.reduce(function(x,k){return typeof k=="string"?x.push(b(k,null)):k.data&&x.push(b(k.data,k.mode)),x},[])},e.fromString=function(y,x){const k=c(y,i.isKanjiModeEnabled()),P=v(k),E=m(P,x),N=l.find_path(E.map,"start","end"),S=[];for(let A=1;A<N.length-1;A++)S.push(E.table[N[A]].node);return e.fromArray(g(S))},e.rawSplit=function(y){return e.fromArray(c(y,i.isKanjiModeEnabled()))}})(ko)),ko}var
|
|
300
|
+
Defaulting to \`null\`.`}var xg=bi,Cg=yi,Rr="Radio",[kg,Si]=me(Rr),[Sg,Eg]=kg(Rr),Ei=p.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:a,disabled:s,value:i="on",onCheck:l,form:d,...f}=e,[c,h]=p.useState(null),g=se(t,b=>h(b)),v=p.useRef(!1),m=c?d||!!c.closest("form"):!0;return u.jsxs(Sg,{scope:n,checked:o,disabled:s,children:[u.jsx(J.button,{type:"button",role:"radio","aria-checked":o,"data-state":Ai(o),"data-disabled":s?"":void 0,disabled:s,value:i,...f,ref:g,onClick:Q(e.onClick,b=>{o||l==null||l(),m&&(v.current=b.isPropagationStopped(),v.current||b.stopPropagation())})}),m&&u.jsx(_i,{control:c,bubbles:!v.current,name:r,value:i,checked:o,required:a,disabled:s,form:d,style:{transform:"translateX(-100%)"}})]})});Ei.displayName=Rr;var Ni="RadioIndicator",Ti=p.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,a=Eg(Ni,n);return u.jsx(Ee,{present:r||a.checked,children:u.jsx(J.span,{"data-state":Ai(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t})})});Ti.displayName=Ni;var Ng="RadioBubbleInput",_i=p.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...o},a)=>{const s=p.useRef(null),i=se(s,a),l=gn(n),d=mn(t);return p.useEffect(()=>{const f=s.current;if(!f)return;const c=window.HTMLInputElement.prototype,g=Object.getOwnPropertyDescriptor(c,"checked").set;if(l!==n&&g){const v=new Event("click",{bubbles:r});g.call(f,n),f.dispatchEvent(v)}},[l,n,r]),u.jsx(J.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:i,style:{...o.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});_i.displayName=Ng;function Ai(e){return e?"checked":"unchecked"}var Tg=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],In="RadioGroup",[_g]=me(In,[An,Si]),Pi=An(),Ii=Si(),[Ag,Pg]=_g(In),Mi=p.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:a,required:s=!1,disabled:i=!1,orientation:l,dir:d,loop:f=!0,onValueChange:c,...h}=e,g=Pi(n),v=Ut(d),[m,b]=Ve({prop:a,defaultProp:o??null,onChange:c,caller:In});return u.jsx(Ag,{scope:n,name:r,required:s,disabled:i,value:m,onValueChange:b,children:u.jsx(gi,{asChild:!0,...g,orientation:l,dir:v,loop:f,children:u.jsx(J.div,{role:"radiogroup","aria-required":s,"aria-orientation":l,"data-disabled":i?"":void 0,dir:v,...h,ref:t})})})});Mi.displayName=In;var Li="RadioGroupItem",Oi=p.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,a=Pg(Li,n),s=a.disabled||r,i=Pi(n),l=Ii(n),d=p.useRef(null),f=se(t,d),c=a.value===o.value,h=p.useRef(!1);return p.useEffect(()=>{const g=m=>{Tg.includes(m.key)&&(h.current=!0)},v=()=>h.current=!1;return document.addEventListener("keydown",g),document.addEventListener("keyup",v),()=>{document.removeEventListener("keydown",g),document.removeEventListener("keyup",v)}},[]),u.jsx(mi,{asChild:!0,...i,focusable:!s,active:c,children:u.jsx(Ei,{disabled:s,required:a.required,checked:c,...l,...o,name:a.name,ref:f,onCheck:()=>a.onValueChange(o.value),onKeyDown:Q(g=>{g.key==="Enter"&&g.preventDefault()}),onFocus:Q(o.onFocus,()=>{var g;h.current&&((g=d.current)==null||g.click())})})})});Oi.displayName=Li;var Ig="RadioGroupIndicator",zi=p.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=Ii(n);return u.jsx(Ti,{...o,...r,ref:t})});zi.displayName=Ig;var Mg=Mi,Lg=Oi,Og=zi;function zg(e,t){return p.useReducer((n,r)=>t[n][r]??n,e)}var jr="ScrollArea",[Di]=me(jr),[Dg,ke]=Di(jr),Bi=p.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:o,scrollHideDelay:a=600,...s}=e,[i,l]=p.useState(null),[d,f]=p.useState(null),[c,h]=p.useState(null),[g,v]=p.useState(null),[m,b]=p.useState(null),[w,y]=p.useState(0),[x,k]=p.useState(0),[P,E]=p.useState(!1),[N,S]=p.useState(!1),A=se(t,_=>l(_)),z=Ut(o);return u.jsx(Dg,{scope:n,type:r,dir:z,scrollHideDelay:a,scrollArea:i,viewport:d,onViewportChange:f,content:c,onContentChange:h,scrollbarX:g,onScrollbarXChange:v,scrollbarXEnabled:P,onScrollbarXEnabledChange:E,scrollbarY:m,onScrollbarYChange:b,scrollbarYEnabled:N,onScrollbarYEnabledChange:S,onCornerWidthChange:y,onCornerHeightChange:k,children:u.jsx(J.div,{dir:z,...s,ref:A,style:{position:"relative","--radix-scroll-area-corner-width":w+"px","--radix-scroll-area-corner-height":x+"px",...e.style}})})});Bi.displayName=jr;var Fi="ScrollAreaViewport",$i=p.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:o,...a}=e,s=ke(Fi,n),i=p.useRef(null),l=se(t,i,s.onViewportChange);return u.jsxs(u.Fragment,{children:[u.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:o}),u.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:u.jsx("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});$i.displayName=Fi;var Fe="ScrollAreaScrollbar",Hi=p.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=ke(Fe,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:s}=o,i=e.orientation==="horizontal";return p.useEffect(()=>(i?a(!0):s(!0),()=>{i?a(!1):s(!1)}),[i,a,s]),o.type==="hover"?u.jsx(Bg,{...r,ref:t,forceMount:n}):o.type==="scroll"?u.jsx(Fg,{...r,ref:t,forceMount:n}):o.type==="auto"?u.jsx(Vi,{...r,ref:t,forceMount:n}):o.type==="always"?u.jsx(Wr,{...r,ref:t}):null});Hi.displayName=Fe;var Bg=p.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=ke(Fe,e.__scopeScrollArea),[a,s]=p.useState(!1);return p.useEffect(()=>{const i=o.scrollArea;let l=0;if(i){const d=()=>{window.clearTimeout(l),s(!0)},f=()=>{l=window.setTimeout(()=>s(!1),o.scrollHideDelay)};return i.addEventListener("pointerenter",d),i.addEventListener("pointerleave",f),()=>{window.clearTimeout(l),i.removeEventListener("pointerenter",d),i.removeEventListener("pointerleave",f)}}},[o.scrollArea,o.scrollHideDelay]),u.jsx(Ee,{present:n||a,children:u.jsx(Vi,{"data-state":a?"visible":"hidden",...r,ref:t})})}),Fg=p.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=ke(Fe,e.__scopeScrollArea),a=e.orientation==="horizontal",s=zn(()=>l("SCROLL_END"),100),[i,l]=zg("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 p.useEffect(()=>{if(i==="idle"){const d=window.setTimeout(()=>l("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(d)}},[i,o.scrollHideDelay,l]),p.useEffect(()=>{const d=o.viewport,f=a?"scrollLeft":"scrollTop";if(d){let c=d[f];const h=()=>{const g=d[f];c!==g&&(l("SCROLL"),s()),c=g};return d.addEventListener("scroll",h),()=>d.removeEventListener("scroll",h)}},[o.viewport,a,l,s]),u.jsx(Ee,{present:n||i!=="hidden",children:u.jsx(Wr,{"data-state":i==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:Q(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:Q(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),Vi=p.forwardRef((e,t)=>{const n=ke(Fe,e.__scopeScrollArea),{forceMount:r,...o}=e,[a,s]=p.useState(!1),i=e.orientation==="horizontal",l=zn(()=>{if(n.viewport){const d=n.viewport.offsetWidth<n.viewport.scrollWidth,f=n.viewport.offsetHeight<n.viewport.scrollHeight;s(i?d:f)}},10);return At(n.viewport,l),At(n.content,l),u.jsx(Ee,{present:r||a,children:u.jsx(Wr,{"data-state":a?"visible":"hidden",...o,ref:t})})}),Wr=p.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,o=ke(Fe,e.__scopeScrollArea),a=p.useRef(null),s=p.useRef(0),[i,l]=p.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),d=qi(i.viewport,i.content),f={...r,sizes:i,onSizesChange:l,hasThumb:d>0&&d<1,onThumbChange:h=>a.current=h,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:h=>s.current=h};function c(h,g){return jg(h,s.current,i,g)}return n==="horizontal"?u.jsx($g,{...f,ref:t,onThumbPositionChange:()=>{if(o.viewport&&a.current){const h=o.viewport.scrollLeft,g=Gi(h,i,o.dir);a.current.style.transform=`translate3d(${g}px, 0, 0)`}},onWheelScroll:h=>{o.viewport&&(o.viewport.scrollLeft=h)},onDragScroll:h=>{o.viewport&&(o.viewport.scrollLeft=c(h,o.dir))}}):n==="vertical"?u.jsx(Hg,{...f,ref:t,onThumbPositionChange:()=>{if(o.viewport&&a.current){const h=o.viewport.scrollTop,g=Gi(h,i);a.current.style.transform=`translate3d(0, ${g}px, 0)`}},onWheelScroll:h=>{o.viewport&&(o.viewport.scrollTop=h)},onDragScroll:h=>{o.viewport&&(o.viewport.scrollTop=c(h))}}):null}),$g=p.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,a=ke(Fe,e.__scopeScrollArea),[s,i]=p.useState(),l=p.useRef(null),d=se(t,l,a.onScrollbarXChange);return p.useEffect(()=>{l.current&&i(getComputedStyle(l.current))},[l]),u.jsx(Ri,{"data-orientation":"horizontal",...o,ref:d,sizes:n,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":On(n)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.x),onDragScroll:f=>e.onDragScroll(f.x),onWheelScroll:(f,c)=>{if(a.viewport){const h=a.viewport.scrollLeft+f.deltaX;e.onWheelScroll(h),Ki(h,c)&&f.preventDefault()}},onResize:()=>{l.current&&a.viewport&&s&&r({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:Ln(s.paddingLeft),paddingEnd:Ln(s.paddingRight)}})}})}),Hg=p.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,a=ke(Fe,e.__scopeScrollArea),[s,i]=p.useState(),l=p.useRef(null),d=se(t,l,a.onScrollbarYChange);return p.useEffect(()=>{l.current&&i(getComputedStyle(l.current))},[l]),u.jsx(Ri,{"data-orientation":"vertical",...o,ref:d,sizes:n,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":On(n)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.y),onDragScroll:f=>e.onDragScroll(f.y),onWheelScroll:(f,c)=>{if(a.viewport){const h=a.viewport.scrollTop+f.deltaY;e.onWheelScroll(h),Ki(h,c)&&f.preventDefault()}},onResize:()=>{l.current&&a.viewport&&s&&r({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:Ln(s.paddingTop),paddingEnd:Ln(s.paddingBottom)}})}})}),[Vg,Ui]=Di(Fe),Ri=p.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:o,onThumbChange:a,onThumbPointerUp:s,onThumbPointerDown:i,onThumbPositionChange:l,onDragScroll:d,onWheelScroll:f,onResize:c,...h}=e,g=ke(Fe,n),[v,m]=p.useState(null),b=se(t,A=>m(A)),w=p.useRef(null),y=p.useRef(""),x=g.viewport,k=r.content-r.viewport,P=pe(f),E=pe(l),N=zn(c,10);function S(A){if(w.current){const z=A.clientX-w.current.left,_=A.clientY-w.current.top;d({x:z,y:_})}}return p.useEffect(()=>{const A=z=>{const _=z.target;(v==null?void 0:v.contains(_))&&P(z,k)};return document.addEventListener("wheel",A,{passive:!1}),()=>document.removeEventListener("wheel",A,{passive:!1})},[x,v,k,P]),p.useEffect(E,[r,E]),At(v,N),At(g.content,N),u.jsx(Vg,{scope:n,scrollbar:v,hasThumb:o,onThumbChange:pe(a),onThumbPointerUp:pe(s),onThumbPositionChange:E,onThumbPointerDown:pe(i),children:u.jsx(J.div,{...h,ref:b,style:{position:"absolute",...h.style},onPointerDown:Q(e.onPointerDown,A=>{A.button===0&&(A.target.setPointerCapture(A.pointerId),w.current=v.getBoundingClientRect(),y.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",g.viewport&&(g.viewport.style.scrollBehavior="auto"),S(A))}),onPointerMove:Q(e.onPointerMove,S),onPointerUp:Q(e.onPointerUp,A=>{const z=A.target;z.hasPointerCapture(A.pointerId)&&z.releasePointerCapture(A.pointerId),document.body.style.webkitUserSelect=y.current,g.viewport&&(g.viewport.style.scrollBehavior=""),w.current=null})})})}),Mn="ScrollAreaThumb",ji=p.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Ui(Mn,e.__scopeScrollArea);return u.jsx(Ee,{present:n||o.hasThumb,children:u.jsx(Ug,{ref:t,...r})})}),Ug=p.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...o}=e,a=ke(Mn,n),s=Ui(Mn,n),{onThumbPositionChange:i}=s,l=se(t,c=>s.onThumbChange(c)),d=p.useRef(void 0),f=zn(()=>{d.current&&(d.current(),d.current=void 0)},100);return p.useEffect(()=>{const c=a.viewport;if(c){const h=()=>{if(f(),!d.current){const g=Wg(c,i);d.current=g,i()}};return i(),c.addEventListener("scroll",h),()=>c.removeEventListener("scroll",h)}},[a.viewport,f,i]),u.jsx(J.div,{"data-state":s.hasThumb?"visible":"hidden",...o,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:Q(e.onPointerDownCapture,c=>{const g=c.target.getBoundingClientRect(),v=c.clientX-g.left,m=c.clientY-g.top;s.onThumbPointerDown({x:v,y:m})}),onPointerUp:Q(e.onPointerUp,s.onThumbPointerUp)})});ji.displayName=Mn;var qr="ScrollAreaCorner",Wi=p.forwardRef((e,t)=>{const n=ke(qr,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?u.jsx(Rg,{...e,ref:t}):null});Wi.displayName=qr;var Rg=p.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,o=ke(qr,n),[a,s]=p.useState(0),[i,l]=p.useState(0),d=!!(a&&i);return At(o.scrollbarX,()=>{var c;const f=((c=o.scrollbarX)==null?void 0:c.offsetHeight)||0;o.onCornerHeightChange(f),l(f)}),At(o.scrollbarY,()=>{var c;const f=((c=o.scrollbarY)==null?void 0:c.offsetWidth)||0;o.onCornerWidthChange(f),s(f)}),d?u.jsx(J.div,{...r,ref:t,style:{width:a,height:i,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Ln(e){return e?parseInt(e,10):0}function qi(e,t){const n=e/t;return isNaN(n)?0:n}function On(e){const t=qi(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function jg(e,t,n,r="ltr"){const o=On(n),a=o/2,s=t||a,i=o-s,l=n.scrollbar.paddingStart+s,d=n.scrollbar.size-n.scrollbar.paddingEnd-i,f=n.content-n.viewport,c=r==="ltr"?[0,f]:[f*-1,0];return Yi([l,d],c)(e)}function Gi(e,t,n="ltr"){const r=On(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-o,s=t.content-t.viewport,i=a-r,l=n==="ltr"?[0,s]:[s*-1,0],d=Hr(e,l);return Yi([0,s],[0,i])(d)}function Yi(e,t){return n=>{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*(n-e[0])}}function Ki(e,t){return e>0&&e<t}var Wg=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function o(){const a={left:e.scrollLeft,top:e.scrollTop},s=n.left!==a.left,i=n.top!==a.top;(s||i)&&t(),n=a,r=window.requestAnimationFrame(o)})(),()=>window.cancelAnimationFrame(r)};function zn(e,t){const n=pe(e),r=p.useRef(0);return p.useEffect(()=>()=>window.clearTimeout(r.current),[]),p.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function At(e,t){const n=pe(t);ie(()=>{let r=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return o.observe(e),()=>{window.cancelAnimationFrame(r),o.unobserve(e)}}},[e,n])}var qg=Bi,Gg=$i,Yg=Wi,Kg=[" ","Enter","ArrowUp","ArrowDown"],Xg=[" ","Enter"],ut="Select",[Dn,Bn,Zg]=za(ut),[Pt]=me(ut,[Zg,_n]),Fn=_n(),[Jg,Qe]=Pt(ut),[Qg,em]=Pt(ut),Xi=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:a,value:s,defaultValue:i,onValueChange:l,dir:d,name:f,autoComplete:c,disabled:h,required:g,form:v}=e,m=Fn(t),[b,w]=p.useState(null),[y,x]=p.useState(null),[k,P]=p.useState(!1),E=Ut(d),[N,S]=Ve({prop:r,defaultProp:o??!1,onChange:a,caller:ut}),[A,z]=Ve({prop:s,defaultProp:i,onChange:l,caller:ut}),_=p.useRef(null),M=b?v||!!b.closest("form"):!0,[O,I]=p.useState(new Set),W=Array.from(O).map(D=>D.props.value).join(";");return u.jsx(si,{...m,children:u.jsxs(Jg,{required:g,scope:t,trigger:b,onTriggerChange:w,valueNode:y,onValueNodeChange:x,valueNodeHasChildren:k,onValueNodeHasChildrenChange:P,contentId:lt(),value:A,onValueChange:z,open:N,onOpenChange:S,dir:E,triggerPointerDownPosRef:_,disabled:h,children:[u.jsx(Dn.Provider,{scope:t,children:u.jsx(Qg,{scope:e.__scopeSelect,onNativeOptionAdd:p.useCallback(D=>{I($=>new Set($).add(D))},[]),onNativeOptionRemove:p.useCallback(D=>{I($=>{const q=new Set($);return q.delete(D),q})},[]),children:n})}),M?u.jsxs(bl,{"aria-hidden":!0,required:g,tabIndex:-1,name:f,autoComplete:c,value:A,onChange:D=>z(D.target.value),disabled:h,form:v,children:[A===void 0?u.jsx("option",{value:""}):null,Array.from(O)]},W):null]})})};Xi.displayName=ut;var Zi="SelectTrigger",Ji=p.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,a=Fn(n),s=Qe(Zi,n),i=s.disabled||r,l=se(t,s.onTriggerChange),d=Bn(n),f=p.useRef("touch"),[c,h,g]=yl(m=>{const b=d().filter(x=>!x.disabled),w=b.find(x=>x.value===s.value),y=xl(b,m,w);y!==void 0&&s.onValueChange(y.value)}),v=m=>{i||(s.onOpenChange(!0),g()),m&&(s.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return u.jsx(ii,{asChild:!0,...a,children:u.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":wl(s.value)?"":void 0,...o,ref:l,onClick:Q(o.onClick,m=>{m.currentTarget.focus(),f.current!=="mouse"&&v(m)}),onPointerDown:Q(o.onPointerDown,m=>{f.current=m.pointerType;const b=m.target;b.hasPointerCapture(m.pointerId)&&b.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(v(m),m.preventDefault())}),onKeyDown:Q(o.onKeyDown,m=>{const b=c.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&h(m.key),!(b&&m.key===" ")&&Kg.includes(m.key)&&(v(),m.preventDefault())})})})});Ji.displayName=Zi;var Qi="SelectValue",el=p.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:a,placeholder:s="",...i}=e,l=Qe(Qi,n),{onValueNodeHasChildrenChange:d}=l,f=a!==void 0,c=se(t,l.onValueNodeChange);return ie(()=>{d(f)},[d,f]),u.jsx(J.span,{...i,ref:c,style:{pointerEvents:"none"},children:wl(l.value)?u.jsx(u.Fragment,{children:s}):a})});el.displayName=Qi;var tm="SelectIcon",tl=p.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return u.jsx(J.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});tl.displayName=tm;var nm="SelectPortal",nl=e=>u.jsx(pr,{asChild:!0,...e});nl.displayName=nm;var ft="SelectContent",rl=p.forwardRef((e,t)=>{const n=Qe(ft,e.__scopeSelect),[r,o]=p.useState();if(ie(()=>{o(new DocumentFragment)},[]),!n.open){const a=r;return a?Zt.createPortal(u.jsx(ol,{scope:e.__scopeSelect,children:u.jsx(Dn.Slot,{scope:e.__scopeSelect,children:u.jsx("div",{children:e.children})})}),a):null}return u.jsx(al,{...e,ref:t})});rl.displayName=ft;var _e=10,[ol,et]=Pt(ft),rm="SelectContentImpl",om=Vt("SelectContent.RemoveScroll"),al=p.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:a,onPointerDownOutside:s,side:i,sideOffset:l,align:d,alignOffset:f,arrowPadding:c,collisionBoundary:h,collisionPadding:g,sticky:v,hideWhenDetached:m,avoidCollisions:b,...w}=e,y=Qe(ft,n),[x,k]=p.useState(null),[P,E]=p.useState(null),N=se(t,R=>k(R)),[S,A]=p.useState(null),[z,_]=p.useState(null),M=Bn(n),[O,I]=p.useState(!1),W=p.useRef(!1);p.useEffect(()=>{if(x)return _p(x)},[x]),Uf();const D=p.useCallback(R=>{const[j,...Z]=M().map(ne=>ne.ref.current),[ee]=Z.slice(-1),ae=document.activeElement;for(const ne of R)if(ne===ae||(ne==null||ne.scrollIntoView({block:"nearest"}),ne===j&&P&&(P.scrollTop=0),ne===ee&&P&&(P.scrollTop=P.scrollHeight),ne==null||ne.focus(),document.activeElement!==ae))return},[M,P]),$=p.useCallback(()=>D([S,x]),[D,S,x]);p.useEffect(()=>{O&&$()},[O,$]);const{onOpenChange:q,triggerPointerDownPosRef:L}=y;p.useEffect(()=>{if(x){let R={x:0,y:0};const j=ee=>{var ae,ne;R={x:Math.abs(Math.round(ee.pageX)-(((ae=L.current)==null?void 0:ae.x)??0)),y:Math.abs(Math.round(ee.pageY)-(((ne=L.current)==null?void 0:ne.y)??0))}},Z=ee=>{R.x<=10&&R.y<=10?ee.preventDefault():x.contains(ee.target)||q(!1),document.removeEventListener("pointermove",j),L.current=null};return L.current!==null&&(document.addEventListener("pointermove",j),document.addEventListener("pointerup",Z,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",j),document.removeEventListener("pointerup",Z,{capture:!0})}}},[x,q,L]),p.useEffect(()=>{const R=()=>q(!1);return window.addEventListener("blur",R),window.addEventListener("resize",R),()=>{window.removeEventListener("blur",R),window.removeEventListener("resize",R)}},[q]);const[T,F]=yl(R=>{const j=M().filter(ae=>!ae.disabled),Z=j.find(ae=>ae.ref.current===document.activeElement),ee=xl(j,R,Z);ee&&setTimeout(()=>ee.ref.current.focus())}),H=p.useCallback((R,j,Z)=>{const ee=!W.current&&!Z;(y.value!==void 0&&y.value===j||ee)&&(A(R),ee&&(W.current=!0))},[y.value]),B=p.useCallback(()=>x==null?void 0:x.focus(),[x]),V=p.useCallback((R,j,Z)=>{const ee=!W.current&&!Z;(y.value!==void 0&&y.value===j||ee)&&_(R)},[y.value]),U=r==="popper"?Gr:sl,X=U===Gr?{side:i,sideOffset:l,align:d,alignOffset:f,arrowPadding:c,collisionBoundary:h,collisionPadding:g,sticky:v,hideWhenDetached:m,avoidCollisions:b}:{};return u.jsx(ol,{scope:n,content:x,viewport:P,onViewportChange:E,itemRefCallback:H,selectedItem:S,onItemLeave:B,itemTextRefCallback:V,focusSelectedItem:$,selectedItemText:z,position:r,isPositioned:O,searchRef:T,children:u.jsx(cs,{as:om,allowPinchZoom:!0,children:u.jsx(Wa,{asChild:!0,trapped:y.open,onMountAutoFocus:R=>{R.preventDefault()},onUnmountAutoFocus:Q(o,R=>{var j;(j=y.trigger)==null||j.focus({preventScroll:!0}),R.preventDefault()}),children:u.jsx(dr,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:R=>R.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:u.jsx(U,{role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:R=>R.preventDefault(),...w,...X,onPlaced:()=>I(!0),ref:N,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:Q(w.onKeyDown,R=>{const j=R.ctrlKey||R.altKey||R.metaKey;if(R.key==="Tab"&&R.preventDefault(),!j&&R.key.length===1&&F(R.key),["ArrowUp","ArrowDown","Home","End"].includes(R.key)){let ee=M().filter(ae=>!ae.disabled).map(ae=>ae.ref.current);if(["ArrowUp","End"].includes(R.key)&&(ee=ee.slice().reverse()),["ArrowUp","ArrowDown"].includes(R.key)){const ae=R.target,ne=ee.indexOf(ae);ee=ee.slice(ne+1)}setTimeout(()=>D(ee)),R.preventDefault()}})})})})})})});al.displayName=rm;var am="SelectItemAlignedPosition",sl=p.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,a=Qe(ft,n),s=et(ft,n),[i,l]=p.useState(null),[d,f]=p.useState(null),c=se(t,N=>f(N)),h=Bn(n),g=p.useRef(!1),v=p.useRef(!0),{viewport:m,selectedItem:b,selectedItemText:w,focusSelectedItem:y}=s,x=p.useCallback(()=>{if(a.trigger&&a.valueNode&&i&&d&&m&&b&&w){const N=a.trigger.getBoundingClientRect(),S=d.getBoundingClientRect(),A=a.valueNode.getBoundingClientRect(),z=w.getBoundingClientRect();if(a.dir!=="rtl"){const ae=z.left-S.left,ne=A.left-ae,ce=N.left-ne,de=N.width+ce,gt=Math.max(de,S.width),nt=window.innerWidth-_e,Ae=Hr(ne,[_e,Math.max(_e,nt-gt)]);i.style.minWidth=de+"px",i.style.left=Ae+"px"}else{const ae=S.right-z.right,ne=window.innerWidth-A.right-ae,ce=window.innerWidth-N.right-ne,de=N.width+ce,gt=Math.max(de,S.width),nt=window.innerWidth-_e,Ae=Hr(ne,[_e,Math.max(_e,nt-gt)]);i.style.minWidth=de+"px",i.style.right=Ae+"px"}const _=h(),M=window.innerHeight-_e*2,O=m.scrollHeight,I=window.getComputedStyle(d),W=parseInt(I.borderTopWidth,10),D=parseInt(I.paddingTop,10),$=parseInt(I.borderBottomWidth,10),q=parseInt(I.paddingBottom,10),L=W+D+O+q+$,T=Math.min(b.offsetHeight*5,L),F=window.getComputedStyle(m),H=parseInt(F.paddingTop,10),B=parseInt(F.paddingBottom,10),V=N.top+N.height/2-_e,U=M-V,X=b.offsetHeight/2,R=b.offsetTop+X,j=W+D+R,Z=L-j;if(j<=V){const ae=_.length>0&&b===_[_.length-1].ref.current;i.style.bottom="0px";const ne=d.clientHeight-m.offsetTop-m.offsetHeight,ce=Math.max(U,X+(ae?B:0)+ne+$),de=j+ce;i.style.height=de+"px"}else{const ae=_.length>0&&b===_[0].ref.current;i.style.top="0px";const ce=Math.max(V,W+m.offsetTop+(ae?H:0)+X)+Z;i.style.height=ce+"px",m.scrollTop=j-V+m.offsetTop}i.style.margin=`${_e}px 0`,i.style.minHeight=T+"px",i.style.maxHeight=M+"px",r==null||r(),requestAnimationFrame(()=>g.current=!0)}},[h,a.trigger,a.valueNode,i,d,m,b,w,a.dir,r]);ie(()=>x(),[x]);const[k,P]=p.useState();ie(()=>{d&&P(window.getComputedStyle(d).zIndex)},[d]);const E=p.useCallback(N=>{N&&v.current===!0&&(x(),y==null||y(),v.current=!1)},[x,y]);return u.jsx(im,{scope:n,contentWrapper:i,shouldExpandOnScrollRef:g,onScrollButtonChange:E,children:u.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:k},children:u.jsx(J.div,{...o,ref:c,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});sl.displayName=am;var sm="SelectPopperPosition",Gr=p.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=_e,...a}=e,s=Fn(n);return u.jsx(li,{...s,...a,ref:t,align:r,collisionPadding:o,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)"}})});Gr.displayName=sm;var[im,Yr]=Pt(ft,{}),Kr="SelectViewport",il=p.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,a=et(Kr,n),s=Yr(Kr,n),i=se(t,a.onViewportChange),l=p.useRef(0);return u.jsxs(u.Fragment,{children:[u.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}),u.jsx(Dn.Slot,{scope:n,children:u.jsx(J.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:i,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:Q(o.onScroll,d=>{const f=d.currentTarget,{contentWrapper:c,shouldExpandOnScrollRef:h}=s;if(h!=null&&h.current&&c){const g=Math.abs(l.current-f.scrollTop);if(g>0){const v=window.innerHeight-_e*2,m=parseFloat(c.style.minHeight),b=parseFloat(c.style.height),w=Math.max(m,b);if(w<v){const y=w+g,x=Math.min(v,y),k=y-x;c.style.height=x+"px",c.style.bottom==="0px"&&(f.scrollTop=k>0?k:0,c.style.justifyContent="flex-end")}}}l.current=f.scrollTop})})})]})});il.displayName=Kr;var ll="SelectGroup",[lm,cm]=Pt(ll),dm=p.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=lt();return u.jsx(lm,{scope:n,id:o,children:u.jsx(J.div,{role:"group","aria-labelledby":o,...r,ref:t})})});dm.displayName=ll;var cl="SelectLabel",um=p.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=cm(cl,n);return u.jsx(J.div,{id:o.id,...r,ref:t})});um.displayName=cl;var $n="SelectItem",[fm,dl]=Pt($n),ul=p.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:a,...s}=e,i=Qe($n,n),l=et($n,n),d=i.value===r,[f,c]=p.useState(a??""),[h,g]=p.useState(!1),v=se(t,y=>{var x;return(x=l.itemRefCallback)==null?void 0:x.call(l,y,r,o)}),m=lt(),b=p.useRef("touch"),w=()=>{o||(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 u.jsx(fm,{scope:n,value:r,disabled:o,textId:m,isSelected:d,onItemTextChange:p.useCallback(y=>{c(x=>x||((y==null?void 0:y.textContent)??"").trim())},[]),children:u.jsx(Dn.ItemSlot,{scope:n,value:r,disabled:o,textValue:f,children:u.jsx(J.div,{role:"option","aria-labelledby":m,"data-highlighted":h?"":void 0,"aria-selected":d&&h,"data-state":d?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...s,ref:v,onFocus:Q(s.onFocus,()=>g(!0)),onBlur:Q(s.onBlur,()=>g(!1)),onClick:Q(s.onClick,()=>{b.current!=="mouse"&&w()}),onPointerUp:Q(s.onPointerUp,()=>{b.current==="mouse"&&w()}),onPointerDown:Q(s.onPointerDown,y=>{b.current=y.pointerType}),onPointerMove:Q(s.onPointerMove,y=>{var x;b.current=y.pointerType,o?(x=l.onItemLeave)==null||x.call(l):b.current==="mouse"&&y.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Q(s.onPointerLeave,y=>{var x;y.currentTarget===document.activeElement&&((x=l.onItemLeave)==null||x.call(l))}),onKeyDown:Q(s.onKeyDown,y=>{var k;((k=l.searchRef)==null?void 0:k.current)!==""&&y.key===" "||(Xg.includes(y.key)&&w(),y.key===" "&&y.preventDefault())})})})})});ul.displayName=$n;var qt="SelectItemText",fl=p.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...a}=e,s=Qe(qt,n),i=et(qt,n),l=dl(qt,n),d=em(qt,n),[f,c]=p.useState(null),h=se(t,w=>c(w),l.onItemTextChange,w=>{var y;return(y=i.itemTextRefCallback)==null?void 0:y.call(i,w,l.value,l.disabled)}),g=f==null?void 0:f.textContent,v=p.useMemo(()=>u.jsx("option",{value:l.value,disabled:l.disabled,children:g},l.value),[l.disabled,l.value,g]),{onNativeOptionAdd:m,onNativeOptionRemove:b}=d;return ie(()=>(m(v),()=>b(v)),[m,b,v]),u.jsxs(u.Fragment,{children:[u.jsx(J.span,{id:l.textId,...a,ref:h}),l.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Zt.createPortal(a.children,s.valueNode):null]})});fl.displayName=qt;var pl="SelectItemIndicator",hl=p.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return dl(pl,n).isSelected?u.jsx(J.span,{"aria-hidden":!0,...r,ref:t}):null});hl.displayName=pl;var Xr="SelectScrollUpButton",gl=p.forwardRef((e,t)=>{const n=et(Xr,e.__scopeSelect),r=Yr(Xr,e.__scopeSelect),[o,a]=p.useState(!1),s=se(t,r.onScrollButtonChange);return ie(()=>{if(n.viewport&&n.isPositioned){let i=function(){const d=l.scrollTop>0;a(d)};const l=n.viewport;return i(),l.addEventListener("scroll",i),()=>l.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),o?u.jsx(vl,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:l}=n;i&&l&&(i.scrollTop=i.scrollTop-l.offsetHeight)}}):null});gl.displayName=Xr;var Zr="SelectScrollDownButton",ml=p.forwardRef((e,t)=>{const n=et(Zr,e.__scopeSelect),r=Yr(Zr,e.__scopeSelect),[o,a]=p.useState(!1),s=se(t,r.onScrollButtonChange);return ie(()=>{if(n.viewport&&n.isPositioned){let i=function(){const d=l.scrollHeight-l.clientHeight,f=Math.ceil(l.scrollTop)<d;a(f)};const l=n.viewport;return i(),l.addEventListener("scroll",i),()=>l.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),o?u.jsx(vl,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:l}=n;i&&l&&(i.scrollTop=i.scrollTop+l.offsetHeight)}}):null});ml.displayName=Zr;var vl=p.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,a=et("SelectScrollButton",n),s=p.useRef(null),i=Bn(n),l=p.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return p.useEffect(()=>()=>l(),[l]),ie(()=>{var f;const d=i().find(c=>c.ref.current===document.activeElement);(f=d==null?void 0:d.ref.current)==null||f.scrollIntoView({block:"nearest"})},[i]),u.jsx(J.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:Q(o.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(r,50))}),onPointerMove:Q(o.onPointerMove,()=>{var d;(d=a.onItemLeave)==null||d.call(a),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:Q(o.onPointerLeave,()=>{l()})})}),pm="SelectSeparator",hm=p.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return u.jsx(J.div,{"aria-hidden":!0,...r,ref:t})});hm.displayName=pm;var Jr="SelectArrow",gm=p.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Fn(n),a=Qe(Jr,n),s=et(Jr,n);return a.open&&s.position==="popper"?u.jsx(ci,{...o,...r,ref:t}):null});gm.displayName=Jr;var mm="SelectBubbleInput",bl=p.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=p.useRef(null),a=se(r,o),s=gn(t);return p.useEffect(()=>{const i=o.current;if(!i)return;const l=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(l,"value").set;if(s!==t&&f){const c=new Event("change",{bubbles:!0});f.call(i,t),i.dispatchEvent(c)}},[s,t]),u.jsx(J.select,{...n,style:{...La,...n.style},ref:a,defaultValue:t})});bl.displayName=mm;function wl(e){return e===""||e===void 0}function yl(e){const t=pe(e),n=p.useRef(""),r=p.useRef(0),o=p.useCallback(s=>{const i=n.current+s;t(i),(function l(d){n.current=d,window.clearTimeout(r.current),d!==""&&(r.current=window.setTimeout(()=>l(""),1e3))})(i)},[t]),a=p.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return p.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,a]}function xl(e,t,n){const o=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let s=vm(e,Math.max(a,0));o.length===1&&(s=s.filter(d=>d!==n));const l=s.find(d=>d.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function vm(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var bm=Xi,wm=Ji,ym=el,xm=tl,Cm=nl,km=rl,Sm=il,Em=ul,Nm=fl,Tm=hl,_m=gl,Am=ml,Pm="Separator",Cl="horizontal",Im=["horizontal","vertical"],kl=p.forwardRef((e,t)=>{const{decorative:n,orientation:r=Cl,...o}=e,a=Mm(r)?r:Cl,i=n?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return u.jsx(J.div,{"data-orientation":a,...i,...o,ref:t})});kl.displayName=Pm;function Mm(e){return Im.includes(e)}var Lm=kl,Hn="Switch",[Om]=me(Hn),[zm,Dm]=Om(Hn),Sl=p.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:a,required:s,disabled:i,value:l="on",onCheckedChange:d,form:f,...c}=e,[h,g]=p.useState(null),v=se(t,x=>g(x)),m=p.useRef(!1),b=h?f||!!h.closest("form"):!0,[w,y]=Ve({prop:o,defaultProp:a??!1,onChange:d,caller:Hn});return u.jsxs(zm,{scope:n,checked:w,disabled:i,children:[u.jsx(J.button,{type:"button",role:"switch","aria-checked":w,"aria-required":s,"data-state":_l(w),"data-disabled":i?"":void 0,disabled:i,value:l,...c,ref:v,onClick:Q(e.onClick,x=>{y(k=>!k),b&&(m.current=x.isPropagationStopped(),m.current||x.stopPropagation())})}),b&&u.jsx(Tl,{control:h,bubbles:!m.current,name:r,value:l,checked:w,required:s,disabled:i,form:f,style:{transform:"translateX(-100%)"}})]})});Sl.displayName=Hn;var El="SwitchThumb",Nl=p.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=Dm(El,n);return u.jsx(J.span,{"data-state":_l(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});Nl.displayName=El;var Bm="SwitchBubbleInput",Tl=p.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...o},a)=>{const s=p.useRef(null),i=se(s,a),l=gn(n),d=mn(t);return p.useEffect(()=>{const f=s.current;if(!f)return;const c=window.HTMLInputElement.prototype,g=Object.getOwnPropertyDescriptor(c,"checked").set;if(l!==n&&g){const v=new Event("click",{bubbles:r});g.call(f,n),f.dispatchEvent(v)}},[l,n,r]),u.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:i,style:{...o.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Tl.displayName=Bm;function _l(e){return e?"checked":"unchecked"}var Fm=Sl,$m=Nl,Vn="Tabs",[Hm]=me(Vn,[An]),Al=An(),[Vm,Qr]=Hm(Vn),Pl=p.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:a,orientation:s="horizontal",dir:i,activationMode:l="automatic",...d}=e,f=Ut(i),[c,h]=Ve({prop:r,onChange:o,defaultProp:a??"",caller:Vn});return u.jsx(Vm,{scope:n,baseId:lt(),value:c,onValueChange:h,orientation:s,dir:f,activationMode:l,children:u.jsx(J.div,{dir:f,"data-orientation":s,...d,ref:t})})});Pl.displayName=Vn;var Il="TabsList",Ml=p.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,a=Qr(Il,n),s=Al(n);return u.jsx(gi,{asChild:!0,...s,orientation:a.orientation,dir:a.dir,loop:r,children:u.jsx(J.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:t})})});Ml.displayName=Il;var Ll="TabsTrigger",Ol=p.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...a}=e,s=Qr(Ll,n),i=Al(n),l=Bl(s.baseId,r),d=Fl(s.baseId,r),f=r===s.value;return u.jsx(mi,{asChild:!0,...i,focusable:!o,active:f,children:u.jsx(J.button,{type:"button",role:"tab","aria-selected":f,"aria-controls":d,"data-state":f?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:l,...a,ref:t,onMouseDown:Q(e.onMouseDown,c=>{!o&&c.button===0&&c.ctrlKey===!1?s.onValueChange(r):c.preventDefault()}),onKeyDown:Q(e.onKeyDown,c=>{[" ","Enter"].includes(c.key)&&s.onValueChange(r)}),onFocus:Q(e.onFocus,()=>{const c=s.activationMode!=="manual";!f&&!o&&c&&s.onValueChange(r)})})})});Ol.displayName=Ll;var zl="TabsContent",Dl=p.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:a,...s}=e,i=Qr(zl,n),l=Bl(i.baseId,r),d=Fl(i.baseId,r),f=r===i.value,c=p.useRef(f);return p.useEffect(()=>{const h=requestAnimationFrame(()=>c.current=!1);return()=>cancelAnimationFrame(h)},[]),u.jsx(Ee,{present:o||f,children:({present:h})=>u.jsx(J.div,{"data-state":f?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":l,hidden:!h,id:d,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:c.current?"0s":void 0},children:h&&a})})});Dl.displayName=zl;function Bl(e,t){return`${e}-trigger-${t}`}function Fl(e,t){return`${e}-content-${t}`}var Um=Pl,Rm=Ml,jm=Ol,Wm=Dl,[Un]=me("Tooltip",[_n]),Rn=_n(),$l="TooltipProvider",qm=700,eo="tooltip.open",[Gm,to]=Un($l),Hl=e=>{const{__scopeTooltip:t,delayDuration:n=qm,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:a}=e,s=p.useRef(!0),i=p.useRef(!1),l=p.useRef(0);return p.useEffect(()=>{const d=l.current;return()=>window.clearTimeout(d)},[]),u.jsx(Gm,{scope:t,isOpenDelayedRef:s,delayDuration:n,onOpen:p.useCallback(()=>{window.clearTimeout(l.current),s.current=!1},[]),onClose:p.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.current=!0,r)},[r]),isPointerInTransitRef:i,onPointerInTransitChange:p.useCallback(d=>{i.current=d},[]),disableHoverableContent:o,children:a})};Hl.displayName=$l;var Gt="Tooltip",[Ym,Yt]=Un(Gt),Vl=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:a,disableHoverableContent:s,delayDuration:i}=e,l=to(Gt,e.__scopeTooltip),d=Rn(t),[f,c]=p.useState(null),h=lt(),g=p.useRef(0),v=s??l.disableHoverableContent,m=i??l.delayDuration,b=p.useRef(!1),[w,y]=Ve({prop:r,defaultProp:o??!1,onChange:N=>{N?(l.onOpen(),document.dispatchEvent(new CustomEvent(eo))):l.onClose(),a==null||a(N)},caller:Gt}),x=p.useMemo(()=>w?b.current?"delayed-open":"instant-open":"closed",[w]),k=p.useCallback(()=>{window.clearTimeout(g.current),g.current=0,b.current=!1,y(!0)},[y]),P=p.useCallback(()=>{window.clearTimeout(g.current),g.current=0,y(!1)},[y]),E=p.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{b.current=!0,y(!0),g.current=0},m)},[m,y]);return p.useEffect(()=>()=>{g.current&&(window.clearTimeout(g.current),g.current=0)},[]),u.jsx(si,{...d,children:u.jsx(Ym,{scope:t,contentId:h,open:w,stateAttribute:x,trigger:f,onTriggerChange:c,onTriggerEnter:p.useCallback(()=>{l.isOpenDelayedRef.current?E():k()},[l.isOpenDelayedRef,E,k]),onTriggerLeave:p.useCallback(()=>{v?P():(window.clearTimeout(g.current),g.current=0)},[P,v]),onOpen:k,onClose:P,disableHoverableContent:v,children:n})})};Vl.displayName=Gt;var no="TooltipTrigger",Ul=p.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Yt(no,n),a=to(no,n),s=Rn(n),i=p.useRef(null),l=se(t,i,o.onTriggerChange),d=p.useRef(!1),f=p.useRef(!1),c=p.useCallback(()=>d.current=!1,[]);return p.useEffect(()=>()=>document.removeEventListener("pointerup",c),[c]),u.jsx(ii,{asChild:!0,...s,children:u.jsx(J.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:l,onPointerMove:Q(e.onPointerMove,h=>{h.pointerType!=="touch"&&!f.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:Q(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:Q(e.onPointerDown,()=>{o.open&&o.onClose(),d.current=!0,document.addEventListener("pointerup",c,{once:!0})}),onFocus:Q(e.onFocus,()=>{d.current||o.onOpen()}),onBlur:Q(e.onBlur,o.onClose),onClick:Q(e.onClick,o.onClose)})})});Ul.displayName=no;var ro="TooltipPortal",[Km,Xm]=Un(ro,{forceMount:void 0}),Rl=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,a=Yt(ro,t);return u.jsx(Km,{scope:t,forceMount:n,children:u.jsx(Ee,{present:n||a.open,children:u.jsx(pr,{asChild:!0,container:o,children:r})})})};Rl.displayName=ro;var It="TooltipContent",jl=p.forwardRef((e,t)=>{const n=Xm(It,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,s=Yt(It,e.__scopeTooltip);return u.jsx(Ee,{present:r||s.open,children:s.disableHoverableContent?u.jsx(Wl,{side:o,...a,ref:t}):u.jsx(Zm,{side:o,...a,ref:t})})}),Zm=p.forwardRef((e,t)=>{const n=Yt(It,e.__scopeTooltip),r=to(It,e.__scopeTooltip),o=p.useRef(null),a=se(t,o),[s,i]=p.useState(null),{trigger:l,onClose:d}=n,f=o.current,{onPointerInTransitChange:c}=r,h=p.useCallback(()=>{i(null),c(!1)},[c]),g=p.useCallback((v,m)=>{const b=v.currentTarget,w={x:v.clientX,y:v.clientY},y=t0(w,b.getBoundingClientRect()),x=n0(w,y),k=r0(m.getBoundingClientRect()),P=a0([...x,...k]);i(P),c(!0)},[c]);return p.useEffect(()=>()=>h(),[h]),p.useEffect(()=>{if(l&&f){const v=b=>g(b,f),m=b=>g(b,l);return l.addEventListener("pointerleave",v),f.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",v),f.removeEventListener("pointerleave",m)}}},[l,f,g,h]),p.useEffect(()=>{if(s){const v=m=>{const b=m.target,w={x:m.clientX,y:m.clientY},y=(l==null?void 0:l.contains(b))||(f==null?void 0:f.contains(b)),x=!o0(w,s);y?h():x&&(h(),d())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[l,f,s,d,h]),u.jsx(Wl,{...e,ref:a})}),[Jm,Qm]=Un(Gt,{isInside:!1}),e0=rf("TooltipContent"),Wl=p.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:s,...i}=e,l=Yt(It,n),d=Rn(n),{onClose:f}=l;return p.useEffect(()=>(document.addEventListener(eo,f),()=>document.removeEventListener(eo,f)),[f]),p.useEffect(()=>{if(l.trigger){const c=h=>{const g=h.target;g!=null&&g.contains(l.trigger)&&f()};return window.addEventListener("scroll",c,{capture:!0}),()=>window.removeEventListener("scroll",c,{capture:!0})}},[l.trigger,f]),u.jsx(dr,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:c=>c.preventDefault(),onDismiss:f,children:u.jsxs(li,{"data-state":l.stateAttribute,...d,...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:[u.jsx(e0,{children:r}),u.jsx(Jm,{scope:n,isInside:!0,children:u.jsx(uf,{id:l.contentId,role:"tooltip",children:o||r})})]})})});jl.displayName=It;var ql="TooltipArrow",Gl=p.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Rn(n);return Qm(ql,n).isInside?null:u.jsx(ci,{...o,...r,ref:t})});Gl.displayName=ql;function t0(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,o,a)){case a:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function n0(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function r0(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function o0(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const i=t[a],l=t[s],d=i.x,f=i.y,c=l.x,h=l.y;f>r!=h>r&&n<(c-d)*(r-f)/(h-f)+d&&(o=!o)}return o}function a0(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),s0(t)}function s0(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const a=t[t.length-1],s=t[t.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const a=n[n.length-1],s=n[n.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var i0=Hl,l0=Vl,c0=Ul,d0=Rl,u0=jl,f0=Gl;const p0=on("inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all 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 Yl({className:e,variant:t="default",size:n="default",asChild:r=!1,...o}){const a=r?Ia:"button";return u.jsx(a,{"data-slot":"button","data-variant":t,"data-size":n,className:K(p0({variant:t,size:n,className:e})),...o})}const h0={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"},g0=on("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 m0({className:e,variant:t="default",hue:n,asChild:r=!1,...o}){const a=r?Ia:"span",s=n?h0[n]:void 0;return u.jsx(a,{"data-slot":"badge","data-variant":t,className:K(g0({variant:t}),s,e),...o})}function v0({className:e,type:t,...n}){return u.jsx("input",{type:t,"data-slot":"input",className:K("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),...n})}function b0({className:e,...t}){return u.jsx("textarea",{"data-slot":"textarea",className:K("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 w0({...e}){return u.jsx(bm,{"data-slot":"select",...e})}function y0({...e}){return u.jsx(ym,{"data-slot":"select-value",...e})}function x0({className:e,size:t="default",children:n,...r}){return u.jsxs(wm,{"data-slot":"select-trigger","data-size":t,className:K("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:[n,u.jsx(xm,{asChild:!0,children:u.jsx(Zo,{className:"size-4 opacity-50"})})]})}function C0({className:e,children:t,position:n="item-aligned",align:r="center",...o}){return u.jsx(Cm,{children:u.jsxs(km,{"data-slot":"select-content",className:K("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",n==="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:n,align:r,...o,children:[u.jsx(S0,{}),u.jsx(Sm,{className:K("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),u.jsx(E0,{})]})})}function k0({className:e,children:t,...n}){return u.jsxs(Em,{"data-slot":"select-item",className:K("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),...n,children:[u.jsx("span",{"data-slot":"select-item-indicator",className:"absolute right-2 flex size-3.5 items-center justify-center",children:u.jsx(Tm,{children:u.jsx(Xo,{className:"size-4"})})}),u.jsx(Nm,{children:t})]})}function S0({className:e,...t}){return u.jsx(_m,{"data-slot":"select-scroll-up-button",className:K("flex cursor-default items-center justify-center py-1",e),...t,children:u.jsx(Yd,{className:"size-4"})})}function E0({className:e,...t}){return u.jsx(Am,{"data-slot":"select-scroll-down-button",className:K("flex cursor-default items-center justify-center py-1",e),...t,children:u.jsx(Zo,{className:"size-4"})})}function N0({className:e,...t}){return u.jsx(Cs,{"data-slot":"checkbox",className:K("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:u.jsx(Ss,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none",children:u.jsx(Xo,{className:"size-3.5"})})})}function T0({className:e,size:t="default",...n}){return u.jsx(Fm,{"data-slot":"switch","data-size":t,className:K("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),...n,children:u.jsx($m,{"data-slot":"switch-thumb",className:K("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 _0({className:e,...t}){return u.jsx(hg,{"data-slot":"label",className:K("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 A0({className:e,...t}){return u.jsx(Mg,{"data-slot":"radio-group",className:K("grid gap-3",e),...t})}function P0({className:e,...t}){return u.jsx(Lg,{"data-slot":"radio-group-item",className:K("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:u.jsx(Og,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:u.jsx(Xd,{className:"absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 fill-primary"})})})}function I0({className:e,orientation:t="horizontal",decorative:n=!0,...r}){return u.jsx(Lm,{"data-slot":"separator",decorative:n,orientation:t,className:K("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 M0({className:e,orientation:t="horizontal",...n}){return u.jsx(Um,{"data-slot":"tabs","data-orientation":t,orientation:t,className:K("group/tabs flex gap-2 data-[orientation=horizontal]:flex-col",e),...n})}const L0=on("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 O0({className:e,variant:t="default",...n}){return u.jsx(Rm,{"data-slot":"tabs-list","data-variant":t,className:K(L0({variant:t}),e),...n})}function z0({className:e,...t}){return u.jsx(jm,{"data-slot":"tabs-trigger",className:K("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 D0({className:e,...t}){return u.jsx(Wm,{"data-slot":"tabs-content",className:K("flex-1 outline-none",e),...t})}function B0({className:e,children:t,...n}){return u.jsxs(qg,{"data-slot":"scroll-area",className:K("relative",e),...n,children:[u.jsx(Gg,{"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}),u.jsx(F0,{}),u.jsx(Yg,{})]})}function F0({className:e,orientation:t="vertical",...n}){return u.jsx(Hi,{"data-slot":"scroll-area-scrollbar",orientation:t,className:K("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),...n,children:u.jsx(ji,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"})})}function oo({className:e,size:t="default",...n}){return u.jsx(Fp,{"data-slot":"avatar","data-size":t,className:K("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),...n})}function ao({className:e,...t}){return u.jsx($p,{"data-slot":"avatar-image",className:K("aspect-square size-full",e),...t})}function so({className:e,...t}){return u.jsx(Hp,{"data-slot":"avatar-fallback",className:K("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})}var Mt={},io,Kl;function $0(){return Kl||(Kl=1,io=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),io}var lo={},tt={},Xl;function pt(){if(Xl)return tt;Xl=1;let e;const t=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return tt.getSymbolSize=function(r){if(!r)throw new Error('"version" cannot be null or undefined');if(r<1||r>40)throw new Error('"version" should be in range from 1 to 40');return r*4+17},tt.getSymbolTotalCodewords=function(r){return t[r]},tt.getBCHDigit=function(n){let r=0;for(;n!==0;)r++,n>>>=1;return r},tt.setToSJISFunction=function(r){if(typeof r!="function")throw new Error('"toSJISFunc" is not a valid function.');e=r},tt.isKanjiModeEnabled=function(){return typeof e<"u"},tt.toSJIS=function(r){return e(r)},tt}var co={},Zl;function uo(){return Zl||(Zl=1,(function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+n)}}e.isValid=function(r){return r&&typeof r.bit<"u"&&r.bit>=0&&r.bit<4},e.from=function(r,o){if(e.isValid(r))return r;try{return t(r)}catch{return o}}})(co)),co}var fo,Jl;function H0(){if(Jl)return fo;Jl=1;function e(){this.buffer=[],this.length=0}return e.prototype={get:function(t){const n=Math.floor(t/8);return(this.buffer[n]>>>7-t%8&1)===1},put:function(t,n){for(let r=0;r<n;r++)this.putBit((t>>>n-r-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){const n=Math.floor(this.length/8);this.buffer.length<=n&&this.buffer.push(0),t&&(this.buffer[n]|=128>>>this.length%8),this.length++}},fo=e,fo}var po,Ql;function V0(){if(Ql)return po;Ql=1;function e(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}return e.prototype.set=function(t,n,r,o){const a=t*this.size+n;this.data[a]=r,o&&(this.reservedBit[a]=!0)},e.prototype.get=function(t,n){return this.data[t*this.size+n]},e.prototype.xor=function(t,n,r){this.data[t*this.size+n]^=r},e.prototype.isReserved=function(t,n){return this.reservedBit[t*this.size+n]},po=e,po}var ho={},ec;function U0(){return ec||(ec=1,(function(e){const t=pt().getSymbolSize;e.getRowColCoords=function(r){if(r===1)return[];const o=Math.floor(r/7)+2,a=t(r),s=a===145?26:Math.ceil((a-13)/(2*o-2))*2,i=[a-7];for(let l=1;l<o-1;l++)i[l]=i[l-1]-s;return i.push(6),i.reverse()},e.getPositions=function(r){const o=[],a=e.getRowColCoords(r),s=a.length;for(let i=0;i<s;i++)for(let l=0;l<s;l++)i===0&&l===0||i===0&&l===s-1||i===s-1&&l===0||o.push([a[i],a[l]]);return o}})(ho)),ho}var go={},tc;function R0(){if(tc)return go;tc=1;const e=pt().getSymbolSize,t=7;return go.getPositions=function(r){const o=e(r);return[[0,0],[o-t,0],[0,o-t]]},go}var mo={},nc;function j0(){return nc||(nc=1,(function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const t={N1:3,N2:3,N3:40,N4:10};e.isValid=function(o){return o!=null&&o!==""&&!isNaN(o)&&o>=0&&o<=7},e.from=function(o){return e.isValid(o)?parseInt(o,10):void 0},e.getPenaltyN1=function(o){const a=o.size;let s=0,i=0,l=0,d=null,f=null;for(let c=0;c<a;c++){i=l=0,d=f=null;for(let h=0;h<a;h++){let g=o.get(c,h);g===d?i++:(i>=5&&(s+=t.N1+(i-5)),d=g,i=1),g=o.get(h,c),g===f?l++:(l>=5&&(s+=t.N1+(l-5)),f=g,l=1)}i>=5&&(s+=t.N1+(i-5)),l>=5&&(s+=t.N1+(l-5))}return s},e.getPenaltyN2=function(o){const a=o.size;let s=0;for(let i=0;i<a-1;i++)for(let l=0;l<a-1;l++){const d=o.get(i,l)+o.get(i,l+1)+o.get(i+1,l)+o.get(i+1,l+1);(d===4||d===0)&&s++}return s*t.N2},e.getPenaltyN3=function(o){const a=o.size;let s=0,i=0,l=0;for(let d=0;d<a;d++){i=l=0;for(let f=0;f<a;f++)i=i<<1&2047|o.get(d,f),f>=10&&(i===1488||i===93)&&s++,l=l<<1&2047|o.get(f,d),f>=10&&(l===1488||l===93)&&s++}return s*t.N3},e.getPenaltyN4=function(o){let a=0;const s=o.data.length;for(let l=0;l<s;l++)a+=o.data[l];return Math.abs(Math.ceil(a*100/s/5)-10)*t.N4};function n(r,o,a){switch(r){case e.Patterns.PATTERN000:return(o+a)%2===0;case e.Patterns.PATTERN001:return o%2===0;case e.Patterns.PATTERN010:return a%3===0;case e.Patterns.PATTERN011:return(o+a)%3===0;case e.Patterns.PATTERN100:return(Math.floor(o/2)+Math.floor(a/3))%2===0;case e.Patterns.PATTERN101:return o*a%2+o*a%3===0;case e.Patterns.PATTERN110:return(o*a%2+o*a%3)%2===0;case e.Patterns.PATTERN111:return(o*a%3+(o+a)%2)%2===0;default:throw new Error("bad maskPattern:"+r)}}e.applyMask=function(o,a){const s=a.size;for(let i=0;i<s;i++)for(let l=0;l<s;l++)a.isReserved(l,i)||a.xor(l,i,n(o,l,i))},e.getBestMask=function(o,a){const s=Object.keys(e.Patterns).length;let i=0,l=1/0;for(let d=0;d<s;d++){a(d),e.applyMask(d,o);const f=e.getPenaltyN1(o)+e.getPenaltyN2(o)+e.getPenaltyN3(o)+e.getPenaltyN4(o);e.applyMask(d,o),f<l&&(l=f,i=d)}return i}})(mo)),mo}var jn={},rc;function oc(){if(rc)return jn;rc=1;const e=uo(),t=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],n=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return jn.getBlocksCount=function(o,a){switch(a){case e.L:return t[(o-1)*4+0];case e.M:return t[(o-1)*4+1];case e.Q:return t[(o-1)*4+2];case e.H:return t[(o-1)*4+3];default:return}},jn.getTotalCodewordsCount=function(o,a){switch(a){case e.L:return n[(o-1)*4+0];case e.M:return n[(o-1)*4+1];case e.Q:return n[(o-1)*4+2];case e.H:return n[(o-1)*4+3];default:return}},jn}var vo={},Kt={},ac;function W0(){if(ac)return Kt;ac=1;const e=new Uint8Array(512),t=new Uint8Array(256);return(function(){let r=1;for(let o=0;o<255;o++)e[o]=r,t[r]=o,r<<=1,r&256&&(r^=285);for(let o=255;o<512;o++)e[o]=e[o-255]})(),Kt.log=function(r){if(r<1)throw new Error("log("+r+")");return t[r]},Kt.exp=function(r){return e[r]},Kt.mul=function(r,o){return r===0||o===0?0:e[t[r]+t[o]]},Kt}var sc;function q0(){return sc||(sc=1,(function(e){const t=W0();e.mul=function(r,o){const a=new Uint8Array(r.length+o.length-1);for(let s=0;s<r.length;s++)for(let i=0;i<o.length;i++)a[s+i]^=t.mul(r[s],o[i]);return a},e.mod=function(r,o){let a=new Uint8Array(r);for(;a.length-o.length>=0;){const s=a[0];for(let l=0;l<o.length;l++)a[l]^=t.mul(o[l],s);let i=0;for(;i<a.length&&a[i]===0;)i++;a=a.slice(i)}return a},e.generateECPolynomial=function(r){let o=new Uint8Array([1]);for(let a=0;a<r;a++)o=e.mul(o,new Uint8Array([1,t.exp(a)]));return o}})(vo)),vo}var bo,ic;function G0(){if(ic)return bo;ic=1;const e=q0();function t(n){this.genPoly=void 0,this.degree=n,this.degree&&this.initialize(this.degree)}return t.prototype.initialize=function(r){this.degree=r,this.genPoly=e.generateECPolynomial(this.degree)},t.prototype.encode=function(r){if(!this.genPoly)throw new Error("Encoder not initialized");const o=new Uint8Array(r.length+this.degree);o.set(r);const a=e.mod(o,this.genPoly),s=this.degree-a.length;if(s>0){const i=new Uint8Array(this.degree);return i.set(a,s),i}return a},bo=t,bo}var wo={},yo={},xo={},lc;function cc(){return lc||(lc=1,xo.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}),xo}var $e={},dc;function uc(){if(dc)return $e;dc=1;const e="[0-9]+",t="[A-Z $%*+\\-./:]+";let n="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";n=n.replace(/u/g,"\\u");const r="(?:(?![A-Z0-9 $%*+\\-./:]|"+n+`)(?:.|[\r
|
|
301
|
+
]))+`;$e.KANJI=new RegExp(n,"g"),$e.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),$e.BYTE=new RegExp(r,"g"),$e.NUMERIC=new RegExp(e,"g"),$e.ALPHANUMERIC=new RegExp(t,"g");const o=new RegExp("^"+n+"$"),a=new RegExp("^"+e+"$"),s=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return $e.testKanji=function(l){return o.test(l)},$e.testNumeric=function(l){return a.test(l)},$e.testAlphanumeric=function(l){return s.test(l)},$e}var fc;function ht(){return fc||(fc=1,(function(e){const t=cc(),n=uc();e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(a,s){if(!a.ccBits)throw new Error("Invalid mode: "+a);if(!t.isValid(s))throw new Error("Invalid version: "+s);return s>=1&&s<10?a.ccBits[0]:s<27?a.ccBits[1]:a.ccBits[2]},e.getBestModeForData=function(a){return n.testNumeric(a)?e.NUMERIC:n.testAlphanumeric(a)?e.ALPHANUMERIC:n.testKanji(a)?e.KANJI:e.BYTE},e.toString=function(a){if(a&&a.id)return a.id;throw new Error("Invalid mode")},e.isValid=function(a){return a&&a.bit&&a.ccBits};function r(o){if(typeof o!="string")throw new Error("Param is not a string");switch(o.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+o)}}e.from=function(a,s){if(e.isValid(a))return a;try{return r(a)}catch{return s}}})(yo)),yo}var pc;function Y0(){return pc||(pc=1,(function(e){const t=pt(),n=oc(),r=uo(),o=ht(),a=cc(),s=7973,i=t.getBCHDigit(s);function l(h,g,v){for(let m=1;m<=40;m++)if(g<=e.getCapacity(m,v,h))return m}function d(h,g){return o.getCharCountIndicator(h,g)+4}function f(h,g){let v=0;return h.forEach(function(m){const b=d(m.mode,g);v+=b+m.getBitsLength()}),v}function c(h,g){for(let v=1;v<=40;v++)if(f(h,v)<=e.getCapacity(v,g,o.MIXED))return v}e.from=function(g,v){return a.isValid(g)?parseInt(g,10):v},e.getCapacity=function(g,v,m){if(!a.isValid(g))throw new Error("Invalid QR Code version");typeof m>"u"&&(m=o.BYTE);const b=t.getSymbolTotalCodewords(g),w=n.getTotalCodewordsCount(g,v),y=(b-w)*8;if(m===o.MIXED)return y;const x=y-d(m,g);switch(m){case o.NUMERIC:return Math.floor(x/10*3);case o.ALPHANUMERIC:return Math.floor(x/11*2);case o.KANJI:return Math.floor(x/13);case o.BYTE:default:return Math.floor(x/8)}},e.getBestVersionForData=function(g,v){let m;const b=r.from(v,r.M);if(Array.isArray(g)){if(g.length>1)return c(g,b);if(g.length===0)return 1;m=g[0]}else m=g;return l(m.mode,m.getLength(),b)},e.getEncodedBits=function(g){if(!a.isValid(g)||g<7)throw new Error("Invalid QR Code version");let v=g<<12;for(;t.getBCHDigit(v)-i>=0;)v^=s<<t.getBCHDigit(v)-i;return g<<12|v}})(wo)),wo}var Co={},hc;function K0(){if(hc)return Co;hc=1;const e=pt(),t=1335,n=21522,r=e.getBCHDigit(t);return Co.getEncodedBits=function(a,s){const i=a.bit<<3|s;let l=i<<10;for(;e.getBCHDigit(l)-r>=0;)l^=t<<e.getBCHDigit(l)-r;return(i<<10|l)^n},Co}var ko={},So,gc;function X0(){if(gc)return So;gc=1;const e=ht();function t(n){this.mode=e.NUMERIC,this.data=n.toString()}return t.getBitsLength=function(r){return 10*Math.floor(r/3)+(r%3?r%3*3+1:0)},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(r){let o,a,s;for(o=0;o+3<=this.data.length;o+=3)a=this.data.substr(o,3),s=parseInt(a,10),r.put(s,10);const i=this.data.length-o;i>0&&(a=this.data.substr(o),s=parseInt(a,10),r.put(s,i*3+1))},So=t,So}var Eo,mc;function Z0(){if(mc)return Eo;mc=1;const e=ht(),t=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function n(r){this.mode=e.ALPHANUMERIC,this.data=r}return n.getBitsLength=function(o){return 11*Math.floor(o/2)+6*(o%2)},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(o){let a;for(a=0;a+2<=this.data.length;a+=2){let s=t.indexOf(this.data[a])*45;s+=t.indexOf(this.data[a+1]),o.put(s,11)}this.data.length%2&&o.put(t.indexOf(this.data[a]),6)},Eo=n,Eo}var No,vc;function J0(){if(vc)return No;vc=1;const e=ht();function t(n){this.mode=e.BYTE,typeof n=="string"?this.data=new TextEncoder().encode(n):this.data=new Uint8Array(n)}return t.getBitsLength=function(r){return r*8},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(n){for(let r=0,o=this.data.length;r<o;r++)n.put(this.data[r],8)},No=t,No}var To,bc;function Q0(){if(bc)return To;bc=1;const e=ht(),t=pt();function n(r){this.mode=e.KANJI,this.data=r}return n.getBitsLength=function(o){return o*13},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(r){let o;for(o=0;o<this.data.length;o++){let a=t.toSJIS(this.data[o]);if(a>=33088&&a<=40956)a-=33088;else if(a>=57408&&a<=60351)a-=49472;else throw new Error("Invalid SJIS character: "+this.data[o]+`
|
|
302
|
+
Make sure your charset is UTF-8`);a=(a>>>8&255)*192+(a&255),r.put(a,13)}},To=n,To}var _o={exports:{}},wc;function ev(){return wc||(wc=1,(function(e){var t={single_source_shortest_paths:function(n,r,o){var a={},s={};s[r]=0;var i=t.PriorityQueue.make();i.push(r,0);for(var l,d,f,c,h,g,v,m,b;!i.empty();){l=i.pop(),d=l.value,c=l.cost,h=n[d]||{};for(f in h)h.hasOwnProperty(f)&&(g=h[f],v=c+g,m=s[f],b=typeof s[f]>"u",(b||m>v)&&(s[f]=v,i.push(f,v),a[f]=d))}if(typeof o<"u"&&typeof s[o]>"u"){var w=["Could not find a path from ",r," to ",o,"."].join("");throw new Error(w)}return a},extract_shortest_path_from_predecessor_list:function(n,r){for(var o=[],a=r;a;)o.push(a),n[a],a=n[a];return o.reverse(),o},find_path:function(n,r,o){var a=t.single_source_shortest_paths(n,r,o);return t.extract_shortest_path_from_predecessor_list(a,o)},PriorityQueue:{make:function(n){var r=t.PriorityQueue,o={},a;n=n||{};for(a in r)r.hasOwnProperty(a)&&(o[a]=r[a]);return o.queue=[],o.sorter=n.sorter||r.default_sorter,o},default_sorter:function(n,r){return n.cost-r.cost},push:function(n,r){var o={value:n,cost:r};this.queue.push(o),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};e.exports=t})(_o)),_o.exports}var yc;function tv(){return yc||(yc=1,(function(e){const t=ht(),n=X0(),r=Z0(),o=J0(),a=Q0(),s=uc(),i=pt(),l=ev();function d(w){return unescape(encodeURIComponent(w)).length}function f(w,y,x){const k=[];let P;for(;(P=w.exec(x))!==null;)k.push({data:P[0],index:P.index,mode:y,length:P[0].length});return k}function c(w){const y=f(s.NUMERIC,t.NUMERIC,w),x=f(s.ALPHANUMERIC,t.ALPHANUMERIC,w);let k,P;return i.isKanjiModeEnabled()?(k=f(s.BYTE,t.BYTE,w),P=f(s.KANJI,t.KANJI,w)):(k=f(s.BYTE_KANJI,t.BYTE,w),P=[]),y.concat(x,k,P).sort(function(N,S){return N.index-S.index}).map(function(N){return{data:N.data,mode:N.mode,length:N.length}})}function h(w,y){switch(y){case t.NUMERIC:return n.getBitsLength(w);case t.ALPHANUMERIC:return r.getBitsLength(w);case t.KANJI:return a.getBitsLength(w);case t.BYTE:return o.getBitsLength(w)}}function g(w){return w.reduce(function(y,x){const k=y.length-1>=0?y[y.length-1]:null;return k&&k.mode===x.mode?(y[y.length-1].data+=x.data,y):(y.push(x),y)},[])}function v(w){const y=[];for(let x=0;x<w.length;x++){const k=w[x];switch(k.mode){case t.NUMERIC:y.push([k,{data:k.data,mode:t.ALPHANUMERIC,length:k.length},{data:k.data,mode:t.BYTE,length:k.length}]);break;case t.ALPHANUMERIC:y.push([k,{data:k.data,mode:t.BYTE,length:k.length}]);break;case t.KANJI:y.push([k,{data:k.data,mode:t.BYTE,length:d(k.data)}]);break;case t.BYTE:y.push([{data:k.data,mode:t.BYTE,length:d(k.data)}])}}return y}function m(w,y){const x={},k={start:{}};let P=["start"];for(let E=0;E<w.length;E++){const N=w[E],S=[];for(let A=0;A<N.length;A++){const z=N[A],_=""+E+A;S.push(_),x[_]={node:z,lastCount:0},k[_]={};for(let M=0;M<P.length;M++){const O=P[M];x[O]&&x[O].node.mode===z.mode?(k[O][_]=h(x[O].lastCount+z.length,z.mode)-h(x[O].lastCount,z.mode),x[O].lastCount+=z.length):(x[O]&&(x[O].lastCount=z.length),k[O][_]=h(z.length,z.mode)+4+t.getCharCountIndicator(z.mode,y))}}P=S}for(let E=0;E<P.length;E++)k[P[E]].end=0;return{map:k,table:x}}function b(w,y){let x;const k=t.getBestModeForData(w);if(x=t.from(y,k),x!==t.BYTE&&x.bit<k.bit)throw new Error('"'+w+'" cannot be encoded with mode '+t.toString(x)+`.
|
|
303
|
+
Suggested mode is: `+t.toString(k));switch(x===t.KANJI&&!i.isKanjiModeEnabled()&&(x=t.BYTE),x){case t.NUMERIC:return new n(w);case t.ALPHANUMERIC:return new r(w);case t.KANJI:return new a(w);case t.BYTE:return new o(w)}}e.fromArray=function(y){return y.reduce(function(x,k){return typeof k=="string"?x.push(b(k,null)):k.data&&x.push(b(k.data,k.mode)),x},[])},e.fromString=function(y,x){const k=c(y,i.isKanjiModeEnabled()),P=v(k),E=m(P,x),N=l.find_path(E.map,"start","end"),S=[];for(let A=1;A<N.length-1;A++)S.push(E.table[N[A]].node);return e.fromArray(g(S))},e.rawSplit=function(y){return e.fromArray(c(y,i.isKanjiModeEnabled()))}})(ko)),ko}var xc;function nv(){if(xc)return lo;xc=1;const e=pt(),t=uo(),n=H0(),r=V0(),o=U0(),a=R0(),s=j0(),i=oc(),l=G0(),d=Y0(),f=K0(),c=ht(),h=tv();function g(E,N){const S=E.size,A=a.getPositions(N);for(let z=0;z<A.length;z++){const _=A[z][0],M=A[z][1];for(let O=-1;O<=7;O++)if(!(_+O<=-1||S<=_+O))for(let I=-1;I<=7;I++)M+I<=-1||S<=M+I||(O>=0&&O<=6&&(I===0||I===6)||I>=0&&I<=6&&(O===0||O===6)||O>=2&&O<=4&&I>=2&&I<=4?E.set(_+O,M+I,!0,!0):E.set(_+O,M+I,!1,!0))}}function v(E){const N=E.size;for(let S=8;S<N-8;S++){const A=S%2===0;E.set(S,6,A,!0),E.set(6,S,A,!0)}}function m(E,N){const S=o.getPositions(N);for(let A=0;A<S.length;A++){const z=S[A][0],_=S[A][1];for(let M=-2;M<=2;M++)for(let O=-2;O<=2;O++)M===-2||M===2||O===-2||O===2||M===0&&O===0?E.set(z+M,_+O,!0,!0):E.set(z+M,_+O,!1,!0)}}function b(E,N){const S=E.size,A=d.getEncodedBits(N);let z,_,M;for(let O=0;O<18;O++)z=Math.floor(O/3),_=O%3+S-8-3,M=(A>>O&1)===1,E.set(z,_,M,!0),E.set(_,z,M,!0)}function w(E,N,S){const A=E.size,z=f.getEncodedBits(N,S);let _,M;for(_=0;_<15;_++)M=(z>>_&1)===1,_<6?E.set(_,8,M,!0):_<8?E.set(_+1,8,M,!0):E.set(A-15+_,8,M,!0),_<8?E.set(8,A-_-1,M,!0):_<9?E.set(8,15-_-1+1,M,!0):E.set(8,15-_-1,M,!0);E.set(A-8,8,1,!0)}function y(E,N){const S=E.size;let A=-1,z=S-1,_=7,M=0;for(let O=S-1;O>0;O-=2)for(O===6&&O--;;){for(let I=0;I<2;I++)if(!E.isReserved(z,O-I)){let W=!1;M<N.length&&(W=(N[M]>>>_&1)===1),E.set(z,O-I,W),_--,_===-1&&(M++,_=7)}if(z+=A,z<0||S<=z){z-=A,A=-A;break}}}function x(E,N,S){const A=new n;S.forEach(function(I){A.put(I.mode.bit,4),A.put(I.getLength(),c.getCharCountIndicator(I.mode,E)),I.write(A)});const z=e.getSymbolTotalCodewords(E),_=i.getTotalCodewordsCount(E,N),M=(z-_)*8;for(A.getLengthInBits()+4<=M&&A.put(0,4);A.getLengthInBits()%8!==0;)A.putBit(0);const O=(M-A.getLengthInBits())/8;for(let I=0;I<O;I++)A.put(I%2?17:236,8);return k(A,E,N)}function k(E,N,S){const A=e.getSymbolTotalCodewords(N),z=i.getTotalCodewordsCount(N,S),_=A-z,M=i.getBlocksCount(N,S),O=A%M,I=M-O,W=Math.floor(A/M),D=Math.floor(_/M),$=D+1,q=W-D,L=new l(q);let T=0;const F=new Array(M),H=new Array(M);let B=0;const V=new Uint8Array(E.buffer);for(let Z=0;Z<M;Z++){const ee=Z<I?D:$;F[Z]=V.slice(T,T+ee),H[Z]=L.encode(F[Z]),T+=ee,B=Math.max(B,ee)}const U=new Uint8Array(A);let X=0,R,j;for(R=0;R<B;R++)for(j=0;j<M;j++)R<F[j].length&&(U[X++]=F[j][R]);for(R=0;R<q;R++)for(j=0;j<M;j++)U[X++]=H[j][R];return U}function P(E,N,S,A){let z;if(Array.isArray(E))z=h.fromArray(E);else if(typeof E=="string"){let W=N;if(!W){const D=h.rawSplit(E);W=d.getBestVersionForData(D,S)}z=h.fromString(E,W||40)}else throw new Error("Invalid data");const _=d.getBestVersionForData(z,S);if(!_)throw new Error("The amount of data is too big to be stored in a QR Code");if(!N)N=_;else if(N<_)throw new Error(`
|
|
299
304
|
The chosen QR Code version cannot contain this amount of data.
|
|
300
305
|
Minimum version required to store current data is: `+_+`.
|
|
301
|
-
`);const M=x(N,S,z),O=e.getSymbolSize(N),I=new r(O);return g(I,N),v(I),m(I,N),w(I,S,0),N>=7&&b(I,N),y(I,M),isNaN(A)&&(A=s.getBestMask(I,w.bind(null,I,S))),s.applyMask(A,I),w(I,S,A),{modules:I,version:N,errorCorrectionLevel:S,maskPattern:A,segments:z}}return lo.create=function(N,S){if(typeof N>"u"||N==="")throw new Error("No input text");let A=t.M,z,_;return typeof S<"u"&&(A=t.from(S.errorCorrectionLevel,t.M),z=d.from(S.version),_=s.from(S.maskPattern),S.toSJISFunc&&e.setToSJISFunction(S.toSJISFunc)),P(N,z,A,_)},lo}var Ao={},Po={},
|
|
302
|
-
`;return typeof i=="function"&&i(null,b),b},Io}var Ec;function ov(){if(Ec)return It;Ec=1;const e=F0(),t=tv(),n=nv(),r=rv();function o(a,s,i,l,d){const f=[].slice.call(arguments,1),c=f.length,p=typeof f[c-1]=="function";if(!p&&!e())throw new Error("Callback required as last argument");if(p){if(c<2)throw new Error("Too few arguments provided");c===2?(d=i,i=s,s=l=void 0):c===3&&(s.getContext&&typeof d>"u"?(d=l,l=void 0):(d=l,l=i,i=s,s=void 0))}else{if(c<1)throw new Error("Too few arguments provided");return c===1?(i=s,s=l=void 0):c===2&&!s.getContext&&(l=i,i=s,s=void 0),new Promise(function(g,v){try{const m=t.create(i,l);g(a(m,s,l))}catch(m){v(m)}})}try{const g=t.create(i,l);d(null,a(g,s,l))}catch(g){d(g)}}return It.create=t.create,It.toCanvas=o.bind(null,n.render),It.toDataURL=o.bind(null,n.renderToDataURL),It.toString=o.bind(null,function(a,s,i){return r.render(a,i)}),It}var av=ov();const sv=_p(av);function Nc({className:e,...t}){return u.jsx("div",{"data-slot":"skeleton",className:K("animate-pulse rounded-md bg-accent",e),...t})}const iv={sm:"size-24",md:"size-36",lg:"size-48"},lv={default:{dark:"#000000",light:"#ffffff"},inverted:{dark:"#ffffff",light:"#000000"}};function cv({value:e,size:t="md",variant:n="default",level:r="medium",alt:o="QR code",className:a}){const[s,i]=C.useState(null),[l,d]=C.useState(!1);C.useEffect(()=>{let c=!1;return d(!1),sv.toDataURL(e,{color:lv[n],errorCorrectionLevel:r,width:512,margin:4}).then(p=>{c||i(p)}).catch(p=>{console.error("[ui-qr-code] Failed to encode:",p),c||d(!0)}),()=>{c=!0}},[e,n,r]);const f=K(iv[t],"rounded-sm",a);return l?u.jsx("div",{className:K(f,"bg-muted flex items-center justify-center"),role:"img","aria-label":"Failed to render QR code",children:u.jsx(tu,{className:"size-1/3 text-muted-foreground"})}):s?u.jsx("div",{className:K(f,"overflow-hidden"),children:u.jsx("img",{src:s,alt:o,className:"size-full"})}):u.jsx(Nc,{className:K(f,n==="inverted"&&"bg-black")})}function dv({delayDuration:e=0,...t}){return u.jsx(s0,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function uv({...e}){return u.jsx(i0,{"data-slot":"tooltip",...e})}function fv({...e}){return u.jsx(l0,{"data-slot":"tooltip-trigger",...e})}function pv({className:e,sideOffset:t=0,children:n,...r}){return u.jsx(c0,{children:u.jsxs(d0,{"data-slot":"tooltip-content",sideOffset:t,className:K("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:[n,u.jsx(u0,{className:"z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground"})]})})}function hv({className:e,value:t,...n}){return u.jsx(yg,{"data-slot":"progress",className:K("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",e),...n,children:u.jsx(xg,{"data-slot":"progress-indicator",className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})})}const gv=on("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 mv({className:e,variant:t,...n}){return u.jsx("div",{"data-slot":"alert",role:"alert",className:K(gv({variant:t}),e),...n})}function vv({className:e,...t}){return u.jsx("div",{"data-slot":"alert-title",className:K("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",e),...t})}function bv({className:e,...t}){return u.jsx("div",{"data-slot":"alert-description",className:K("col-start-2 grid justify-items-start gap-1 text-sm text-muted-foreground [&_p]:leading-relaxed",e),...t})}function wv({...e}){return u.jsx(kf,{"data-slot":"collapsible",...e})}function yv({...e}){return u.jsx(Ba,{"data-slot":"collapsible-trigger",...e})}function xv({...e}){return u.jsx(Fa,{"data-slot":"collapsible-content",...e})}const Mt=e=>e==null?void 0:e===!0||e==="true",Tc={"arrow-left":Ud,calendar:jd,"check-circle-2":Qo,"chevron-left":qd,"chevron-right":Jn,clock:Xd,"credit-card":Jd,"external-link":Qd,"help-circle":ea,info:en,"loader-2":Qn,mail:er,"map-pin":nu,"message-circle":ta,"message-square":tr,package:ou,phone:au,search:iu,"shopping-bag":lu,sparkles:na,truck:du,user:ra,"x-circle":Yd,"alert-circle":Jo,"book-open":Rd},_c={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"},Ac={default:"text-foreground",muted:"text-muted-foreground",destructive:"text-destructive"},Pc=e=>typeof e=="number"?_c[String(e)]??"gap-2":typeof e=="string"?_c[e.trim()]??"gap-2":"gap-2",Cv=({children:e,className:t,onClick:n})=>u.jsx($t,{className:t,onClick:n,children:e}),kv=({children:e,className:t})=>u.jsx(Ht,{className:t,children:e}),Sv=({children:e,className:t})=>u.jsx(ef,{className:t,children:e}),Ev=({children:e,className:t,onClick:n,variant:r,size:o,disabled:a,title:s})=>u.jsx(Gl,{className:t,variant:r,size:o,onClick:n,disabled:Mt(a),title:s,children:e}),Nv=({children:e,className:t,variant:n,hue:r,tone:o})=>u.jsx(g0,{className:K(Ac[o]??"",t),variant:n,hue:r,children:e}),Tv=({className:e,onChange:t,...n})=>u.jsx(m0,{className:e,onChange:t,...n}),_v=({className:e,onChange:t,...n})=>u.jsx(v0,{className:e,onChange:t,...n}),Av=({children:e,className:t,value:n,defaultValue:r,onChange:o,placeholder:a,disabled:s})=>u.jsxs(b0,{value:n,defaultValue:r,onValueChange:i=>{const l=o;l==null||l({target:{value:i}})},disabled:Mt(s),children:[u.jsx(y0,{className:t,children:u.jsx(w0,{placeholder:a})}),u.jsx(x0,{style:{zIndex:"calc(var(--widget-z, 1000) + 1)"},children:e})]}),Pv=({children:e,value:t,disabled:n,className:r})=>u.jsx(C0,{value:t,disabled:Mt(n),className:r,children:e}),Iv=({checked:e,onChange:t,disabled:n,className:r,id:o})=>{const a=e!==void 0,s=t;return u.jsx(E0,{...a?{checked:e==="true"||e===!0}:{},onCheckedChange:i=>s==null?void 0:s({target:{value:String(i)}}),disabled:Mt(n),className:r,id:o})},Mv=({checked:e,onChange:t,disabled:n,size:r,className:o,id:a})=>{const s=e!==void 0,i=t;return u.jsx(N0,{...s?{checked:e==="true"||e===!0}:{},onCheckedChange:l=>i==null?void 0:i({target:{value:String(l)}}),disabled:Mt(n),size:r,className:o,id:a})},Lv=({children:e,htmlFor:t,className:n})=>u.jsx(T0,{htmlFor:t,className:n,children:e}),Ov=({children:e,value:t,defaultValue:n,onChange:r,className:o})=>u.jsx(_0,{value:t,defaultValue:n,onValueChange:a=>{const s=r;s==null||s({target:{value:a}})},className:o,children:e}),zv=({value:e,disabled:t,className:n,id:r})=>u.jsx(A0,{value:e,disabled:Mt(t),className:n,id:r}),Dv=({className:e})=>u.jsx(P0,{className:e}),Bv=({children:e,defaultValue:t,className:n})=>{const[r,o]=C.useState(t);return u.jsx(I0,{value:r,onValueChange:o,className:n,children:e})},Fv=({children:e,className:t})=>u.jsx(L0,{className:t,children:e}),$v=({children:e,value:t,className:n})=>u.jsx(O0,{className:n,value:t,children:e}),Hv=({children:e,value:t,className:n})=>u.jsx(z0,{className:n,value:t,children:e}),Vv=({children:e,className:t})=>u.jsx(D0,{className:t,children:e}),Uv=({src:e,alt:t,className:n})=>{var r;return u.jsxs(oo,{className:n,children:[u.jsx(ao,{src:e,alt:t}),u.jsx(so,{children:((r=t==null?void 0:t.charAt(0))==null?void 0:r.toUpperCase())||"?"})]})},Rv=({width:e,height:t,className:n})=>u.jsx(Nc,{className:n,style:{width:e,height:t}}),Wv=({children:e,content:t,className:n})=>u.jsx(dv,{children:u.jsxs(uv,{children:[u.jsx(fv,{asChild:!0,children:u.jsx("span",{className:n,children:e})}),u.jsx(pv,{children:u.jsx("p",{children:String(t)})})]})}),jv=({value:e,className:t})=>u.jsx(hv,{value:typeof e=="string"?Number(e):e,className:t}),qv={default:en,destructive:Jo},Gv=({children:e,variant:t,title:n,className:r})=>{const o=t,a=qv[o||"default"]||en;return u.jsxs(mv,{variant:o,className:r,children:[u.jsx(a,{className:"size-4"}),n?u.jsx(vv,{children:String(n)}):null,e?u.jsx(bv,{children:e}):null]})},Yv=({children:e,defaultOpen:t,className:n})=>u.jsx(wv,{defaultOpen:t==="true"||t===!0,className:n,children:e}),Kv=({children:e,className:t})=>u.jsxs(yv,{className:K("flex items-center gap-1 cursor-pointer text-sm font-medium [&[data-state=open]>svg]:rotate-90",t),children:[u.jsx(Jn,{className:"size-4 shrink-0 transition-transform duration-200"}),e]}),Xv=({children:e,className:t})=>u.jsx(xv,{className:t,children:e}),Zv=({children:e,className:t,tone:n})=>u.jsx("p",{className:K("text-sm",Ac[n]??"",t),children:e}),Jv=({children:e,className:t,level:n})=>{const r=`h${n||"2"}`;return u.jsx(r,{className:K("font-semibold tracking-tight",t),children:e})},Qv=({children:e,className:t,direction:n,gap:r})=>{const o=n==="row"?"flex-row":"flex-col",a=Pc(r);return u.jsx("div",{className:K("flex",o,a,t),children:e})},eb=({children:e,className:t,gap:n})=>{const r=Pc(n);return u.jsx("div",{className:K("flex flex-row items-center",r,t),children:e})},tb=({children:e,className:t,href:n,target:r,rel:o})=>u.jsx("a",{href:n,target:r,rel:o,className:t,children:e}),nb=({title:e,children:t,className:n})=>u.jsxs($t,{className:K("overflow-hidden p-0 gap-0 shadow-sm",n),children:[e?u.jsx(Ht,{className:"px-6 py-3",children:u.jsx("h3",{className:"text-xs font-semibold tracking-wider text-muted-foreground",children:String(e)})}):null,u.jsx("div",{className:"flex flex-col gap-0 divide-y divide-border",children:t})]}),rb=({icon:e,label:t,description:n,onClick:r,className:o})=>{const a=e,s="size-5",i=a?Tc[a]:null;return u.jsxs("button",{type:"button",className:K("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",o),onClick:r,children:[i&&u.jsx(i,{className:`${s} shrink-0 text-muted-foreground`}),u.jsxs("div",{className:"flex flex-col gap-0 flex-1 min-w-0 items-start",children:[t?u.jsx("p",{className:"font-medium text-sm text-foreground",children:String(t)}):null,n?u.jsx("p",{className:"mt-0.5 text-xs text-muted-foreground",children:String(n)}):null]}),u.jsx(Jn,{className:"mr-1 size-4 shrink-0 text-muted-foreground"})]})},ob=({name:e,size:t,className:n})=>{const o={sm:"size-3",md:"size-5",lg:"size-6"}[t]??"size-4",a=e,s=Tc[a],i=a==="sparkles"?"sparkle-icon":"";return s?u.jsx(s,{className:K(o,i,n)}):u.jsx("span",{className:K("inline-block",o,i,n),"data-icon":a})},ab=({value:e,size:t,variant:n,level:r,alt:o,className:a})=>u.jsx(cv,{value:e,size:t,variant:n,level:r,alt:o,className:a}),sb=()=>({"ui-card":Cv,"ui-card-content":kv,"ui-card-header":Sv,"ui-button":Ev,"ui-text":Zv,"ui-heading":Jv,"ui-badge":Nv,"ui-input":Tv,"ui-textarea":_v,"ui-select":Av,"ui-select-option":Pv,"ui-checkbox":Iv,"ui-switch":Mv,"ui-label":Lv,"ui-radio-group":Ov,"ui-radio-group-item":zv,"ui-stack":Qv,"ui-inline":eb,"ui-separator":Dv,"ui-tabs":Bv,"ui-tabs-list":Fv,"ui-tabs-trigger":$v,"ui-tabs-content":Hv,"ui-scroll-area":Vv,"ui-avatar":Uv,"ui-icon":ob,"ui-qr-code":ab,"ui-link":tb,"ui-menu-item":rb,"ui-menu":nb,"ui-skeleton":Rv,"ui-tooltip":Wv,"ui-progress":jv,"ui-alert":Gv,"ui-collapsible":Yv,"ui-collapsible-trigger":Kv,"ui-collapsible-content":Xv}),Ic="/api/ecommerce",Mc=async(e,t)=>{const n=t?`${t.replace(/\/$/,"")}${Ic}`:Ic,r=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),o=await r.json();if(!r.ok)throw new Error(o.error||"API request failed");return o.data},ib=({className:e})=>u.jsxs("svg",{width:"100%",height:"100%",viewBox:"0 0 190 190",version:"1.1",className:e,children:[u.jsx("g",{transform:"matrix(1,0,0,1,-160.365,27.97)",children:u.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)"})}),u.jsx("g",{transform:"matrix(1,0,0,1,-160.365,27.97)",children:u.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)"})}),u.jsx("g",{transform:"matrix(1,0,0,1,-160.365,27.97)",children:u.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)"})}),u.jsx("g",{transform:"matrix(1,0,0,1,-160.365,27.97)",children:u.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)"})})]}),Lc="stackable-dev-badge-styles",lb=()=>{if(typeof document>"u"||document.getElementById(Lc))return;const e=document.createElement("style");e.id=Lc,e.textContent=`
|
|
306
|
+
`);const M=x(N,S,z),O=e.getSymbolSize(N),I=new r(O);return g(I,N),v(I),m(I,N),w(I,S,0),N>=7&&b(I,N),y(I,M),isNaN(A)&&(A=s.getBestMask(I,w.bind(null,I,S))),s.applyMask(A,I),w(I,S,A),{modules:I,version:N,errorCorrectionLevel:S,maskPattern:A,segments:z}}return lo.create=function(N,S){if(typeof N>"u"||N==="")throw new Error("No input text");let A=t.M,z,_;return typeof S<"u"&&(A=t.from(S.errorCorrectionLevel,t.M),z=d.from(S.version),_=s.from(S.maskPattern),S.toSJISFunc&&e.setToSJISFunction(S.toSJISFunc)),P(N,z,A,_)},lo}var Ao={},Po={},Cc;function kc(){return Cc||(Cc=1,(function(e){function t(n){if(typeof n=="number"&&(n=n.toString()),typeof n!="string")throw new Error("Color should be defined as hex string");let r=n.slice().replace("#","").split("");if(r.length<3||r.length===5||r.length>8)throw new Error("Invalid hex color: "+n);(r.length===3||r.length===4)&&(r=Array.prototype.concat.apply([],r.map(function(a){return[a,a]}))),r.length===6&&r.push("F","F");const o=parseInt(r.join(""),16);return{r:o>>24&255,g:o>>16&255,b:o>>8&255,a:o&255,hex:"#"+r.slice(0,6).join("")}}e.getOptions=function(r){r||(r={}),r.color||(r.color={});const o=typeof r.margin>"u"||r.margin===null||r.margin<0?4:r.margin,a=r.width&&r.width>=21?r.width:void 0,s=r.scale||4;return{width:a,scale:a?4:s,margin:o,color:{dark:t(r.color.dark||"#000000ff"),light:t(r.color.light||"#ffffffff")},type:r.type,rendererOpts:r.rendererOpts||{}}},e.getScale=function(r,o){return o.width&&o.width>=r+o.margin*2?o.width/(r+o.margin*2):o.scale},e.getImageWidth=function(r,o){const a=e.getScale(r,o);return Math.floor((r+o.margin*2)*a)},e.qrToImageData=function(r,o,a){const s=o.modules.size,i=o.modules.data,l=e.getScale(s,a),d=Math.floor((s+a.margin*2)*l),f=a.margin*l,c=[a.color.light,a.color.dark];for(let h=0;h<d;h++)for(let g=0;g<d;g++){let v=(h*d+g)*4,m=a.color.light;if(h>=f&&g>=f&&h<d-f&&g<d-f){const b=Math.floor((h-f)/l),w=Math.floor((g-f)/l);m=c[i[b*s+w]?1:0]}r[v++]=m.r,r[v++]=m.g,r[v++]=m.b,r[v]=m.a}}})(Po)),Po}var Sc;function rv(){return Sc||(Sc=1,(function(e){const t=kc();function n(o,a,s){o.clearRect(0,0,a.width,a.height),a.style||(a.style={}),a.height=s,a.width=s,a.style.height=s+"px",a.style.width=s+"px"}function r(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}e.render=function(a,s,i){let l=i,d=s;typeof l>"u"&&(!s||!s.getContext)&&(l=s,s=void 0),s||(d=r()),l=t.getOptions(l);const f=t.getImageWidth(a.modules.size,l),c=d.getContext("2d"),h=c.createImageData(f,f);return t.qrToImageData(h.data,a,l),n(c,d,f),c.putImageData(h,0,0),d},e.renderToDataURL=function(a,s,i){let l=i;typeof l>"u"&&(!s||!s.getContext)&&(l=s,s=void 0),l||(l={});const d=e.render(a,s,l),f=l.type||"image/png",c=l.rendererOpts||{};return d.toDataURL(f,c.quality)}})(Ao)),Ao}var Io={},Ec;function ov(){if(Ec)return Io;Ec=1;const e=kc();function t(o,a){const s=o.a/255,i=a+'="'+o.hex+'"';return s<1?i+" "+a+'-opacity="'+s.toFixed(2).slice(1)+'"':i}function n(o,a,s){let i=o+a;return typeof s<"u"&&(i+=" "+s),i}function r(o,a,s){let i="",l=0,d=!1,f=0;for(let c=0;c<o.length;c++){const h=Math.floor(c%a),g=Math.floor(c/a);!h&&!d&&(d=!0),o[c]?(f++,c>0&&h>0&&o[c-1]||(i+=d?n("M",h+s,.5+g+s):n("m",l,0),l=0,d=!1),h+1<a&&o[c+1]||(i+=n("h",f),f=0)):l++}return i}return Io.render=function(a,s,i){const l=e.getOptions(s),d=a.modules.size,f=a.modules.data,c=d+l.margin*2,h=l.color.light.a?"<path "+t(l.color.light,"fill")+' d="M0 0h'+c+"v"+c+'H0z"/>':"",g="<path "+t(l.color.dark,"stroke")+' d="'+r(f,d,l.margin)+'"/>',v='viewBox="0 0 '+c+" "+c+'"',b='<svg xmlns="http://www.w3.org/2000/svg" '+(l.width?'width="'+l.width+'" height="'+l.width+'" ':"")+v+' shape-rendering="crispEdges">'+h+g+`</svg>
|
|
307
|
+
`;return typeof i=="function"&&i(null,b),b},Io}var Nc;function av(){if(Nc)return Mt;Nc=1;const e=$0(),t=nv(),n=rv(),r=ov();function o(a,s,i,l,d){const f=[].slice.call(arguments,1),c=f.length,h=typeof f[c-1]=="function";if(!h&&!e())throw new Error("Callback required as last argument");if(h){if(c<2)throw new Error("Too few arguments provided");c===2?(d=i,i=s,s=l=void 0):c===3&&(s.getContext&&typeof d>"u"?(d=l,l=void 0):(d=l,l=i,i=s,s=void 0))}else{if(c<1)throw new Error("Too few arguments provided");return c===1?(i=s,s=l=void 0):c===2&&!s.getContext&&(l=i,i=s,s=void 0),new Promise(function(g,v){try{const m=t.create(i,l);g(a(m,s,l))}catch(m){v(m)}})}try{const g=t.create(i,l);d(null,a(g,s,l))}catch(g){d(g)}}return Mt.create=t.create,Mt.toCanvas=o.bind(null,n.render),Mt.toDataURL=o.bind(null,n.renderToDataURL),Mt.toString=o.bind(null,function(a,s,i){return r.render(a,i)}),Mt}var sv=av();const iv=Ap(sv);function Tc({className:e,...t}){return u.jsx("div",{"data-slot":"skeleton",className:K("animate-pulse rounded-md bg-accent",e),...t})}const lv={sm:"size-24",md:"size-36",lg:"size-48"},cv={sm:"p-2",md:"p-3",lg:"p-3"},dv={default:{dark:"#000000",light:"#ffffff"},inverted:{dark:"#ffffff",light:"#000000"}},uv={default:"bg-white",inverted:"bg-black"};function fv({value:e,color:t,margin:n=0,width:r=512,variant:o="default",errorCorrectionLevel:a="M",alt:s="QR code",size:i="md",className:l,...d}){const[f,c]=C.useState(null),[h,g]=C.useState(!1);C.useEffect(()=>{if(c(null),g(!e),!e)return;let m=!1;try{iv.toDataURL(e,{color:t??dv[o],errorCorrectionLevel:a,margin:n,width:r,...d}).then(b=>{m||c(b)}).catch(b=>{console.error("[ui-qr-code] Failed to encode:",b),m||g(!0)})}catch(b){console.error("[ui-qr-code] Failed to encode:",b),g(!0)}return()=>{m=!0}},[e,o,a,n,r,t,d]);const v=K(lv[i],"rounded-sm",l);return h?u.jsx("div",{className:K(v,"bg-muted flex items-center justify-center"),role:"img","aria-label":"Failed to render QR code",children:u.jsx(ta,{className:"size-1/3 text-muted-foreground"})}):f?u.jsx("div",{className:K(v,cv[i],uv[o],"overflow-hidden"),children:u.jsx("img",{src:f,alt:s,className:"size-full"})}):u.jsx(Tc,{className:K(v,o==="inverted"&&"bg-black")})}function pv({delayDuration:e=0,...t}){return u.jsx(i0,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function hv({...e}){return u.jsx(l0,{"data-slot":"tooltip",...e})}function gv({...e}){return u.jsx(c0,{"data-slot":"tooltip-trigger",...e})}function mv({className:e,sideOffset:t=0,children:n,...r}){return u.jsx(d0,{children:u.jsxs(u0,{"data-slot":"tooltip-content",sideOffset:t,className:K("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:[n,u.jsx(f0,{className:"z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground"})]})})}function vv({className:e,value:t,...n}){return u.jsx(xg,{"data-slot":"progress",className:K("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",e),...n,children:u.jsx(Cg,{"data-slot":"progress-indicator",className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})})}const bv=on("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 wv({className:e,variant:t,...n}){return u.jsx("div",{"data-slot":"alert",role:"alert",className:K(bv({variant:t}),e),...n})}function yv({className:e,...t}){return u.jsx("div",{"data-slot":"alert-title",className:K("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",e),...t})}function xv({className:e,...t}){return u.jsx("div",{"data-slot":"alert-description",className:K("col-start-2 grid justify-items-start gap-1 text-sm text-muted-foreground [&_p]:leading-relaxed",e),...t})}function Cv({...e}){return u.jsx(Sf,{"data-slot":"collapsible",...e})}function kv({...e}){return u.jsx(Fa,{"data-slot":"collapsible-trigger",...e})}function Sv({...e}){return u.jsx($a,{"data-slot":"collapsible-content",...e})}const Lt=e=>e==null?void 0:e===!0||e==="true",_c={"arrow-left":Rd,calendar:qd,"check-circle-2":Qo,"chevron-left":Gd,"chevron-right":Jn,clock:Zd,"credit-card":Qd,"external-link":eu,"help-circle":ea,info:en,"loader-2":Qn,mail:er,"map-pin":nu,"message-circle":na,"message-square":tr,package:ou,phone:au,search:lu,"shopping-bag":cu,sparkles:ra,truck:uu,user:oa,"x-circle":Kd,"alert-circle":Jo,"book-open":jd,"qr-code":iu,"image-off":ta},Ac={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"},Pc={default:"text-foreground",muted:"text-muted-foreground",destructive:"text-destructive"},Ic=e=>typeof e=="number"?Ac[String(e)]??"gap-2":typeof e=="string"?Ac[e.trim()]??"gap-2":"gap-2",Ev=({children:e,className:t,onClick:n})=>u.jsx($t,{className:t,onClick:n,children:e}),Nv=({children:e,className:t})=>u.jsx(Ht,{className:t,children:e}),Tv=({children:e,className:t})=>u.jsx(tf,{className:t,children:e}),_v=({children:e,className:t,onClick:n,variant:r,size:o,disabled:a,title:s})=>u.jsx(Yl,{className:t,variant:r,size:o,onClick:n,disabled:Lt(a),title:s,children:e}),Av=({children:e,className:t,variant:n,hue:r,tone:o})=>u.jsx(m0,{className:K(Pc[o]??"",t),variant:n,hue:r,children:e}),Pv=({className:e,onChange:t,...n})=>u.jsx(v0,{className:e,onChange:t,...n}),Iv=({className:e,onChange:t,...n})=>u.jsx(b0,{className:e,onChange:t,...n}),Mv=({children:e,className:t,value:n,defaultValue:r,onChange:o,placeholder:a,disabled:s})=>u.jsxs(w0,{value:n,defaultValue:r,onValueChange:i=>{const l=o;l==null||l({target:{value:i}})},disabled:Lt(s),children:[u.jsx(x0,{className:t,children:u.jsx(y0,{placeholder:a})}),u.jsx(C0,{style:{zIndex:"calc(var(--widget-z, 1000) + 1)"},children:e})]}),Lv=({children:e,value:t,disabled:n,className:r})=>u.jsx(k0,{value:t,disabled:Lt(n),className:r,children:e}),Ov=({checked:e,onChange:t,disabled:n,className:r,id:o})=>{const a=e!==void 0,s=t;return u.jsx(N0,{...a?{checked:e==="true"||e===!0}:{},onCheckedChange:i=>s==null?void 0:s({target:{value:String(i)}}),disabled:Lt(n),className:r,id:o})},zv=({checked:e,onChange:t,disabled:n,size:r,className:o,id:a})=>{const s=e!==void 0,i=t;return u.jsx(T0,{...s?{checked:e==="true"||e===!0}:{},onCheckedChange:l=>i==null?void 0:i({target:{value:String(l)}}),disabled:Lt(n),size:r,className:o,id:a})},Dv=({children:e,htmlFor:t,className:n})=>u.jsx(_0,{htmlFor:t,className:n,children:e}),Bv=({children:e,value:t,defaultValue:n,onChange:r,className:o})=>u.jsx(A0,{value:t,defaultValue:n,onValueChange:a=>{const s=r;s==null||s({target:{value:a}})},className:o,children:e}),Fv=({value:e,disabled:t,className:n,id:r})=>u.jsx(P0,{value:e,disabled:Lt(t),className:n,id:r}),$v=({className:e})=>u.jsx(I0,{className:e}),Hv=({children:e,defaultValue:t,className:n})=>{const[r,o]=C.useState(t);return u.jsx(M0,{value:r,onValueChange:o,className:n,children:e})},Vv=({children:e,className:t})=>u.jsx(O0,{className:t,children:e}),Uv=({children:e,value:t,className:n})=>u.jsx(z0,{className:n,value:t,children:e}),Rv=({children:e,value:t,className:n})=>u.jsx(D0,{className:n,value:t,children:e}),jv=({children:e,className:t})=>u.jsx(B0,{className:t,children:e}),Wv=({src:e,alt:t,className:n})=>{var r;return u.jsxs(oo,{className:n,children:[u.jsx(ao,{src:e,alt:t}),u.jsx(so,{children:((r=t==null?void 0:t.charAt(0))==null?void 0:r.toUpperCase())||"?"})]})},qv=({width:e,height:t,className:n})=>u.jsx(Tc,{className:n,style:{width:e,height:t}}),Gv=({children:e,content:t,className:n})=>u.jsx(pv,{children:u.jsxs(hv,{children:[u.jsx(gv,{asChild:!0,children:u.jsx("span",{className:n,children:e})}),u.jsx(mv,{children:u.jsx("p",{children:String(t)})})]})}),Yv=({value:e,className:t})=>u.jsx(vv,{value:typeof e=="string"?Number(e):e,className:t}),Kv={default:en,destructive:Jo},Xv=({children:e,variant:t,title:n,className:r})=>{const o=t,a=Kv[o||"default"]||en;return u.jsxs(wv,{variant:o,className:r,children:[u.jsx(a,{className:"size-4"}),n?u.jsx(yv,{children:String(n)}):null,e?u.jsx(xv,{children:e}):null]})},Zv=({children:e,defaultOpen:t,className:n})=>u.jsx(Cv,{defaultOpen:t==="true"||t===!0,className:n,children:e}),Jv=({children:e,className:t})=>u.jsxs(kv,{className:K("flex items-center gap-1 cursor-pointer text-sm font-medium [&[data-state=open]>svg]:rotate-90",t),children:[u.jsx(Jn,{className:"size-4 shrink-0 transition-transform duration-200"}),e]}),Qv=({children:e,className:t})=>u.jsx(Sv,{className:t,children:e}),eb=({children:e,className:t,tone:n})=>u.jsx("p",{className:K("text-sm",Pc[n]??"",t),children:e}),tb=({children:e,className:t,level:n})=>{const r=`h${n||"2"}`;return u.jsx(r,{className:K("font-semibold tracking-tight",t),children:e})},nb=({children:e,className:t,direction:n,gap:r})=>{const o=n==="row"?"flex-row":"flex-col",a=Ic(r);return u.jsx("div",{className:K("flex",o,a,t),children:e})},rb=({children:e,className:t,gap:n})=>{const r=Ic(n);return u.jsx("div",{className:K("flex flex-row items-center",r,t),children:e})},ob=({children:e,className:t,href:n,target:r,rel:o})=>u.jsx("a",{href:n,target:r,rel:o,className:t,children:e}),ab=({title:e,children:t,className:n})=>u.jsxs($t,{className:K("overflow-hidden p-0 gap-0 shadow-sm",n),children:[e?u.jsx(Ht,{className:"px-6 py-3",children:u.jsx("h3",{className:"text-xs font-semibold tracking-wider text-muted-foreground",children:String(e)})}):null,u.jsx("div",{className:"flex flex-col gap-0 divide-y divide-border",children:t})]}),sb=({icon:e,label:t,description:n,onClick:r,className:o})=>{const a=e,s="size-5",i=a?_c[a]:null;return u.jsxs("button",{type:"button",className:K("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",o),onClick:r,children:[i&&u.jsx(i,{className:`${s} shrink-0 text-muted-foreground`}),u.jsxs("div",{className:"flex flex-col gap-0 flex-1 min-w-0 items-start",children:[t?u.jsx("p",{className:"font-medium text-sm text-foreground",children:String(t)}):null,n?u.jsx("p",{className:"mt-0.5 text-xs text-muted-foreground",children:String(n)}):null]}),u.jsx(Jn,{className:"mr-1 size-4 shrink-0 text-muted-foreground"})]})},ib=({name:e,size:t,className:n})=>{const o={sm:"size-3",md:"size-5",lg:"size-6"}[t]??"size-4",a=e,s=_c[a],i=a==="sparkles"?"sparkle-icon":"";return s?u.jsx(s,{className:K(o,i,n)}):u.jsx("span",{className:K("inline-block",o,i,n),"data-icon":a})},lb=({value:e,size:t,variant:n,level:r,alt:o,className:a})=>u.jsx(fv,{value:e,size:t,variant:n,errorCorrectionLevel:r,alt:o,className:a}),cb=()=>({"ui-card":Ev,"ui-card-content":Nv,"ui-card-header":Tv,"ui-button":_v,"ui-text":eb,"ui-heading":tb,"ui-badge":Av,"ui-input":Pv,"ui-textarea":Iv,"ui-select":Mv,"ui-select-option":Lv,"ui-checkbox":Ov,"ui-switch":zv,"ui-label":Dv,"ui-radio-group":Bv,"ui-radio-group-item":Fv,"ui-stack":nb,"ui-inline":rb,"ui-separator":$v,"ui-tabs":Hv,"ui-tabs-list":Vv,"ui-tabs-trigger":Uv,"ui-tabs-content":Rv,"ui-scroll-area":jv,"ui-avatar":Wv,"ui-icon":ib,"ui-qr-code":lb,"ui-link":ob,"ui-menu-item":sb,"ui-menu":ab,"ui-skeleton":qv,"ui-tooltip":Gv,"ui-progress":Yv,"ui-alert":Xv,"ui-collapsible":Zv,"ui-collapsible-trigger":Jv,"ui-collapsible-content":Qv}),Mc="/api/ecommerce",Lc=async(e,t)=>{const n=t?`${t.replace(/\/$/,"")}${Mc}`:Mc,r=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),o=await r.json();if(!r.ok)throw new Error(o.error||"API request failed");return o.data},db=({className:e})=>u.jsxs("svg",{width:"100%",height:"100%",viewBox:"0 0 190 190",version:"1.1",className:e,children:[u.jsx("g",{transform:"matrix(1,0,0,1,-160.365,27.97)",children:u.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)"})}),u.jsx("g",{transform:"matrix(1,0,0,1,-160.365,27.97)",children:u.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)"})}),u.jsx("g",{transform:"matrix(1,0,0,1,-160.365,27.97)",children:u.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)"})}),u.jsx("g",{transform:"matrix(1,0,0,1,-160.365,27.97)",children:u.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)"})})]}),Oc="stackable-dev-badge-styles",ub=()=>{if(typeof document>"u"||document.getElementById(Oc))return;const e=document.createElement("style");e.id=Oc,e.textContent=`
|
|
303
308
|
@keyframes stackable-icon-wiggle {
|
|
304
309
|
0% { transform: rotate(0deg); }
|
|
305
310
|
70% { transform: rotate(200deg); }
|
|
306
311
|
85% { transform: rotate(175deg); }
|
|
307
312
|
100% { transform: rotate(180deg); }
|
|
308
313
|
}
|
|
309
|
-
`,document.head.appendChild(e)},cb=e=>{const t=e.some(r=>r.mode==="staging"),n=e.some(r=>r.mode==="dev");return t&&n?"Dev + Staging":t?"Staging Mode":"Dev Mode"},db=e=>e.mode==="staging"?"STAGING":"DEV",ub=({className:e="",extensions:t=[],tokenErrors:n=new Map})=>{const[r,o]=C.useState([]),[a,s]=C.useState(!1),[i,l]=C.useState(!1),[d,f]=C.useState(!1),c=C.useRef(null),p=n.size>0;if(C.useEffect(()=>{lb()},[]),C.useEffect(()=>{if(!p)return;const v=()=>{f(!0),setTimeout(()=>f(!1),600)};v();const m=setInterval(v,4e3);return()=>clearInterval(m)},[p]),C.useEffect(()=>{if(typeof window>"u")return;const v=()=>{const b=Go(window.location.search);o(b)};v();const m=()=>v();return window.addEventListener("popstate",m),()=>window.removeEventListener("popstate",m)},[]),r.length===0)return null;const g=v=>{if(v.stopPropagation(),typeof window>"u")return;const m=new URL(window.location.href);m.searchParams.delete("_stackable_dev"),m.searchParams.delete("_stackable_staging"),window.location.href=m.toString()};return u.jsxs("div",{className:e,style:{position:"fixed",bottom:"16px",left:"50%",transform:i||d?"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&&u.jsx("div",{style:{backgroundColor:"#fff",border:"1px solid #e5e7eb",borderBottom:`1px solid ${p?"#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((v,m)=>{var b;return u.jsxs("div",{style:{padding:"8px 12px",borderBottom:m<r.length-1?"1px solid #f3f4f6":"none"},children:[u.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[u.jsx("span",{style:{fontSize:"10px",fontWeight:700,color:v.mode==="staging"?"#7c3aed":"#b45309",backgroundColor:v.mode==="staging"?"#ede9fe":"#fef3c7",padding:"1px 5px",borderRadius:"3px",letterSpacing:"0.05em",fontFamily:"ui-monospace, SFMono-Regular, monospace"},children:db(v)}),u.jsx("span",{style:{fontSize:"12px",fontWeight:600,color:"#111",fontFamily:"ui-monospace, SFMono-Regular, monospace",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:((b=t.find(w=>w.id===v.extensionId))==null?void 0:b.manifest.name)||v.extensionId})]}),u.jsxs("div",{style:{fontSize:"11px",color:"#6b7280",fontFamily:"ui-monospace, SFMono-Regular, monospace",marginTop:"2px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},title:v.bundleUrl,children:["→ ",v.bundleUrl]}),n.get(v.extensionId)&&u.jsxs("div",{style:{fontSize:"11px",color:"#dc2626",fontFamily:"ui-monospace, SFMono-Regular, monospace",marginTop:"3px"},children:["⚠ ",n.get(v.extensionId)]})]},v.extensionId)})}),u.jsxs("div",{onClick:()=>s(!a),style:{display:"flex",alignItems:"center",gap:"8px",backgroundColor:p?"#dc2626":"#eab308",color:p?"#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:[u.jsx("span",{ref:c,style:{display:"inline-flex",animation:i&&!a||d?"stackable-icon-wiggle 0.55s cubic-bezier(0.36, 0.07, 0.19, 0.97) both":"none"},children:u.jsx(ib,{className:"w-6 h-6"})}),u.jsx("span",{children:cb(r)}),u.jsxs("span",{style:{fontSize:"12px",opacity:.75},children:["(",r.length," extension",r.length>1?"s":"",")"]}),u.jsx("button",{onClick:g,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:v=>{v.currentTarget.style.backgroundColor="rgba(0, 0, 0, 0.25)"},onMouseOut:v=>{v.currentTarget.style.backgroundColor="rgba(0, 0, 0, 0.15)"},children:"Clear"})]})]})},fb=800,Xt=(e,t)=>e?`${e.replace(/\/$/,"")}${t}`:t,pb=async(e,t,n,r,o)=>{const a=new Map,s=new Map;return await Promise.all(e.filter(i=>{var l;return i.manifest.permissions.includes("data:fetch")||(((l=i.manifest.settingsSchema)==null?void 0:l.length)??0)>0}).map(async i=>{const l=o.find(g=>g.extensionId===i.id),d=l==null?void 0:l.token,f=l==null?void 0:l.mode,c=Xt(t,"/proxy-token"),p=await fetch(c,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({appId:n,instanceId:r,extensionId:i.id,...f&&{mode:f},...d&&{devSessionToken:d}})});if(p.ok){const{token:g,encryptionKey:v,settings:m}=await p.json();a.set(i.id,{token:g,encryptionKey:v,settings:m})}else{let g=`Proxy token failed (${p.status})`;f&&!d?g="Session token missing — re-run CLI":f&&(g="Session expired or invalid — re-run CLI"),s.set(i.id,g),console.warn(`[embeddables] Failed to obtain proxy token for extension ${i.id} (${p.status}) — ${g}`)}})),{tokens:a,errors:s}},hb=e=>typeof e=="object"&&e!==null&&e.encrypted===!0&&Array.isArray(e.data),gb=({instanceId:e,queryApiBase:t,apiBase:n,appId:r,children:o,customerId:a,customerEmail:s,customerName:i})=>{const[l,d]=C.useState([]),[f,c]=C.useState([]),[p,g]=C.useState(new Map),[v,m]=C.useState(new Map),[b,w]=C.useState(!1),[y,x]=C.useState({authenticated:!1,user:null}),[k,P]=C.useState(void 0);C.useEffect(()=>{window.stackable||(window.stackable={emit:(L,T={})=>{const[F,...H]=L.split(":"),B=H.join(":");window.dispatchEvent(new CustomEvent(`stackable:${F}`,{detail:{eventName:B,data:T}}))}})},[]);const E=C.useRef(null),N=C.useRef(new Set),S=C.useMemo(()=>l.filter(L=>L.manifest.permissions.includes("extend:identity")).map(L=>L.id),[l]);C.useEffect(()=>{(async()=>{const T=e;try{if(!T){console.warn("[ExtensionSetup] No instanceId provided; loading no extensions"),d([]),w(!0);return}if(!n||!r){console.warn("[ExtensionSetup] apiBase and appId are required to load extensions"),d([]),w(!0);return}const F=await fetch(Xt(n,`/instances/${r}/${T}`));if(!F.ok){console.warn(`[ExtensionSetup] Instance not found or failed to load: ${T}`),d([]),w(!0);return}const H=await F.json(),B=Go(typeof window<"u"?window.location.search:""),V=await zd(H,B),{tokens:U,errors:X}=await pb(V,n,r,T,B);d(V),c(B),g(new Map(U)),m(X)}catch(F){console.error("Failed to load extensions:",F)}finally{w(!0)}})()},[e,r,n]),C.useEffect(()=>{if(!n||!r||l.length===0)return;const T=setInterval(async()=>{const F=[];await Promise.all(l.filter(H=>{var B;return H.manifest.permissions.includes("data:fetch")||(((B=H.manifest.settingsSchema)==null?void 0:B.length)??0)>0}).map(async H=>{const B=f.find(W=>W.extensionId===H.id),V=B==null?void 0:B.token,U=B==null?void 0:B.mode,X=Xt(n,"/proxy-token"),R=await fetch(X,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({appId:r,instanceId:e,extensionId:H.id,...U&&{mode:U},...V&&{devSessionToken:V}})});if(R.ok){const{token:W,encryptionKey:Z,settings:ee}=await R.json();F.push([H.id,{token:W,encryptionKey:Z,settings:ee}])}else console.warn(`[embeddables] Proxy token refresh failed for extension ${H.id} (${R.status}) — using stale token`)})),F.length>0&&g(H=>{const B=new Map(H);for(const[V,U]of F)B.set(V,U);return B})},3300*1e3);return()=>clearInterval(T)},[l,f,n,r,e]),C.useEffect(()=>{if(p.size===0)return;const L=T=>{const F=T.data;if((F==null?void 0:F.type)!=="extension-ready")return;const H=F.extensionId,B=l.find(X=>X.id===H);if(!(B!=null&&B.bundleUrl))return;const V=f.find(X=>X.extensionId===H);if(Md(B.bundleUrl)&&(V==null?void 0:V.mode)!=="staging")return;const U=p.get(H);U&&Me(H,{type:"extension-encryption-key",encryptionKey:U.encryptionKey})};return window.addEventListener("message",L),()=>window.removeEventListener("message",L)},[l,f,p]);const A=C.useCallback((L,T)=>{const F=mt();for(const[H,B]of F){if(!B.manifest.permissions.includes("events:identity"))continue;const V=B.manifest.events??[];!V.includes("identity")&&!V.includes(`identity:${L}`)||Me(H,{type:"extension-event",eventType:"identity",payload:{eventName:L,data:{state:T,timestamp:Xn(new Date().toISOString())}}})}},[]),z=C.useCallback(L=>{const T=mt();for(const[F,H]of T){if(!H.manifest.permissions.includes("events:messaging"))continue;const B=H.manifest.events??[];!B.includes("messaging")&&!B.includes("messaging:postback")&&!B.includes(`messaging:postback:${L.data.actionName}`)||Me(F,{type:"extension-event",eventType:"messaging",payload:L})}},[]),_=C.useCallback(L=>{const T=mt();for(const[F,H]of T){if(!H.manifest.permissions.includes("events:activity"))continue;const B=H.manifest.events??[];!B.includes("activity")&&!B.includes(`activity:${L.eventName}`)||Me(F,{type:"extension-event",eventType:"activity",payload:L})}},[]),M=C.useCallback(async L=>{const T=mt(),F=[];for(const[B,V]of T){if(!V.manifest.permissions.includes("extend:identity"))continue;const U=new Promise(X=>{const R=`enrich_${B}_${Date.now()}`,W=Z=>{const ee=Z.data;(ee==null?void 0:ee.type)!=="extend-identity-response"||ee.id!==R||(window.removeEventListener("message",W),ee.additionalClaims?X(ee.additionalClaims):X({}))};window.addEventListener("message",W),setTimeout(()=>{window.removeEventListener("message",W),X({})},5e3),Me(B,{type:"extend-identity-request",id:R,claims:L})});F.push(U)}if(F.length===0)return{};const H=await Promise.all(F);return Object.assign({},...H)},[]),O=C.useCallback(async L=>{if(!n||!r||!e)return console.warn("[embeddables] signIdentity skipped — missing:",{apiBase:!!n,appId:!!r,instanceId:!!e}),null;const T=Xt(n,`/instances/${r}/${e}/identity`);console.log("[embeddables] Calling identity sign:",{url:T,claims:Object.keys(L)});try{const F=await fetch(T,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(L)});if(!F.ok)return console.warn(`[embeddables] Identity sign failed (${F.status})`),null;const{token:H}=await F.json();return H}catch(F){return console.warn("[embeddables] Identity sign request failed:",F),null}},[n,r,e]),I=C.useCallback(L=>{const T=window.zE;T&&T("messenger","loginUser",async F=>{F(L)})},[]),j=C.useCallback(()=>{const L=window.zE;L&&L("messenger","logoutUser")},[]),D=C.useCallback(L=>{console.log("[embeddables] Running sign lifecycle for user:",L.id);const{email:T,name:F}=L,H={external_id:String(L.id)};(async()=>{const B=await M({...H,email:T,name:F});console.log("[embeddables] Enriched claims:",B);const V=await O({...H,...B,email:T,name:F});console.log("[embeddables] Sign result:",{hasToken:!!V}),V&&I(V)})()},[M,O,I]),$=C.useCallback(L=>{if(S.length>0&&N.current.size<S.length){console.log(`[embeddables] Deferring sign lifecycle — waiting for extend:identity extensions: ${N.current.size}/${S.length} ready`),E.current=L;return}console.log("[embeddables] No extend:identity extensions (or all ready) — signing immediately"),D(L)},[S,D]);C.useEffect(()=>{if(!b){console.log("[embeddables] Identity effect skipped — extensions not loaded yet");return}if(console.log("[embeddables] Identity effect running",{initialized:b,customerId:!!a,extendExtensions:S.length}),a){console.log("[embeddables] Identity from props:",{customerId:a,customerEmail:s,customerName:i});const L={authenticated:!0,user:{id:String(a),email:s,name:i,provider:"shopify"}};x(T=>{var F,H;return T.authenticated&&((F=T.user)==null?void 0:F.id)===((H=L.user)==null?void 0:H.id)?T:(console.log("[embeddables] Identity state changed (props), starting sign lifecycle"),$(L.user),A("login",L),L)})}else{if(a===void 0)return;x(L=>L.authenticated?(console.log("[embeddables] Customer props cleared, logging out"),j(),A("logout",{authenticated:!1,user:null}),{authenticated:!1,user:null}):L)}},[b,a,s,i,S,$,A,j]),C.useEffect(()=>{if(!b||a!==void 0)return;const L=()=>{const F=document.getElementById("stackable-identity");if(F)try{const H=JSON.parse(F.textContent??"{}"),B={authenticated:!0,user:{id:String(H.customerId??""),email:H.customerEmail,name:H.customerName,provider:"shopify"}};x(V=>{var U,X;return V.authenticated&&((U=V.user)==null?void 0:U.id)===((X=B.user)==null?void 0:X.id)?V:(console.log("[embeddables] Identity state changed (DOM), starting sign lifecycle"),$(B.user),A("login",B),B)})}catch{console.warn("[embeddables] Failed to parse #stackable-identity JSON")}else x(H=>H.authenticated?(j(),A("logout",{authenticated:!1,user:null}),{authenticated:!1,user:null}):H)};L();const T=new MutationObserver(L);return T.observe(document.head,{childList:!0,subtree:!0}),T.observe(document.body,{childList:!0,subtree:!0}),()=>T.disconnect()},[b,a,$,A,j]),C.useEffect(()=>{if(!y.authenticated)return;const L=T=>{const F=T.data;if((F==null?void 0:F.type)!=="extension-ready")return;const H=F.extensionId,B=l.find(U=>U.id===H);if(!(B!=null&&B.manifest.permissions.includes("events:identity")))return;const V=B.manifest.events??[];!V.includes("identity")&&!V.includes("identity:login")||Me(H,{type:"extension-event",eventType:"identity",payload:{eventName:"login",data:{state:y,timestamp:Xn(new Date().toISOString())}}})};return window.addEventListener("message",L),()=>window.removeEventListener("message",L)},[y,l]),C.useEffect(()=>{if(S.length===0)return;const L=F=>{const H=F.data;if((H==null?void 0:H.type)!=="extension-ready")return;const B=H.extensionId;if(S.includes(B)&&(N.current.add(B),console.log(`[embeddables] extend:identity extension ready: ${B} (${N.current.size}/${S.length})`),N.current.size>=S.length&&E.current)){console.log("[embeddables] All extend:identity extensions ready, running deferred sign lifecycle");const V=E.current;E.current=null,D(V)}};window.addEventListener("message",L);const T=setTimeout(()=>{if(E.current){console.warn(`[embeddables] extend:identity timeout (5s) — signing with ${N.current.size}/${S.length} extensions ready`);const F=E.current;E.current=null,D(F)}},5e3);return()=>{window.removeEventListener("message",L),clearTimeout(T)}},[S,D]),C.useEffect(()=>{const L=T=>{const{detail:F}=T;F!=null&&F.eventName&&(F.eventName==="postback"?z({eventName:"postback",data:{actionName:F.data.actionName,conversationId:F.data.conversationId??"",timestamp:Xn(new Date().toISOString())}}):F.eventName==="context"&&P(H=>({...H,...F.data})))};return window.addEventListener("stackable:messaging",L),()=>window.removeEventListener("stackable:messaging",L)},[z]),C.useEffect(()=>{const L=T=>{const{detail:F}=T;F!=null&&F.eventName&&_({eventName:F.eventName,data:F.data??{}})};return window.addEventListener("stackable:activity",L),()=>window.removeEventListener("stackable:activity",L)},[_]),C.useEffect(()=>{var F;if(!b)return;const L={customerId:a??"",customerEmail:s??"",customerName:i??"",messaging:k,identity:y},T=mt();for(const[H,B]of T){if(!B.manifest.permissions.includes("context:read"))continue;const V=(F=p.get(H))==null?void 0:F.settings,U=V?{...L,settings:V}:L;Me(H,{type:"context-push",context:U})}},[b,a,s,i,y,k,p]);const q=C.useMemo(()=>({"data.query":async L=>Mc(L,t),"data.fetch":async(L,T)=>{const F=p.get(L);if(!F)return{status:0,ok:!1,data:{error:"data.fetch: proxy token unavailable — ensure the extension has data:fetch permission and allowedDomains configured"}};const H=hb(T)?T:{url:T.url,method:T.method??"GET",headers:T.headers??{},body:T.body??null},B=Xt(n,"/proxy"),V=await fetch(B,{method:"POST",headers:{"Content-Type":"application/json","X-Extension-Id":L,"X-Application-Id":r??"",Authorization:`Bearer ${F.token}`},body:JSON.stringify(H)}),U=await V.json();return{status:U.status??V.status,ok:U.ok??V.ok,data:U.data}},"actions.toast":async(L,T)=>{const F={...T.description&&{description:T.description},...T.duration&&{duration:T.duration},...T.position&&{position:T.position},...T.dismissible!=null&&{dismissible:T.dismissible},...T.closeButton!=null&&{closeButton:T.closeButton}};if(T.fetch){const H=V=>new Promise(U=>setTimeout(U,V)),B=Promise.all([q["data.fetch"](L,T.fetch),H(fb)]).then(([V])=>V);wt.promise(B,{loading:T.loading??T.message,success:T.success??T.message,error:T.error??"Something went wrong",...F});return}switch(T.type){case"success":{wt.success(T.message,F);break}case"error":{wt.error(T.message,F);break}case"warning":{wt.warning(T.message,F);break}case"info":{wt.info(T.message,F);break}default:wt(T.message,F)}},"actions.invoke":async L=>(window.dispatchEvent(new CustomEvent(`stackable:action:${L.action}`,{detail:L})),{success:!0}),"context.read":async L=>{var T;return{customerId:a??"",customerEmail:s??"",customerName:i??"",identity:y,messaging:k,...((T=p.get(L))==null?void 0:T.settings)&&{settings:p.get(L).settings}}}}),[n,r,t,a,s,i,p,y,k]);return b?u.jsxs(u.Fragment,{children:[u.jsx(Qc,{extensions:l,capabilityHandlers:q,components:sb(),children:o}),u.jsx(ub,{extensions:l,tokenErrors:v})]}):null};var mb=(e,t,n,r,o,a,s,i)=>{let l=document.documentElement,d=["light","dark"];function f(g){(Array.isArray(e)?e:[e]).forEach(v=>{let m=v==="class",b=m&&a?o.map(w=>a[w]||w):o;m?(l.classList.remove(...b),l.classList.add(a&&a[g]?a[g]:g)):l.setAttribute(v,g)}),c(g)}function c(g){i&&d.includes(g)&&(l.style.colorScheme=g)}function p(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(r)f(r);else try{let g=localStorage.getItem(t)||n,v=s&&g==="system"?p():g;f(v)}catch{}},vb=h.createContext(void 0),bb={setTheme:e=>{},themes:[]},wb=()=>{var e;return(e=h.useContext(vb))!=null?e:bb};h.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:o,defaultTheme:a,value:s,themes:i,nonce:l,scriptProps:d})=>{let f=JSON.stringify([n,t,a,e,i,s,r,o]).slice(1,-1);return h.createElement("script",{...d,suppressHydrationWarning:!0,nonce:typeof window>"u"?l:"",dangerouslySetInnerHTML:{__html:`(${mb.toString()})(${f})`}})});const yb=({...e})=>{const{theme:t="system"}=wb();return u.jsx(Id,{theme:t,className:"toaster group",icons:{success:u.jsx(Qo,{className:"size-4"}),info:u.jsx(en,{className:"size-4"}),warning:u.jsx(cu,{className:"size-4"}),error:u.jsx(ru,{className:"size-4"}),loading:u.jsx(Qn,{className:"size-4 animate-spin"})},style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)","--border-radius":"var(--radius)"},...e})},xb={dark:"dark",light:"widget-theme-light"},Cb={dark:"dark",light:"light"},kb=({children:e,theme:t="inherit"})=>u.jsxs("div",{"data-id":"widget-body",className:xb[t],style:{position:"relative",transform:"translateZ(0)"},children:[u.jsx("div",{className:"h-[700px] w-[900px] overflow-hidden rounded-md ring ring-zinc-200 dark:ring-zinc-300",children:u.jsx("div",{className:"flex h-full w-full flex-col overflow-hidden rounded-md bg-muted dark:bg-background text-foreground",children:e})}),u.jsx(yb,{position:"bottom-center",theme:Cb[t]??"system",toastOptions:{descriptionClassName:"!text-muted-foreground"}})]}),Sb={airplay:Vd,"message-circle":ta,"message-square":tr,headphones:eu,"help-circle":ea,bot:Wd,sparkles:na,zap:uu},Eb=({className:e})=>u.jsx("svg",{className:K(e,"scale-125"),viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:u.jsx("path",{d:"M10,18 L6,22 L6,18 L10,18 Z M17,6 C19.7614237,6 22,8.23857625 22,11 C22,13.7614237 19.7614237,16 17,16 L7,16 C4.23857625,16 2,13.7614237 2,11 C2,8.23857625 4.23857625,6 7,6 Z",transform:"translate(12, 14) scale(-1, 1) translate(-12, -14)"})}),Nb=({className:e})=>u.jsxs("svg",{className:e,viewBox:"0 0 190 190",fill:"currentColor","aria-hidden":"true",children:[u.jsxs("g",{id:"sl-half-right",children:[u.jsx("g",{transform:"translate(-160.365,27.97)",children:u.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"})}),u.jsx("g",{transform:"translate(-160.365,27.97)",children:u.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",opacity:"0.3"})})]}),u.jsxs("g",{id:"sl-half-left",children:[u.jsx("g",{transform:"translate(-160.365,27.97)",children:u.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"})}),u.jsx("g",{transform:"translate(-160.365,27.97)",children:u.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",opacity:"0.3"})})]})]}),Oc=400,Tb=Oc*.35,_b=({icon:e,isOpen:t,onClick:n})=>{const r=Sb[e]??Eb,[o,a]=C.useState("idle"),s=C.useRef(t);C.useEffect(()=>{if(s.current===t)return;s.current=t,a("interstitial");const l=setTimeout(()=>a("idle"),Tb);return()=>clearTimeout(l)},[t]);const i=()=>o==="interstitial"?u.jsx(Nb,{}):t?u.jsx(Zd,{}):u.jsx(r,{});return u.jsx("div",{className:"fixed bottom-8 right-8 z-50",children:u.jsx(Gl,{size:"icon",className:K("h-12 w-12 rounded-full cursor-pointer transition-transform duration-300",t?"scale-115":"scale-100 hover:scale-105"),onClick:n,children:u.jsx("span",{className:K("flex items-center justify-center transition-transform",t&&"rotate-180"),style:{transitionDuration:`${Oc}ms`},children:i()})})})},Ab=({children:e,icon:t,theme:n})=>{const[r,o]=C.useState(!1),[a,s]=C.useState(!0),[i,l]=C.useState(!1),d=C.useCallback(()=>{o(f=>!f)},[]);return C.useEffect(()=>{r&&!i&&l(!0)},[r,i]),C.useEffect(()=>{const f=()=>o(m=>!m),c=()=>o(!0),p=()=>o(!1),g=()=>s(!0),v=()=>{o(!1),s(!1)};return window.addEventListener("stackable:action:toggle",f),window.addEventListener("stackable:action:open",c),window.addEventListener("stackable:action:close",p),window.addEventListener("stackable:action:show",g),window.addEventListener("stackable:action:hide",v),()=>{window.removeEventListener("stackable:action:open",c),window.removeEventListener("stackable:action:close",p),window.removeEventListener("stackable:action:toggle",f),window.removeEventListener("stackable:action:show",g),window.removeEventListener("stackable:action:hide",v)}},[]),u.jsxs(u.Fragment,{children:[a&&u.jsx(_b,{isOpen:r,icon:t,onClick:d}),i&&u.jsx("div",{"data-id":"widget-container",className:K("overflow-hidden fixed bottom-24 right-8 z-1000 rounded-md shadow-xl transition-all duration-200 ease-out origin-bottom-right",r?"opacity-100 scale-100 translate-y-0 pointer-events-auto":"opacity-0 scale-95 translate-y-2 pointer-events-none"),children:u.jsx(kb,{theme:n,children:e})})]})},Pb=({href:e,children:t})=>u.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}),Ib=(e,t)=>{const[n,r]=C.useState(null),[o,a]=C.useState(!1),[s,i]=C.useState(null);return C.useEffect(()=>{if(!e){r(null);return}(async()=>{a(!0),i(null);try{const d=await Mc({action:"getCustomer",customerId:e},t);r(d)}catch(d){i(d)}finally{a(!1)}})()},[e,t]),{customer:n,loading:o,error:s}},Mb=({customerId:e,customerEmail:t,queryApiBase:n,children:r})=>{var l,d;const{customer:o,loading:a,error:s}=Ib(e,n);if(a)return u.jsx($t,{className:"border-none shadow-none bg-transparent",children:u.jsx(Ht,{className:"flex items-center justify-center p-6",children:u.jsx(Qn,{className:"h-6 w-6 animate-spin text-muted-foreground"})})});if(s||!o){const f=t?t.split("@")[0]:e?`Customer ${e.slice(-4)}`:"Customer",c=f.split(/[\s._-]+/).map(p=>p[0]).join("").slice(0,2).toUpperCase();return u.jsx($t,{className:"border-none px-0 py-0 mb-4 shadow-none bg-transparent",children:u.jsxs(Ht,{className:"p-4 pb-0 pt-2",children:[u.jsxs("div",{className:"flex flex-col items-center",children:[u.jsxs(oo,{className:"h-16 w-16 mb-2 ring-2 ring-background shadow-sm",children:[u.jsx(ao,{src:`https://ui-avatars.com/api/?name=${encodeURIComponent(f)}&background=7c3aed&color=fff&size=128`,alt:f}),u.jsx(so,{className:"text-lg",children:c})]}),u.jsxs("div",{className:"text-center w-full space-y-1",children:[u.jsxs("div",{children:[u.jsx("p",{className:"text-xs text-foreground/70 font-medium tracking-wide",children:"Welcome,"}),u.jsx("h2",{className:"text-lg font-bold text-foreground leading-tight",children:f})]}),t&&u.jsx("div",{className:"pt-2 flex flex-col items-center gap-1",children:u.jsxs("div",{className:"flex items-center justify-center gap-1.5 text-xs font-semibold text-foreground/75",children:[u.jsx(er,{className:"h-3 w-3","aria-hidden":"true"}),u.jsx("span",{className:"truncate max-w-[200px]",children:t})]})}),u.jsx("div",{className:"py-1 rounded-lg flex justify-center gap-1",children:r})]})]}),u.jsx("p",{className:"pt-2 text-center text-xs text-muted-foreground",children:"Using fallback profile (customer API returned no data)"})]})})}const i=`${((l=o.first_name)==null?void 0:l[0])||""}${((d=o.last_name)==null?void 0:d[0])||""}`;return u.jsx($t,{className:"border-none px-0 py-0 mb-4 shadow-none bg-transparent",children:u.jsx(Ht,{className:"p-4 pb-0 pt-2",children:u.jsxs("div",{className:"flex flex-col items-center",children:[u.jsxs(oo,{className:"h-16 w-16 mb-2 ring-2 ring-background shadow-sm",children:[u.jsx(ao,{src:`https://ui-avatars.com/api/?name=${encodeURIComponent(o.name)}&background=7c3aed&color=fff&size=128`,alt:o.name}),u.jsx(so,{className:"text-lg",children:i})]}),u.jsxs("div",{className:"text-center w-full space-y-1",children:[u.jsxs("div",{children:[u.jsx("p",{className:"text-xs text-foreground/70 font-medium tracking-wide",children:"Welcome,"}),u.jsx("h2",{className:"text-lg font-bold text-foreground leading-tight",children:o.name})]}),u.jsx("div",{className:"pt-2 flex flex-col items-center gap-1",children:u.jsxs("div",{className:"flex items-center justify-center gap-1.5 text-xs font-semibold text-foreground/75",children:[u.jsx(er,{className:"h-3 w-3","aria-hidden":"true"}),u.jsx("span",{className:"truncate max-w-[200px]",children:o.email})]})}),u.jsx("div",{className:"py-1 rounded-lg flex justify-center gap-1",children:r})]})]})})})},zc=(e,t)=>{C.useEffect(()=>{const n=t.current;if(!n)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 o=new MutationObserver(()=>{for(;r.firstChild;)n.appendChild(document.adoptNode(r.firstChild))});return o.observe(r,{childList:!0,subtree:!0}),()=>{o.disconnect(),r==null||r.remove()}},[e,t])},Lb=({customization:e})=>{const t=C.useRef(null);return zc("widget_conversations",t),C.useEffect(()=>{!window.zE||!t.current||e&&window.zE("messenger:set","customization",{conversationList:e})},[e]),u.jsx("div",{ref:t,className:"h-full overflow-hidden"})},Ob=({customization:e})=>{const t=C.useRef(null);return zc("widget_messages",t),C.useEffect(()=>{!window.zE||!t.current||e&&window.zE("messenger:set","customization",{messageLog:e})},[e]),u.jsx("div",{ref:t,className:"h-full overflow-hidden"})},Lt="stackable:action",Mo=e=>{window.dispatchEvent(new CustomEvent("stackable:messaging",{detail:{eventName:"context",data:e}}))},Lo=25,Oo=75,zb=({header:e,buttons:t,queryApiBase:n,customerId:r="",customerEmail:o="",primaryPercent:a=50})=>{const s=Math.max(Lo,Math.min(Oo,a)),{extensions:i}=Uo(),l=C.useMemo(()=>i.some(_=>_.enabled&&(_.manifest.targets.includes("slot.header")||_.manifest.targets.includes("slot.content"))),[i]),[d,f]=C.useState(!1),[c,p]=C.useState(!1),[g,v]=C.useState("extensions"),[m,b]=C.useState(s),[w,y]=C.useState("loading"),x=C.useRef(null),k=C.useCallback(()=>!window.zE||!document.getElementById("widget_conversations")||!document.getElementById("widget_messages")?!1:(window.zE("messenger","render",{mode:"embedded",messageLog:{targetElement:"#widget_messages"},conversationList:{targetElement:"#widget_conversations"}}),window.zE("messenger:set","customization",{common:{hideHeader:!1},messageLog:{hideHeader:!0},conversationList:{hideHeader:!0,hideNewConversationButton:!0}}),!0),[]);C.useEffect(()=>{var j,D;const _=document.querySelector('script[src*="zdassets.com/ekr/snippet"]'),M=(D=(j=_==null?void 0:_.src)==null?void 0:j.match(/key=([a-f0-9-]+)/))==null?void 0:D[1];if(M&&fetch(`https://ekr.zdassets.com/compose/${M}`).then($=>$.text()).then($=>{var L;const q=(L=$.match(/appId['"]?\s*:\s*['"]([a-f0-9]+)['"]/))==null?void 0:L[1];q&&Mo({appId:q})}).catch(()=>{}),k()){y("ready");return}const O=setInterval(()=>{k()&&(y("ready"),clearInterval(O))},100),I=setTimeout(()=>{clearInterval(O),y($=>$==="ready"?$:(console.warn("Zendesk widget failed to load after 10 seconds"),"error"))},1e4);return()=>{clearInterval(O),clearTimeout(I)}},[k]);const P=C.useCallback(_=>{!window.zE||!_.length||(console.log("[ZendeskMessenger] setConversationTags",_,{zE:!!window.zE}),window.zE("messenger:set","conversationTags",_))},[]),E=C.useCallback(_=>{!window.zE||!_.length||(console.log("[ZendeskMessenger] setConversationFields",_,{zE:!!window.zE}),window.zE("messenger:set","conversationFields",_))},[]),N=C.useCallback(_=>{if(!window.zE)return;const{tags:M=[],fields:O=[],...I}=_??{};P(M),E(O),window.zE("messenger:ui","newConversation",Object.keys(I).length?I:void 0)},[P,E]),S=C.useCallback(_=>{const{detail:M}=_;M!=null&&M.payload&&N(M.payload)},[N]);C.useEffect(()=>(window.addEventListener(`${Lt}:${bt.NEW_CONVERSATION}`,S),()=>{window.removeEventListener(`${Lt}:${bt.NEW_CONVERSATION}`,S)}),[S]),C.useEffect(()=>{const _=O=>{const{detail:I}=O;I!=null&&I.payload&&P(I.payload)},M=O=>{const{detail:I}=O;I!=null&&I.payload&&E(I.payload)};return window.addEventListener(`${Lt}:${bt.SET_CONVERSATION_TAGS}`,_),window.addEventListener(`${Lt}:${bt.SET_CONVERSATION_FIELDS}`,M),()=>{window.removeEventListener(`${Lt}:${bt.SET_CONVERSATION_TAGS}`,_),window.removeEventListener(`${Lt}:${bt.SET_CONVERSATION_FIELDS}`,M)}},[P,E]),C.useEffect(()=>{if(w!=="ready"||!window.zE)return;const _=window.zE("messenger:on","conversationStarted",I=>{var D,$;const j=($=(D=I==null?void 0:I.payload)==null?void 0:D.conversation)==null?void 0:$.id;j&&Mo({conversationId:j})}),M=window.zE("messenger:on","messagesShown",I=>{var D,$;const j=($=(D=I==null?void 0:I.payload)==null?void 0:D.conversation)==null?void 0:$.id;j&&Mo({conversationId:j})}),O=window.zE("messenger:on","postbackButtonClicked",I=>{var D;const j=I==null?void 0:I.payload;j!=null&&j.actionName&&window.dispatchEvent(new CustomEvent("stackable:messaging",{detail:{eventName:"postback",data:{actionName:j.actionName,conversationId:((D=j.conversation)==null?void 0:D.id)??""}}}))});return()=>{typeof _=="function"&&_(),typeof M=="function"&&M(),typeof O=="function"&&O()}},[w]),C.useEffect(()=>{if(!d)return;const _=O=>{if(!x.current)return;const I=x.current.getBoundingClientRect();if((c?I.width:I.height)===0)return;const D=c?(O.clientX-I.left)/I.width*100:(O.clientY-I.top)/I.height*100,$=Math.max(Lo,Math.min(Oo,D));b($)},M=()=>{f(!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",_),window.addEventListener("mouseup",M),window.addEventListener("blur",M),()=>{window.removeEventListener("mousemove",_),window.removeEventListener("mouseup",M),window.removeEventListener("blur",M),document.body.style.cursor="",document.body.style.userSelect=""}},[d,c]),C.useEffect(()=>{if(!x.current)return;const _=x.current,M=()=>{const I=getComputedStyle(_).flexDirection==="row";p(I)};M();const O=new ResizeObserver(M);return O.observe(_),()=>{O.disconnect()}},[]);const A=C.useCallback(_=>{if(_.detail===2){b(s);return}_.preventDefault(),f(!0)},[s]),z={customerId:r,customerEmail:o};return u.jsxs("div",{"data-component":"zendesk-wrapper",className:"flex-1 flex flex-col z-10 overflow-hidden",style:{containerType:"inline-size"},children:[u.jsx("style",{children:'@container (min-width: 42rem) { [data-component="zendesk-wrapper"] > [data-id="panel-layout"] { flex-direction: row; } }'}),u.jsxs("div",{ref:x,"data-id":"panel-layout",className:"relative flex-1 overflow-hidden flex flex-col",children:[l&&u.jsxs("div",{"data-id":"primary-panel",className:"min-h-0 min-w-0 flex-none overflow-hidden flex flex-col",style:{flexBasis:`${m}%`},children:[u.jsxs("div",{className:"flex items-center justify-between px-4 py-3",children:[u.jsx("h2",{className:"font-semibold text-sm text-foreground",children:g==="extensions"?"My Profile":"My Conversations"}),u.jsxs("div",{className:"flex items-center gap-1",children:[e&&u.jsx("div",{className:"flex gap-1",children:e}),u.jsxs("div",{className:"flex rounded-lg bg-muted p-1",children:[w==="ready"&&u.jsx("button",{onClick:()=>N({}),className:"rounded-md border border-transparent p-1.5 text-muted-foreground transition-colors hover:cursor-pointer hover:text-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-ring/40",title:"New Conversation",children:u.jsx(su,{className:"h-4 w-4"})}),t,u.jsx("button",{onClick:()=>v("conversations"),className:K("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",g==="conversations"?"border-border bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),title:"Conversations",children:u.jsx(tr,{className:"h-4 w-4"})}),u.jsx("button",{onClick:()=>v("extensions"),className:K("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",g==="extensions"?"border-border bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),title:"My Profile",children:u.jsx(ra,{className:"h-4 w-4"})})]})]})]}),u.jsxs("div",{className:"flex-1 overflow-y-auto p-4 relative",children:[u.jsxs("div",{className:K("flex flex-col gap-2",g==="conversations"&&"hidden"),children:[u.jsx(Mb,{customerId:r,customerEmail:o,queryApiBase:n,children:u.jsx(Jt,{target:"slot.header",context:z,className:"flex-none"})}),u.jsx(Jt,{target:"slot.content",context:z,className:"flex flex-col gap-2"})]}),u.jsx("div",{className:K("h-full rounded-xl border border-zinc-200 bg-white p-2 shadow-sm dark:border-zinc-300",g==="extensions"&&"hidden"),children:w==="error"?u.jsx("div",{className:"flex h-full items-center justify-center p-6 text-center text-sm text-muted-foreground",children:u.jsx("p",{children:"Error loading conversations."})}):u.jsx(Lb,{})})]})]}),u.jsxs("div",{"data-id":"secondary-panel",className:"min-h-0 min-w-0 flex-none flex flex-col bg-white",style:{flexBasis:l?`${100-m}%`:"100%"},children:[u.jsx("div",{className:"flex-1 overflow-hidden",children:w==="error"?u.jsx("div",{className:"flex h-full items-center justify-center p-6 text-center text-sm text-muted-foreground",children:u.jsx("p",{children:"Zendesk Messenger could not be loaded. Check that a valid Snippet Key is configured."})}):u.jsx(Ob,{})}),u.jsxs("div",{className:"flex flex-wrap items-center justify-end gap-1 py-1 mr-4 text-xs text-zinc-500",children:[u.jsx(Jt,{target:"slot.footer",context:z,className:"flex items-center gap-1",fallback:u.jsxs(u.Fragment,{children:[u.jsx("div",{children:"powered by"}),u.jsx(Pb,{href:"https://zendesk.com",children:"Zendesk"})]})}),u.jsx(Jt,{target:"slot.footer-links",context:z,className:"flex items-center gap-1",separator:u.jsx("span",{className:"text-zinc-300",children:"/"}),render:({children:_,index:M})=>u.jsxs(u.Fragment,{children:[M===0&&u.jsx("span",{className:"text-zinc-300",children:"+"}),_]})})]})]}),l&&u.jsxs(u.Fragment,{children:[u.jsx("div",{className:K("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:`${m}%`}:{top:`${m}%`},onMouseDown:A,role:"separator","aria-label":"Resize panels","aria-orientation":c?"vertical":"horizontal","aria-valuemin":Lo,"aria-valuemax":Oo,"aria-valuenow":Math.round(m),children:u.jsx("div",{className:K("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",d?"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")})}),d&&u.jsx("div",{className:K("absolute inset-0 z-40",c?"cursor-col-resize":"cursor-row-resize"),onMouseUp:()=>f(!1)})]})]})]})},Db="ze-snippet",Dc=e=>`https://static.zdassets.com/ekr/snippet.js?key=${encodeURIComponent(e)}`,Bb=(e,t={})=>{if(typeof window>"u"||typeof document>"u"||!e)return Promise.resolve();const{autorender:n=!1,scriptId:r=Db}=t;window.zEMessenger={autorender:n};const o=document.getElementById(r);if(o){if(o.getAttribute("src")===Dc(e))return Promise.resolve();o.remove()}return new Promise((a,s)=>{const i=document.createElement("script");i.id=r,i.src=Dc(e),i.async=!0,i.onload=()=>a(),i.onerror=()=>s(new Error("Failed to load Zendesk snippet")),document.head.appendChild(i)})},Fb=({queryApiBase:e,apiBase:t,appId:n,theme:r,icon:o,instanceId:a,customerId:s,customerEmail:i,customerName:l,snippetKey:d})=>{const f=r==="dark"||r==="light"?r:"inherit";return C.useEffect(()=>{d&&Bb(d).catch(c=>{console.error("[StackableWidget] Failed to load Zendesk snippet:",c)})},[d]),u.jsx(gb,{instanceId:a,queryApiBase:e,apiBase:t,appId:n,customerId:s,customerEmail:i,customerName:l,children:u.jsx(Ab,{theme:f,icon:o,children:u.jsx(zb,{queryApiBase:e,customerId:s,customerEmail:i,primaryPercent:40})})})};class $b extends HTMLElement{constructor(){super();Bo(this,"mountNode");Bo(this,"root");const n=this.attachShadow({mode:"open"}),r=document.createElement("style");r.textContent=Wc,n.appendChild(r),this.mountNode=document.createElement("div"),n.appendChild(this.mountNode)}static get observedAttributes(){return["query-api-base","api-base","app-id","instance-id","theme","icon","customer-id","customer-email","customer-name","snippet-key"]}connectedCallback(){this.root=be.createRoot(this.mountNode),this.renderWidget()}disconnectedCallback(){var n;(n=this.root)==null||n.unmount(),this.root=void 0}attributeChangedCallback(){this.renderWidget()}renderWidget(){if(!this.root)return;const n=this.getAttribute("theme")??"";this.mountNode.classList.toggle("dark",n==="dark"),this.root.render(u.jsx(Fb,{theme:n,icon:this.getAttribute("icon")??void 0,queryApiBase:this.getAttribute("query-api-base")??"",apiBase:this.getAttribute("api-base")??void 0,appId:this.getAttribute("app-id")??"",instanceId:this.getAttribute("instance-id")??"",customerId:this.getAttribute("customer-id")??void 0,customerEmail:this.getAttribute("customer-email")??void 0,customerName:this.getAttribute("customer-name")??void 0,snippetKey:this.getAttribute("snippet-key")??""}))}}customElements.get("stackable-widget")||customElements.define("stackable-widget",$b)}));
|
|
314
|
+
`,document.head.appendChild(e)},fb=e=>{const t=e.some(r=>r.mode==="staging"),n=e.some(r=>r.mode==="dev");return t&&n?"Dev + Staging":t?"Staging Mode":"Dev Mode"},pb=e=>e.mode==="staging"?"STAGING":"DEV",hb=({className:e="",extensions:t=[],tokenErrors:n=new Map})=>{const[r,o]=C.useState([]),[a,s]=C.useState(!1),[i,l]=C.useState(!1),[d,f]=C.useState(!1),c=C.useRef(null),h=n.size>0;if(C.useEffect(()=>{ub()},[]),C.useEffect(()=>{if(!h)return;const v=()=>{f(!0),setTimeout(()=>f(!1),600)};v();const m=setInterval(v,4e3);return()=>clearInterval(m)},[h]),C.useEffect(()=>{if(typeof window>"u")return;const v=()=>{const b=Go(window.location.search);o(b)};v();const m=()=>v();return window.addEventListener("popstate",m),()=>window.removeEventListener("popstate",m)},[]),r.length===0)return null;const g=v=>{if(v.stopPropagation(),typeof window>"u")return;const m=new URL(window.location.href);m.searchParams.delete("_stackable_dev"),m.searchParams.delete("_stackable_staging"),window.location.href=m.toString()};return u.jsxs("div",{className:e,style:{position:"fixed",bottom:"16px",left:"50%",transform:i||d?"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&&u.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((v,m)=>{var b;return u.jsxs("div",{style:{padding:"8px 12px",borderBottom:m<r.length-1?"1px solid #f3f4f6":"none"},children:[u.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[u.jsx("span",{style:{fontSize:"10px",fontWeight:700,color:v.mode==="staging"?"#7c3aed":"#b45309",backgroundColor:v.mode==="staging"?"#ede9fe":"#fef3c7",padding:"1px 5px",borderRadius:"3px",letterSpacing:"0.05em",fontFamily:"ui-monospace, SFMono-Regular, monospace"},children:pb(v)}),u.jsx("span",{style:{fontSize:"12px",fontWeight:600,color:"#111",fontFamily:"ui-monospace, SFMono-Regular, monospace",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:((b=t.find(w=>w.id===v.extensionId))==null?void 0:b.manifest.name)||v.extensionId})]}),u.jsxs("div",{style:{fontSize:"11px",color:"#6b7280",fontFamily:"ui-monospace, SFMono-Regular, monospace",marginTop:"2px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},title:v.bundleUrl,children:["→ ",v.bundleUrl]}),n.get(v.extensionId)&&u.jsxs("div",{style:{fontSize:"11px",color:"#dc2626",fontFamily:"ui-monospace, SFMono-Regular, monospace",marginTop:"3px"},children:["⚠ ",n.get(v.extensionId)]})]},v.extensionId)})}),u.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:[u.jsx("span",{ref:c,style:{display:"inline-flex",animation:i&&!a||d?"stackable-icon-wiggle 0.55s cubic-bezier(0.36, 0.07, 0.19, 0.97) both":"none"},children:u.jsx(db,{className:"w-6 h-6"})}),u.jsx("span",{children:fb(r)}),u.jsxs("span",{style:{fontSize:"12px",opacity:.75},children:["(",r.length," extension",r.length>1?"s":"",")"]}),u.jsx("button",{onClick:g,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:v=>{v.currentTarget.style.backgroundColor="rgba(0, 0, 0, 0.25)"},onMouseOut:v=>{v.currentTarget.style.backgroundColor="rgba(0, 0, 0, 0.15)"},children:"Clear"})]})]})},gb=800,Xt=(e,t)=>e?`${e.replace(/\/$/,"")}${t}`:t,mb=async(e,t,n,r,o)=>{const a=new Map,s=new Map;return await Promise.all(e.filter(i=>{var l;return i.manifest.permissions.includes("data:fetch")||(((l=i.manifest.settingsSchema)==null?void 0:l.length)??0)>0}).map(async i=>{const l=o.find(g=>g.extensionId===i.id),d=l==null?void 0:l.token,f=l==null?void 0:l.mode,c=Xt(t,"/proxy-token"),h=await fetch(c,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({appId:n,instanceId:r,extensionId:i.id,...f&&{mode:f},...d&&{devSessionToken:d}})});if(h.ok){const{token:g,encryptionKey:v,settings:m}=await h.json();a.set(i.id,{token:g,encryptionKey:v,settings:m})}else{let g=`Proxy token failed (${h.status})`;f&&!d?g="Session token missing — re-run CLI":f&&(g="Session expired or invalid — re-run CLI"),s.set(i.id,g),console.warn(`[embeddables] Failed to obtain proxy token for extension ${i.id} (${h.status}) — ${g}`)}})),{tokens:a,errors:s}},vb=e=>typeof e=="object"&&e!==null&&e.encrypted===!0&&Array.isArray(e.data),bb=({instanceId:e,queryApiBase:t,apiBase:n,appId:r,children:o,customerId:a,customerEmail:s,customerName:i})=>{const[l,d]=C.useState([]),[f,c]=C.useState([]),[h,g]=C.useState(new Map),[v,m]=C.useState(new Map),[b,w]=C.useState(!1),[y,x]=C.useState({authenticated:!1,user:null}),[k,P]=C.useState(void 0);C.useEffect(()=>{window.stackable||(window.stackable={emit:(L,T={})=>{const[F,...H]=L.split(":"),B=H.join(":");window.dispatchEvent(new CustomEvent(`stackable:${F}`,{detail:{eventName:B,data:T}}))}})},[]);const E=C.useRef(null),N=C.useRef(new Set),S=C.useMemo(()=>l.filter(L=>L.manifest.permissions.includes("extend:identity")).map(L=>L.id),[l]);C.useEffect(()=>{(async()=>{const T=e;try{if(!T){console.warn("[ExtensionSetup] No instanceId provided; loading no extensions"),d([]),w(!0);return}if(!n||!r){console.warn("[ExtensionSetup] apiBase and appId are required to load extensions"),d([]),w(!0);return}const F=await fetch(Xt(n,`/instances/${r}/${T}`));if(!F.ok){console.warn(`[ExtensionSetup] Instance not found or failed to load: ${T}`),d([]),w(!0);return}const H=await F.json(),B=Go(typeof window<"u"?window.location.search:""),V=await Dd(H,B),{tokens:U,errors:X}=await mb(V,n,r,T,B);d(V),c(B),g(new Map(U)),m(X)}catch(F){console.error("Failed to load extensions:",F)}finally{w(!0)}})()},[e,r,n]),C.useEffect(()=>{if(!n||!r||l.length===0)return;const T=setInterval(async()=>{const F=[];await Promise.all(l.filter(H=>{var B;return H.manifest.permissions.includes("data:fetch")||(((B=H.manifest.settingsSchema)==null?void 0:B.length)??0)>0}).map(async H=>{const B=f.find(j=>j.extensionId===H.id),V=B==null?void 0:B.token,U=B==null?void 0:B.mode,X=Xt(n,"/proxy-token"),R=await fetch(X,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({appId:r,instanceId:e,extensionId:H.id,...U&&{mode:U},...V&&{devSessionToken:V}})});if(R.ok){const{token:j,encryptionKey:Z,settings:ee}=await R.json();F.push([H.id,{token:j,encryptionKey:Z,settings:ee}])}else console.warn(`[embeddables] Proxy token refresh failed for extension ${H.id} (${R.status}) — using stale token`)})),F.length>0&&g(H=>{const B=new Map(H);for(const[V,U]of F)B.set(V,U);return B})},3300*1e3);return()=>clearInterval(T)},[l,f,n,r,e]),C.useEffect(()=>{if(h.size===0)return;const L=T=>{const F=T.data;if((F==null?void 0:F.type)!=="extension-ready")return;const H=F.extensionId,B=l.find(X=>X.id===H);if(!(B!=null&&B.bundleUrl))return;const V=f.find(X=>X.extensionId===H);if(Ld(B.bundleUrl)&&(V==null?void 0:V.mode)!=="staging")return;const U=h.get(H);U&&Me(H,{type:"extension-encryption-key",encryptionKey:U.encryptionKey})};return window.addEventListener("message",L),()=>window.removeEventListener("message",L)},[l,f,h]);const A=C.useCallback((L,T)=>{const F=bt();for(const[H,B]of F){if(!B.manifest.permissions.includes("events:identity"))continue;const V=B.manifest.events??[];!V.includes("identity")&&!V.includes(`identity:${L}`)||Me(H,{type:"extension-event",eventType:"identity",payload:{eventName:L,data:{state:T,timestamp:Xn(new Date().toISOString())}}})}},[]),z=C.useCallback(L=>{const T=bt();for(const[F,H]of T){if(!H.manifest.permissions.includes("events:messaging"))continue;const B=H.manifest.events??[];!B.includes("messaging")&&!B.includes("messaging:postback")&&!B.includes(`messaging:postback:${L.data.actionName}`)||Me(F,{type:"extension-event",eventType:"messaging",payload:L})}},[]),_=C.useCallback(L=>{const T=bt();for(const[F,H]of T){if(!H.manifest.permissions.includes("events:activity"))continue;const B=H.manifest.events??[];!B.includes("activity")&&!B.includes(`activity:${L.eventName}`)||Me(F,{type:"extension-event",eventType:"activity",payload:L})}},[]),M=C.useCallback(async L=>{const T=bt(),F=[];for(const[B,V]of T){if(!V.manifest.permissions.includes("extend:identity"))continue;const U=new Promise(X=>{const R=`enrich_${B}_${Date.now()}`,j=Z=>{const ee=Z.data;(ee==null?void 0:ee.type)!=="extend-identity-response"||ee.id!==R||(window.removeEventListener("message",j),ee.additionalClaims?X(ee.additionalClaims):X({}))};window.addEventListener("message",j),setTimeout(()=>{window.removeEventListener("message",j),X({})},5e3),Me(B,{type:"extend-identity-request",id:R,claims:L})});F.push(U)}if(F.length===0)return{};const H=await Promise.all(F);return Object.assign({},...H)},[]),O=C.useCallback(async L=>{if(!n||!r||!e)return console.warn("[embeddables] signIdentity skipped — missing:",{apiBase:!!n,appId:!!r,instanceId:!!e}),null;const T=Xt(n,`/instances/${r}/${e}/identity`);console.log("[embeddables] Calling identity sign:",{url:T,claims:Object.keys(L)});try{const F=await fetch(T,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(L)});if(!F.ok)return console.warn(`[embeddables] Identity sign failed (${F.status})`),null;const{token:H}=await F.json();return H}catch(F){return console.warn("[embeddables] Identity sign request failed:",F),null}},[n,r,e]),I=C.useCallback(L=>{const T=window.zE;T&&T("messenger","loginUser",async F=>{F(L)})},[]),W=C.useCallback(()=>{const L=window.zE;L&&L("messenger","logoutUser")},[]),D=C.useCallback(L=>{console.log("[embeddables] Running sign lifecycle for user:",L.id);const{email:T,name:F}=L,H={external_id:String(L.id)};(async()=>{const B=await M({...H,email:T,name:F});console.log("[embeddables] Enriched claims:",B);const V=await O({...H,...B,email:T,name:F});console.log("[embeddables] Sign result:",{hasToken:!!V}),V&&I(V)})()},[M,O,I]),$=C.useCallback(L=>{if(S.length>0&&N.current.size<S.length){console.log(`[embeddables] Deferring sign lifecycle — waiting for extend:identity extensions: ${N.current.size}/${S.length} ready`),E.current=L;return}console.log("[embeddables] No extend:identity extensions (or all ready) — signing immediately"),D(L)},[S,D]);C.useEffect(()=>{if(!b){console.log("[embeddables] Identity effect skipped — extensions not loaded yet");return}if(console.log("[embeddables] Identity effect running",{initialized:b,customerId:!!a,extendExtensions:S.length}),a){console.log("[embeddables] Identity from props:",{customerId:a,customerEmail:s,customerName:i});const L={authenticated:!0,user:{id:String(a),email:s,name:i,provider:"shopify"}};x(T=>{var F,H;return T.authenticated&&((F=T.user)==null?void 0:F.id)===((H=L.user)==null?void 0:H.id)?T:(console.log("[embeddables] Identity state changed (props), starting sign lifecycle"),$(L.user),A("login",L),L)})}else{if(a===void 0)return;x(L=>L.authenticated?(console.log("[embeddables] Customer props cleared, logging out"),W(),A("logout",{authenticated:!1,user:null}),{authenticated:!1,user:null}):L)}},[b,a,s,i,S,$,A,W]),C.useEffect(()=>{if(!b||a!==void 0)return;const L=()=>{const F=document.getElementById("stackable-identity");if(F)try{const H=JSON.parse(F.textContent??"{}"),B={authenticated:!0,user:{id:String(H.customerId??""),email:H.customerEmail,name:H.customerName,provider:"shopify"}};x(V=>{var U,X;return V.authenticated&&((U=V.user)==null?void 0:U.id)===((X=B.user)==null?void 0:X.id)?V:(console.log("[embeddables] Identity state changed (DOM), starting sign lifecycle"),$(B.user),A("login",B),B)})}catch{console.warn("[embeddables] Failed to parse #stackable-identity JSON")}else x(H=>H.authenticated?(W(),A("logout",{authenticated:!1,user:null}),{authenticated:!1,user:null}):H)};L();const T=new MutationObserver(L);return T.observe(document.head,{childList:!0,subtree:!0}),T.observe(document.body,{childList:!0,subtree:!0}),()=>T.disconnect()},[b,a,$,A,W]),C.useEffect(()=>{if(!y.authenticated)return;const L=T=>{const F=T.data;if((F==null?void 0:F.type)!=="extension-ready")return;const H=F.extensionId,B=l.find(U=>U.id===H);if(!(B!=null&&B.manifest.permissions.includes("events:identity")))return;const V=B.manifest.events??[];!V.includes("identity")&&!V.includes("identity:login")||Me(H,{type:"extension-event",eventType:"identity",payload:{eventName:"login",data:{state:y,timestamp:Xn(new Date().toISOString())}}})};return window.addEventListener("message",L),()=>window.removeEventListener("message",L)},[y,l]),C.useEffect(()=>{if(S.length===0)return;const L=F=>{const H=F.data;if((H==null?void 0:H.type)!=="extension-ready")return;const B=H.extensionId;if(S.includes(B)&&(N.current.add(B),console.log(`[embeddables] extend:identity extension ready: ${B} (${N.current.size}/${S.length})`),N.current.size>=S.length&&E.current)){console.log("[embeddables] All extend:identity extensions ready, running deferred sign lifecycle");const V=E.current;E.current=null,D(V)}};window.addEventListener("message",L);const T=setTimeout(()=>{if(E.current){console.warn(`[embeddables] extend:identity timeout (5s) — signing with ${N.current.size}/${S.length} extensions ready`);const F=E.current;E.current=null,D(F)}},5e3);return()=>{window.removeEventListener("message",L),clearTimeout(T)}},[S,D]),C.useEffect(()=>{const L=T=>{const{detail:F}=T;F!=null&&F.eventName&&(F.eventName==="postback"?z({eventName:"postback",data:{actionName:F.data.actionName,conversationId:F.data.conversationId??"",timestamp:Xn(new Date().toISOString())}}):F.eventName==="context"&&P(H=>({...H,...F.data})))};return window.addEventListener("stackable:messaging",L),()=>window.removeEventListener("stackable:messaging",L)},[z]),C.useEffect(()=>{const L=T=>{const{detail:F}=T;F!=null&&F.eventName&&_({eventName:F.eventName,data:F.data??{}})};return window.addEventListener("stackable:activity",L),()=>window.removeEventListener("stackable:activity",L)},[_]),C.useEffect(()=>{var F;if(!b)return;const L={customerId:a??"",customerEmail:s??"",customerName:i??"",messaging:k,identity:y},T=bt();for(const[H,B]of T){if(!B.manifest.permissions.includes("context:read"))continue;const V=(F=h.get(H))==null?void 0:F.settings,U=V?{...L,settings:V}:L;Me(H,{type:"context-push",context:U})}},[b,a,s,i,y,k,h]);const q=C.useMemo(()=>({"data.query":async L=>Lc(L,t),"data.fetch":async(L,T)=>{const F=h.get(L);if(!F)return{status:0,ok:!1,data:{error:"data.fetch: proxy token unavailable — ensure the extension has data:fetch permission and allowedDomains configured"}};const H=vb(T)?T:{url:T.url,method:T.method??"GET",headers:T.headers??{},body:T.body??null},B=Xt(n,"/proxy"),V=await fetch(B,{method:"POST",headers:{"Content-Type":"application/json","X-Extension-Id":L,"X-Application-Id":r??"",Authorization:`Bearer ${F.token}`},body:JSON.stringify(H)}),U=await V.json();return{status:U.status??V.status,ok:U.ok??V.ok,data:U.data}},"actions.toast":async(L,T)=>{const F={...T.description&&{description:T.description},...T.duration&&{duration:T.duration},...T.position&&{position:T.position},...T.dismissible!=null&&{dismissible:T.dismissible},...T.closeButton!=null&&{closeButton:T.closeButton}};if(T.fetch){const H=V=>new Promise(U=>setTimeout(U,V)),B=Promise.all([q["data.fetch"](L,T.fetch),H(gb)]).then(([V])=>V);yt.promise(B,{loading:T.loading??T.message,success:T.success??T.message,error:T.error??"Something went wrong",...F});return}switch(T.type){case"success":{yt.success(T.message,F);break}case"error":{yt.error(T.message,F);break}case"warning":{yt.warning(T.message,F);break}case"info":{yt.info(T.message,F);break}default:yt(T.message,F)}},"actions.invoke":async L=>(window.dispatchEvent(new CustomEvent(`stackable:action:${L.action}`,{detail:L})),{success:!0}),"context.read":async L=>{var T;return{customerId:a??"",customerEmail:s??"",customerName:i??"",identity:y,messaging:k,...((T=h.get(L))==null?void 0:T.settings)&&{settings:h.get(L).settings}}}}),[n,r,t,a,s,i,h,y,k]);return b?u.jsxs(u.Fragment,{children:[u.jsx(ed,{extensions:l,capabilityHandlers:q,components:cb(),children:o}),u.jsx(hb,{extensions:l,tokenErrors:v})]}):null};var wb=(e,t,n,r,o,a,s,i)=>{let l=document.documentElement,d=["light","dark"];function f(g){(Array.isArray(e)?e:[e]).forEach(v=>{let m=v==="class",b=m&&a?o.map(w=>a[w]||w):o;m?(l.classList.remove(...b),l.classList.add(a&&a[g]?a[g]:g)):l.setAttribute(v,g)}),c(g)}function c(g){i&&d.includes(g)&&(l.style.colorScheme=g)}function h(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(r)f(r);else try{let g=localStorage.getItem(t)||n,v=s&&g==="system"?h():g;f(v)}catch{}},yb=p.createContext(void 0),xb={setTheme:e=>{},themes:[]},Cb=()=>{var e;return(e=p.useContext(yb))!=null?e:xb};p.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:o,defaultTheme:a,value:s,themes:i,nonce:l,scriptProps:d})=>{let f=JSON.stringify([n,t,a,e,i,s,r,o]).slice(1,-1);return p.createElement("script",{...d,suppressHydrationWarning:!0,nonce:typeof window>"u"?l:"",dangerouslySetInnerHTML:{__html:`(${wb.toString()})(${f})`}})});const kb=({...e})=>{const{theme:t="system"}=Cb();return u.jsx(Md,{theme:t,className:"toaster group",icons:{success:u.jsx(Qo,{className:"size-4"}),info:u.jsx(en,{className:"size-4"}),warning:u.jsx(du,{className:"size-4"}),error:u.jsx(ru,{className:"size-4"}),loading:u.jsx(Qn,{className:"size-4 animate-spin"})},style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)","--border-radius":"var(--radius)"},...e})},Sb={dark:"dark",light:"widget-theme-light"},Eb={dark:"dark",light:"light"},Nb=({children:e,theme:t="inherit"})=>u.jsxs("div",{"data-id":"widget-body",className:Sb[t],style:{position:"relative",transform:"translateZ(0)"},children:[u.jsx("div",{className:"h-[700px] w-[900px] overflow-hidden rounded-md ring ring-zinc-200 dark:ring-zinc-300",children:u.jsx("div",{className:"flex h-full w-full flex-col overflow-hidden rounded-md bg-muted dark:bg-background text-foreground",children:e})}),u.jsx(kb,{position:"bottom-center",theme:Eb[t]??"system",toastOptions:{descriptionClassName:"!text-muted-foreground"}})]}),Tb={airplay:Ud,"message-circle":na,"message-square":tr,headphones:tu,"help-circle":ea,bot:Wd,sparkles:ra,zap:fu},_b=({className:e})=>u.jsx("svg",{className:K(e,"scale-125"),viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:u.jsx("path",{d:"M10,18 L6,22 L6,18 L10,18 Z M17,6 C19.7614237,6 22,8.23857625 22,11 C22,13.7614237 19.7614237,16 17,16 L7,16 C4.23857625,16 2,13.7614237 2,11 C2,8.23857625 4.23857625,6 7,6 Z",transform:"translate(12, 14) scale(-1, 1) translate(-12, -14)"})}),Ab=({className:e})=>u.jsxs("svg",{className:e,viewBox:"0 0 190 190",fill:"currentColor","aria-hidden":"true",children:[u.jsxs("g",{id:"sl-half-right",children:[u.jsx("g",{transform:"translate(-160.365,27.97)",children:u.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"})}),u.jsx("g",{transform:"translate(-160.365,27.97)",children:u.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",opacity:"0.3"})})]}),u.jsxs("g",{id:"sl-half-left",children:[u.jsx("g",{transform:"translate(-160.365,27.97)",children:u.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"})}),u.jsx("g",{transform:"translate(-160.365,27.97)",children:u.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",opacity:"0.3"})})]})]}),zc=400,Pb=zc*.35,Ib=({icon:e,isOpen:t,onClick:n})=>{const r=Tb[e]??_b,[o,a]=C.useState("idle"),s=C.useRef(t);C.useEffect(()=>{if(s.current===t)return;s.current=t,a("interstitial");const l=setTimeout(()=>a("idle"),Pb);return()=>clearTimeout(l)},[t]);const i=()=>o==="interstitial"?u.jsx(Ab,{}):t?u.jsx(Jd,{}):u.jsx(r,{});return u.jsx("div",{className:"fixed bottom-8 right-8 z-50",children:u.jsx(Yl,{size:"icon",className:K("h-12 w-12 rounded-full cursor-pointer transition-transform duration-300",t?"scale-115":"scale-100 hover:scale-105"),onClick:n,children:u.jsx("span",{className:K("flex items-center justify-center transition-transform",t&&"rotate-180"),style:{transitionDuration:`${zc}ms`},children:i()})})})},Mb=({children:e,icon:t,theme:n})=>{const[r,o]=C.useState(!1),[a,s]=C.useState(!0),[i,l]=C.useState(!1),d=C.useCallback(()=>{o(f=>!f)},[]);return C.useEffect(()=>{r&&!i&&l(!0)},[r,i]),C.useEffect(()=>{const f=()=>o(m=>!m),c=()=>o(!0),h=()=>o(!1),g=()=>s(!0),v=()=>{o(!1),s(!1)};return window.addEventListener("stackable:action:toggle",f),window.addEventListener("stackable:action:open",c),window.addEventListener("stackable:action:close",h),window.addEventListener("stackable:action:show",g),window.addEventListener("stackable:action:hide",v),()=>{window.removeEventListener("stackable:action:open",c),window.removeEventListener("stackable:action:close",h),window.removeEventListener("stackable:action:toggle",f),window.removeEventListener("stackable:action:show",g),window.removeEventListener("stackable:action:hide",v)}},[]),u.jsxs(u.Fragment,{children:[a&&u.jsx(Ib,{isOpen:r,icon:t,onClick:d}),i&&u.jsx("div",{"data-id":"widget-container",className:K("overflow-hidden fixed bottom-24 right-8 z-1000 rounded-md shadow-xl transition-all duration-200 ease-out origin-bottom-right",r?"opacity-100 scale-100 translate-y-0 pointer-events-auto":"opacity-0 scale-95 translate-y-2 pointer-events-none"),children:u.jsx(Nb,{theme:n,children:e})})]})},Lb=({href:e,children:t})=>u.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}),Ob=(e,t)=>{const[n,r]=C.useState(null),[o,a]=C.useState(!1),[s,i]=C.useState(null);return C.useEffect(()=>{if(!e){r(null);return}(async()=>{a(!0),i(null);try{const d=await Lc({action:"getCustomer",customerId:e},t);r(d)}catch(d){i(d)}finally{a(!1)}})()},[e,t]),{customer:n,loading:o,error:s}},zb=({customerId:e,customerEmail:t,queryApiBase:n,children:r})=>{var l,d;const{customer:o,loading:a,error:s}=Ob(e,n);if(a)return u.jsx($t,{className:"border-none shadow-none bg-transparent",children:u.jsx(Ht,{className:"flex items-center justify-center p-6",children:u.jsx(Qn,{className:"h-6 w-6 animate-spin text-muted-foreground"})})});if(s||!o){const f=t?t.split("@")[0]:e?`Customer ${e.slice(-4)}`:"Customer",c=f.split(/[\s._-]+/).map(h=>h[0]).join("").slice(0,2).toUpperCase();return u.jsx($t,{className:"border-none px-0 py-0 mb-4 shadow-none bg-transparent",children:u.jsxs(Ht,{className:"p-4 pb-0 pt-2",children:[u.jsxs("div",{className:"flex flex-col items-center",children:[u.jsxs(oo,{className:"h-16 w-16 mb-2 ring-2 ring-background shadow-sm",children:[u.jsx(ao,{src:`https://ui-avatars.com/api/?name=${encodeURIComponent(f)}&background=7c3aed&color=fff&size=128`,alt:f}),u.jsx(so,{className:"text-lg",children:c})]}),u.jsxs("div",{className:"text-center w-full space-y-1",children:[u.jsxs("div",{children:[u.jsx("p",{className:"text-xs text-foreground/70 font-medium tracking-wide",children:"Welcome,"}),u.jsx("h2",{className:"text-lg font-bold text-foreground leading-tight",children:f})]}),t&&u.jsx("div",{className:"pt-2 flex flex-col items-center gap-1",children:u.jsxs("div",{className:"flex items-center justify-center gap-1.5 text-xs font-semibold text-foreground/75",children:[u.jsx(er,{className:"h-3 w-3","aria-hidden":"true"}),u.jsx("span",{className:"truncate max-w-[200px]",children:t})]})}),u.jsx("div",{className:"py-1 rounded-lg flex justify-center gap-1",children:r})]})]}),u.jsx("p",{className:"pt-2 text-center text-xs text-muted-foreground",children:"Using fallback profile (customer API returned no data)"})]})})}const i=`${((l=o.first_name)==null?void 0:l[0])||""}${((d=o.last_name)==null?void 0:d[0])||""}`;return u.jsx($t,{className:"border-none px-0 py-0 mb-4 shadow-none bg-transparent",children:u.jsx(Ht,{className:"p-4 pb-0 pt-2",children:u.jsxs("div",{className:"flex flex-col items-center",children:[u.jsxs(oo,{className:"h-16 w-16 mb-2 ring-2 ring-background shadow-sm",children:[u.jsx(ao,{src:`https://ui-avatars.com/api/?name=${encodeURIComponent(o.name)}&background=7c3aed&color=fff&size=128`,alt:o.name}),u.jsx(so,{className:"text-lg",children:i})]}),u.jsxs("div",{className:"text-center w-full space-y-1",children:[u.jsxs("div",{children:[u.jsx("p",{className:"text-xs text-foreground/70 font-medium tracking-wide",children:"Welcome,"}),u.jsx("h2",{className:"text-lg font-bold text-foreground leading-tight",children:o.name})]}),u.jsx("div",{className:"pt-2 flex flex-col items-center gap-1",children:u.jsxs("div",{className:"flex items-center justify-center gap-1.5 text-xs font-semibold text-foreground/75",children:[u.jsx(er,{className:"h-3 w-3","aria-hidden":"true"}),u.jsx("span",{className:"truncate max-w-[200px]",children:o.email})]})}),u.jsx("div",{className:"py-1 rounded-lg flex justify-center gap-1",children:r})]})]})})})},Dc=(e,t)=>{C.useEffect(()=>{const n=t.current;if(!n)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 o=new MutationObserver(()=>{for(;r.firstChild;)n.appendChild(document.adoptNode(r.firstChild))});return o.observe(r,{childList:!0,subtree:!0}),()=>{o.disconnect(),r==null||r.remove()}},[e,t])},Db=({customization:e})=>{const t=C.useRef(null);return Dc("widget_conversations",t),C.useEffect(()=>{!window.zE||!t.current||e&&window.zE("messenger:set","customization",{conversationList:e})},[e]),u.jsx("div",{ref:t,className:"h-full overflow-hidden"})},Bb=({customization:e})=>{const t=C.useRef(null);return Dc("widget_messages",t),C.useEffect(()=>{!window.zE||!t.current||e&&window.zE("messenger:set","customization",{messageLog:e})},[e]),u.jsx("div",{ref:t,className:"h-full overflow-hidden"})},Ot="stackable:action",Mo=e=>{window.dispatchEvent(new CustomEvent("stackable:messaging",{detail:{eventName:"context",data:e}}))},Lo=25,Oo=75,Fb=({header:e,buttons:t,queryApiBase:n,customerId:r="",customerEmail:o="",primaryPercent:a=50})=>{const s=Math.max(Lo,Math.min(Oo,a)),{extensions:i}=Uo(),l=C.useMemo(()=>i.some(_=>_.enabled&&(_.manifest.targets.includes("slot.header")||_.manifest.targets.includes("slot.content"))),[i]),[d,f]=C.useState(!1),[c,h]=C.useState(!1),[g,v]=C.useState("extensions"),[m,b]=C.useState(s),[w,y]=C.useState("loading"),x=C.useRef(null),k=C.useCallback(()=>!window.zE||!document.getElementById("widget_conversations")||!document.getElementById("widget_messages")?!1:(window.zE("messenger","render",{mode:"embedded",messageLog:{targetElement:"#widget_messages"},conversationList:{targetElement:"#widget_conversations"}}),window.zE("messenger:set","customization",{common:{hideHeader:!1},messageLog:{hideHeader:!0},conversationList:{hideHeader:!0,hideNewConversationButton:!0}}),!0),[]);C.useEffect(()=>{var W,D;const _=document.querySelector('script[src*="zdassets.com/ekr/snippet"]'),M=(D=(W=_==null?void 0:_.src)==null?void 0:W.match(/key=([a-f0-9-]+)/))==null?void 0:D[1];if(M&&fetch(`https://ekr.zdassets.com/compose/${M}`).then($=>$.text()).then($=>{var L;const q=(L=$.match(/appId['"]?\s*:\s*['"]([a-f0-9]+)['"]/))==null?void 0:L[1];q&&Mo({appId:q})}).catch(()=>{}),k()){y("ready");return}const O=setInterval(()=>{k()&&(y("ready"),clearInterval(O))},100),I=setTimeout(()=>{clearInterval(O),y($=>$==="ready"?$:(console.warn("Zendesk widget failed to load after 10 seconds"),"error"))},1e4);return()=>{clearInterval(O),clearTimeout(I)}},[k]);const P=C.useCallback(_=>{!window.zE||!_.length||(console.log("[ZendeskMessenger] setConversationTags",_,{zE:!!window.zE}),window.zE("messenger:set","conversationTags",_))},[]),E=C.useCallback(_=>{!window.zE||!_.length||(console.log("[ZendeskMessenger] setConversationFields",_,{zE:!!window.zE}),window.zE("messenger:set","conversationFields",_))},[]),N=C.useCallback(_=>{if(!window.zE)return;const{tags:M=[],fields:O=[],...I}=_??{};P(M),E(O),window.zE("messenger:ui","newConversation",Object.keys(I).length?I:void 0)},[P,E]),S=C.useCallback(_=>{const{detail:M}=_;M!=null&&M.payload&&N(M.payload)},[N]);C.useEffect(()=>(window.addEventListener(`${Ot}:${wt.NEW_CONVERSATION}`,S),()=>{window.removeEventListener(`${Ot}:${wt.NEW_CONVERSATION}`,S)}),[S]),C.useEffect(()=>{const _=O=>{const{detail:I}=O;I!=null&&I.payload&&P(I.payload)},M=O=>{const{detail:I}=O;I!=null&&I.payload&&E(I.payload)};return window.addEventListener(`${Ot}:${wt.SET_CONVERSATION_TAGS}`,_),window.addEventListener(`${Ot}:${wt.SET_CONVERSATION_FIELDS}`,M),()=>{window.removeEventListener(`${Ot}:${wt.SET_CONVERSATION_TAGS}`,_),window.removeEventListener(`${Ot}:${wt.SET_CONVERSATION_FIELDS}`,M)}},[P,E]),C.useEffect(()=>{if(w!=="ready"||!window.zE)return;const _=window.zE("messenger:on","conversationStarted",I=>{var D,$;const W=($=(D=I==null?void 0:I.payload)==null?void 0:D.conversation)==null?void 0:$.id;W&&Mo({conversationId:W})}),M=window.zE("messenger:on","messagesShown",I=>{var D,$;const W=($=(D=I==null?void 0:I.payload)==null?void 0:D.conversation)==null?void 0:$.id;W&&Mo({conversationId:W})}),O=window.zE("messenger:on","postbackButtonClicked",I=>{var D;const W=I==null?void 0:I.payload;W!=null&&W.actionName&&window.dispatchEvent(new CustomEvent("stackable:messaging",{detail:{eventName:"postback",data:{actionName:W.actionName,conversationId:((D=W.conversation)==null?void 0:D.id)??""}}}))});return()=>{typeof _=="function"&&_(),typeof M=="function"&&M(),typeof O=="function"&&O()}},[w]),C.useEffect(()=>{if(!d)return;const _=O=>{if(!x.current)return;const I=x.current.getBoundingClientRect();if((c?I.width:I.height)===0)return;const D=c?(O.clientX-I.left)/I.width*100:(O.clientY-I.top)/I.height*100,$=Math.max(Lo,Math.min(Oo,D));b($)},M=()=>{f(!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",_),window.addEventListener("mouseup",M),window.addEventListener("blur",M),()=>{window.removeEventListener("mousemove",_),window.removeEventListener("mouseup",M),window.removeEventListener("blur",M),document.body.style.cursor="",document.body.style.userSelect=""}},[d,c]),C.useEffect(()=>{if(!x.current)return;const _=x.current,M=()=>{const I=getComputedStyle(_).flexDirection==="row";h(I)};M();const O=new ResizeObserver(M);return O.observe(_),()=>{O.disconnect()}},[]);const A=C.useCallback(_=>{if(_.detail===2){b(s);return}_.preventDefault(),f(!0)},[s]),z={customerId:r,customerEmail:o};return u.jsxs("div",{"data-component":"zendesk-wrapper",className:"flex-1 flex flex-col z-10 overflow-hidden",style:{containerType:"inline-size"},children:[u.jsx("style",{children:'@container (min-width: 42rem) { [data-component="zendesk-wrapper"] > [data-id="panel-layout"] { flex-direction: row; } }'}),u.jsxs("div",{ref:x,"data-id":"panel-layout",className:"relative flex-1 overflow-hidden flex flex-col",children:[l&&u.jsxs("div",{"data-id":"primary-panel",className:"min-h-0 min-w-0 flex-none overflow-hidden flex flex-col",style:{flexBasis:`${m}%`},children:[u.jsxs("div",{className:"flex items-center justify-between px-4 py-3",children:[u.jsx("h2",{className:"font-semibold text-sm text-foreground",children:g==="extensions"?"My Profile":"My Conversations"}),u.jsxs("div",{className:"flex items-center gap-1",children:[e&&u.jsx("div",{className:"flex gap-1",children:e}),u.jsxs("div",{className:"flex rounded-lg bg-muted p-1",children:[w==="ready"&&u.jsx("button",{onClick:()=>N({}),className:"rounded-md border border-transparent p-1.5 text-muted-foreground transition-colors hover:cursor-pointer hover:text-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-ring/40",title:"New Conversation",children:u.jsx(su,{className:"h-4 w-4"})}),t,u.jsx("button",{onClick:()=>v("conversations"),className:K("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",g==="conversations"?"border-border bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),title:"Conversations",children:u.jsx(tr,{className:"h-4 w-4"})}),u.jsx("button",{onClick:()=>v("extensions"),className:K("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",g==="extensions"?"border-border bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),title:"My Profile",children:u.jsx(oa,{className:"h-4 w-4"})})]})]})]}),u.jsxs("div",{className:"flex-1 overflow-y-auto p-4 relative",children:[u.jsxs("div",{className:K("flex flex-col gap-2",g==="conversations"&&"hidden"),children:[u.jsx(zb,{customerId:r,customerEmail:o,queryApiBase:n,children:u.jsx(Jt,{target:"slot.header",context:z,className:"flex-none"})}),u.jsx(Jt,{target:"slot.content",context:z,className:"flex flex-col gap-2"})]}),u.jsx("div",{className:K("h-full rounded-xl border border-zinc-200 bg-white p-2 shadow-sm dark:border-zinc-300",g==="extensions"&&"hidden"),children:w==="error"?u.jsx("div",{className:"flex h-full items-center justify-center p-6 text-center text-sm text-muted-foreground",children:u.jsx("p",{children:"Error loading conversations."})}):u.jsx(Db,{})})]})]}),u.jsxs("div",{"data-id":"secondary-panel",className:"min-h-0 min-w-0 flex-none flex flex-col bg-white",style:{flexBasis:l?`${100-m}%`:"100%"},children:[u.jsx("div",{className:"flex-1 overflow-hidden",children:w==="error"?u.jsx("div",{className:"flex h-full items-center justify-center p-6 text-center text-sm text-muted-foreground",children:u.jsx("p",{children:"Zendesk Messenger could not be loaded. Check that a valid Snippet Key is configured."})}):u.jsx(Bb,{})}),u.jsxs("div",{className:"flex flex-wrap items-center justify-end gap-1 py-1 mr-4 text-xs text-zinc-500",children:[u.jsx(Jt,{target:"slot.footer",context:z,className:"flex items-center gap-1",fallback:u.jsxs(u.Fragment,{children:[u.jsx("div",{children:"powered by"}),u.jsx(Lb,{href:"https://zendesk.com",children:"Zendesk"})]})}),u.jsx(Jt,{target:"slot.footer-links",context:z,className:"flex items-center gap-1",separator:u.jsx("span",{className:"text-zinc-300",children:"/"}),render:({children:_,index:M})=>u.jsxs(u.Fragment,{children:[M===0&&u.jsx("span",{className:"text-zinc-300",children:"+"}),_]})})]})]}),l&&u.jsxs(u.Fragment,{children:[u.jsx("div",{className:K("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:`${m}%`}:{top:`${m}%`},onMouseDown:A,role:"separator","aria-label":"Resize panels","aria-orientation":c?"vertical":"horizontal","aria-valuemin":Lo,"aria-valuemax":Oo,"aria-valuenow":Math.round(m),children:u.jsx("div",{className:K("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",d?"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")})}),d&&u.jsx("div",{className:K("absolute inset-0 z-40",c?"cursor-col-resize":"cursor-row-resize"),onMouseUp:()=>f(!1)})]})]})]})},$b="ze-snippet",Bc=e=>`https://static.zdassets.com/ekr/snippet.js?key=${encodeURIComponent(e)}`,Hb=(e,t={})=>{if(typeof window>"u"||typeof document>"u"||!e)return Promise.resolve();const{autorender:n=!1,scriptId:r=$b}=t;window.zEMessenger={autorender:n};const o=document.getElementById(r);if(o){if(o.getAttribute("src")===Bc(e))return Promise.resolve();o.remove()}return new Promise((a,s)=>{const i=document.createElement("script");i.id=r,i.src=Bc(e),i.async=!0,i.onload=()=>a(),i.onerror=()=>s(new Error("Failed to load Zendesk snippet")),document.head.appendChild(i)})},Vb=({queryApiBase:e,apiBase:t,appId:n,theme:r,icon:o,instanceId:a,customerId:s,customerEmail:i,customerName:l,snippetKey:d})=>{const f=r==="dark"||r==="light"?r:"inherit";return C.useEffect(()=>{d&&Hb(d).catch(c=>{console.error("[StackableWidget] Failed to load Zendesk snippet:",c)})},[d]),u.jsx(bb,{instanceId:a,queryApiBase:e,apiBase:t,appId:n,customerId:s,customerEmail:i,customerName:l,children:u.jsx(Mb,{theme:f,icon:o,children:u.jsx(Fb,{queryApiBase:e,customerId:s,customerEmail:i,primaryPercent:40})})})};class Ub extends HTMLElement{constructor(){super();Bo(this,"mountNode");Bo(this,"root");const n=this.attachShadow({mode:"open"}),r=document.createElement("style");r.textContent=Wc,n.appendChild(r),this.mountNode=document.createElement("div"),n.appendChild(this.mountNode)}static get observedAttributes(){return["query-api-base","api-base","app-id","instance-id","theme","icon","customer-id","customer-email","customer-name","snippet-key"]}connectedCallback(){this.root=be.createRoot(this.mountNode),this.renderWidget()}disconnectedCallback(){var n;(n=this.root)==null||n.unmount(),this.root=void 0}attributeChangedCallback(){this.renderWidget()}renderWidget(){if(!this.root)return;const n=this.getAttribute("theme")??"";this.mountNode.classList.toggle("dark",n==="dark"),this.root.render(u.jsx(Vb,{theme:n,icon:this.getAttribute("icon")??void 0,queryApiBase:this.getAttribute("query-api-base")??"",apiBase:this.getAttribute("api-base")??void 0,appId:this.getAttribute("app-id")??"",instanceId:this.getAttribute("instance-id")??"",customerId:this.getAttribute("customer-id")??void 0,customerEmail:this.getAttribute("customer-email")??void 0,customerName:this.getAttribute("customer-name")??void 0,snippetKey:this.getAttribute("snippet-key")??""}))}}customElements.get("stackable-widget")||customElements.define("stackable-widget",Ub)}));
|