@voxket-ai/voxket-live 1.0.120 → 1.0.121

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/index.cjs CHANGED
@@ -8,7 +8,7 @@
8
8
  const style = document.createElement('style');
9
9
  style.type = 'text/css';
10
10
  style.setAttribute('data-voxket-widget-styles', 'true');
11
- style.textContent = "/*! tailwindcss v4.1.11 | 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)))){*,.voxket-widget-root :before,.voxket-widget-root :after,.voxket-widget-root ::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-contain-size:initial;--tw-contain-layout:initial;--tw-contain-paint:initial;--tw-contain-style:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}.voxket-widget-root .pointer-events-auto{pointer-events:auto}.voxket-widget-root .pointer-events-none{pointer-events:none}.voxket-widget-root .visible{visibility:visible}.voxket-widget-root .absolute{position:absolute}.voxket-widget-root .fixed{position:fixed}.voxket-widget-root .relative{position:relative}.voxket-widget-root .static{position:static}.voxket-widget-root .sticky{position:sticky}.voxket-widget-root .inset-0{inset:calc(var(--spacing)*0)}.voxket-widget-root .inset-4{inset:calc(var(--spacing)*4)}.voxket-widget-root .-top-2{top:calc(var(--spacing)*-2)}.voxket-widget-root .top-0{top:calc(var(--spacing)*0)}.voxket-widget-root .top-1{top:calc(var(--spacing)*1)}.voxket-widget-root .top-2{top:calc(var(--spacing)*2)}.voxket-widget-root .top-4{top:calc(var(--spacing)*4)}.voxket-widget-root .-right-2{right:calc(var(--spacing)*-2)}.voxket-widget-root .right-0{right:calc(var(--spacing)*0)}.voxket-widget-root .right-2{right:calc(var(--spacing)*2)}.voxket-widget-root .right-4{right:calc(var(--spacing)*4)}.voxket-widget-root .right-6{right:calc(var(--spacing)*6)}.voxket-widget-root .-bottom-2{bottom:calc(var(--spacing)*-2)}.voxket-widget-root .bottom-0{bottom:calc(var(--spacing)*0)}.voxket-widget-root .bottom-2{bottom:calc(var(--spacing)*2)}.voxket-widget-root .bottom-4{bottom:calc(var(--spacing)*4)}.voxket-widget-root .bottom-20{bottom:calc(var(--spacing)*20)}.voxket-widget-root .-left-2{left:calc(var(--spacing)*-2)}.voxket-widget-root .left-0{left:calc(var(--spacing)*0)}.voxket-widget-root .left-2{left:calc(var(--spacing)*2)}.voxket-widget-root .left-4{left:calc(var(--spacing)*4)}.voxket-widget-root .z-10{z-index:10}.voxket-widget-root .z-20{z-index:20}.voxket-widget-root .z-50{z-index:50}.voxket-widget-root .z-\\[9999\\]{z-index:9999}.voxket-widget-root .z-\\[10000\\]{z-index:10000}.voxket-widget-root .order-1{order:1}.voxket-widget-root .order-2{order:2}.voxket-widget-root .col-span-2{grid-column:span 2/span 2}.voxket-widget-root .col-start-1{grid-column-start:1}.voxket-widget-root .col-start-2{grid-column-start:2}.voxket-widget-root .row-span-3{grid-row:span 3/span 3}.voxket-widget-root .row-start-1{grid-row-start:1}.voxket-widget-root .row-start-3{grid-row-start:3}.voxket-widget-root .container{width:100%}@media (min-width:40rem){.voxket-widget-root .container{max-width:40rem}}@media (min-width:48rem){.voxket-widget-root .container{max-width:48rem}}@media (min-width:64rem){.voxket-widget-root .container{max-width:64rem}}@media (min-width:80rem){.voxket-widget-root .container{max-width:80rem}}@media (min-width:96rem){.voxket-widget-root .container{max-width:96rem}}.voxket-widget-root .m-4{margin:calc(var(--spacing)*4)}.voxket-widget-root .-mx-1{margin-inline:calc(var(--spacing)*-1)}.voxket-widget-root .mx-0{margin-inline:calc(var(--spacing)*0)}.voxket-widget-root .mx-0\\.5{margin-inline:calc(var(--spacing)*.5)}.voxket-widget-root .mx-3{margin-inline:calc(var(--spacing)*3)}.voxket-widget-root .mx-4{margin-inline:calc(var(--spacing)*4)}.voxket-widget-root .mx-8{margin-inline:calc(var(--spacing)*8)}.voxket-widget-root .mx-auto{margin-inline:auto}.voxket-widget-root .my-1{margin-block:calc(var(--spacing)*1)}.voxket-widget-root .mt-0\\.5{margin-top:calc(var(--spacing)*.5)}.voxket-widget-root .mt-1{margin-top:calc(var(--spacing)*1)}.voxket-widget-root .mt-2{margin-top:calc(var(--spacing)*2)}.voxket-widget-root .mt-4{margin-top:calc(var(--spacing)*4)}.voxket-widget-root .mt-6{margin-top:calc(var(--spacing)*6)}.voxket-widget-root .mt-8{margin-top:calc(var(--spacing)*8)}.voxket-widget-root .mr-1{margin-right:calc(var(--spacing)*1)}.voxket-widget-root .mr-2{margin-right:calc(var(--spacing)*2)}.voxket-widget-root .mr-3{margin-right:calc(var(--spacing)*3)}.voxket-widget-root .mb-1{margin-bottom:calc(var(--spacing)*1)}.voxket-widget-root .mb-2{margin-bottom:calc(var(--spacing)*2)}.voxket-widget-root .mb-3{margin-bottom:calc(var(--spacing)*3)}.voxket-widget-root .mb-4{margin-bottom:calc(var(--spacing)*4)}.voxket-widget-root .mb-6{margin-bottom:calc(var(--spacing)*6)}.voxket-widget-root .mb-8{margin-bottom:calc(var(--spacing)*8)}.voxket-widget-root .ml-1{margin-left:calc(var(--spacing)*1)}.voxket-widget-root .ml-2{margin-left:calc(var(--spacing)*2)}.voxket-widget-root .ml-auto{margin-left:auto}.voxket-widget-root .line-clamp-1{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.voxket-widget-root .block{display:block}.voxket-widget-root .flex{display:flex}.voxket-widget-root .grid{display:grid}.voxket-widget-root .hidden{display:none}.voxket-widget-root .inline{display:inline}.voxket-widget-root .inline-block{display:inline-block}.voxket-widget-root .inline-flex{display:inline-flex}.voxket-widget-root .aspect-square{aspect-ratio:1}.voxket-widget-root .aspect-video{aspect-ratio:var(--aspect-video)}.voxket-widget-root .size-3\\.5{width:calc(var(--spacing)*3.5);height:calc(var(--spacing)*3.5)}.voxket-widget-root .size-4{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.voxket-widget-root .size-9{width:calc(var(--spacing)*9);height:calc(var(--spacing)*9)}.voxket-widget-root .h-0{height:calc(var(--spacing)*0)}.voxket-widget-root .h-1{height:calc(var(--spacing)*1)}.voxket-widget-root .h-1\\.5{height:calc(var(--spacing)*1.5)}.voxket-widget-root .h-2{height:calc(var(--spacing)*2)}.voxket-widget-root .h-3{height:calc(var(--spacing)*3)}.voxket-widget-root .h-4{height:calc(var(--spacing)*4)}.voxket-widget-root .h-5{height:calc(var(--spacing)*5)}.voxket-widget-root .h-6{height:calc(var(--spacing)*6)}.voxket-widget-root .h-8{height:calc(var(--spacing)*8)}.voxket-widget-root .h-9{height:calc(var(--spacing)*9)}.voxket-widget-root .h-10{height:calc(var(--spacing)*10)}.voxket-widget-root .h-12{height:calc(var(--spacing)*12)}.voxket-widget-root .h-16{height:calc(var(--spacing)*16)}.voxket-widget-root .h-20{height:calc(var(--spacing)*20)}.voxket-widget-root .h-24{height:calc(var(--spacing)*24)}.voxket-widget-root .h-28{height:calc(var(--spacing)*28)}.voxket-widget-root .h-32{height:calc(var(--spacing)*32)}.voxket-widget-root .h-96{height:calc(var(--spacing)*96)}.voxket-widget-root .h-\\[25rem\\]{height:25rem}.voxket-widget-root .h-\\[30rem\\]{height:30rem}.voxket-widget-root .h-\\[56px\\]{height:56px}.voxket-widget-root .h-\\[60px\\]{height:60px}.voxket-widget-root .h-\\[70px\\]{height:70px}.voxket-widget-root .h-\\[90px\\]{height:90px}.voxket-widget-root .h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.voxket-widget-root .h-auto{height:auto}.voxket-widget-root .h-fit{height:-moz-fit-content;height:fit-content}.voxket-widget-root .h-full{height:100%}.voxket-widget-root .h-px{height:1px}.voxket-widget-root .h-screen{height:100vh}.voxket-widget-root .max-h-\\(--radix-select-content-available-height\\){max-height:var(--radix-select-content-available-height)}.voxket-widget-root .max-h-20{max-height:calc(var(--spacing)*20)}.voxket-widget-root .max-h-48{max-height:calc(var(--spacing)*48)}.voxket-widget-root .max-h-\\[80vh\\]{max-height:80vh}.voxket-widget-root .max-h-\\[85vh\\]{max-height:85vh}.voxket-widget-root .max-h-\\[95vh\\]{max-height:95vh}.voxket-widget-root .max-h-full{max-height:100%}.voxket-widget-root .min-h-0{min-height:calc(var(--spacing)*0)}.voxket-widget-root .min-h-2{min-height:calc(var(--spacing)*2)}.voxket-widget-root .min-h-4{min-height:calc(var(--spacing)*4)}.voxket-widget-root .min-h-\\[3rem\\]{min-height:3rem}.voxket-widget-root .min-h-\\[32px\\]{min-height:32px}.voxket-widget-root .min-h-\\[180px\\]{min-height:180px}.voxket-widget-root .min-h-fit{min-height:-moz-fit-content;min-height:fit-content}.voxket-widget-root .min-h-screen{min-height:100vh}.voxket-widget-root .\\!w-full{width:100%!important}.voxket-widget-root .w-0\\.5{width:calc(var(--spacing)*.5)}.voxket-widget-root .w-1\\.5{width:calc(var(--spacing)*1.5)}.voxket-widget-root .w-2{width:calc(var(--spacing)*2)}.voxket-widget-root .w-3{width:calc(var(--spacing)*3)}.voxket-widget-root .w-4{width:calc(var(--spacing)*4)}.voxket-widget-root .w-5{width:calc(var(--spacing)*5)}.voxket-widget-root .w-6{width:calc(var(--spacing)*6)}.voxket-widget-root .w-8{width:calc(var(--spacing)*8)}.voxket-widget-root .w-10{width:calc(var(--spacing)*10)}.voxket-widget-root .w-12{width:calc(var(--spacing)*12)}.voxket-widget-root .w-16{width:calc(var(--spacing)*16)}.voxket-widget-root .w-20{width:calc(var(--spacing)*20)}.voxket-widget-root .w-24{width:calc(var(--spacing)*24)}.voxket-widget-root .w-28{width:calc(var(--spacing)*28)}.voxket-widget-root .w-32{width:calc(var(--spacing)*32)}.voxket-widget-root .w-40{width:calc(var(--spacing)*40)}.voxket-widget-root .w-80{width:calc(var(--spacing)*80)}.voxket-widget-root .w-96{width:calc(var(--spacing)*96)}.voxket-widget-root .w-\\[180px\\]{width:180px}.voxket-widget-root .w-auto{width:auto}.voxket-widget-root .w-fit{width:-moz-fit-content;width:fit-content}.voxket-widget-root .w-full{width:100%}.voxket-widget-root .w-screen{width:100vw}.voxket-widget-root .max-w-2xl{max-width:var(--container-2xl)}.voxket-widget-root .max-w-3xl{max-width:var(--container-3xl)}.voxket-widget-root .max-w-4xl{max-width:var(--container-4xl)}.voxket-widget-root .max-w-5xl{max-width:var(--container-5xl)}.voxket-widget-root .max-w-6xl{max-width:var(--container-6xl)}.voxket-widget-root .max-w-7xl{max-width:var(--container-7xl)}.voxket-widget-root .max-w-\\[85\\%\\]{max-width:85%}.voxket-widget-root .max-w-full{max-width:100%}.voxket-widget-root .max-w-lg{max-width:var(--container-lg)}.voxket-widget-root .max-w-md{max-width:var(--container-md)}.voxket-widget-root .max-w-none{max-width:none}.voxket-widget-root .max-w-sm{max-width:var(--container-sm)}.voxket-widget-root .max-w-xs{max-width:var(--container-xs)}.voxket-widget-root .min-w-0{min-width:calc(var(--spacing)*0)}.voxket-widget-root .min-w-8{min-width:calc(var(--spacing)*8)}.voxket-widget-root .min-w-9{min-width:calc(var(--spacing)*9)}.voxket-widget-root .min-w-10{min-width:calc(var(--spacing)*10)}.voxket-widget-root .min-w-\\[2\\.5rem\\]{min-width:2.5rem}.voxket-widget-root .min-w-\\[8rem\\]{min-width:8rem}.voxket-widget-root .min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.voxket-widget-root .flex-1{flex:1}.voxket-widget-root .flex-shrink-0,.voxket-widget-root .shrink-0{flex-shrink:0}.voxket-widget-root .origin-\\(--radix-select-content-transform-origin\\){transform-origin:var(--radix-select-content-transform-origin)}.voxket-widget-root .origin-center{transform-origin:50%}.voxket-widget-root .translate-y-0{--tw-translate-y:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.voxket-widget-root .translate-y-10{--tw-translate-y:calc(var(--spacing)*10);translate:var(--tw-translate-x)var(--tw-translate-y)}.voxket-widget-root .animate-pulse{animation:var(--animate-pulse)}.voxket-widget-root .cursor-default{cursor:default}.voxket-widget-root .cursor-not-allowed{cursor:not-allowed}.voxket-widget-root .cursor-pointer{cursor:pointer}.voxket-widget-root .resize{resize:both}.voxket-widget-root .resize-none{resize:none}.voxket-widget-root .scroll-my-1{scroll-margin-block:calc(var(--spacing)*1)}.voxket-widget-root .list-inside{list-style-position:inside}.voxket-widget-root .list-decimal{list-style-type:decimal}.voxket-widget-root .list-disc{list-style-type:disc}.voxket-widget-root .grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.voxket-widget-root .grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.voxket-widget-root .grid-cols-\\[0_1fr\\]{grid-template-columns:0 1fr}.voxket-widget-root .grid-cols-\\[1fr_1fr\\]{grid-template-columns:1fr 1fr}.voxket-widget-root .grid-rows-\\[90px_1fr_90px\\]{grid-template-rows:90px 1fr 90px}.voxket-widget-root .flex-col{flex-direction:column}.voxket-widget-root .flex-row{flex-direction:row}.voxket-widget-root .flex-row-reverse{flex-direction:row-reverse}.voxket-widget-root .flex-wrap{flex-wrap:wrap}.voxket-widget-root .place-content-center{place-content:center}.voxket-widget-root .place-content-end{place-content:end}.voxket-widget-root .items-center{align-items:center}.voxket-widget-root .items-end{align-items:flex-end}.voxket-widget-root .items-start{align-items:flex-start}.voxket-widget-root .justify-between{justify-content:space-between}.voxket-widget-root .justify-center{justify-content:center}.voxket-widget-root .justify-end{justify-content:flex-end}.voxket-widget-root .justify-start{justify-content:flex-start}.voxket-widget-root .justify-items-start{justify-items:start}.voxket-widget-root .gap-1{gap:calc(var(--spacing)*1)}.voxket-widget-root .gap-1\\.5{gap:calc(var(--spacing)*1.5)}.voxket-widget-root .gap-2{gap:calc(var(--spacing)*2)}.voxket-widget-root .gap-3{gap:calc(var(--spacing)*3)}.voxket-widget-root .gap-4{gap:calc(var(--spacing)*4)}.voxket-widget-root .gap-6{gap:calc(var(--spacing)*6)}.voxket-widget-root .gap-8{gap:calc(var(--spacing)*8)}.voxket-widget-root :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)))}.voxket-widget-root :where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}.voxket-widget-root :where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*3)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-y-reverse)))}.voxket-widget-root :where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}.voxket-widget-root :where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}.voxket-widget-root :where(.space-y-8>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*8)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*8)*calc(1 - var(--tw-space-y-reverse)))}.voxket-widget-root .gap-x-0\\.5{-moz-column-gap:calc(var(--spacing)*.5);column-gap:calc(var(--spacing)*.5)}.voxket-widget-root .gap-x-2{-moz-column-gap:calc(var(--spacing)*2);column-gap:calc(var(--spacing)*2)}.voxket-widget-root :where(.space-x-1>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*1)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-x-reverse)))}.voxket-widget-root :where(.space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*2)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-x-reverse)))}.voxket-widget-root :where(.space-x-3>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*3)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-x-reverse)))}.voxket-widget-root :where(.space-x-4>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*4)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-x-reverse)))}.voxket-widget-root .gap-y-0\\.5{row-gap:calc(var(--spacing)*.5)}.voxket-widget-root .gap-y-2{row-gap:calc(var(--spacing)*2)}.voxket-widget-root .self-center{align-self:center}.voxket-widget-root .justify-self-end{justify-self:flex-end}.voxket-widget-root .justify-self-start{justify-self:flex-start}.voxket-widget-root .truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.voxket-widget-root .overflow-auto{overflow:auto}.voxket-widget-root .overflow-hidden{overflow:hidden}.voxket-widget-root .overflow-x-auto{overflow-x:auto}.voxket-widget-root .overflow-x-hidden{overflow-x:hidden}.voxket-widget-root .overflow-y-auto{overflow-y:auto}.voxket-widget-root .rounded{border-radius:.25rem}.voxket-widget-root .rounded-2xl{border-radius:var(--radius-2xl)}.voxket-widget-root .rounded-3xl{border-radius:var(--radius-3xl)}.voxket-widget-root .rounded-full{border-radius:3.40282e38px}.voxket-widget-root .rounded-lg{border-radius:var(--radius-lg)}.voxket-widget-root .rounded-md{border-radius:var(--radius-md)}.voxket-widget-root .rounded-none{border-radius:0}.voxket-widget-root .rounded-sm{border-radius:var(--radius-sm)}.voxket-widget-root .rounded-xl{border-radius:var(--radius-xl)}.voxket-widget-root .rounded-t-4xl{border-top-left-radius:var(--radius-4xl);border-top-right-radius:var(--radius-4xl)}.voxket-widget-root .rounded-br-md{border-bottom-right-radius:var(--radius-md)}.voxket-widget-root .rounded-bl-md{border-bottom-left-radius:var(--radius-md)}.voxket-widget-root .border{border-style:var(--tw-border-style);border-width:1px}.voxket-widget-root .border-0{border-style:var(--tw-border-style);border-width:0}.voxket-widget-root .border-2{border-style:var(--tw-border-style);border-width:2px}.voxket-widget-root .border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.voxket-widget-root .border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.voxket-widget-root .border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.voxket-widget-root .\\!border-none{--tw-border-style:none!important;border-style:none!important}.voxket-widget-root .border-none{--tw-border-style:none;border-style:none}.voxket-widget-root .border-\\[\\#3B82F6\\]\\/40{border-color:#3b82f666}.voxket-widget-root .border-\\[\\#8B5CF6\\]\\/30{border-color:#8b5cf64d}.voxket-widget-root .border-\\[\\#813aa7\\]\\/30{border-color:#813aa74d}.voxket-widget-root .border-\\[\\#5078F2\\]\\/30{border-color:#5078f24d}.voxket-widget-root .border-\\[\\#23233a\\]{border-color:#23233a}.voxket-widget-root .border-\\[\\#232336\\]{border-color:#232336}.voxket-widget-root .border-\\[\\#EC4899\\]\\/20{border-color:#ec489933}.voxket-widget-root .border-blue-100{border-color:var(--color-blue-100)}.voxket-widget-root .border-blue-200{border-color:var(--color-blue-200)}.voxket-widget-root .border-blue-400{border-color:var(--color-blue-400)}.voxket-widget-root .border-blue-500{border-color:var(--color-blue-500)}.voxket-widget-root .border-blue-500\\/20{border-color:#3080ff33}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .border-blue-500\\/20{border-color:color-mix(in oklab,var(--color-blue-500)20%,transparent)}}.voxket-widget-root .border-blue-600{border-color:var(--color-blue-600)}.voxket-widget-root .border-current{border-color:currentColor}.voxket-widget-root .border-gray-200{border-color:var(--color-gray-200)}.voxket-widget-root .border-gray-300{border-color:var(--color-gray-300)}.voxket-widget-root .border-gray-400\\/15{border-color:#99a1af26}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .border-gray-400\\/15{border-color:color-mix(in oklab,var(--color-gray-400)15%,transparent)}}.voxket-widget-root .border-gray-500\\/20{border-color:#6a728233}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .border-gray-500\\/20{border-color:color-mix(in oklab,var(--color-gray-500)20%,transparent)}}.voxket-widget-root .border-gray-600{border-color:var(--color-gray-600)}.voxket-widget-root .border-gray-600\\/30{border-color:#4a55654d}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .border-gray-600\\/30{border-color:color-mix(in oklab,var(--color-gray-600)30%,transparent)}}.voxket-widget-root .border-gray-700{border-color:var(--color-gray-700)}.voxket-widget-root .border-gray-800{border-color:var(--color-gray-800)}.voxket-widget-root .border-gray-900{border-color:var(--color-gray-900)}.voxket-widget-root .border-green-200{border-color:var(--color-green-200)}.voxket-widget-root .border-pink-500\\/10{border-color:#f6339a1a}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .border-pink-500\\/10{border-color:color-mix(in oklab,var(--color-pink-500)10%,transparent)}}.voxket-widget-root .border-purple-500\\/15{border-color:#ac4bff26}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .border-purple-500\\/15{border-color:color-mix(in oklab,var(--color-purple-500)15%,transparent)}}.voxket-widget-root .border-red-200{border-color:var(--color-red-200)}.voxket-widget-root .border-red-800{border-color:var(--color-red-800)}.voxket-widget-root .border-white{border-color:var(--color-white)}.voxket-widget-root .border-white\\/20{border-color:#fff3}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .border-white\\/20{border-color:color-mix(in oklab,var(--color-white)20%,transparent)}}.voxket-widget-root .border-yellow-200{border-color:var(--color-yellow-200)}.voxket-widget-root .border-t-transparent{border-top-color:#0000}.voxket-widget-root .bg-\\[\\#1E1E2E\\]{background-color:#1e1e2e}.voxket-widget-root .bg-\\[\\#1E1E2E\\]\\/80{background-color:#1e1e2ecc}.voxket-widget-root .bg-\\[\\#1E1E2E\\]\\/90{background-color:#1e1e2ee6}.voxket-widget-root .bg-\\[\\#3B82F6\\]{background-color:#3b82f6}.voxket-widget-root .bg-\\[\\#5c64f6\\]{background-color:#5c64f6}.voxket-widget-root .bg-\\[\\#10B981\\]{background-color:#10b981}.voxket-widget-root .bg-\\[\\#221f3f\\]{background-color:#221f3f}.voxket-widget-root .bg-\\[\\#813aa7\\]{background-color:#813aa7}.voxket-widget-root .bg-\\[\\#5078F2\\]{background-color:#5078f2}.voxket-widget-root .bg-\\[\\#6721a4\\]{background-color:#6721a4}.voxket-widget-root .bg-\\[\\#18182a\\]\\/80{background-color:#18182acc}.voxket-widget-root .bg-\\[\\#18182a\\]\\/90{background-color:#18182ae6}.voxket-widget-root .bg-black{background-color:var(--color-black)}.voxket-widget-root .bg-black\\/0{background-color:#0000}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-black\\/0{background-color:color-mix(in oklab,var(--color-black)0%,transparent)}}.voxket-widget-root .bg-black\\/40{background-color:#0006}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-black\\/40{background-color:color-mix(in oklab,var(--color-black)40%,transparent)}}.voxket-widget-root .bg-black\\/50{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-black\\/50{background-color:color-mix(in oklab,var(--color-black)50%,transparent)}}.voxket-widget-root .bg-black\\/70{background-color:#000000b3}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-black\\/70{background-color:color-mix(in oklab,var(--color-black)70%,transparent)}}.voxket-widget-root .bg-black\\/80{background-color:#000c}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-black\\/80{background-color:color-mix(in oklab,var(--color-black)80%,transparent)}}.voxket-widget-root .bg-blue-50{background-color:var(--color-blue-50)}.voxket-widget-root .bg-blue-100{background-color:var(--color-blue-100)}.voxket-widget-root .bg-blue-200{background-color:var(--color-blue-200)}.voxket-widget-root .bg-blue-400{background-color:var(--color-blue-400)}.voxket-widget-root .bg-blue-500{background-color:var(--color-blue-500)}.voxket-widget-root .bg-blue-600{background-color:var(--color-blue-600)}.voxket-widget-root .bg-blue-900\\/50{background-color:#1c398e80}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-blue-900\\/50{background-color:color-mix(in oklab,var(--color-blue-900)50%,transparent)}}.voxket-widget-root .bg-current{background-color:currentColor}.voxket-widget-root .bg-gray-50{background-color:var(--color-gray-50)}.voxket-widget-root .bg-gray-100{background-color:var(--color-gray-100)}.voxket-widget-root .bg-gray-200{background-color:var(--color-gray-200)}.voxket-widget-root .bg-gray-400{background-color:var(--color-gray-400)}.voxket-widget-root .bg-gray-600{background-color:var(--color-gray-600)}.voxket-widget-root .bg-gray-600\\/50{background-color:#4a556580}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-gray-600\\/50{background-color:color-mix(in oklab,var(--color-gray-600)50%,transparent)}}.voxket-widget-root .bg-gray-700{background-color:var(--color-gray-700)}.voxket-widget-root .bg-gray-700\\/50{background-color:#36415380}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-gray-700\\/50{background-color:color-mix(in oklab,var(--color-gray-700)50%,transparent)}}.voxket-widget-root .bg-gray-800{background-color:var(--color-gray-800)}.voxket-widget-root .bg-gray-800\\/50{background-color:#1e293980}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-gray-800\\/50{background-color:color-mix(in oklab,var(--color-gray-800)50%,transparent)}}.voxket-widget-root .bg-gray-800\\/90{background-color:#1e2939e6}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-gray-800\\/90{background-color:color-mix(in oklab,var(--color-gray-800)90%,transparent)}}.voxket-widget-root .bg-gray-900{background-color:var(--color-gray-900)}.voxket-widget-root .bg-gray-900\\/50{background-color:#10182880}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-gray-900\\/50{background-color:color-mix(in oklab,var(--color-gray-900)50%,transparent)}}.voxket-widget-root .bg-gray-900\\/80{background-color:#101828cc}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-gray-900\\/80{background-color:color-mix(in oklab,var(--color-gray-900)80%,transparent)}}.voxket-widget-root .bg-gray-900\\/95{background-color:#101828f2}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-gray-900\\/95{background-color:color-mix(in oklab,var(--color-gray-900)95%,transparent)}}.voxket-widget-root .bg-green-50{background-color:var(--color-green-50)}.voxket-widget-root .bg-green-500{background-color:var(--color-green-500)}.voxket-widget-root .bg-green-600{background-color:var(--color-green-600)}.voxket-widget-root .bg-indigo-600{background-color:var(--color-indigo-600)}.voxket-widget-root .bg-purple-500{background-color:var(--color-purple-500)}.voxket-widget-root .bg-purple-600{background-color:var(--color-purple-600)}.voxket-widget-root .bg-red-50{background-color:var(--color-red-50)}.voxket-widget-root .bg-red-500{background-color:var(--color-red-500)}.voxket-widget-root .bg-red-600{background-color:var(--color-red-600)}.voxket-widget-root .bg-red-600\\/80{background-color:#e40014cc}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-red-600\\/80{background-color:color-mix(in oklab,var(--color-red-600)80%,transparent)}}.voxket-widget-root .bg-red-900\\/20{background-color:#82181a33}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-red-900\\/20{background-color:color-mix(in oklab,var(--color-red-900)20%,transparent)}}.voxket-widget-root .bg-transparent{background-color:#0000}.voxket-widget-root .bg-white{background-color:var(--color-white)}.voxket-widget-root .bg-white\\/10{background-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-white\\/10{background-color:color-mix(in oklab,var(--color-white)10%,transparent)}}.voxket-widget-root .bg-white\\/20{background-color:#fff3}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-white\\/20{background-color:color-mix(in oklab,var(--color-white)20%,transparent)}}.voxket-widget-root .bg-white\\/80{background-color:#fffc}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-white\\/80{background-color:color-mix(in oklab,var(--color-white)80%,transparent)}}.voxket-widget-root .bg-white\\/90{background-color:#ffffffe6}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-white\\/90{background-color:color-mix(in oklab,var(--color-white)90%,transparent)}}.voxket-widget-root .bg-white\\/95{background-color:#fffffff2}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-white\\/95{background-color:color-mix(in oklab,var(--color-white)95%,transparent)}}.voxket-widget-root .bg-yellow-50{background-color:var(--color-yellow-50)}.voxket-widget-root .bg-yellow-500{background-color:var(--color-yellow-500)}.voxket-widget-root .bg-gradient-to-b{--tw-gradient-position:to bottom in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.voxket-widget-root .bg-gradient-to-br{--tw-gradient-position:to bottom right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.voxket-widget-root .bg-gradient-to-r{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.voxket-widget-root .bg-gradient-to-tr{--tw-gradient-position:to top right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.voxket-widget-root .bg-\\[radial-gradient\\(ellipse_at_center\\, .voxket-widget-root _var\\(--tw-gradient-stops\\)\\)\\]{background-image:radial-gradient(ellipse at center,var(--tw-gradient-stops))}.voxket-widget-root .from-\\[\\#3B82F6\\]{--tw-gradient-from:#3b82f6;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-\\[\\#3B82F6\\]\\/15{--tw-gradient-from:oklab(62.3083% -.0332476 -.185052/.15);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-\\[\\#8B5CF6\\]{--tw-gradient-from:#8b5cf6;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-\\[\\#8B5CF6\\]\\/25{--tw-gradient-from:oklab(60.5631% .0845415 -.201932/.25);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-\\[\\#10B981\\]{--tw-gradient-from:#10b981;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-\\[\\#171727\\]{--tw-gradient-from:#171727;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-\\[\\#171727\\]\\/90{--tw-gradient-from:oklab(21.3014% .00727232 -.0304822/.9);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-\\[\\#181825\\]{--tw-gradient-from:#181825;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-\\[\\#EC4899\\]{--tw-gradient-from:#ec4899;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-\\[\\#EC4899\\]\\/20{--tw-gradient-from:oklab(65.592% .210729 -.0210022/.2);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-black{--tw-gradient-from:var(--color-black);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-black\\/90{--tw-gradient-from:#000000e6}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .from-black\\/90{--tw-gradient-from:color-mix(in oklab,var(--color-black)90%,transparent)}}.voxket-widget-root .from-black\\/90{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-blue-500{--tw-gradient-from:var(--color-blue-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-blue-500\\/5{--tw-gradient-from:#3080ff0d}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .from-blue-500\\/5{--tw-gradient-from:color-mix(in oklab,var(--color-blue-500)5%,transparent)}}.voxket-widget-root .from-blue-500\\/5{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-blue-600{--tw-gradient-from:var(--color-blue-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-gray-400{--tw-gradient-from:var(--color-gray-400);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-gray-500{--tw-gradient-from:var(--color-gray-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-gray-500\\/8{--tw-gradient-from:#6a728214}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .from-gray-500\\/8{--tw-gradient-from:color-mix(in oklab,var(--color-gray-500)8%,transparent)}}.voxket-widget-root .from-gray-500\\/8{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-gray-600{--tw-gradient-from:var(--color-gray-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-gray-600\\/10{--tw-gradient-from:#4a55651a}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .from-gray-600\\/10{--tw-gradient-from:color-mix(in oklab,var(--color-gray-600)10%,transparent)}}.voxket-widget-root .from-gray-600\\/10{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-gray-800\\/20{--tw-gradient-from:#1e293933}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .from-gray-800\\/20{--tw-gradient-from:color-mix(in oklab,var(--color-gray-800)20%,transparent)}}.voxket-widget-root .from-gray-800\\/20{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-pink-500{--tw-gradient-from:var(--color-pink-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-pink-500\\/8{--tw-gradient-from:#f6339a14}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .from-pink-500\\/8{--tw-gradient-from:color-mix(in oklab,var(--color-pink-500)8%,transparent)}}.voxket-widget-root .from-pink-500\\/8{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-purple-500\\/10{--tw-gradient-from:#ac4bff1a}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .from-purple-500\\/10{--tw-gradient-from:color-mix(in oklab,var(--color-purple-500)10%,transparent)}}.voxket-widget-root .from-purple-500\\/10{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-white{--tw-gradient-from:var(--color-white);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-white\\/90{--tw-gradient-from:#ffffffe6}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .from-white\\/90{--tw-gradient-from:color-mix(in oklab,var(--color-white)90%,transparent)}}.voxket-widget-root .from-white\\/90{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .via-\\[\\#8B5CF6\\]{--tw-gradient-via:#8b5cf6;--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.voxket-widget-root .via-gray-200{--tw-gradient-via:var(--color-gray-200);--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.voxket-widget-root .via-purple-600{--tw-gradient-via:var(--color-purple-600);--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.voxket-widget-root .via-transparent{--tw-gradient-via:transparent;--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.voxket-widget-root .to-\\[\\#8B5CF6\\]{--tw-gradient-to:#8b5cf6;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .to-\\[\\#12121F\\]{--tw-gradient-to:#12121f;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .to-\\[\\#059669\\]{--tw-gradient-to:#059669;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .to-\\[\\#232336\\]{--tw-gradient-to:#232336;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .to-\\[\\#EC4899\\]{--tw-gradient-to:#ec4899;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .to-gray-50{--tw-gradient-to:var(--color-gray-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .to-gray-300{--tw-gradient-to:var(--color-gray-300);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .to-gray-500{--tw-gradient-to:var(--color-gray-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .to-gray-600{--tw-gradient-to:var(--color-gray-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .to-gray-700{--tw-gradient-to:var(--color-gray-700);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .to-gray-900{--tw-gradient-to:var(--color-gray-900);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .to-pink-600{--tw-gradient-to:var(--color-pink-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .to-purple-500{--tw-gradient-to:var(--color-purple-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .to-purple-600{--tw-gradient-to:var(--color-purple-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .to-transparent{--tw-gradient-to:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .bg-clip-text{-webkit-background-clip:text;background-clip:text}.voxket-widget-root .object-cover{-o-object-fit:cover;object-fit:cover}.voxket-widget-root .p-0{padding:calc(var(--spacing)*0)}.voxket-widget-root .p-1{padding:calc(var(--spacing)*1)}.voxket-widget-root .p-2{padding:calc(var(--spacing)*2)}.voxket-widget-root .p-3{padding:calc(var(--spacing)*3)}.voxket-widget-root .p-4{padding:calc(var(--spacing)*4)}.voxket-widget-root .p-6{padding:calc(var(--spacing)*6)}.voxket-widget-root .p-8{padding:calc(var(--spacing)*8)}.voxket-widget-root .px-0{padding-inline:calc(var(--spacing)*0)}.voxket-widget-root .px-1{padding-inline:calc(var(--spacing)*1)}.voxket-widget-root .px-1\\.5{padding-inline:calc(var(--spacing)*1.5)}.voxket-widget-root .px-2{padding-inline:calc(var(--spacing)*2)}.voxket-widget-root .px-2\\.5{padding-inline:calc(var(--spacing)*2.5)}.voxket-widget-root .px-3{padding-inline:calc(var(--spacing)*3)}.voxket-widget-root .px-4{padding-inline:calc(var(--spacing)*4)}.voxket-widget-root .px-5{padding-inline:calc(var(--spacing)*5)}.voxket-widget-root .px-6{padding-inline:calc(var(--spacing)*6)}.voxket-widget-root .px-8{padding-inline:calc(var(--spacing)*8)}.voxket-widget-root .px-10{padding-inline:calc(var(--spacing)*10)}.voxket-widget-root .py-0{padding-block:calc(var(--spacing)*0)}.voxket-widget-root .py-1{padding-block:calc(var(--spacing)*1)}.voxket-widget-root .py-1\\.5{padding-block:calc(var(--spacing)*1.5)}.voxket-widget-root .py-2{padding-block:calc(var(--spacing)*2)}.voxket-widget-root .py-3{padding-block:calc(var(--spacing)*3)}.voxket-widget-root .py-4{padding-block:calc(var(--spacing)*4)}.voxket-widget-root .py-8{padding-block:calc(var(--spacing)*8)}.voxket-widget-root .py-12{padding-block:calc(var(--spacing)*12)}.voxket-widget-root .pt-3{padding-top:calc(var(--spacing)*3)}.voxket-widget-root .pt-5{padding-top:calc(var(--spacing)*5)}.voxket-widget-root .pr-8{padding-right:calc(var(--spacing)*8)}.voxket-widget-root .pb-2{padding-bottom:calc(var(--spacing)*2)}.voxket-widget-root .pb-3{padding-bottom:calc(var(--spacing)*3)}.voxket-widget-root .pb-4{padding-bottom:calc(var(--spacing)*4)}.voxket-widget-root .pl-1{padding-left:calc(var(--spacing)*1)}.voxket-widget-root .pl-2{padding-left:calc(var(--spacing)*2)}.voxket-widget-root .text-center{text-align:center}.voxket-widget-root .text-end{text-align:end}.voxket-widget-root .text-left{text-align:left}.voxket-widget-root .text-right{text-align:right}.voxket-widget-root .font-mono{font-family:var(--font-mono)}.voxket-widget-root .text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.voxket-widget-root .text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.voxket-widget-root .text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.voxket-widget-root .text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.voxket-widget-root .text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.voxket-widget-root .text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.voxket-widget-root .text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.voxket-widget-root .leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.voxket-widget-root .leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.voxket-widget-root .leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.voxket-widget-root .font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.voxket-widget-root .font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.voxket-widget-root .font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.voxket-widget-root .tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.voxket-widget-root .tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.voxket-widget-root .break-words{overflow-wrap:break-word}.voxket-widget-root .whitespace-nowrap{white-space:nowrap}.voxket-widget-root .whitespace-pre-line{white-space:pre-line}.voxket-widget-root .whitespace-pre-wrap{white-space:pre-wrap}.voxket-widget-root .text-black{color:var(--color-black)}.voxket-widget-root .text-blue-300{color:var(--color-blue-300)}.voxket-widget-root .text-blue-400{color:var(--color-blue-400)}.voxket-widget-root .text-blue-500{color:var(--color-blue-500)}.voxket-widget-root .text-blue-600{color:var(--color-blue-600)}.voxket-widget-root .text-blue-700{color:var(--color-blue-700)}.voxket-widget-root .text-blue-800{color:var(--color-blue-800)}.voxket-widget-root .text-gray-200{color:var(--color-gray-200)}.voxket-widget-root .text-gray-300{color:var(--color-gray-300)}.voxket-widget-root .text-gray-400{color:var(--color-gray-400)}.voxket-widget-root .text-gray-500{color:var(--color-gray-500)}.voxket-widget-root .text-gray-600{color:var(--color-gray-600)}.voxket-widget-root .text-gray-700{color:var(--color-gray-700)}.voxket-widget-root .text-gray-800{color:var(--color-gray-800)}.voxket-widget-root .text-gray-900{color:var(--color-gray-900)}.voxket-widget-root .text-green-700{color:var(--color-green-700)}.voxket-widget-root .text-inherit{color:inherit}.voxket-widget-root .text-red-400{color:var(--color-red-400)}.voxket-widget-root .text-red-500{color:var(--color-red-500)}.voxket-widget-root .text-red-600{color:var(--color-red-600)}.voxket-widget-root .text-red-700{color:var(--color-red-700)}.voxket-widget-root .text-transparent{color:#0000}.voxket-widget-root .text-white{color:var(--color-white)}.voxket-widget-root .text-yellow-400{color:var(--color-yellow-400)}.voxket-widget-root .text-yellow-700{color:var(--color-yellow-700)}.voxket-widget-root .uppercase{text-transform:uppercase}.voxket-widget-root .italic{font-style:italic}.voxket-widget-root .underline-offset-4{text-underline-offset:4px}.voxket-widget-root .placeholder-gray-400::-moz-placeholder{color:var(--color-gray-400)}.voxket-widget-root .placeholder-gray-400::placeholder{color:var(--color-gray-400)}.voxket-widget-root .placeholder-gray-500::-moz-placeholder{color:var(--color-gray-500)}.voxket-widget-root .placeholder-gray-500::placeholder{color:var(--color-gray-500)}.voxket-widget-root .opacity-0{opacity:0}.voxket-widget-root .opacity-15{opacity:.15}.voxket-widget-root .opacity-20{opacity:.2}.voxket-widget-root .opacity-30{opacity:.3}.voxket-widget-root .opacity-40{opacity:.4}.voxket-widget-root .opacity-50{opacity:.5}.voxket-widget-root .opacity-60{opacity:.6}.voxket-widget-root .opacity-70{opacity:.7}.voxket-widget-root .opacity-80{opacity:.8}.voxket-widget-root .opacity-100{opacity:1}.voxket-widget-root .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)}.voxket-widget-root .shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.voxket-widget-root .shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.voxket-widget-root .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)}.voxket-widget-root .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)}.voxket-widget-root .\\!ring-0{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(0px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor)!important;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)!important}.voxket-widget-root .shadow-black\\/40{--tw-shadow-color:#0006}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .shadow-black\\/40{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-black)40%,transparent)var(--tw-shadow-alpha),transparent)}}.voxket-widget-root .outline-hidden{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.voxket-widget-root .outline-hidden{outline-offset:2px;outline:2px solid #0000}}.voxket-widget-root .outline{outline-style:var(--tw-outline-style);outline-width:1px}.voxket-widget-root .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,)}.voxket-widget-root .blur-2xl{--tw-blur:blur(var(--blur-2xl));filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.voxket-widget-root .blur-sm{--tw-blur:blur(var(--blur-sm));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,)}.voxket-widget-root .blur-xl{--tw-blur:blur(var(--blur-xl));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,)}.voxket-widget-root .\\!filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)!important}.voxket-widget-root .filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.voxket-widget-root .backdrop-blur-lg{--tw-backdrop-blur:blur(var(--blur-lg));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.voxket-widget-root .backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.voxket-widget-root .backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.voxket-widget-root .backdrop-blur-xl{--tw-backdrop-blur:blur(var(--blur-xl));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.voxket-widget-root .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,visibility,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))}.voxket-widget-root .transition-\\[color\\, .voxket-widget-root border\\, .voxket-widget-root background-color\\]{transition-property:color,border,background-color;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.voxket-widget-root .transition-\\[height\\]{transition-property:height;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.voxket-widget-root .transition-\\[opacity\\, .voxket-widget-root translate\\]{transition-property:opacity,translate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.voxket-widget-root .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))}.voxket-widget-root .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))}.voxket-widget-root .transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.voxket-widget-root .delay-200{transition-delay:.2s}.voxket-widget-root .duration-150{--tw-duration:.15s;transition-duration:.15s}.voxket-widget-root .duration-200{--tw-duration:.2s;transition-duration:.2s}.voxket-widget-root .duration-250{--tw-duration:.25s;transition-duration:.25s}.voxket-widget-root .duration-300{--tw-duration:.3s;transition-duration:.3s}.voxket-widget-root .duration-700{--tw-duration:.7s;transition-duration:.7s}.voxket-widget-root .ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.voxket-widget-root .ease-linear{--tw-ease:linear;transition-timing-function:linear}.voxket-widget-root .ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.voxket-widget-root .contain-layout{--tw-contain-layout:layout;contain:var(--tw-contain-size,)var(--tw-contain-layout,)var(--tw-contain-paint,)var(--tw-contain-style,)}.voxket-widget-root .\\!outline-none{--tw-outline-style:none!important;outline-style:none!important}.voxket-widget-root .outline-none{--tw-outline-style:none;outline-style:none}.voxket-widget-root .select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}@media (hover:hover){.voxket-widget-root .group-hover\\:scale-\\[1\\.02\\]:is(:where(.group):hover *){scale:1.02}.voxket-widget-root .group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}}.voxket-widget-root .group-data-\\[state\\=off\\]\\/track\\:bg-white:is(:where(.group\\/track)[data-state=off] *),.voxket-widget-root .group-data-\\[state\\=on\\]\\/track\\:bg-white:is(:where(.group\\/track)[data-state=on] *){background-color:var(--color-white)}.voxket-widget-root .focus-within\\:border-blue-500\\/50:focus-within{border-color:#3080ff80}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .focus-within\\:border-blue-500\\/50:focus-within{border-color:color-mix(in oklab,var(--color-blue-500)50%,transparent)}}.voxket-widget-root .focus-within\\:shadow-lg:focus-within{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.voxket-widget-root .focus-within\\:ring-2:focus-within{--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)}.voxket-widget-root .focus-within\\:ring-blue-500\\/30:focus-within{--tw-ring-color:#3080ff4d}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .focus-within\\:ring-blue-500\\/30:focus-within{--tw-ring-color:color-mix(in oklab,var(--color-blue-500)30%,transparent)}}@media (hover:hover){.voxket-widget-root .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)}.voxket-widget-root .hover\\:border-gray-300:hover{border-color:var(--color-gray-300)}.voxket-widget-root .hover\\:bg-\\[\\#2563EB\\]:hover{background-color:#2563eb}.voxket-widget-root .hover\\:bg-black\\/10:hover{background-color:#0000001a}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .hover\\:bg-black\\/10:hover{background-color:color-mix(in oklab,var(--color-black)10%,transparent)}}.voxket-widget-root .hover\\:bg-blue-50:hover{background-color:var(--color-blue-50)}.voxket-widget-root .hover\\:bg-blue-600:hover{background-color:var(--color-blue-600)}.voxket-widget-root .hover\\:bg-blue-700:hover{background-color:var(--color-blue-700)}.voxket-widget-root .hover\\:bg-gray-50:hover{background-color:var(--color-gray-50)}.voxket-widget-root .hover\\:bg-gray-100:hover{background-color:var(--color-gray-100)}.voxket-widget-root .hover\\:bg-gray-200:hover{background-color:var(--color-gray-200)}.voxket-widget-root .hover\\:bg-gray-300:hover{background-color:var(--color-gray-300)}.voxket-widget-root .hover\\:bg-gray-600:hover{background-color:var(--color-gray-600)}.voxket-widget-root .hover\\:bg-gray-600\\/50:hover{background-color:#4a556580}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .hover\\:bg-gray-600\\/50:hover{background-color:color-mix(in oklab,var(--color-gray-600)50%,transparent)}}.voxket-widget-root .hover\\:bg-gray-700:hover{background-color:var(--color-gray-700)}.voxket-widget-root .hover\\:bg-gray-700\\/50:hover{background-color:#36415380}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .hover\\:bg-gray-700\\/50:hover{background-color:color-mix(in oklab,var(--color-gray-700)50%,transparent)}}.voxket-widget-root .hover\\:bg-gray-800:hover{background-color:var(--color-gray-800)}.voxket-widget-root .hover\\:bg-green-600:hover{background-color:var(--color-green-600)}.voxket-widget-root .hover\\:bg-green-700:hover{background-color:var(--color-green-700)}.voxket-widget-root .hover\\:bg-purple-600:hover{background-color:var(--color-purple-600)}.voxket-widget-root .hover\\:bg-red-100:hover{background-color:var(--color-red-100)}.voxket-widget-root .hover\\:bg-red-600:hover{background-color:var(--color-red-600)}.voxket-widget-root .hover\\:bg-red-700:hover{background-color:var(--color-red-700)}.voxket-widget-root .hover\\:bg-red-800\\/30:hover{background-color:#9f07124d}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .hover\\:bg-red-800\\/30:hover{background-color:color-mix(in oklab,var(--color-red-800)30%,transparent)}}.voxket-widget-root .hover\\:bg-white:hover{background-color:var(--color-white)}.voxket-widget-root .hover\\:bg-white\\/30:hover{background-color:#ffffff4d}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .hover\\:bg-white\\/30:hover{background-color:color-mix(in oklab,var(--color-white)30%,transparent)}}.voxket-widget-root .hover\\:from-\\[\\#2563EB\\]:hover{--tw-gradient-from:#2563eb;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .hover\\:from-blue-600:hover{--tw-gradient-from:var(--color-blue-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .hover\\:to-\\[\\#7C3AED\\]:hover{--tw-gradient-to:#7c3aed;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .hover\\:to-purple-700:hover{--tw-gradient-to:var(--color-purple-700);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .hover\\:text-blue-900:hover{color:var(--color-blue-900)}.voxket-widget-root .hover\\:text-gray-200:hover{color:var(--color-gray-200)}.voxket-widget-root .hover\\:text-gray-300:hover{color:var(--color-gray-300)}.voxket-widget-root .hover\\:text-gray-700:hover{color:var(--color-gray-700)}.voxket-widget-root .hover\\:text-gray-800:hover{color:var(--color-gray-800)}.voxket-widget-root .hover\\:text-white:hover{color:var(--color-white)}.voxket-widget-root .hover\\:underline:hover{text-decoration-line:underline}.voxket-widget-root .hover\\:shadow-md:hover{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.voxket-widget-root .hover\\:shadow-xl:hover{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.voxket-widget-root .focus\\:border-blue-500:focus{border-color:var(--color-blue-500)}.voxket-widget-root .focus\\:ring-1:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.voxket-widget-root .focus\\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.voxket-widget-root .focus\\:ring-blue-400\\/40:focus{--tw-ring-color:#54a2ff66}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .focus\\:ring-blue-400\\/40:focus{--tw-ring-color:color-mix(in oklab,var(--color-blue-400)40%,transparent)}}.voxket-widget-root .focus\\:ring-blue-500:focus{--tw-ring-color:var(--color-blue-500)}.voxket-widget-root .focus\\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.voxket-widget-root .focus\\:ring-offset-gray-900:focus{--tw-ring-offset-color:var(--color-gray-900)}.voxket-widget-root .focus\\:ring-offset-white:focus{--tw-ring-offset-color:var(--color-white)}.voxket-widget-root .focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.voxket-widget-root .focus-visible\\:ring-\\[3px\\]:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(3px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.voxket-widget-root .active\\:scale-95:active{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x)var(--tw-scale-y)}.voxket-widget-root .disabled\\:pointer-events-none:disabled{pointer-events:none}.voxket-widget-root .disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.voxket-widget-root .disabled\\:bg-gray-300:disabled{background-color:var(--color-gray-300)}.voxket-widget-root .disabled\\:bg-gray-600:disabled{background-color:var(--color-gray-600)}.voxket-widget-root .disabled\\:opacity-50:disabled{opacity:.5}.voxket-widget-root .disabled\\:opacity-70:disabled{opacity:.7}.voxket-widget-root .has-\\[\\>svg\\]\\:grid-cols-\\[calc\\(var\\(--spacing\\)\\*4\\)_1fr\\]:has(>svg){grid-template-columns:calc(var(--spacing)*4)1fr}.voxket-widget-root .has-\\[\\>svg\\]\\:gap-x-3:has(>svg){-moz-column-gap:calc(var(--spacing)*3);column-gap:calc(var(--spacing)*3)}.voxket-widget-root .has-\\[\\>svg\\]\\:px-2\\.5:has(>svg){padding-inline:calc(var(--spacing)*2.5)}.voxket-widget-root .has-\\[\\>svg\\]\\:px-3:has(>svg){padding-inline:calc(var(--spacing)*3)}.voxket-widget-root .has-\\[\\>svg\\]\\:px-4:has(>svg){padding-inline:calc(var(--spacing)*4)}.voxket-widget-root .aria-invalid\\:border-0[aria-invalid=true]{border-style:var(--tw-border-style);border-width:0}.voxket-widget-root .aria-invalid\\:ring-0[aria-invalid=true]{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(0px + 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)}.voxket-widget-root .data-\\[disabled\\]\\:pointer-events-none[data-disabled]{pointer-events:none}.voxket-widget-root .data-\\[disabled\\]\\:opacity-50[data-disabled]{opacity:.5}.voxket-widget-root .data-\\[lk-highlighted\\=true\\]\\:bg-\\[\\#5c64f6\\][data-lk-highlighted=true]{background-color:#5c64f6}.voxket-widget-root .data-\\[lk-muted\\=true\\]\\:bg-\\[\\#222222\\][data-lk-muted=true]{background-color:#222}.voxket-widget-root .data-\\[side\\=bottom\\]\\:translate-y-1[data-side=bottom]{--tw-translate-y:calc(var(--spacing)*1);translate:var(--tw-translate-x)var(--tw-translate-y)}.voxket-widget-root .data-\\[side\\=left\\]\\:-translate-x-1[data-side=left]{--tw-translate-x:calc(var(--spacing)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.voxket-widget-root .data-\\[side\\=right\\]\\:translate-x-1[data-side=right]{--tw-translate-x:calc(var(--spacing)*1);translate:var(--tw-translate-x)var(--tw-translate-y)}.voxket-widget-root .data-\\[side\\=top\\]\\:-translate-y-1[data-side=top]{--tw-translate-y:calc(var(--spacing)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.voxket-widget-root .data-\\[size\\=default\\]\\:h-9[data-size=default]{height:calc(var(--spacing)*9)}.voxket-widget-root .data-\\[size\\=sm\\]\\:h-8[data-size=sm]{height:calc(var(--spacing)*8)}.voxket-widget-root :is(.\\*\\:data-\\[slot\\=select-value\\]\\:line-clamp-1>*)[data-slot=select-value]{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.voxket-widget-root :is(.\\*\\:data-\\[slot\\=select-value\\]\\:flex>*)[data-slot=select-value]{display:flex}.voxket-widget-root :is(.\\*\\:data-\\[slot\\=select-value\\]\\:items-center>*)[data-slot=select-value]{align-items:center}.voxket-widget-root :is(.\\*\\:data-\\[slot\\=select-value\\]\\:gap-2>*)[data-slot=select-value]{gap:calc(var(--spacing)*2)}@media (min-width:48rem){.voxket-widget-root .md\\:px-0{padding-inline:calc(var(--spacing)*0)}}@media (min-width:64rem){.voxket-widget-root .lg\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (prefers-color-scheme:dark){.voxket-widget-root .dark\\:border-gray-600{border-color:var(--color-gray-600)}.voxket-widget-root .dark\\:border-gray-700{border-color:var(--color-gray-700)}.voxket-widget-root .dark\\:bg-gray-800{background-color:var(--color-gray-800)}.voxket-widget-root .dark\\:bg-gray-900{background-color:var(--color-gray-900)}.voxket-widget-root .dark\\:bg-white{background-color:var(--color-white)}.voxket-widget-root .dark\\:text-gray-400{color:var(--color-gray-400)}.voxket-widget-root .dark\\:text-white{color:var(--color-white)}.voxket-widget-root .dark\\:aria-invalid\\:ring-0[aria-invalid=true]{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(0px + 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)}}.voxket-widget-root .\\[\\&_p\\]\\:leading-relaxed p{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.voxket-widget-root .\\[\\&_svg\\]\\:pointer-events-none svg{pointer-events:none}.voxket-widget-root .\\[\\&_svg\\]\\:shrink-0 svg{flex-shrink:0}.voxket-widget-root .\\[\\&_svg\\:not\\(\\[class\\*\\=\\'size-\\'\\]\\)\\]\\:size-4 svg:not([class*=size-]){width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.voxket-widget-root :is(.\\*\\:\\[span\\]\\:last\\:flex>*):is(span):last-child{display:flex}.voxket-widget-root :is(.\\*\\:\\[span\\]\\:last\\:items-center>*):is(span):last-child{align-items:center}.voxket-widget-root :is(.\\*\\:\\[span\\]\\:last\\:gap-2>*):is(span):last-child{gap:calc(var(--spacing)*2)}.voxket-widget-root .\\[\\&\\>svg\\]\\:size-4>svg{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.voxket-widget-root .\\[\\&\\>svg\\]\\:translate-y-0\\.5>svg{--tw-translate-y:calc(var(--spacing)*.5);translate:var(--tw-translate-x)var(--tw-translate-y)}.voxket-widget-root .\\[\\&\\>svg\\]\\:text-current>svg{color:currentColor}.voxket-widget-root .\\[\\&\\>video\\]\\:h-\\[90px\\]>video{height:90px}.voxket-widget-root .\\[\\&\\>video\\]\\:w-auto>video{width:auto}@layer theme{:root,.voxket-widget-root :host{--font-sans:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-100:oklch(93.6% .032 17.717);--color-red-200:oklch(88.5% .062 18.334);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-800:oklch(44.4% .177 26.899);--color-red-900:oklch(39.6% .141 25.723);--color-yellow-50:oklch(98.7% .026 102.212);--color-yellow-200:oklch(94.5% .129 101.54);--color-yellow-400:oklch(85.2% .199 91.936);--color-yellow-500:oklch(79.5% .184 86.047);--color-yellow-700:oklch(55.4% .135 66.442);--color-green-50:oklch(98.2% .018 155.826);--color-green-200:oklch(92.5% .084 155.995);--color-green-500:oklch(72.3% .219 149.579);--color-green-600:oklch(62.7% .194 149.214);--color-green-700:oklch(52.7% .154 150.069);--color-blue-50:oklch(97% .014 254.604);--color-blue-100:oklch(93.2% .032 255.585);--color-blue-200:oklch(88.2% .059 254.128);--color-blue-300:oklch(80.9% .105 251.813);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-700:oklch(48.8% .243 264.376);--color-blue-800:oklch(42.4% .199 265.638);--color-blue-900:oklch(37.9% .146 265.522);--color-indigo-600:oklch(51.1% .262 276.966);--color-purple-500:oklch(62.7% .265 303.9);--color-purple-600:oklch(55.8% .288 302.321);--color-purple-700:oklch(49.6% .265 301.924);--color-pink-500:oklch(65.6% .241 354.308);--color-pink-600:oklch(59.2% .249 .584);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-800:oklch(27.8% .033 256.848);--color-gray-900:oklch(21% .034 264.665);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-2xl:42rem;--container-3xl:48rem;--container-4xl:56rem;--container-5xl:64rem;--container-6xl:72rem;--container-7xl:80rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-wider:.05em;--leading-tight:1.25;--leading-snug:1.375;--leading-relaxed:1.625;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--radius-3xl:1.5rem;--radius-4xl:2rem;--ease-out:cubic-bezier(0,0,.2,1);--ease-in-out:cubic-bezier(.4,0,.2,1);--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--blur-sm:8px;--blur-md:12px;--blur-lg:16px;--blur-xl:24px;--blur-2xl:40px;--aspect-video:16/9;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,.voxket-widget-root :after,.voxket-widget-root :before,.voxket-widget-root ::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}.voxket-widget-root ::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,.voxket-widget-root :host{-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-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}.voxket-widget-root hr{height:0;color:inherit;border-top-width:1px}.voxket-widget-root abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.voxket-widget-root h1,.voxket-widget-root h2,.voxket-widget-root h3,.voxket-widget-root h4,.voxket-widget-root h5,.voxket-widget-root h6{font-size:inherit;font-weight:inherit}.voxket-widget-root a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}.voxket-widget-root b,.voxket-widget-root strong{font-weight:bolder}.voxket-widget-root code,.voxket-widget-root kbd,.voxket-widget-root samp,.voxket-widget-root 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}.voxket-widget-root small{font-size:80%}.voxket-widget-root sub,.voxket-widget-root sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}.voxket-widget-root sub{bottom:-.25em}.voxket-widget-root sup{top:-.5em}.voxket-widget-root table{text-indent:0;border-color:inherit;border-collapse:collapse}.voxket-widget-root :-moz-focusring{outline:auto}.voxket-widget-root progress{vertical-align:baseline}.voxket-widget-root summary{display:list-item}.voxket-widget-root ol,.voxket-widget-root ul,.voxket-widget-root menu{list-style:none}.voxket-widget-root img,.voxket-widget-root svg,.voxket-widget-root video,.voxket-widget-root canvas,.voxket-widget-root audio,.voxket-widget-root iframe,.voxket-widget-root embed,.voxket-widget-root object{vertical-align:middle;display:block}.voxket-widget-root img,.voxket-widget-root video{max-width:100%;height:auto}.voxket-widget-root button,.voxket-widget-root input,.voxket-widget-root select,.voxket-widget-root optgroup,.voxket-widget-root textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}.voxket-widget-root ::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}.voxket-widget-root :where(select:is([multiple],.voxket-widget-root [size])) optgroup{font-weight:bolder}.voxket-widget-root :where(select:is([multiple],.voxket-widget-root [size])) optgroup option{padding-inline-start:20px}.voxket-widget-root ::file-selector-button{margin-inline-end:4px}.voxket-widget-root ::-moz-placeholder{opacity:1}.voxket-widget-root ::placeholder{opacity:1}@supports (not (-webkit-appearance:-apple-pay-button)) or (contain-intrinsic-size:1px){.voxket-widget-root ::-moz-placeholder{color:currentColor}.voxket-widget-root ::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root ::-moz-placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}.voxket-widget-root ::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}.voxket-widget-root textarea{resize:vertical}.voxket-widget-root ::-webkit-search-decoration{-webkit-appearance:none}.voxket-widget-root ::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}.voxket-widget-root ::-webkit-datetime-edit{display:inline-flex}.voxket-widget-root ::-webkit-datetime-edit-fields-wrapper{padding:0}.voxket-widget-root ::-webkit-datetime-edit{padding-block:0}.voxket-widget-root ::-webkit-datetime-edit-year-field{padding-block:0}.voxket-widget-root ::-webkit-datetime-edit-month-field{padding-block:0}.voxket-widget-root ::-webkit-datetime-edit-day-field{padding-block:0}.voxket-widget-root ::-webkit-datetime-edit-hour-field{padding-block:0}.voxket-widget-root ::-webkit-datetime-edit-minute-field{padding-block:0}.voxket-widget-root ::-webkit-datetime-edit-second-field{padding-block:0}.voxket-widget-root ::-webkit-datetime-edit-millisecond-field{padding-block:0}.voxket-widget-root ::-webkit-datetime-edit-meridiem-field{padding-block:0}.voxket-widget-root :-moz-ui-invalid{box-shadow:none}.voxket-widget-root button,.voxket-widget-root input:where([type=button],.voxket-widget-root [type=reset],.voxket-widget-root [type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}.voxket-widget-root ::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}.voxket-widget-root ::-webkit-inner-spin-button{height:auto}.voxket-widget-root ::-webkit-outer-spin-button{height:auto}.voxket-widget-root [hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components,utilities;.voxket-widget-root ::-webkit-scrollbar{display:none}.voxket-widget-root .scrollbar-hide{scrollbar-width:none;-ms-overflow-style:none}.voxket-widget-root .scrollbar-hide::-webkit-scrollbar{display:none}.voxket-widget-root .chat-scrollable{scrollbar-width:thin;scrollbar-color:#9b9b9b4d transparent;flex-direction:column;display:flex}.voxket-widget-root .chat-scrollable::-webkit-scrollbar{width:6px;display:block}.voxket-widget-root .chat-scrollable::-webkit-scrollbar-track{background:0 0}.voxket-widget-root .chat-scrollable::-webkit-scrollbar-thumb{background-color:#9b9b9b4d;border-radius:3px}.voxket-widget-root .chat-scrollable::-webkit-scrollbar-thumb:hover{background-color:#9b9b9b80}.voxket-widget-root .chat-messages-container{flex-direction:column;justify-content:flex-end;width:100%;max-width:none;min-height:100%;display:flex}@keyframes pulse-ring{0%{opacity:1;transform:scale(1)}50%{opacity:.6;transform:scale(1.2)}to{opacity:0;transform:scale(1.4)}}@keyframes glow{0%,to{box-shadow:0 0 20px #3b82f680}50%{box-shadow:0 0 30px #3b82f6cc}}.voxket-widget-root .pulse-ring{animation:2s cubic-bezier(.4,0,.6,1) infinite pulse-ring}.voxket-widget-root .mic-glow{animation:2s ease-in-out infinite glow}.voxket-widget-root{color-scheme:light dark;color:#ffffffde;border-radius:\"2xl\";font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background-color:#0000;border-radius:1rem;font-family:system-ui,Avenir,Helvetica,Arial,sans-serif;font-weight:400;line-height:1.5}.voxket-widget-root.theme-light{color:#000000de}.voxket-widget-root.theme-dark,.voxket-widget-root.theme-vox{color:#ffffffde}.voxket-widget-root .animate-spin{animation:1s linear infinite spin}@keyframes spin{to{transform:rotate(360deg)}}.voxket-widget-root button{cursor:pointer}@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-space-y-reverse{syntax:\"*\";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:\"*\";inherits:false;initial-value:0}@property --tw-border-style{syntax:\"*\";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:\"*\";inherits:false}@property --tw-gradient-from{syntax:\"<color>\";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:\"<color>\";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:\"<color>\";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:\"*\";inherits:false}@property --tw-gradient-via-stops{syntax:\"*\";inherits:false}@property --tw-gradient-from-position{syntax:\"<length-percentage>\";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:\"<length-percentage>\";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:\"<length-percentage>\";inherits:false;initial-value:100%}@property --tw-leading{syntax:\"*\";inherits:false}@property --tw-font-weight{syntax:\"*\";inherits:false}@property --tw-tracking{syntax:\"*\";inherits:false}@property --tw-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-backdrop-blur{syntax:\"*\";inherits:false}@property --tw-backdrop-brightness{syntax:\"*\";inherits:false}@property --tw-backdrop-contrast{syntax:\"*\";inherits:false}@property --tw-backdrop-grayscale{syntax:\"*\";inherits:false}@property --tw-backdrop-hue-rotate{syntax:\"*\";inherits:false}@property --tw-backdrop-invert{syntax:\"*\";inherits:false}@property --tw-backdrop-opacity{syntax:\"*\";inherits:false}@property --tw-backdrop-saturate{syntax:\"*\";inherits:false}@property --tw-backdrop-sepia{syntax:\"*\";inherits:false}@property --tw-duration{syntax:\"*\";inherits:false}@property --tw-ease{syntax:\"*\";inherits:false}@property --tw-contain-size{syntax:\"*\";inherits:false}@property --tw-contain-layout{syntax:\"*\";inherits:false}@property --tw-contain-paint{syntax:\"*\";inherits:false}@property --tw-contain-style{syntax:\"*\";inherits:false}@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}@keyframes pulse{50%{opacity:.5}}\n";
11
+ style.textContent = "/*! tailwindcss v4.1.11 | 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)))){*,.voxket-widget-root :before,.voxket-widget-root :after,.voxket-widget-root ::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-contain-size:initial;--tw-contain-layout:initial;--tw-contain-paint:initial;--tw-contain-style:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}.voxket-widget-root .pointer-events-auto{pointer-events:auto}.voxket-widget-root .pointer-events-none{pointer-events:none}.voxket-widget-root .visible{visibility:visible}.voxket-widget-root .absolute{position:absolute}.voxket-widget-root .fixed{position:fixed}.voxket-widget-root .relative{position:relative}.voxket-widget-root .static{position:static}.voxket-widget-root .sticky{position:sticky}.voxket-widget-root .inset-0{inset:calc(var(--spacing)*0)}.voxket-widget-root .inset-4{inset:calc(var(--spacing)*4)}.voxket-widget-root .-top-2{top:calc(var(--spacing)*-2)}.voxket-widget-root .top-0{top:calc(var(--spacing)*0)}.voxket-widget-root .top-1{top:calc(var(--spacing)*1)}.voxket-widget-root .top-2{top:calc(var(--spacing)*2)}.voxket-widget-root .top-4{top:calc(var(--spacing)*4)}.voxket-widget-root .-right-2{right:calc(var(--spacing)*-2)}.voxket-widget-root .right-0{right:calc(var(--spacing)*0)}.voxket-widget-root .right-2{right:calc(var(--spacing)*2)}.voxket-widget-root .right-4{right:calc(var(--spacing)*4)}.voxket-widget-root .right-6{right:calc(var(--spacing)*6)}.voxket-widget-root .-bottom-2{bottom:calc(var(--spacing)*-2)}.voxket-widget-root .bottom-0{bottom:calc(var(--spacing)*0)}.voxket-widget-root .bottom-2{bottom:calc(var(--spacing)*2)}.voxket-widget-root .bottom-4{bottom:calc(var(--spacing)*4)}.voxket-widget-root .bottom-20{bottom:calc(var(--spacing)*20)}.voxket-widget-root .-left-2{left:calc(var(--spacing)*-2)}.voxket-widget-root .left-0{left:calc(var(--spacing)*0)}.voxket-widget-root .left-2{left:calc(var(--spacing)*2)}.voxket-widget-root .left-4{left:calc(var(--spacing)*4)}.voxket-widget-root .z-10{z-index:10}.voxket-widget-root .z-20{z-index:20}.voxket-widget-root .z-50{z-index:50}.voxket-widget-root .z-\\[9999\\]{z-index:9999}.voxket-widget-root .z-\\[10000\\]{z-index:10000}.voxket-widget-root .order-1{order:1}.voxket-widget-root .order-2{order:2}.voxket-widget-root .col-span-2{grid-column:span 2/span 2}.voxket-widget-root .col-start-1{grid-column-start:1}.voxket-widget-root .col-start-2{grid-column-start:2}.voxket-widget-root .row-span-3{grid-row:span 3/span 3}.voxket-widget-root .row-start-1{grid-row-start:1}.voxket-widget-root .row-start-3{grid-row-start:3}.voxket-widget-root .container{width:100%}@media (min-width:40rem){.voxket-widget-root .container{max-width:40rem}}@media (min-width:48rem){.voxket-widget-root .container{max-width:48rem}}@media (min-width:64rem){.voxket-widget-root .container{max-width:64rem}}@media (min-width:80rem){.voxket-widget-root .container{max-width:80rem}}@media (min-width:96rem){.voxket-widget-root .container{max-width:96rem}}.voxket-widget-root .m-4{margin:calc(var(--spacing)*4)}.voxket-widget-root .-mx-1{margin-inline:calc(var(--spacing)*-1)}.voxket-widget-root .mx-0{margin-inline:calc(var(--spacing)*0)}.voxket-widget-root .mx-0\\.5{margin-inline:calc(var(--spacing)*.5)}.voxket-widget-root .mx-3{margin-inline:calc(var(--spacing)*3)}.voxket-widget-root .mx-4{margin-inline:calc(var(--spacing)*4)}.voxket-widget-root .mx-8{margin-inline:calc(var(--spacing)*8)}.voxket-widget-root .mx-auto{margin-inline:auto}.voxket-widget-root .my-1{margin-block:calc(var(--spacing)*1)}.voxket-widget-root .mt-0\\.5{margin-top:calc(var(--spacing)*.5)}.voxket-widget-root .mt-1{margin-top:calc(var(--spacing)*1)}.voxket-widget-root .mt-2{margin-top:calc(var(--spacing)*2)}.voxket-widget-root .mt-4{margin-top:calc(var(--spacing)*4)}.voxket-widget-root .mt-6{margin-top:calc(var(--spacing)*6)}.voxket-widget-root .mt-8{margin-top:calc(var(--spacing)*8)}.voxket-widget-root .mr-1{margin-right:calc(var(--spacing)*1)}.voxket-widget-root .mr-2{margin-right:calc(var(--spacing)*2)}.voxket-widget-root .mr-3{margin-right:calc(var(--spacing)*3)}.voxket-widget-root .mb-1{margin-bottom:calc(var(--spacing)*1)}.voxket-widget-root .mb-2{margin-bottom:calc(var(--spacing)*2)}.voxket-widget-root .mb-3{margin-bottom:calc(var(--spacing)*3)}.voxket-widget-root .mb-4{margin-bottom:calc(var(--spacing)*4)}.voxket-widget-root .mb-6{margin-bottom:calc(var(--spacing)*6)}.voxket-widget-root .mb-8{margin-bottom:calc(var(--spacing)*8)}.voxket-widget-root .ml-1{margin-left:calc(var(--spacing)*1)}.voxket-widget-root .ml-2{margin-left:calc(var(--spacing)*2)}.voxket-widget-root .ml-auto{margin-left:auto}.voxket-widget-root .line-clamp-1{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.voxket-widget-root .block{display:block}.voxket-widget-root .flex{display:flex}.voxket-widget-root .grid{display:grid}.voxket-widget-root .hidden{display:none}.voxket-widget-root .inline{display:inline}.voxket-widget-root .inline-block{display:inline-block}.voxket-widget-root .inline-flex{display:inline-flex}.voxket-widget-root .aspect-square{aspect-ratio:1}.voxket-widget-root .aspect-video{aspect-ratio:var(--aspect-video)}.voxket-widget-root .size-3\\.5{width:calc(var(--spacing)*3.5);height:calc(var(--spacing)*3.5)}.voxket-widget-root .size-4{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.voxket-widget-root .size-9{width:calc(var(--spacing)*9);height:calc(var(--spacing)*9)}.voxket-widget-root .h-0{height:calc(var(--spacing)*0)}.voxket-widget-root .h-1{height:calc(var(--spacing)*1)}.voxket-widget-root .h-1\\.5{height:calc(var(--spacing)*1.5)}.voxket-widget-root .h-2{height:calc(var(--spacing)*2)}.voxket-widget-root .h-3{height:calc(var(--spacing)*3)}.voxket-widget-root .h-4{height:calc(var(--spacing)*4)}.voxket-widget-root .h-5{height:calc(var(--spacing)*5)}.voxket-widget-root .h-6{height:calc(var(--spacing)*6)}.voxket-widget-root .h-8{height:calc(var(--spacing)*8)}.voxket-widget-root .h-9{height:calc(var(--spacing)*9)}.voxket-widget-root .h-10{height:calc(var(--spacing)*10)}.voxket-widget-root .h-12{height:calc(var(--spacing)*12)}.voxket-widget-root .h-16{height:calc(var(--spacing)*16)}.voxket-widget-root .h-20{height:calc(var(--spacing)*20)}.voxket-widget-root .h-24{height:calc(var(--spacing)*24)}.voxket-widget-root .h-28{height:calc(var(--spacing)*28)}.voxket-widget-root .h-32{height:calc(var(--spacing)*32)}.voxket-widget-root .h-96{height:calc(var(--spacing)*96)}.voxket-widget-root .h-\\[25rem\\]{height:25rem}.voxket-widget-root .h-\\[30rem\\]{height:30rem}.voxket-widget-root .h-\\[56px\\]{height:56px}.voxket-widget-root .h-\\[60px\\]{height:60px}.voxket-widget-root .h-\\[70px\\]{height:70px}.voxket-widget-root .h-\\[90px\\]{height:90px}.voxket-widget-root .h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.voxket-widget-root .h-auto{height:auto}.voxket-widget-root .h-fit{height:-moz-fit-content;height:fit-content}.voxket-widget-root .h-full{height:100%}.voxket-widget-root .h-px{height:1px}.voxket-widget-root .h-screen{height:100vh}.voxket-widget-root .max-h-\\(--radix-select-content-available-height\\){max-height:var(--radix-select-content-available-height)}.voxket-widget-root .max-h-20{max-height:calc(var(--spacing)*20)}.voxket-widget-root .max-h-48{max-height:calc(var(--spacing)*48)}.voxket-widget-root .max-h-\\[80vh\\]{max-height:80vh}.voxket-widget-root .max-h-\\[85vh\\]{max-height:85vh}.voxket-widget-root .max-h-\\[95vh\\]{max-height:95vh}.voxket-widget-root .max-h-full{max-height:100%}.voxket-widget-root .min-h-0{min-height:calc(var(--spacing)*0)}.voxket-widget-root .min-h-2{min-height:calc(var(--spacing)*2)}.voxket-widget-root .min-h-4{min-height:calc(var(--spacing)*4)}.voxket-widget-root .min-h-\\[3rem\\]{min-height:3rem}.voxket-widget-root .min-h-\\[32px\\]{min-height:32px}.voxket-widget-root .min-h-\\[180px\\]{min-height:180px}.voxket-widget-root .min-h-fit{min-height:-moz-fit-content;min-height:fit-content}.voxket-widget-root .min-h-screen{min-height:100vh}.voxket-widget-root .\\!w-full{width:100%!important}.voxket-widget-root .w-0\\.5{width:calc(var(--spacing)*.5)}.voxket-widget-root .w-1\\.5{width:calc(var(--spacing)*1.5)}.voxket-widget-root .w-2{width:calc(var(--spacing)*2)}.voxket-widget-root .w-3{width:calc(var(--spacing)*3)}.voxket-widget-root .w-4{width:calc(var(--spacing)*4)}.voxket-widget-root .w-5{width:calc(var(--spacing)*5)}.voxket-widget-root .w-6{width:calc(var(--spacing)*6)}.voxket-widget-root .w-8{width:calc(var(--spacing)*8)}.voxket-widget-root .w-10{width:calc(var(--spacing)*10)}.voxket-widget-root .w-12{width:calc(var(--spacing)*12)}.voxket-widget-root .w-16{width:calc(var(--spacing)*16)}.voxket-widget-root .w-20{width:calc(var(--spacing)*20)}.voxket-widget-root .w-24{width:calc(var(--spacing)*24)}.voxket-widget-root .w-28{width:calc(var(--spacing)*28)}.voxket-widget-root .w-32{width:calc(var(--spacing)*32)}.voxket-widget-root .w-40{width:calc(var(--spacing)*40)}.voxket-widget-root .w-80{width:calc(var(--spacing)*80)}.voxket-widget-root .w-96{width:calc(var(--spacing)*96)}.voxket-widget-root .w-\\[32rem\\]{width:32rem}.voxket-widget-root .w-\\[180px\\]{width:180px}.voxket-widget-root .w-auto{width:auto}.voxket-widget-root .w-fit{width:-moz-fit-content;width:fit-content}.voxket-widget-root .w-full{width:100%}.voxket-widget-root .w-screen{width:100vw}.voxket-widget-root .max-w-2xl{max-width:var(--container-2xl)}.voxket-widget-root .max-w-3xl{max-width:var(--container-3xl)}.voxket-widget-root .max-w-4xl{max-width:var(--container-4xl)}.voxket-widget-root .max-w-5xl{max-width:var(--container-5xl)}.voxket-widget-root .max-w-6xl{max-width:var(--container-6xl)}.voxket-widget-root .max-w-7xl{max-width:var(--container-7xl)}.voxket-widget-root .max-w-\\[85\\%\\]{max-width:85%}.voxket-widget-root .max-w-full{max-width:100%}.voxket-widget-root .max-w-lg{max-width:var(--container-lg)}.voxket-widget-root .max-w-md{max-width:var(--container-md)}.voxket-widget-root .max-w-none{max-width:none}.voxket-widget-root .max-w-sm{max-width:var(--container-sm)}.voxket-widget-root .max-w-xs{max-width:var(--container-xs)}.voxket-widget-root .min-w-0{min-width:calc(var(--spacing)*0)}.voxket-widget-root .min-w-8{min-width:calc(var(--spacing)*8)}.voxket-widget-root .min-w-9{min-width:calc(var(--spacing)*9)}.voxket-widget-root .min-w-10{min-width:calc(var(--spacing)*10)}.voxket-widget-root .min-w-\\[2\\.5rem\\]{min-width:2.5rem}.voxket-widget-root .min-w-\\[8rem\\]{min-width:8rem}.voxket-widget-root .min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.voxket-widget-root .flex-1{flex:1}.voxket-widget-root .flex-shrink-0,.voxket-widget-root .shrink-0{flex-shrink:0}.voxket-widget-root .origin-\\(--radix-select-content-transform-origin\\){transform-origin:var(--radix-select-content-transform-origin)}.voxket-widget-root .origin-center{transform-origin:50%}.voxket-widget-root .translate-y-0{--tw-translate-y:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.voxket-widget-root .translate-y-10{--tw-translate-y:calc(var(--spacing)*10);translate:var(--tw-translate-x)var(--tw-translate-y)}.voxket-widget-root .animate-bounce{animation:var(--animate-bounce)}.voxket-widget-root .animate-pulse{animation:var(--animate-pulse)}.voxket-widget-root .cursor-default{cursor:default}.voxket-widget-root .cursor-not-allowed{cursor:not-allowed}.voxket-widget-root .cursor-pointer{cursor:pointer}.voxket-widget-root .resize{resize:both}.voxket-widget-root .resize-none{resize:none}.voxket-widget-root .scroll-my-1{scroll-margin-block:calc(var(--spacing)*1)}.voxket-widget-root .list-inside{list-style-position:inside}.voxket-widget-root .list-decimal{list-style-type:decimal}.voxket-widget-root .list-disc{list-style-type:disc}.voxket-widget-root .grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.voxket-widget-root .grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.voxket-widget-root .grid-cols-\\[0_1fr\\]{grid-template-columns:0 1fr}.voxket-widget-root .grid-cols-\\[1fr_1fr\\]{grid-template-columns:1fr 1fr}.voxket-widget-root .grid-rows-\\[90px_1fr_90px\\]{grid-template-rows:90px 1fr 90px}.voxket-widget-root .flex-col{flex-direction:column}.voxket-widget-root .flex-row{flex-direction:row}.voxket-widget-root .flex-row-reverse{flex-direction:row-reverse}.voxket-widget-root .flex-wrap{flex-wrap:wrap}.voxket-widget-root .place-content-center{place-content:center}.voxket-widget-root .place-content-end{place-content:end}.voxket-widget-root .items-center{align-items:center}.voxket-widget-root .items-end{align-items:flex-end}.voxket-widget-root .items-start{align-items:flex-start}.voxket-widget-root .justify-between{justify-content:space-between}.voxket-widget-root .justify-center{justify-content:center}.voxket-widget-root .justify-end{justify-content:flex-end}.voxket-widget-root .justify-start{justify-content:flex-start}.voxket-widget-root .justify-items-start{justify-items:start}.voxket-widget-root .gap-1{gap:calc(var(--spacing)*1)}.voxket-widget-root .gap-1\\.5{gap:calc(var(--spacing)*1.5)}.voxket-widget-root .gap-2{gap:calc(var(--spacing)*2)}.voxket-widget-root .gap-3{gap:calc(var(--spacing)*3)}.voxket-widget-root .gap-4{gap:calc(var(--spacing)*4)}.voxket-widget-root .gap-6{gap:calc(var(--spacing)*6)}.voxket-widget-root .gap-8{gap:calc(var(--spacing)*8)}.voxket-widget-root :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)))}.voxket-widget-root :where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}.voxket-widget-root :where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*3)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-y-reverse)))}.voxket-widget-root :where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}.voxket-widget-root :where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}.voxket-widget-root :where(.space-y-8>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*8)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*8)*calc(1 - var(--tw-space-y-reverse)))}.voxket-widget-root .gap-x-0\\.5{-moz-column-gap:calc(var(--spacing)*.5);column-gap:calc(var(--spacing)*.5)}.voxket-widget-root .gap-x-2{-moz-column-gap:calc(var(--spacing)*2);column-gap:calc(var(--spacing)*2)}.voxket-widget-root :where(.space-x-1>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*1)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-x-reverse)))}.voxket-widget-root :where(.space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*2)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-x-reverse)))}.voxket-widget-root :where(.space-x-3>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*3)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-x-reverse)))}.voxket-widget-root :where(.space-x-4>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*4)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-x-reverse)))}.voxket-widget-root .gap-y-0\\.5{row-gap:calc(var(--spacing)*.5)}.voxket-widget-root .gap-y-2{row-gap:calc(var(--spacing)*2)}.voxket-widget-root .self-center{align-self:center}.voxket-widget-root .justify-self-end{justify-self:flex-end}.voxket-widget-root .justify-self-start{justify-self:flex-start}.voxket-widget-root .truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.voxket-widget-root .overflow-auto{overflow:auto}.voxket-widget-root .overflow-hidden{overflow:hidden}.voxket-widget-root .overflow-x-auto{overflow-x:auto}.voxket-widget-root .overflow-x-hidden{overflow-x:hidden}.voxket-widget-root .overflow-y-auto{overflow-y:auto}.voxket-widget-root .rounded{border-radius:.25rem}.voxket-widget-root .rounded-2xl{border-radius:var(--radius-2xl)}.voxket-widget-root .rounded-3xl{border-radius:var(--radius-3xl)}.voxket-widget-root .rounded-full{border-radius:3.40282e38px}.voxket-widget-root .rounded-lg{border-radius:var(--radius-lg)}.voxket-widget-root .rounded-md{border-radius:var(--radius-md)}.voxket-widget-root .rounded-none{border-radius:0}.voxket-widget-root .rounded-sm{border-radius:var(--radius-sm)}.voxket-widget-root .rounded-xl{border-radius:var(--radius-xl)}.voxket-widget-root .rounded-t-4xl{border-top-left-radius:var(--radius-4xl);border-top-right-radius:var(--radius-4xl)}.voxket-widget-root .rounded-br-md{border-bottom-right-radius:var(--radius-md)}.voxket-widget-root .rounded-bl-md{border-bottom-left-radius:var(--radius-md)}.voxket-widget-root .border{border-style:var(--tw-border-style);border-width:1px}.voxket-widget-root .border-0{border-style:var(--tw-border-style);border-width:0}.voxket-widget-root .border-2{border-style:var(--tw-border-style);border-width:2px}.voxket-widget-root .border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.voxket-widget-root .border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.voxket-widget-root .border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.voxket-widget-root .\\!border-none{--tw-border-style:none!important;border-style:none!important}.voxket-widget-root .border-none{--tw-border-style:none;border-style:none}.voxket-widget-root .border-\\[\\#3B82F6\\]\\/40{border-color:#3b82f666}.voxket-widget-root .border-\\[\\#8B5CF6\\]\\/30{border-color:#8b5cf64d}.voxket-widget-root .border-\\[\\#813aa7\\]\\/30{border-color:#813aa74d}.voxket-widget-root .border-\\[\\#5078F2\\]\\/30{border-color:#5078f24d}.voxket-widget-root .border-\\[\\#23233a\\]{border-color:#23233a}.voxket-widget-root .border-\\[\\#232336\\]{border-color:#232336}.voxket-widget-root .border-\\[\\#EC4899\\]\\/20{border-color:#ec489933}.voxket-widget-root .border-blue-100{border-color:var(--color-blue-100)}.voxket-widget-root .border-blue-200{border-color:var(--color-blue-200)}.voxket-widget-root .border-blue-400{border-color:var(--color-blue-400)}.voxket-widget-root .border-blue-500{border-color:var(--color-blue-500)}.voxket-widget-root .border-blue-500\\/20{border-color:#3080ff33}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .border-blue-500\\/20{border-color:color-mix(in oklab,var(--color-blue-500)20%,transparent)}}.voxket-widget-root .border-blue-600{border-color:var(--color-blue-600)}.voxket-widget-root .border-current{border-color:currentColor}.voxket-widget-root .border-gray-200{border-color:var(--color-gray-200)}.voxket-widget-root .border-gray-300{border-color:var(--color-gray-300)}.voxket-widget-root .border-gray-400\\/15{border-color:#99a1af26}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .border-gray-400\\/15{border-color:color-mix(in oklab,var(--color-gray-400)15%,transparent)}}.voxket-widget-root .border-gray-500\\/20{border-color:#6a728233}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .border-gray-500\\/20{border-color:color-mix(in oklab,var(--color-gray-500)20%,transparent)}}.voxket-widget-root .border-gray-600{border-color:var(--color-gray-600)}.voxket-widget-root .border-gray-600\\/30{border-color:#4a55654d}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .border-gray-600\\/30{border-color:color-mix(in oklab,var(--color-gray-600)30%,transparent)}}.voxket-widget-root .border-gray-700{border-color:var(--color-gray-700)}.voxket-widget-root .border-gray-800{border-color:var(--color-gray-800)}.voxket-widget-root .border-gray-900{border-color:var(--color-gray-900)}.voxket-widget-root .border-green-200{border-color:var(--color-green-200)}.voxket-widget-root .border-pink-500\\/10{border-color:#f6339a1a}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .border-pink-500\\/10{border-color:color-mix(in oklab,var(--color-pink-500)10%,transparent)}}.voxket-widget-root .border-purple-500\\/15{border-color:#ac4bff26}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .border-purple-500\\/15{border-color:color-mix(in oklab,var(--color-purple-500)15%,transparent)}}.voxket-widget-root .border-red-200{border-color:var(--color-red-200)}.voxket-widget-root .border-red-800{border-color:var(--color-red-800)}.voxket-widget-root .border-white{border-color:var(--color-white)}.voxket-widget-root .border-white\\/20{border-color:#fff3}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .border-white\\/20{border-color:color-mix(in oklab,var(--color-white)20%,transparent)}}.voxket-widget-root .border-yellow-200{border-color:var(--color-yellow-200)}.voxket-widget-root .border-t-transparent{border-top-color:#0000}.voxket-widget-root .bg-\\[\\#1E1E2E\\]{background-color:#1e1e2e}.voxket-widget-root .bg-\\[\\#1E1E2E\\]\\/80{background-color:#1e1e2ecc}.voxket-widget-root .bg-\\[\\#1E1E2E\\]\\/90{background-color:#1e1e2ee6}.voxket-widget-root .bg-\\[\\#3B82F6\\]{background-color:#3b82f6}.voxket-widget-root .bg-\\[\\#5c64f6\\]{background-color:#5c64f6}.voxket-widget-root .bg-\\[\\#10B981\\]{background-color:#10b981}.voxket-widget-root .bg-\\[\\#221f3f\\]{background-color:#221f3f}.voxket-widget-root .bg-\\[\\#813aa7\\]{background-color:#813aa7}.voxket-widget-root .bg-\\[\\#5078F2\\]{background-color:#5078f2}.voxket-widget-root .bg-\\[\\#6721a4\\]{background-color:#6721a4}.voxket-widget-root .bg-\\[\\#18182a\\]\\/80{background-color:#18182acc}.voxket-widget-root .bg-\\[\\#18182a\\]\\/90{background-color:#18182ae6}.voxket-widget-root .bg-black{background-color:var(--color-black)}.voxket-widget-root .bg-black\\/0{background-color:#0000}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-black\\/0{background-color:color-mix(in oklab,var(--color-black)0%,transparent)}}.voxket-widget-root .bg-black\\/40{background-color:#0006}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-black\\/40{background-color:color-mix(in oklab,var(--color-black)40%,transparent)}}.voxket-widget-root .bg-black\\/50{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-black\\/50{background-color:color-mix(in oklab,var(--color-black)50%,transparent)}}.voxket-widget-root .bg-black\\/70{background-color:#000000b3}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-black\\/70{background-color:color-mix(in oklab,var(--color-black)70%,transparent)}}.voxket-widget-root .bg-black\\/80{background-color:#000c}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-black\\/80{background-color:color-mix(in oklab,var(--color-black)80%,transparent)}}.voxket-widget-root .bg-blue-50{background-color:var(--color-blue-50)}.voxket-widget-root .bg-blue-100{background-color:var(--color-blue-100)}.voxket-widget-root .bg-blue-200{background-color:var(--color-blue-200)}.voxket-widget-root .bg-blue-400{background-color:var(--color-blue-400)}.voxket-widget-root .bg-blue-500{background-color:var(--color-blue-500)}.voxket-widget-root .bg-blue-600{background-color:var(--color-blue-600)}.voxket-widget-root .bg-blue-900\\/50{background-color:#1c398e80}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-blue-900\\/50{background-color:color-mix(in oklab,var(--color-blue-900)50%,transparent)}}.voxket-widget-root .bg-current{background-color:currentColor}.voxket-widget-root .bg-gray-50{background-color:var(--color-gray-50)}.voxket-widget-root .bg-gray-100{background-color:var(--color-gray-100)}.voxket-widget-root .bg-gray-200{background-color:var(--color-gray-200)}.voxket-widget-root .bg-gray-400{background-color:var(--color-gray-400)}.voxket-widget-root .bg-gray-600{background-color:var(--color-gray-600)}.voxket-widget-root .bg-gray-600\\/50{background-color:#4a556580}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-gray-600\\/50{background-color:color-mix(in oklab,var(--color-gray-600)50%,transparent)}}.voxket-widget-root .bg-gray-700{background-color:var(--color-gray-700)}.voxket-widget-root .bg-gray-700\\/50{background-color:#36415380}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-gray-700\\/50{background-color:color-mix(in oklab,var(--color-gray-700)50%,transparent)}}.voxket-widget-root .bg-gray-800{background-color:var(--color-gray-800)}.voxket-widget-root .bg-gray-800\\/50{background-color:#1e293980}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-gray-800\\/50{background-color:color-mix(in oklab,var(--color-gray-800)50%,transparent)}}.voxket-widget-root .bg-gray-800\\/90{background-color:#1e2939e6}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-gray-800\\/90{background-color:color-mix(in oklab,var(--color-gray-800)90%,transparent)}}.voxket-widget-root .bg-gray-900{background-color:var(--color-gray-900)}.voxket-widget-root .bg-gray-900\\/50{background-color:#10182880}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-gray-900\\/50{background-color:color-mix(in oklab,var(--color-gray-900)50%,transparent)}}.voxket-widget-root .bg-gray-900\\/80{background-color:#101828cc}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-gray-900\\/80{background-color:color-mix(in oklab,var(--color-gray-900)80%,transparent)}}.voxket-widget-root .bg-gray-900\\/95{background-color:#101828f2}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-gray-900\\/95{background-color:color-mix(in oklab,var(--color-gray-900)95%,transparent)}}.voxket-widget-root .bg-green-50{background-color:var(--color-green-50)}.voxket-widget-root .bg-green-500{background-color:var(--color-green-500)}.voxket-widget-root .bg-green-600{background-color:var(--color-green-600)}.voxket-widget-root .bg-indigo-600{background-color:var(--color-indigo-600)}.voxket-widget-root .bg-purple-500{background-color:var(--color-purple-500)}.voxket-widget-root .bg-purple-600{background-color:var(--color-purple-600)}.voxket-widget-root .bg-red-50{background-color:var(--color-red-50)}.voxket-widget-root .bg-red-500{background-color:var(--color-red-500)}.voxket-widget-root .bg-red-600{background-color:var(--color-red-600)}.voxket-widget-root .bg-red-600\\/80{background-color:#e40014cc}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-red-600\\/80{background-color:color-mix(in oklab,var(--color-red-600)80%,transparent)}}.voxket-widget-root .bg-red-900\\/20{background-color:#82181a33}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-red-900\\/20{background-color:color-mix(in oklab,var(--color-red-900)20%,transparent)}}.voxket-widget-root .bg-transparent{background-color:#0000}.voxket-widget-root .bg-white{background-color:var(--color-white)}.voxket-widget-root .bg-white\\/10{background-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-white\\/10{background-color:color-mix(in oklab,var(--color-white)10%,transparent)}}.voxket-widget-root .bg-white\\/20{background-color:#fff3}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-white\\/20{background-color:color-mix(in oklab,var(--color-white)20%,transparent)}}.voxket-widget-root .bg-white\\/80{background-color:#fffc}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-white\\/80{background-color:color-mix(in oklab,var(--color-white)80%,transparent)}}.voxket-widget-root .bg-white\\/90{background-color:#ffffffe6}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-white\\/90{background-color:color-mix(in oklab,var(--color-white)90%,transparent)}}.voxket-widget-root .bg-white\\/95{background-color:#fffffff2}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-white\\/95{background-color:color-mix(in oklab,var(--color-white)95%,transparent)}}.voxket-widget-root .bg-yellow-50{background-color:var(--color-yellow-50)}.voxket-widget-root .bg-yellow-500{background-color:var(--color-yellow-500)}.voxket-widget-root .bg-gradient-to-b{--tw-gradient-position:to bottom in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.voxket-widget-root .bg-gradient-to-br{--tw-gradient-position:to bottom right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.voxket-widget-root .bg-gradient-to-r{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.voxket-widget-root .bg-gradient-to-tr{--tw-gradient-position:to top right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.voxket-widget-root .bg-\\[radial-gradient\\(ellipse_at_center\\, .voxket-widget-root _var\\(--tw-gradient-stops\\)\\)\\]{background-image:radial-gradient(ellipse at center,var(--tw-gradient-stops))}.voxket-widget-root .from-\\[\\#3B82F6\\]{--tw-gradient-from:#3b82f6;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-\\[\\#3B82F6\\]\\/15{--tw-gradient-from:oklab(62.3083% -.0332476 -.185052/.15);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-\\[\\#8B5CF6\\]{--tw-gradient-from:#8b5cf6;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-\\[\\#8B5CF6\\]\\/25{--tw-gradient-from:oklab(60.5631% .0845415 -.201932/.25);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-\\[\\#10B981\\]{--tw-gradient-from:#10b981;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-\\[\\#171727\\]{--tw-gradient-from:#171727;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-\\[\\#171727\\]\\/90{--tw-gradient-from:oklab(21.3014% .00727232 -.0304822/.9);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-\\[\\#181825\\]{--tw-gradient-from:#181825;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-\\[\\#EC4899\\]{--tw-gradient-from:#ec4899;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-\\[\\#EC4899\\]\\/20{--tw-gradient-from:oklab(65.592% .210729 -.0210022/.2);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-black{--tw-gradient-from:var(--color-black);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-black\\/90{--tw-gradient-from:#000000e6}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .from-black\\/90{--tw-gradient-from:color-mix(in oklab,var(--color-black)90%,transparent)}}.voxket-widget-root .from-black\\/90{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-blue-500{--tw-gradient-from:var(--color-blue-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-blue-500\\/5{--tw-gradient-from:#3080ff0d}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .from-blue-500\\/5{--tw-gradient-from:color-mix(in oklab,var(--color-blue-500)5%,transparent)}}.voxket-widget-root .from-blue-500\\/5{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-blue-600{--tw-gradient-from:var(--color-blue-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-gray-400{--tw-gradient-from:var(--color-gray-400);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-gray-500{--tw-gradient-from:var(--color-gray-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-gray-500\\/8{--tw-gradient-from:#6a728214}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .from-gray-500\\/8{--tw-gradient-from:color-mix(in oklab,var(--color-gray-500)8%,transparent)}}.voxket-widget-root .from-gray-500\\/8{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-gray-600{--tw-gradient-from:var(--color-gray-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-gray-600\\/10{--tw-gradient-from:#4a55651a}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .from-gray-600\\/10{--tw-gradient-from:color-mix(in oklab,var(--color-gray-600)10%,transparent)}}.voxket-widget-root .from-gray-600\\/10{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-gray-800\\/20{--tw-gradient-from:#1e293933}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .from-gray-800\\/20{--tw-gradient-from:color-mix(in oklab,var(--color-gray-800)20%,transparent)}}.voxket-widget-root .from-gray-800\\/20{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-pink-500{--tw-gradient-from:var(--color-pink-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-pink-500\\/8{--tw-gradient-from:#f6339a14}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .from-pink-500\\/8{--tw-gradient-from:color-mix(in oklab,var(--color-pink-500)8%,transparent)}}.voxket-widget-root .from-pink-500\\/8{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-purple-500\\/10{--tw-gradient-from:#ac4bff1a}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .from-purple-500\\/10{--tw-gradient-from:color-mix(in oklab,var(--color-purple-500)10%,transparent)}}.voxket-widget-root .from-purple-500\\/10{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-white{--tw-gradient-from:var(--color-white);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-white\\/90{--tw-gradient-from:#ffffffe6}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .from-white\\/90{--tw-gradient-from:color-mix(in oklab,var(--color-white)90%,transparent)}}.voxket-widget-root .from-white\\/90{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .via-\\[\\#8B5CF6\\]{--tw-gradient-via:#8b5cf6;--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.voxket-widget-root .via-gray-200{--tw-gradient-via:var(--color-gray-200);--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.voxket-widget-root .via-purple-600{--tw-gradient-via:var(--color-purple-600);--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.voxket-widget-root .via-transparent{--tw-gradient-via:transparent;--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.voxket-widget-root .to-\\[\\#8B5CF6\\]{--tw-gradient-to:#8b5cf6;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .to-\\[\\#12121F\\]{--tw-gradient-to:#12121f;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .to-\\[\\#059669\\]{--tw-gradient-to:#059669;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .to-\\[\\#232336\\]{--tw-gradient-to:#232336;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .to-\\[\\#EC4899\\]{--tw-gradient-to:#ec4899;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .to-gray-50{--tw-gradient-to:var(--color-gray-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .to-gray-300{--tw-gradient-to:var(--color-gray-300);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .to-gray-500{--tw-gradient-to:var(--color-gray-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .to-gray-600{--tw-gradient-to:var(--color-gray-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .to-gray-700{--tw-gradient-to:var(--color-gray-700);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .to-gray-900{--tw-gradient-to:var(--color-gray-900);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .to-pink-600{--tw-gradient-to:var(--color-pink-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .to-purple-500{--tw-gradient-to:var(--color-purple-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .to-purple-600{--tw-gradient-to:var(--color-purple-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .to-transparent{--tw-gradient-to:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .bg-clip-text{-webkit-background-clip:text;background-clip:text}.voxket-widget-root .object-cover{-o-object-fit:cover;object-fit:cover}.voxket-widget-root .p-0{padding:calc(var(--spacing)*0)}.voxket-widget-root .p-1{padding:calc(var(--spacing)*1)}.voxket-widget-root .p-2{padding:calc(var(--spacing)*2)}.voxket-widget-root .p-3{padding:calc(var(--spacing)*3)}.voxket-widget-root .p-4{padding:calc(var(--spacing)*4)}.voxket-widget-root .p-6{padding:calc(var(--spacing)*6)}.voxket-widget-root .p-8{padding:calc(var(--spacing)*8)}.voxket-widget-root .px-0{padding-inline:calc(var(--spacing)*0)}.voxket-widget-root .px-1{padding-inline:calc(var(--spacing)*1)}.voxket-widget-root .px-1\\.5{padding-inline:calc(var(--spacing)*1.5)}.voxket-widget-root .px-2{padding-inline:calc(var(--spacing)*2)}.voxket-widget-root .px-2\\.5{padding-inline:calc(var(--spacing)*2.5)}.voxket-widget-root .px-3{padding-inline:calc(var(--spacing)*3)}.voxket-widget-root .px-4{padding-inline:calc(var(--spacing)*4)}.voxket-widget-root .px-5{padding-inline:calc(var(--spacing)*5)}.voxket-widget-root .px-6{padding-inline:calc(var(--spacing)*6)}.voxket-widget-root .px-8{padding-inline:calc(var(--spacing)*8)}.voxket-widget-root .px-10{padding-inline:calc(var(--spacing)*10)}.voxket-widget-root .py-0{padding-block:calc(var(--spacing)*0)}.voxket-widget-root .py-1{padding-block:calc(var(--spacing)*1)}.voxket-widget-root .py-1\\.5{padding-block:calc(var(--spacing)*1.5)}.voxket-widget-root .py-2{padding-block:calc(var(--spacing)*2)}.voxket-widget-root .py-3{padding-block:calc(var(--spacing)*3)}.voxket-widget-root .py-4{padding-block:calc(var(--spacing)*4)}.voxket-widget-root .py-8{padding-block:calc(var(--spacing)*8)}.voxket-widget-root .py-12{padding-block:calc(var(--spacing)*12)}.voxket-widget-root .pt-3{padding-top:calc(var(--spacing)*3)}.voxket-widget-root .pt-5{padding-top:calc(var(--spacing)*5)}.voxket-widget-root .pr-8{padding-right:calc(var(--spacing)*8)}.voxket-widget-root .pb-2{padding-bottom:calc(var(--spacing)*2)}.voxket-widget-root .pb-3{padding-bottom:calc(var(--spacing)*3)}.voxket-widget-root .pb-4{padding-bottom:calc(var(--spacing)*4)}.voxket-widget-root .pl-1{padding-left:calc(var(--spacing)*1)}.voxket-widget-root .pl-2{padding-left:calc(var(--spacing)*2)}.voxket-widget-root .text-center{text-align:center}.voxket-widget-root .text-end{text-align:end}.voxket-widget-root .text-left{text-align:left}.voxket-widget-root .text-right{text-align:right}.voxket-widget-root .font-mono{font-family:var(--font-mono)}.voxket-widget-root .text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.voxket-widget-root .text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.voxket-widget-root .text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.voxket-widget-root .text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.voxket-widget-root .text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.voxket-widget-root .text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.voxket-widget-root .text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.voxket-widget-root .text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.voxket-widget-root .leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.voxket-widget-root .leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.voxket-widget-root .leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.voxket-widget-root .font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.voxket-widget-root .font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.voxket-widget-root .font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.voxket-widget-root .tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.voxket-widget-root .tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.voxket-widget-root .break-words{overflow-wrap:break-word}.voxket-widget-root .whitespace-nowrap{white-space:nowrap}.voxket-widget-root .whitespace-pre-line{white-space:pre-line}.voxket-widget-root .whitespace-pre-wrap{white-space:pre-wrap}.voxket-widget-root .text-black{color:var(--color-black)}.voxket-widget-root .text-blue-300{color:var(--color-blue-300)}.voxket-widget-root .text-blue-400{color:var(--color-blue-400)}.voxket-widget-root .text-blue-500{color:var(--color-blue-500)}.voxket-widget-root .text-blue-600{color:var(--color-blue-600)}.voxket-widget-root .text-blue-700{color:var(--color-blue-700)}.voxket-widget-root .text-blue-800{color:var(--color-blue-800)}.voxket-widget-root .text-gray-200{color:var(--color-gray-200)}.voxket-widget-root .text-gray-300{color:var(--color-gray-300)}.voxket-widget-root .text-gray-400{color:var(--color-gray-400)}.voxket-widget-root .text-gray-500{color:var(--color-gray-500)}.voxket-widget-root .text-gray-600{color:var(--color-gray-600)}.voxket-widget-root .text-gray-700{color:var(--color-gray-700)}.voxket-widget-root .text-gray-800{color:var(--color-gray-800)}.voxket-widget-root .text-gray-900{color:var(--color-gray-900)}.voxket-widget-root .text-green-700{color:var(--color-green-700)}.voxket-widget-root .text-inherit{color:inherit}.voxket-widget-root .text-red-400{color:var(--color-red-400)}.voxket-widget-root .text-red-500{color:var(--color-red-500)}.voxket-widget-root .text-red-600{color:var(--color-red-600)}.voxket-widget-root .text-red-700{color:var(--color-red-700)}.voxket-widget-root .text-transparent{color:#0000}.voxket-widget-root .text-white{color:var(--color-white)}.voxket-widget-root .text-yellow-400{color:var(--color-yellow-400)}.voxket-widget-root .text-yellow-700{color:var(--color-yellow-700)}.voxket-widget-root .uppercase{text-transform:uppercase}.voxket-widget-root .italic{font-style:italic}.voxket-widget-root .underline-offset-4{text-underline-offset:4px}.voxket-widget-root .placeholder-gray-400::-moz-placeholder{color:var(--color-gray-400)}.voxket-widget-root .placeholder-gray-400::placeholder{color:var(--color-gray-400)}.voxket-widget-root .placeholder-gray-500::-moz-placeholder{color:var(--color-gray-500)}.voxket-widget-root .placeholder-gray-500::placeholder{color:var(--color-gray-500)}.voxket-widget-root .opacity-0{opacity:0}.voxket-widget-root .opacity-15{opacity:.15}.voxket-widget-root .opacity-20{opacity:.2}.voxket-widget-root .opacity-30{opacity:.3}.voxket-widget-root .opacity-40{opacity:.4}.voxket-widget-root .opacity-50{opacity:.5}.voxket-widget-root .opacity-60{opacity:.6}.voxket-widget-root .opacity-70{opacity:.7}.voxket-widget-root .opacity-80{opacity:.8}.voxket-widget-root .opacity-100{opacity:1}.voxket-widget-root .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)}.voxket-widget-root .shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.voxket-widget-root .shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.voxket-widget-root .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)}.voxket-widget-root .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)}.voxket-widget-root .\\!ring-0{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(0px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor)!important;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)!important}.voxket-widget-root .shadow-black\\/40{--tw-shadow-color:#0006}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .shadow-black\\/40{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-black)40%,transparent)var(--tw-shadow-alpha),transparent)}}.voxket-widget-root .outline-hidden{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.voxket-widget-root .outline-hidden{outline-offset:2px;outline:2px solid #0000}}.voxket-widget-root .outline{outline-style:var(--tw-outline-style);outline-width:1px}.voxket-widget-root .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,)}.voxket-widget-root .blur-2xl{--tw-blur:blur(var(--blur-2xl));filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.voxket-widget-root .blur-sm{--tw-blur:blur(var(--blur-sm));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,)}.voxket-widget-root .blur-xl{--tw-blur:blur(var(--blur-xl));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,)}.voxket-widget-root .\\!filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)!important}.voxket-widget-root .filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.voxket-widget-root .backdrop-blur-lg{--tw-backdrop-blur:blur(var(--blur-lg));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.voxket-widget-root .backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.voxket-widget-root .backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.voxket-widget-root .backdrop-blur-xl{--tw-backdrop-blur:blur(var(--blur-xl));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.voxket-widget-root .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,visibility,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))}.voxket-widget-root .transition-\\[color\\, .voxket-widget-root border\\, .voxket-widget-root background-color\\]{transition-property:color,border,background-color;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.voxket-widget-root .transition-\\[height\\]{transition-property:height;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.voxket-widget-root .transition-\\[opacity\\, .voxket-widget-root translate\\]{transition-property:opacity,translate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.voxket-widget-root .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))}.voxket-widget-root .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))}.voxket-widget-root .transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.voxket-widget-root .delay-200{transition-delay:.2s}.voxket-widget-root .duration-150{--tw-duration:.15s;transition-duration:.15s}.voxket-widget-root .duration-200{--tw-duration:.2s;transition-duration:.2s}.voxket-widget-root .duration-250{--tw-duration:.25s;transition-duration:.25s}.voxket-widget-root .duration-300{--tw-duration:.3s;transition-duration:.3s}.voxket-widget-root .duration-700{--tw-duration:.7s;transition-duration:.7s}.voxket-widget-root .ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.voxket-widget-root .ease-linear{--tw-ease:linear;transition-timing-function:linear}.voxket-widget-root .ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.voxket-widget-root .contain-layout{--tw-contain-layout:layout;contain:var(--tw-contain-size,)var(--tw-contain-layout,)var(--tw-contain-paint,)var(--tw-contain-style,)}.voxket-widget-root .\\!outline-none{--tw-outline-style:none!important;outline-style:none!important}.voxket-widget-root .outline-none{--tw-outline-style:none;outline-style:none}.voxket-widget-root .select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}@media (hover:hover){.voxket-widget-root .group-hover\\:scale-\\[1\\.02\\]:is(:where(.group):hover *){scale:1.02}.voxket-widget-root .group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}}.voxket-widget-root .group-data-\\[state\\=off\\]\\/track\\:bg-white:is(:where(.group\\/track)[data-state=off] *),.voxket-widget-root .group-data-\\[state\\=on\\]\\/track\\:bg-white:is(:where(.group\\/track)[data-state=on] *){background-color:var(--color-white)}.voxket-widget-root .focus-within\\:border-blue-500\\/50:focus-within{border-color:#3080ff80}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .focus-within\\:border-blue-500\\/50:focus-within{border-color:color-mix(in oklab,var(--color-blue-500)50%,transparent)}}.voxket-widget-root .focus-within\\:shadow-lg:focus-within{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.voxket-widget-root .focus-within\\:ring-2:focus-within{--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)}.voxket-widget-root .focus-within\\:ring-blue-500\\/30:focus-within{--tw-ring-color:#3080ff4d}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .focus-within\\:ring-blue-500\\/30:focus-within{--tw-ring-color:color-mix(in oklab,var(--color-blue-500)30%,transparent)}}@media (hover:hover){.voxket-widget-root .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)}.voxket-widget-root .hover\\:border-gray-300:hover{border-color:var(--color-gray-300)}.voxket-widget-root .hover\\:bg-\\[\\#2563EB\\]:hover{background-color:#2563eb}.voxket-widget-root .hover\\:bg-black\\/10:hover{background-color:#0000001a}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .hover\\:bg-black\\/10:hover{background-color:color-mix(in oklab,var(--color-black)10%,transparent)}}.voxket-widget-root .hover\\:bg-blue-50:hover{background-color:var(--color-blue-50)}.voxket-widget-root .hover\\:bg-blue-600:hover{background-color:var(--color-blue-600)}.voxket-widget-root .hover\\:bg-blue-700:hover{background-color:var(--color-blue-700)}.voxket-widget-root .hover\\:bg-gray-50:hover{background-color:var(--color-gray-50)}.voxket-widget-root .hover\\:bg-gray-100:hover{background-color:var(--color-gray-100)}.voxket-widget-root .hover\\:bg-gray-200:hover{background-color:var(--color-gray-200)}.voxket-widget-root .hover\\:bg-gray-300:hover{background-color:var(--color-gray-300)}.voxket-widget-root .hover\\:bg-gray-600:hover{background-color:var(--color-gray-600)}.voxket-widget-root .hover\\:bg-gray-600\\/50:hover{background-color:#4a556580}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .hover\\:bg-gray-600\\/50:hover{background-color:color-mix(in oklab,var(--color-gray-600)50%,transparent)}}.voxket-widget-root .hover\\:bg-gray-700:hover{background-color:var(--color-gray-700)}.voxket-widget-root .hover\\:bg-gray-700\\/50:hover{background-color:#36415380}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .hover\\:bg-gray-700\\/50:hover{background-color:color-mix(in oklab,var(--color-gray-700)50%,transparent)}}.voxket-widget-root .hover\\:bg-gray-800:hover{background-color:var(--color-gray-800)}.voxket-widget-root .hover\\:bg-green-600:hover{background-color:var(--color-green-600)}.voxket-widget-root .hover\\:bg-green-700:hover{background-color:var(--color-green-700)}.voxket-widget-root .hover\\:bg-purple-600:hover{background-color:var(--color-purple-600)}.voxket-widget-root .hover\\:bg-red-100:hover{background-color:var(--color-red-100)}.voxket-widget-root .hover\\:bg-red-600:hover{background-color:var(--color-red-600)}.voxket-widget-root .hover\\:bg-red-700:hover{background-color:var(--color-red-700)}.voxket-widget-root .hover\\:bg-red-800\\/30:hover{background-color:#9f07124d}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .hover\\:bg-red-800\\/30:hover{background-color:color-mix(in oklab,var(--color-red-800)30%,transparent)}}.voxket-widget-root .hover\\:bg-white:hover{background-color:var(--color-white)}.voxket-widget-root .hover\\:bg-white\\/30:hover{background-color:#ffffff4d}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .hover\\:bg-white\\/30:hover{background-color:color-mix(in oklab,var(--color-white)30%,transparent)}}.voxket-widget-root .hover\\:from-\\[\\#2563EB\\]:hover{--tw-gradient-from:#2563eb;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .hover\\:from-blue-600:hover{--tw-gradient-from:var(--color-blue-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .hover\\:to-\\[\\#7C3AED\\]:hover{--tw-gradient-to:#7c3aed;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .hover\\:to-purple-700:hover{--tw-gradient-to:var(--color-purple-700);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .hover\\:text-blue-900:hover{color:var(--color-blue-900)}.voxket-widget-root .hover\\:text-gray-200:hover{color:var(--color-gray-200)}.voxket-widget-root .hover\\:text-gray-300:hover{color:var(--color-gray-300)}.voxket-widget-root .hover\\:text-gray-700:hover{color:var(--color-gray-700)}.voxket-widget-root .hover\\:text-gray-800:hover{color:var(--color-gray-800)}.voxket-widget-root .hover\\:text-white:hover{color:var(--color-white)}.voxket-widget-root .hover\\:underline:hover{text-decoration-line:underline}.voxket-widget-root .hover\\:shadow-md:hover{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.voxket-widget-root .hover\\:shadow-xl:hover{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.voxket-widget-root .focus\\:border-blue-500:focus{border-color:var(--color-blue-500)}.voxket-widget-root .focus\\:ring-1:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.voxket-widget-root .focus\\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.voxket-widget-root .focus\\:ring-blue-400\\/40:focus{--tw-ring-color:#54a2ff66}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .focus\\:ring-blue-400\\/40:focus{--tw-ring-color:color-mix(in oklab,var(--color-blue-400)40%,transparent)}}.voxket-widget-root .focus\\:ring-blue-500:focus{--tw-ring-color:var(--color-blue-500)}.voxket-widget-root .focus\\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.voxket-widget-root .focus\\:ring-offset-gray-900:focus{--tw-ring-offset-color:var(--color-gray-900)}.voxket-widget-root .focus\\:ring-offset-white:focus{--tw-ring-offset-color:var(--color-white)}.voxket-widget-root .focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.voxket-widget-root .focus-visible\\:ring-\\[3px\\]:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(3px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.voxket-widget-root .active\\:scale-95:active{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x)var(--tw-scale-y)}.voxket-widget-root .disabled\\:pointer-events-none:disabled{pointer-events:none}.voxket-widget-root .disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.voxket-widget-root .disabled\\:bg-gray-300:disabled{background-color:var(--color-gray-300)}.voxket-widget-root .disabled\\:bg-gray-600:disabled{background-color:var(--color-gray-600)}.voxket-widget-root .disabled\\:opacity-50:disabled{opacity:.5}.voxket-widget-root .disabled\\:opacity-70:disabled{opacity:.7}.voxket-widget-root .has-\\[\\>svg\\]\\:grid-cols-\\[calc\\(var\\(--spacing\\)\\*4\\)_1fr\\]:has(>svg){grid-template-columns:calc(var(--spacing)*4)1fr}.voxket-widget-root .has-\\[\\>svg\\]\\:gap-x-3:has(>svg){-moz-column-gap:calc(var(--spacing)*3);column-gap:calc(var(--spacing)*3)}.voxket-widget-root .has-\\[\\>svg\\]\\:px-2\\.5:has(>svg){padding-inline:calc(var(--spacing)*2.5)}.voxket-widget-root .has-\\[\\>svg\\]\\:px-3:has(>svg){padding-inline:calc(var(--spacing)*3)}.voxket-widget-root .has-\\[\\>svg\\]\\:px-4:has(>svg){padding-inline:calc(var(--spacing)*4)}.voxket-widget-root .aria-invalid\\:border-0[aria-invalid=true]{border-style:var(--tw-border-style);border-width:0}.voxket-widget-root .aria-invalid\\:ring-0[aria-invalid=true]{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(0px + 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)}.voxket-widget-root .data-\\[disabled\\]\\:pointer-events-none[data-disabled]{pointer-events:none}.voxket-widget-root .data-\\[disabled\\]\\:opacity-50[data-disabled]{opacity:.5}.voxket-widget-root .data-\\[lk-highlighted\\=true\\]\\:bg-\\[\\#5c64f6\\][data-lk-highlighted=true]{background-color:#5c64f6}.voxket-widget-root .data-\\[lk-muted\\=true\\]\\:bg-\\[\\#222222\\][data-lk-muted=true]{background-color:#222}.voxket-widget-root .data-\\[side\\=bottom\\]\\:translate-y-1[data-side=bottom]{--tw-translate-y:calc(var(--spacing)*1);translate:var(--tw-translate-x)var(--tw-translate-y)}.voxket-widget-root .data-\\[side\\=left\\]\\:-translate-x-1[data-side=left]{--tw-translate-x:calc(var(--spacing)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.voxket-widget-root .data-\\[side\\=right\\]\\:translate-x-1[data-side=right]{--tw-translate-x:calc(var(--spacing)*1);translate:var(--tw-translate-x)var(--tw-translate-y)}.voxket-widget-root .data-\\[side\\=top\\]\\:-translate-y-1[data-side=top]{--tw-translate-y:calc(var(--spacing)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.voxket-widget-root .data-\\[size\\=default\\]\\:h-9[data-size=default]{height:calc(var(--spacing)*9)}.voxket-widget-root .data-\\[size\\=sm\\]\\:h-8[data-size=sm]{height:calc(var(--spacing)*8)}.voxket-widget-root :is(.\\*\\:data-\\[slot\\=select-value\\]\\:line-clamp-1>*)[data-slot=select-value]{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.voxket-widget-root :is(.\\*\\:data-\\[slot\\=select-value\\]\\:flex>*)[data-slot=select-value]{display:flex}.voxket-widget-root :is(.\\*\\:data-\\[slot\\=select-value\\]\\:items-center>*)[data-slot=select-value]{align-items:center}.voxket-widget-root :is(.\\*\\:data-\\[slot\\=select-value\\]\\:gap-2>*)[data-slot=select-value]{gap:calc(var(--spacing)*2)}@media (min-width:48rem){.voxket-widget-root .md\\:px-0{padding-inline:calc(var(--spacing)*0)}}@media (min-width:64rem){.voxket-widget-root .lg\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (prefers-color-scheme:dark){.voxket-widget-root .dark\\:border-gray-600{border-color:var(--color-gray-600)}.voxket-widget-root .dark\\:border-gray-700{border-color:var(--color-gray-700)}.voxket-widget-root .dark\\:bg-gray-800{background-color:var(--color-gray-800)}.voxket-widget-root .dark\\:bg-gray-900{background-color:var(--color-gray-900)}.voxket-widget-root .dark\\:bg-white{background-color:var(--color-white)}.voxket-widget-root .dark\\:text-gray-400{color:var(--color-gray-400)}.voxket-widget-root .dark\\:text-white{color:var(--color-white)}@media (hover:hover){.voxket-widget-root .dark\\:hover\\:bg-gray-800:hover{background-color:var(--color-gray-800)}}.voxket-widget-root .dark\\:aria-invalid\\:ring-0[aria-invalid=true]{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(0px + 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)}}.voxket-widget-root .\\[\\&_p\\]\\:leading-relaxed p{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.voxket-widget-root .\\[\\&_svg\\]\\:pointer-events-none svg{pointer-events:none}.voxket-widget-root .\\[\\&_svg\\]\\:shrink-0 svg{flex-shrink:0}.voxket-widget-root .\\[\\&_svg\\:not\\(\\[class\\*\\=\\'size-\\'\\]\\)\\]\\:size-4 svg:not([class*=size-]){width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.voxket-widget-root :is(.\\*\\:\\[span\\]\\:last\\:flex>*):is(span):last-child{display:flex}.voxket-widget-root :is(.\\*\\:\\[span\\]\\:last\\:items-center>*):is(span):last-child{align-items:center}.voxket-widget-root :is(.\\*\\:\\[span\\]\\:last\\:gap-2>*):is(span):last-child{gap:calc(var(--spacing)*2)}.voxket-widget-root .\\[\\&\\>svg\\]\\:size-4>svg{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.voxket-widget-root .\\[\\&\\>svg\\]\\:translate-y-0\\.5>svg{--tw-translate-y:calc(var(--spacing)*.5);translate:var(--tw-translate-x)var(--tw-translate-y)}.voxket-widget-root .\\[\\&\\>svg\\]\\:text-current>svg{color:currentColor}.voxket-widget-root .\\[\\&\\>video\\]\\:h-\\[90px\\]>video{height:90px}.voxket-widget-root .\\[\\&\\>video\\]\\:w-auto>video{width:auto}@layer theme{:root,.voxket-widget-root :host{--font-sans:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-100:oklch(93.6% .032 17.717);--color-red-200:oklch(88.5% .062 18.334);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-800:oklch(44.4% .177 26.899);--color-red-900:oklch(39.6% .141 25.723);--color-yellow-50:oklch(98.7% .026 102.212);--color-yellow-200:oklch(94.5% .129 101.54);--color-yellow-400:oklch(85.2% .199 91.936);--color-yellow-500:oklch(79.5% .184 86.047);--color-yellow-700:oklch(55.4% .135 66.442);--color-green-50:oklch(98.2% .018 155.826);--color-green-200:oklch(92.5% .084 155.995);--color-green-500:oklch(72.3% .219 149.579);--color-green-600:oklch(62.7% .194 149.214);--color-green-700:oklch(52.7% .154 150.069);--color-blue-50:oklch(97% .014 254.604);--color-blue-100:oklch(93.2% .032 255.585);--color-blue-200:oklch(88.2% .059 254.128);--color-blue-300:oklch(80.9% .105 251.813);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-700:oklch(48.8% .243 264.376);--color-blue-800:oklch(42.4% .199 265.638);--color-blue-900:oklch(37.9% .146 265.522);--color-indigo-600:oklch(51.1% .262 276.966);--color-purple-500:oklch(62.7% .265 303.9);--color-purple-600:oklch(55.8% .288 302.321);--color-purple-700:oklch(49.6% .265 301.924);--color-pink-500:oklch(65.6% .241 354.308);--color-pink-600:oklch(59.2% .249 .584);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-800:oklch(27.8% .033 256.848);--color-gray-900:oklch(21% .034 264.665);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-2xl:42rem;--container-3xl:48rem;--container-4xl:56rem;--container-5xl:64rem;--container-6xl:72rem;--container-7xl:80rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5/2.25);--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-wider:.05em;--leading-tight:1.25;--leading-snug:1.375;--leading-relaxed:1.625;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--radius-3xl:1.5rem;--radius-4xl:2rem;--ease-out:cubic-bezier(0,0,.2,1);--ease-in-out:cubic-bezier(.4,0,.2,1);--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--animate-bounce:bounce 1s infinite;--blur-sm:8px;--blur-md:12px;--blur-lg:16px;--blur-xl:24px;--blur-2xl:40px;--aspect-video:16/9;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,.voxket-widget-root :after,.voxket-widget-root :before,.voxket-widget-root ::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}.voxket-widget-root ::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,.voxket-widget-root :host{-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-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}.voxket-widget-root hr{height:0;color:inherit;border-top-width:1px}.voxket-widget-root abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.voxket-widget-root h1,.voxket-widget-root h2,.voxket-widget-root h3,.voxket-widget-root h4,.voxket-widget-root h5,.voxket-widget-root h6{font-size:inherit;font-weight:inherit}.voxket-widget-root a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}.voxket-widget-root b,.voxket-widget-root strong{font-weight:bolder}.voxket-widget-root code,.voxket-widget-root kbd,.voxket-widget-root samp,.voxket-widget-root 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}.voxket-widget-root small{font-size:80%}.voxket-widget-root sub,.voxket-widget-root sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}.voxket-widget-root sub{bottom:-.25em}.voxket-widget-root sup{top:-.5em}.voxket-widget-root table{text-indent:0;border-color:inherit;border-collapse:collapse}.voxket-widget-root :-moz-focusring{outline:auto}.voxket-widget-root progress{vertical-align:baseline}.voxket-widget-root summary{display:list-item}.voxket-widget-root ol,.voxket-widget-root ul,.voxket-widget-root menu{list-style:none}.voxket-widget-root img,.voxket-widget-root svg,.voxket-widget-root video,.voxket-widget-root canvas,.voxket-widget-root audio,.voxket-widget-root iframe,.voxket-widget-root embed,.voxket-widget-root object{vertical-align:middle;display:block}.voxket-widget-root img,.voxket-widget-root video{max-width:100%;height:auto}.voxket-widget-root button,.voxket-widget-root input,.voxket-widget-root select,.voxket-widget-root optgroup,.voxket-widget-root textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}.voxket-widget-root ::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}.voxket-widget-root :where(select:is([multiple],.voxket-widget-root [size])) optgroup{font-weight:bolder}.voxket-widget-root :where(select:is([multiple],.voxket-widget-root [size])) optgroup option{padding-inline-start:20px}.voxket-widget-root ::file-selector-button{margin-inline-end:4px}.voxket-widget-root ::-moz-placeholder{opacity:1}.voxket-widget-root ::placeholder{opacity:1}@supports (not (-webkit-appearance:-apple-pay-button)) or (contain-intrinsic-size:1px){.voxket-widget-root ::-moz-placeholder{color:currentColor}.voxket-widget-root ::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root ::-moz-placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}.voxket-widget-root ::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}.voxket-widget-root textarea{resize:vertical}.voxket-widget-root ::-webkit-search-decoration{-webkit-appearance:none}.voxket-widget-root ::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}.voxket-widget-root ::-webkit-datetime-edit{display:inline-flex}.voxket-widget-root ::-webkit-datetime-edit-fields-wrapper{padding:0}.voxket-widget-root ::-webkit-datetime-edit{padding-block:0}.voxket-widget-root ::-webkit-datetime-edit-year-field{padding-block:0}.voxket-widget-root ::-webkit-datetime-edit-month-field{padding-block:0}.voxket-widget-root ::-webkit-datetime-edit-day-field{padding-block:0}.voxket-widget-root ::-webkit-datetime-edit-hour-field{padding-block:0}.voxket-widget-root ::-webkit-datetime-edit-minute-field{padding-block:0}.voxket-widget-root ::-webkit-datetime-edit-second-field{padding-block:0}.voxket-widget-root ::-webkit-datetime-edit-millisecond-field{padding-block:0}.voxket-widget-root ::-webkit-datetime-edit-meridiem-field{padding-block:0}.voxket-widget-root :-moz-ui-invalid{box-shadow:none}.voxket-widget-root button,.voxket-widget-root input:where([type=button],.voxket-widget-root [type=reset],.voxket-widget-root [type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}.voxket-widget-root ::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}.voxket-widget-root ::-webkit-inner-spin-button{height:auto}.voxket-widget-root ::-webkit-outer-spin-button{height:auto}.voxket-widget-root [hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components,utilities;.voxket-widget-root ::-webkit-scrollbar{display:none}.voxket-widget-root .scrollbar-hide{scrollbar-width:none;-ms-overflow-style:none}.voxket-widget-root .scrollbar-hide::-webkit-scrollbar{display:none}.voxket-widget-root .chat-scrollable{scrollbar-width:thin;scrollbar-color:#9b9b9b4d transparent;flex-direction:column;display:flex}.voxket-widget-root .chat-scrollable::-webkit-scrollbar{width:6px;display:block}.voxket-widget-root .chat-scrollable::-webkit-scrollbar-track{background:0 0}.voxket-widget-root .chat-scrollable::-webkit-scrollbar-thumb{background-color:#9b9b9b4d;border-radius:3px}.voxket-widget-root .chat-scrollable::-webkit-scrollbar-thumb:hover{background-color:#9b9b9b80}.voxket-widget-root .chat-messages-container{flex-direction:column;justify-content:flex-end;width:100%;max-width:none;min-height:100%;display:flex}@keyframes pulse-ring{0%{opacity:1;transform:scale(1)}50%{opacity:.6;transform:scale(1.2)}to{opacity:0;transform:scale(1.4)}}@keyframes glow{0%,to{box-shadow:0 0 20px #3b82f680}50%{box-shadow:0 0 30px #3b82f6cc}}.voxket-widget-root .pulse-ring{animation:2s cubic-bezier(.4,0,.6,1) infinite pulse-ring}.voxket-widget-root .mic-glow{animation:2s ease-in-out infinite glow}.voxket-widget-root{color-scheme:light dark;color:#ffffffde;border-radius:\"2xl\";font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background-color:#0000;border-radius:1rem;font-family:system-ui,Avenir,Helvetica,Arial,sans-serif;font-weight:400;line-height:1.5}.voxket-widget-root.theme-light{color:#000000de}.voxket-widget-root.theme-dark,.voxket-widget-root.theme-vox{color:#ffffffde}.voxket-widget-root .animate-spin{animation:1s linear infinite spin}@keyframes spin{to{transform:rotate(360deg)}}.voxket-widget-root button{cursor:pointer}@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-space-y-reverse{syntax:\"*\";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:\"*\";inherits:false;initial-value:0}@property --tw-border-style{syntax:\"*\";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:\"*\";inherits:false}@property --tw-gradient-from{syntax:\"<color>\";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:\"<color>\";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:\"<color>\";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:\"*\";inherits:false}@property --tw-gradient-via-stops{syntax:\"*\";inherits:false}@property --tw-gradient-from-position{syntax:\"<length-percentage>\";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:\"<length-percentage>\";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:\"<length-percentage>\";inherits:false;initial-value:100%}@property --tw-leading{syntax:\"*\";inherits:false}@property --tw-font-weight{syntax:\"*\";inherits:false}@property --tw-tracking{syntax:\"*\";inherits:false}@property --tw-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-backdrop-blur{syntax:\"*\";inherits:false}@property --tw-backdrop-brightness{syntax:\"*\";inherits:false}@property --tw-backdrop-contrast{syntax:\"*\";inherits:false}@property --tw-backdrop-grayscale{syntax:\"*\";inherits:false}@property --tw-backdrop-hue-rotate{syntax:\"*\";inherits:false}@property --tw-backdrop-invert{syntax:\"*\";inherits:false}@property --tw-backdrop-opacity{syntax:\"*\";inherits:false}@property --tw-backdrop-saturate{syntax:\"*\";inherits:false}@property --tw-backdrop-sepia{syntax:\"*\";inherits:false}@property --tw-duration{syntax:\"*\";inherits:false}@property --tw-ease{syntax:\"*\";inherits:false}@property --tw-contain-size{syntax:\"*\";inherits:false}@property --tw-contain-layout{syntax:\"*\";inherits:false}@property --tw-contain-paint{syntax:\"*\";inherits:false}@property --tw-contain-style{syntax:\"*\";inherits:false}@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}@keyframes pulse{50%{opacity:.5}}@keyframes bounce{0%,to{animation-timing-function:cubic-bezier(.8,0,1,1);transform:translateY(-25%)}50%{animation-timing-function:cubic-bezier(0,0,.2,1);transform:none}}\n";
12
12
 
13
13
  const head = document.head || document.getElementsByTagName('head')[0];
14
14
  if (head.firstChild) {
@@ -18,34 +18,34 @@
18
18
  }
19
19
  })();
20
20
 
21
- "use strict";var Yd=Object.defineProperty;var qd=(e,t,n)=>t in e?Yd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Ee=(e,t,n)=>qd(e,typeof t!="symbol"?t+"":t,n);Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const v=require("react"),c=require("react/jsx-runtime"),U=require("livekit-client"),Ze=require("@livekit/components-react"),qr=require("class-variance-authority"),Xr=require("clsx"),Xd=require("@radix-ui/react-toggle"),Jd=require("@radix-ui/react-select"),$e=require("lucide-react"),Qd=require("@emotion/styled");require("@emotion/react");const eu=require("react-dom/client");function Jr(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const p=Jr(v),tu=Jr(Xd),Qe=Jr(Jd),Qr=v.createContext({});function eo(e){const t=v.useRef(null);return t.current===null&&(t.current=e()),t.current}const to=typeof window<"u",ac=to?v.useLayoutEffect:v.useEffect,Es=v.createContext(null);function no(e,t){e.indexOf(t)===-1&&e.push(t)}function so(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const pt=(e,t,n)=>n>t?t:n<e?e:n;function vr(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let mn=()=>{},gt=()=>{};process.env.NODE_ENV!=="production"&&(mn=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(vr(t,n))},gt=(e,t,n)=>{if(!e)throw new Error(vr(t,n))});const yt={},cc=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function lc(e){return typeof e=="object"&&e!==null}const dc=e=>/^0[^.\s]+$/u.test(e);function ro(e){let t;return()=>(t===void 0&&(t=e()),t)}const et=e=>e,nu=(e,t)=>n=>t(e(n)),Bn=(...e)=>e.reduce(nu),In=(e,t,n)=>{const s=t-e;return s===0?1:(n-e)/s};class oo{constructor(){this.subscriptions=[]}add(t){return no(this.subscriptions,t),()=>so(this.subscriptions,t)}notify(t,n,s){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](t,n,s);else for(let i=0;i<r;i++){const o=this.subscriptions[i];o&&o(t,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const st=e=>e*1e3,at=e=>e/1e3;function uc(e,t){return t?e*(1e3/t):0}const Jo=new Set;function io(e,t,n){e||Jo.has(t)||(console.warn(vr(t,n)),Jo.add(t))}const fc=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,su=1e-7,ru=12;function ou(e,t,n,s,r){let i,o,a=0;do o=t+(n-t)/2,i=fc(o,s,r)-e,i>0?n=o:t=o;while(Math.abs(i)>su&&++a<ru);return o}function Hn(e,t,n,s){if(e===t&&n===s)return et;const r=i=>ou(i,0,1,e,n);return i=>i===0||i===1?i:fc(r(i),t,s)}const hc=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,mc=e=>t=>1-e(1-t),pc=Hn(.33,1.53,.69,.99),ao=mc(pc),gc=hc(ao),yc=e=>(e*=2)<1?.5*ao(e):.5*(2-Math.pow(2,-10*(e-1))),co=e=>1-Math.sin(Math.acos(e)),xc=mc(co),bc=hc(co),iu=Hn(.42,0,1,1),au=Hn(0,0,.58,1),vc=Hn(.42,0,.58,1),cu=e=>Array.isArray(e)&&typeof e[0]!="number",wc=e=>Array.isArray(e)&&typeof e[0]=="number",Qo={linear:et,easeIn:iu,easeInOut:vc,easeOut:au,circIn:co,circInOut:bc,circOut:xc,backIn:ao,backInOut:gc,backOut:pc,anticipate:yc},lu=e=>typeof e=="string",ei=e=>{if(wc(e)){gt(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,s,r]=e;return Hn(t,n,s,r)}else if(lu(e))return gt(Qo[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Qo[e];return e},qn=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function du(e,t){let n=new Set,s=new Set,r=!1,i=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(u){o.has(u)&&(d.schedule(u),e()),u(a)}const d={schedule:(u,h=!1,m=!1)=>{const x=m&&r?n:s;return h&&o.add(u),x.has(u)||x.add(u),u},cancel:u=>{s.delete(u),o.delete(u)},process:u=>{if(a=u,r){i=!0;return}r=!0,[n,s]=[s,n],n.forEach(l),n.clear(),r=!1,i&&(i=!1,d.process(u))}};return d}const uu=40;function Sc(e,t){let n=!1,s=!0;const r={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,o=qn.reduce((T,C)=>(T[C]=du(i),T),{}),{setup:a,read:l,resolveKeyframes:d,preUpdate:u,update:h,preRender:m,render:g,postRender:x}=o,f=()=>{const T=yt.useManualTiming?r.timestamp:performance.now();n=!1,yt.useManualTiming||(r.delta=s?1e3/60:Math.max(Math.min(T-r.timestamp,uu),1)),r.timestamp=T,r.isProcessing=!0,a.process(r),l.process(r),d.process(r),u.process(r),h.process(r),m.process(r),g.process(r),x.process(r),r.isProcessing=!1,n&&t&&(s=!1,e(f))},b=()=>{n=!0,s=!0,r.isProcessing||e(f)};return{schedule:qn.reduce((T,C)=>{const w=o[C];return T[C]=(A,V=!1,E=!1)=>(n||b(),w.schedule(A,V,E)),T},{}),cancel:T=>{for(let C=0;C<qn.length;C++)o[qn[C]].cancel(T)},state:r,steps:o}}const{schedule:Te,cancel:kt,state:_e,steps:Us}=Sc(typeof requestAnimationFrame<"u"?requestAnimationFrame:et,!0);let cs;function fu(){cs=void 0}const We={now:()=>(cs===void 0&&We.set(_e.isProcessing||yt.useManualTiming?_e.timestamp:performance.now()),cs),set:e=>{cs=e,queueMicrotask(fu)}},Cc=e=>t=>typeof t=="string"&&t.startsWith(e),lo=Cc("--"),hu=Cc("var(--"),uo=e=>hu(e)?mu.test(e.split("/*")[0].trim()):!1,mu=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,pn={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Dn={...pn,transform:e=>pt(0,1,e)},Xn={...pn,default:1},jn=e=>Math.round(e*1e5)/1e5,fo=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function pu(e){return e==null}const gu=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,ho=(e,t)=>n=>!!(typeof n=="string"&&gu.test(n)&&n.startsWith(e)||t&&!pu(n)&&Object.prototype.hasOwnProperty.call(n,t)),kc=(e,t,n)=>s=>{if(typeof s!="string")return s;const[r,i,o,a]=s.match(fo);return{[e]:parseFloat(r),[t]:parseFloat(i),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},yu=e=>pt(0,255,e),zs={...pn,transform:e=>Math.round(yu(e))},Dt={test:ho("rgb","red"),parse:kc("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:s=1})=>"rgba("+zs.transform(e)+", "+zs.transform(t)+", "+zs.transform(n)+", "+jn(Dn.transform(s))+")"};function xu(e){let t="",n="",s="",r="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),s=e.substring(5,7),r=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),s=e.substring(3,4),r=e.substring(4,5),t+=t,n+=n,s+=s,r+=r),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:r?parseInt(r,16)/255:1}}const wr={test:ho("#"),parse:xu,transform:Dt.transform},Un=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),St=Un("deg"),ct=Un("%"),ie=Un("px"),bu=Un("vh"),vu=Un("vw"),ti={...ct,parse:e=>ct.parse(e)/100,transform:e=>ct.transform(e*100)},en={test:ho("hsl","hue"),parse:kc("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:s=1})=>"hsla("+Math.round(e)+", "+ct.transform(jn(t))+", "+ct.transform(jn(n))+", "+jn(Dn.transform(s))+")"},De={test:e=>Dt.test(e)||wr.test(e)||en.test(e),parse:e=>Dt.test(e)?Dt.parse(e):en.test(e)?en.parse(e):wr.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Dt.transform(e):en.transform(e),getAnimatableNone:e=>{const t=De.parse(e);return t.alpha=0,De.transform(t)}},wu=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Su(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(fo))==null?void 0:t.length)||0)+(((n=e.match(wu))==null?void 0:n.length)||0)>0}const Tc="number",Ec="color",Cu="var",ku="var(",ni="${}",Tu=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function $n(e){const t=e.toString(),n=[],s={color:[],number:[],var:[]},r=[];let i=0;const a=t.replace(Tu,l=>(De.test(l)?(s.color.push(i),r.push(Ec),n.push(De.parse(l))):l.startsWith(ku)?(s.var.push(i),r.push(Cu),n.push(l)):(s.number.push(i),r.push(Tc),n.push(parseFloat(l))),++i,ni)).split(ni);return{values:n,split:a,indexes:s,types:r}}function Ac(e){return $n(e).values}function jc(e){const{split:t,types:n}=$n(e),s=t.length;return r=>{let i="";for(let o=0;o<s;o++)if(i+=t[o],r[o]!==void 0){const a=n[o];a===Tc?i+=jn(r[o]):a===Ec?i+=De.transform(r[o]):i+=r[o]}return i}}const Eu=e=>typeof e=="number"?0:De.test(e)?De.getAnimatableNone(e):e;function Au(e){const t=Ac(e);return jc(e)(t.map(Eu))}const Tt={test:Su,parse:Ac,createTransformer:jc,getAnimatableNone:Au};function Ws(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function ju({hue:e,saturation:t,lightness:n,alpha:s}){e/=360,t/=100,n/=100;let r=0,i=0,o=0;if(!t)r=i=o=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;r=Ws(l,a,e+1/3),i=Ws(l,a,e),o=Ws(l,a,e-1/3)}return{red:Math.round(r*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:s}}function ys(e,t){return n=>n>0?t:e}const je=(e,t,n)=>e+(t-e)*n,Zs=(e,t,n)=>{const s=e*e,r=n*(t*t-s)+s;return r<0?0:Math.sqrt(r)},Mu=[wr,Dt,en],Vu=e=>Mu.find(t=>t.test(e));function si(e){const t=Vu(e);if(mn(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===en&&(n=ju(n)),n}const ri=(e,t)=>{const n=si(e),s=si(t);if(!n||!s)return ys(e,t);const r={...n};return i=>(r.red=Zs(n.red,s.red,i),r.green=Zs(n.green,s.green,i),r.blue=Zs(n.blue,s.blue,i),r.alpha=je(n.alpha,s.alpha,i),Dt.transform(r))},Sr=new Set(["none","hidden"]);function Nu(e,t){return Sr.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Pu(e,t){return n=>je(e,t,n)}function mo(e){return typeof e=="number"?Pu:typeof e=="string"?uo(e)?ys:De.test(e)?ri:Du:Array.isArray(e)?Mc:typeof e=="object"?De.test(e)?ri:Ru:ys}function Mc(e,t){const n=[...e],s=n.length,r=e.map((i,o)=>mo(i)(i,t[o]));return i=>{for(let o=0;o<s;o++)n[o]=r[o](i);return n}}function Ru(e,t){const n={...e,...t},s={};for(const r in n)e[r]!==void 0&&t[r]!==void 0&&(s[r]=mo(e[r])(e[r],t[r]));return r=>{for(const i in s)n[i]=s[i](r);return n}}function Iu(e,t){const n=[],s={color:0,var:0,number:0};for(let r=0;r<t.values.length;r++){const i=t.types[r],o=e.indexes[i][s[i]],a=e.values[o]??0;n[r]=a,s[i]++}return n}const Du=(e,t)=>{const n=Tt.createTransformer(t),s=$n(e),r=$n(t);return s.indexes.var.length===r.indexes.var.length&&s.indexes.color.length===r.indexes.color.length&&s.indexes.number.length>=r.indexes.number.length?Sr.has(e)&&!r.values.length||Sr.has(t)&&!s.values.length?Nu(e,t):Bn(Mc(Iu(s,r),r.values),n):(mn(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),ys(e,t))};function Vc(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?je(e,t,n):mo(e)(e,t)}const $u=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>Te.update(t,n),stop:()=>kt(t),now:()=>_e.isProcessing?_e.timestamp:We.now()}},Nc=(e,t,n=10)=>{let s="";const r=Math.max(Math.round(t/n),2);for(let i=0;i<r;i++)s+=Math.round(e(i/(r-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},xs=2e4;function po(e){let t=0;const n=50;let s=e.next(t);for(;!s.done&&t<xs;)t+=n,s=e.next(t);return t>=xs?1/0:t}function Fu(e,t=100,n){const s=n({...e,keyframes:[0,t]}),r=Math.min(po(s),xs);return{type:"keyframes",ease:i=>s.next(r*i).value/t,duration:at(r)}}const Ou=5;function Pc(e,t,n){const s=Math.max(t-Ou,0);return uc(n-e(s),t-s)}const Ae={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Gs=.001;function Lu({duration:e=Ae.duration,bounce:t=Ae.bounce,velocity:n=Ae.velocity,mass:s=Ae.mass}){let r,i;mn(e<=st(Ae.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-t;o=pt(Ae.minDamping,Ae.maxDamping,o),e=pt(Ae.minDuration,Ae.maxDuration,at(e)),o<1?(r=d=>{const u=d*o,h=u*e,m=u-n,g=Cr(d,o),x=Math.exp(-h);return Gs-m/g*x},i=d=>{const h=d*o*e,m=h*n+n,g=Math.pow(o,2)*Math.pow(d,2)*e,x=Math.exp(-h),f=Cr(Math.pow(d,2),o);return(-r(d)+Gs>0?-1:1)*((m-g)*x)/f}):(r=d=>{const u=Math.exp(-d*e),h=(d-n)*e+1;return-Gs+u*h},i=d=>{const u=Math.exp(-d*e),h=(n-d)*(e*e);return u*h});const a=5/e,l=Bu(r,i,a);if(e=st(e),isNaN(l))return{stiffness:Ae.stiffness,damping:Ae.damping,duration:e};{const d=Math.pow(l,2)*s;return{stiffness:d,damping:o*2*Math.sqrt(s*d),duration:e}}}const _u=12;function Bu(e,t,n){let s=n;for(let r=1;r<_u;r++)s=s-e(s)/t(s);return s}function Cr(e,t){return e*Math.sqrt(1-t*t)}const Hu=["duration","bounce"],Uu=["stiffness","damping","mass"];function oi(e,t){return t.some(n=>e[n]!==void 0)}function zu(e){let t={velocity:Ae.velocity,stiffness:Ae.stiffness,damping:Ae.damping,mass:Ae.mass,isResolvedFromDuration:!1,...e};if(!oi(e,Uu)&&oi(e,Hu))if(e.visualDuration){const n=e.visualDuration,s=2*Math.PI/(n*1.2),r=s*s,i=2*pt(.05,1,1-(e.bounce||0))*Math.sqrt(r);t={...t,mass:Ae.mass,stiffness:r,damping:i}}else{const n=Lu(e);t={...t,...n,mass:Ae.mass},t.isResolvedFromDuration=!0}return t}function bs(e=Ae.visualDuration,t=Ae.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:s,restDelta:r}=n;const i=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:i},{stiffness:l,damping:d,mass:u,duration:h,velocity:m,isResolvedFromDuration:g}=zu({...n,velocity:-at(n.velocity||0)}),x=m||0,f=d/(2*Math.sqrt(l*u)),b=o-i,k=at(Math.sqrt(l/u)),S=Math.abs(b)<5;s||(s=S?Ae.restSpeed.granular:Ae.restSpeed.default),r||(r=S?Ae.restDelta.granular:Ae.restDelta.default);let T;if(f<1){const w=Cr(k,f);T=A=>{const V=Math.exp(-f*k*A);return o-V*((x+f*k*b)/w*Math.sin(w*A)+b*Math.cos(w*A))}}else if(f===1)T=w=>o-Math.exp(-k*w)*(b+(x+k*b)*w);else{const w=k*Math.sqrt(f*f-1);T=A=>{const V=Math.exp(-f*k*A),E=Math.min(w*A,300);return o-V*((x+f*k*b)*Math.sinh(E)+w*b*Math.cosh(E))/w}}const C={calculatedDuration:g&&h||null,next:w=>{const A=T(w);if(g)a.done=w>=h;else{let V=w===0?x:0;f<1&&(V=w===0?st(x):Pc(T,w,A));const E=Math.abs(V)<=s,F=Math.abs(o-A)<=r;a.done=E&&F}return a.value=a.done?o:A,a},toString:()=>{const w=Math.min(po(C),xs),A=Nc(V=>C.next(w*V).value,w,30);return w+"ms "+A},toTransition:()=>{}};return C}bs.applyToOptions=e=>{const t=Fu(e,100,bs);return e.ease=t.ease,e.duration=st(t.duration),e.type="keyframes",e};function kr({keyframes:e,velocity:t=0,power:n=.8,timeConstant:s=325,bounceDamping:r=10,bounceStiffness:i=500,modifyTarget:o,min:a,max:l,restDelta:d=.5,restSpeed:u}){const h=e[0],m={done:!1,value:h},g=E=>a!==void 0&&E<a||l!==void 0&&E>l,x=E=>a===void 0?l:l===void 0||Math.abs(a-E)<Math.abs(l-E)?a:l;let f=n*t;const b=h+f,k=o===void 0?b:o(b);k!==b&&(f=k-h);const S=E=>-f*Math.exp(-E/s),T=E=>k+S(E),C=E=>{const F=S(E),y=T(E);m.done=Math.abs(F)<=d,m.value=m.done?k:y};let w,A;const V=E=>{g(m.value)&&(w=E,A=bs({keyframes:[m.value,x(m.value)],velocity:Pc(T,E,m.value),damping:r,stiffness:i,restDelta:d,restSpeed:u}))};return V(0),{calculatedDuration:null,next:E=>{let F=!1;return!A&&w===void 0&&(F=!0,C(E),V(E)),w!==void 0&&E>=w?A.next(E-w):(!F&&C(E),m)}}}function Wu(e,t,n){const s=[],r=n||yt.mix||Vc,i=e.length-1;for(let o=0;o<i;o++){let a=r(e[o],e[o+1]);if(t){const l=Array.isArray(t)?t[o]||et:t;a=Bn(l,a)}s.push(a)}return s}function Zu(e,t,{clamp:n=!0,ease:s,mixer:r}={}){const i=e.length;if(gt(i===t.length,"Both input and output ranges must be the same length","range-length"),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=Wu(t,s,r),l=a.length,d=u=>{if(o&&u<e[0])return t[0];let h=0;if(l>1)for(;h<e.length-2&&!(u<e[h+1]);h++);const m=In(e[h],e[h+1],u);return a[h](m)};return n?u=>d(pt(e[0],e[i-1],u)):d}function Gu(e,t){const n=e[e.length-1];for(let s=1;s<=t;s++){const r=In(0,t,s);e.push(je(n,1,r))}}function Ku(e){const t=[0];return Gu(t,e.length-1),t}function Yu(e,t){return e.map(n=>n*t)}function qu(e,t){return e.map(()=>t||vc).splice(0,e.length-1)}function tn({duration:e=300,keyframes:t,times:n,ease:s="easeInOut"}){const r=cu(s)?s.map(ei):ei(s),i={done:!1,value:t[0]},o=Yu(n&&n.length===t.length?n:Ku(t),e),a=Zu(o,t,{ease:Array.isArray(r)?r:qu(t,r)});return{calculatedDuration:e,next:l=>(i.value=a(l),i.done=l>=e,i)}}const Xu=e=>e!==null;function go(e,{repeat:t,repeatType:n="loop"},s,r=1){const i=e.filter(Xu),a=r<0||t&&n!=="loop"&&t%2===1?0:i.length-1;return!a||s===void 0?i[a]:s}const Ju={decay:kr,inertia:kr,tween:tn,keyframes:tn,spring:bs};function Rc(e){typeof e.type=="string"&&(e.type=Ju[e.type])}class yo{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const Qu=e=>e/100;class xo extends yo{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var s,r;const{motionValue:n}=this.options;n&&n.updatedAt!==We.now()&&this.tick(We.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(r=(s=this.options).onStop)==null||r.call(s))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;Rc(t);const{type:n=tn,repeat:s=0,repeatDelay:r=0,repeatType:i,velocity:o=0}=t;let{keyframes:a}=t;const l=n||tn;process.env.NODE_ENV!=="production"&&l!==tn&&gt(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==tn&&typeof a[0]!="number"&&(this.mixKeyframes=Bn(Qu,Vc(a[0],a[1])),a=[0,100]);const d=l({...t,keyframes:a});i==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-o})),d.calculatedDuration===null&&(d.calculatedDuration=po(d));const{calculatedDuration:u}=d;this.calculatedDuration=u,this.resolvedDuration=u+r,this.totalDuration=this.resolvedDuration*(s+1)-r,this.generator=d}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:s,totalDuration:r,mixKeyframes:i,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return s.next(0);const{delay:d=0,keyframes:u,repeat:h,repeatType:m,repeatDelay:g,type:x,onUpdate:f,finalKeyframe:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-r/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const k=this.currentTime-d*(this.playbackSpeed>=0?1:-1),S=this.playbackSpeed>=0?k<0:k>r;this.currentTime=Math.max(k,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=r);let T=this.currentTime,C=s;if(h){const E=Math.min(this.currentTime,r)/a;let F=Math.floor(E),y=E%1;!y&&E>=1&&(y=1),y===1&&F--,F=Math.min(F,h+1),!!(F%2)&&(m==="reverse"?(y=1-y,g&&(y-=g/a)):m==="mirror"&&(C=o)),T=pt(0,1,y)*a}const w=S?{done:!1,value:u[0]}:C.next(T);i&&(w.value=i(w.value));let{done:A}=w;!S&&l!==null&&(A=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);const V=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&A);return V&&x!==kr&&(w.value=go(u,this.options,b,this.speed)),f&&f(w.value),V&&this.finish(),w}then(t,n){return this.finished.then(t,n)}get duration(){return at(this.calculatedDuration)}get time(){return at(this.currentTime)}set time(t){var n;t=st(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(We.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=at(this.currentTime))}play(){var r,i;if(this.isStopped)return;const{driver:t=$u,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),(i=(r=this.options).onPlay)==null||i.call(r);const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=n??s),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(We.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function ef(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const $t=e=>e*180/Math.PI,Tr=e=>{const t=$t(Math.atan2(e[1],e[0]));return Er(t)},tf={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Tr,rotateZ:Tr,skewX:e=>$t(Math.atan(e[1])),skewY:e=>$t(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Er=e=>(e=e%360,e<0&&(e+=360),e),ii=Tr,ai=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),ci=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),nf={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:ai,scaleY:ci,scale:e=>(ai(e)+ci(e))/2,rotateX:e=>Er($t(Math.atan2(e[6],e[5]))),rotateY:e=>Er($t(Math.atan2(-e[2],e[0]))),rotateZ:ii,rotate:ii,skewX:e=>$t(Math.atan(e[4])),skewY:e=>$t(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Ar(e){return e.includes("scale")?1:0}function jr(e,t){if(!e||e==="none")return Ar(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,r;if(n)s=nf,r=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=tf,r=a}if(!r)return Ar(t);const i=s[t],o=r[1].split(",").map(rf);return typeof i=="function"?i(o):o[i]}const sf=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return jr(n,t)};function rf(e){return parseFloat(e.trim())}const gn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],yn=new Set(gn),li=e=>e===pn||e===ie,of=new Set(["x","y","z"]),af=gn.filter(e=>!of.has(e));function cf(e){const t=[];return af.forEach(n=>{const s=e.getValue(n);s!==void 0&&(t.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),t}const Ot={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>jr(t,"x"),y:(e,{transform:t})=>jr(t,"y")};Ot.translateX=Ot.x;Ot.translateY=Ot.y;const Lt=new Set;let Mr=!1,Vr=!1,Nr=!1;function Ic(){if(Vr){const e=Array.from(Lt).filter(s=>s.needsMeasurement),t=new Set(e.map(s=>s.element)),n=new Map;t.forEach(s=>{const r=cf(s);r.length&&(n.set(s,r),s.render())}),e.forEach(s=>s.measureInitialState()),t.forEach(s=>{s.render();const r=n.get(s);r&&r.forEach(([i,o])=>{var a;(a=s.getValue(i))==null||a.set(o)})}),e.forEach(s=>s.measureEndState()),e.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}Vr=!1,Mr=!1,Lt.forEach(e=>e.complete(Nr)),Lt.clear()}function Dc(){Lt.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Vr=!0)})}function lf(){Nr=!0,Dc(),Ic(),Nr=!1}class bo{constructor(t,n,s,r,i,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=s,this.motionValue=r,this.element=i,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Lt.add(this),Mr||(Mr=!0,Te.read(Dc),Te.resolveKeyframes(Ic))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:s,motionValue:r}=this;if(t[0]===null){const i=r==null?void 0:r.get(),o=t[t.length-1];if(i!==void 0)t[0]=i;else if(s&&n){const a=s.readValue(n,o);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=o),r&&i===void 0&&r.set(t[0])}ef(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Lt.delete(this)}cancel(){this.state==="scheduled"&&(Lt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const df=e=>e.startsWith("--");function uf(e,t,n){df(t)?e.style.setProperty(t,n):e.style[t]=n}const ff=ro(()=>window.ScrollTimeline!==void 0),hf={};function mf(e,t){const n=ro(e);return()=>hf[t]??n()}const $c=mf(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Tn=([e,t,n,s])=>`cubic-bezier(${e}, ${t}, ${n}, ${s})`,di={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Tn([0,.65,.55,1]),circOut:Tn([.55,0,1,.45]),backIn:Tn([.31,.01,.66,-.59]),backOut:Tn([.33,1.53,.69,.99])};function Fc(e,t){if(e)return typeof e=="function"?$c()?Nc(e,t):"ease-out":wc(e)?Tn(e):Array.isArray(e)?e.map(n=>Fc(n,t)||di.easeOut):di[e]}function pf(e,t,n,{delay:s=0,duration:r=300,repeat:i=0,repeatType:o="loop",ease:a="easeOut",times:l}={},d=void 0){const u={[t]:n};l&&(u.offset=l);const h=Fc(a,r);Array.isArray(h)&&(u.easing=h);const m={delay:s,duration:r,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:i+1,direction:o==="reverse"?"alternate":"normal"};return d&&(m.pseudoElement=d),e.animate(u,m)}function Oc(e){return typeof e=="function"&&"applyToOptions"in e}function gf({type:e,...t}){return Oc(e)&&$c()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class yf extends yo{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:s,keyframes:r,pseudoElement:i,allowFlatten:o=!1,finalKeyframe:a,onComplete:l}=t;this.isPseudoElement=!!i,this.allowFlatten=o,this.options=t,gt(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const d=gf(t);this.animation=pf(n,s,r,d,i),d.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const u=go(r,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(u):uf(n,s,u),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var t,n;this.isPseudoElement||(n=(t=this.animation).commitStyles)==null||n.call(t)}get duration(){var n,s;const t=((s=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:s.call(n).duration)||0;return at(Number(t))}get time(){return at(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=st(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){var s;return this.allowFlatten&&((s=this.animation.effect)==null||s.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&ff()?(this.animation.timeline=t,et):n(this)}}const Lc={anticipate:yc,backInOut:gc,circInOut:bc};function xf(e){return e in Lc}function bf(e){typeof e.ease=="string"&&xf(e.ease)&&(e.ease=Lc[e.ease])}const ui=10;class vf extends yf{constructor(t){bf(t),Rc(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:s,onComplete:r,element:i,...o}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new xo({...o,autoplay:!1}),l=st(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-ui).value,a.sample(l).value,ui),a.stop()}}const fi=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Tt.test(e)||e==="0")&&!e.startsWith("url("));function wf(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function Sf(e,t,n,s){const r=e[0];if(r===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],o=fi(r,t),a=fi(i,t);return mn(o===a,`You are trying to animate ${t} from "${r}" to "${i}". "${o?i:r}" is not an animatable value.`,"value-not-animatable"),!o||!a?!1:wf(e)||(n==="spring"||Oc(n))&&s}function Pr(e){e.duration=0,e.type}const Cf=new Set(["opacity","clipPath","filter","transform"]),kf=ro(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Tf(e){var u;const{motionValue:t,name:n,repeatDelay:s,repeatType:r,damping:i,type:o}=e;if(!(((u=t==null?void 0:t.owner)==null?void 0:u.current)instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:d}=t.owner.getProps();return kf()&&n&&Cf.has(n)&&(n!=="transform"||!d)&&!l&&!s&&r!=="mirror"&&i!==0&&o!=="inertia"}const Ef=40;class Af extends yo{constructor({autoplay:t=!0,delay:n=0,type:s="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:o="loop",keyframes:a,name:l,motionValue:d,element:u,...h}){var x;super(),this.stop=()=>{var f,b;this._animation&&(this._animation.stop(),(f=this.stopTimeline)==null||f.call(this)),(b=this.keyframeResolver)==null||b.cancel()},this.createdAt=We.now();const m={autoplay:t,delay:n,type:s,repeat:r,repeatDelay:i,repeatType:o,name:l,motionValue:d,element:u,...h},g=(u==null?void 0:u.KeyframeResolver)||bo;this.keyframeResolver=new g(a,(f,b,k)=>this.onKeyframesResolved(f,b,m,!k),l,d,u),(x=this.keyframeResolver)==null||x.scheduleResolve()}onKeyframesResolved(t,n,s,r){this.keyframeResolver=void 0;const{name:i,type:o,velocity:a,delay:l,isHandoff:d,onUpdate:u}=s;this.resolvedAt=We.now(),Sf(t,i,o,a)||((yt.instantAnimations||!l)&&(u==null||u(go(t,s,n))),t[0]=t[t.length-1],Pr(s),s.repeat=0);const m={startTime:r?this.resolvedAt?this.resolvedAt-this.createdAt>Ef?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:t},g=!d&&Tf(m)?new vf({...m,element:m.motionValue.owner.current}):new xo(m);g.finished.then(()=>this.notifyFinished()).catch(et),this.pendingTimeline&&(this.stopTimeline=g.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=g}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),lf()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}const jf=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Mf(e){const t=jf.exec(e);if(!t)return[,];const[,n,s,r]=t;return[`--${n??s}`,r]}const Vf=4;function _c(e,t,n=1){gt(n<=Vf,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,r]=Mf(e);if(!s)return;const i=window.getComputedStyle(t).getPropertyValue(s);if(i){const o=i.trim();return cc(o)?parseFloat(o):o}return uo(r)?_c(r,t,n+1):r}function vo(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const Bc=new Set(["width","height","top","left","right","bottom",...gn]),Nf={test:e=>e==="auto",parse:e=>e},Hc=e=>t=>t.test(e),Uc=[pn,ie,ct,St,vu,bu,Nf],hi=e=>Uc.find(Hc(e));function Pf(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||dc(e):!0}const Rf=new Set(["brightness","contrast","saturate","opacity"]);function If(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[s]=n.match(fo)||[];if(!s)return e;const r=n.replace(s,"");let i=Rf.has(t)?1:0;return s!==n&&(i*=100),t+"("+i+r+")"}const Df=/\b([a-z-]*)\(.*?\)/gu,Rr={...Tt,getAnimatableNone:e=>{const t=e.match(Df);return t?t.map(If).join(" "):e}},mi={...pn,transform:Math.round},$f={rotate:St,rotateX:St,rotateY:St,rotateZ:St,scale:Xn,scaleX:Xn,scaleY:Xn,scaleZ:Xn,skew:St,skewX:St,skewY:St,distance:ie,translateX:ie,translateY:ie,translateZ:ie,x:ie,y:ie,z:ie,perspective:ie,transformPerspective:ie,opacity:Dn,originX:ti,originY:ti,originZ:ie},wo={borderWidth:ie,borderTopWidth:ie,borderRightWidth:ie,borderBottomWidth:ie,borderLeftWidth:ie,borderRadius:ie,radius:ie,borderTopLeftRadius:ie,borderTopRightRadius:ie,borderBottomRightRadius:ie,borderBottomLeftRadius:ie,width:ie,maxWidth:ie,height:ie,maxHeight:ie,top:ie,right:ie,bottom:ie,left:ie,padding:ie,paddingTop:ie,paddingRight:ie,paddingBottom:ie,paddingLeft:ie,margin:ie,marginTop:ie,marginRight:ie,marginBottom:ie,marginLeft:ie,backgroundPositionX:ie,backgroundPositionY:ie,...$f,zIndex:mi,fillOpacity:Dn,strokeOpacity:Dn,numOctaves:mi},Ff={...wo,color:De,backgroundColor:De,outlineColor:De,fill:De,stroke:De,borderColor:De,borderTopColor:De,borderRightColor:De,borderBottomColor:De,borderLeftColor:De,filter:Rr,WebkitFilter:Rr},zc=e=>Ff[e];function Wc(e,t){let n=zc(e);return n!==Rr&&(n=Tt),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Of=new Set(["auto","none","0"]);function Lf(e,t,n){let s=0,r;for(;s<e.length&&!r;){const i=e[s];typeof i=="string"&&!Of.has(i)&&$n(i).values.length&&(r=e[s]),s++}if(r&&n)for(const i of t)e[i]=Wc(n,r)}class _f extends bo{constructor(t,n,s,r,i){super(t,n,s,r,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let d=t[l];if(typeof d=="string"&&(d=d.trim(),uo(d))){const u=_c(d,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!Bc.has(s)||t.length!==2)return;const[r,i]=t,o=hi(r),a=hi(i);if(o!==a)if(li(o)&&li(a))for(let l=0;l<t.length;l++){const d=t[l];typeof d=="string"&&(t[l]=parseFloat(d))}else Ot[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,s=[];for(let r=0;r<t.length;r++)(t[r]===null||Pf(t[r]))&&s.push(r);s.length&&Lf(t,s,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:s}=this;if(!t||!t.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Ot[s](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const r=n[n.length-1];r!==void 0&&t.getValue(s,r).jump(r,!1)}measureEndState(){var a;const{element:t,name:n,unresolvedKeyframes:s}=this;if(!t||!t.current)return;const r=t.getValue(n);r&&r.jump(this.measuredOrigin,!1);const i=s.length-1,o=s[i];s[i]=Ot[n](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([l,d])=>{t.getValue(l).set(d)}),this.resolveNoneKeyframes()}}function Bf(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let s=document;const r=(n==null?void 0:n[e])??s.querySelectorAll(e);return r?Array.from(r):[]}return Array.from(e)}const Zc=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Gc(e){return lc(e)&&"offsetHeight"in e}const pi=30,Hf=e=>!isNaN(parseFloat(e));class Uf{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{var i;const r=We.now();if(this.updatedAt!==r&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&((i=this.events.change)==null||i.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=We.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Hf(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&io(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new oo);const s=this.events[t].add(n);return t==="change"?()=>{s(),Te.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-s}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=We.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>pi)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,pi);return uc(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function dn(e,t){return new Uf(e,t)}const{schedule:So}=Sc(queueMicrotask,!1),nt={x:!1,y:!1};function Kc(){return nt.x||nt.y}function zf(e){return e==="x"||e==="y"?nt[e]?null:(nt[e]=!0,()=>{nt[e]=!1}):nt.x||nt.y?null:(nt.x=nt.y=!0,()=>{nt.x=nt.y=!1})}function Yc(e,t){const n=Bf(e),s=new AbortController,r={passive:!0,...t,signal:s.signal};return[n,r,()=>s.abort()]}function gi(e){return!(e.pointerType==="touch"||Kc())}function Wf(e,t,n={}){const[s,r,i]=Yc(e,n),o=a=>{if(!gi(a))return;const{target:l}=a,d=t(l,a);if(typeof d!="function"||!l)return;const u=h=>{gi(h)&&(d(h),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,r)};return s.forEach(a=>{a.addEventListener("pointerenter",o,r)}),i}const qc=(e,t)=>t?e===t?!0:qc(e,t.parentElement):!1,Co=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Zf=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Gf(e){return Zf.has(e.tagName)||e.tabIndex!==-1}const ls=new WeakSet;function yi(e){return t=>{t.key==="Enter"&&e(t)}}function Ks(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Kf=(e,t)=>{const n=e.currentTarget;if(!n)return;const s=yi(()=>{if(ls.has(n))return;Ks(n,"down");const r=yi(()=>{Ks(n,"up")}),i=()=>Ks(n,"cancel");n.addEventListener("keyup",r,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",s,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),t)};function xi(e){return Co(e)&&!Kc()}function Yf(e,t,n={}){const[s,r,i]=Yc(e,n),o=a=>{const l=a.currentTarget;if(!xi(a))return;ls.add(l);const d=t(l,a),u=(g,x)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",m),ls.has(l)&&ls.delete(l),xi(g)&&typeof d=="function"&&d(g,{success:x})},h=g=>{u(g,l===window||l===document||n.useGlobalTarget||qc(l,g.target))},m=g=>{u(g,!1)};window.addEventListener("pointerup",h,r),window.addEventListener("pointercancel",m,r)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,r),Gc(a)&&(a.addEventListener("focus",d=>Kf(d,r)),!Gf(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),i}function Xc(e){return lc(e)&&"ownerSVGElement"in e}function qf(e){return Xc(e)&&e.tagName==="svg"}const He=e=>!!(e&&e.getVelocity),Xf=[...Uc,De,Tt],Jf=e=>Xf.find(Hc(e)),ko=v.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class Qf extends p.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const s=n.offsetParent,r=Gc(s)&&s.offsetWidth||0,i=this.props.sizeRef.current;i.height=n.offsetHeight||0,i.width=n.offsetWidth||0,i.top=n.offsetTop,i.left=n.offsetLeft,i.right=r-i.width-i.left}return null}componentDidUpdate(){}render(){return this.props.children}}function eh({children:e,isPresent:t,anchorX:n,root:s}){const r=v.useId(),i=v.useRef(null),o=v.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=v.useContext(ko);return v.useInsertionEffect(()=>{const{width:l,height:d,top:u,left:h,right:m}=o.current;if(t||!i.current||!l||!d)return;const g=n==="left"?`left: ${h}`:`right: ${m}`;i.current.dataset.motionPopId=r;const x=document.createElement("style");a&&(x.nonce=a);const f=s??document.head;return f.appendChild(x),x.sheet&&x.sheet.insertRule(`
21
+ "use strict";var Yd=Object.defineProperty;var qd=(e,t,n)=>t in e?Yd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Ne=(e,t,n)=>qd(e,typeof t!="symbol"?t+"":t,n);Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const w=require("react"),l=require("react/jsx-runtime"),K=require("livekit-client"),Ke=require("@livekit/components-react"),qr=require("class-variance-authority"),Xr=require("clsx"),Xd=require("@radix-ui/react-toggle"),Jd=require("@radix-ui/react-select"),$e=require("lucide-react"),Qd=require("@emotion/styled");require("@emotion/react");const eu=require("react-dom/client");function Jr(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const g=Jr(w),tu=Jr(Xd),tt=Jr(Jd),Qr=w.createContext({});function eo(e){const t=w.useRef(null);return t.current===null&&(t.current=e()),t.current}const to=typeof window<"u",ll=to?w.useLayoutEffect:w.useEffect,Es=w.createContext(null);function no(e,t){e.indexOf(t)===-1&&e.push(t)}function so(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const yt=(e,t,n)=>n>t?t:n<e?e:n;function vr(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let hn=()=>{},xt=()=>{};process.env.NODE_ENV!=="production"&&(hn=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(vr(t,n))},xt=(e,t,n)=>{if(!e)throw new Error(vr(t,n))});const bt={},cl=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function dl(e){return typeof e=="object"&&e!==null}const ul=e=>/^0[^.\s]+$/u.test(e);function ro(e){let t;return()=>(t===void 0&&(t=e()),t)}const nt=e=>e,nu=(e,t)=>n=>t(e(n)),Ln=(...e)=>e.reduce(nu),Pn=(e,t,n)=>{const s=t-e;return s===0?1:(n-e)/s};class oo{constructor(){this.subscriptions=[]}add(t){return no(this.subscriptions,t),()=>so(this.subscriptions,t)}notify(t,n,s){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](t,n,s);else for(let i=0;i<r;i++){const o=this.subscriptions[i];o&&o(t,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const at=e=>e*1e3,dt=e=>e/1e3;function fl(e,t){return t?e*(1e3/t):0}const Qo=new Set;function io(e,t,n){e||Qo.has(t)||(console.warn(vr(t,n)),Qo.add(t))}const hl=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,su=1e-7,ru=12;function ou(e,t,n,s,r){let i,o,a=0;do o=t+(n-t)/2,i=hl(o,s,r)-e,i>0?n=o:t=o;while(Math.abs(i)>su&&++a<ru);return o}function _n(e,t,n,s){if(e===t&&n===s)return nt;const r=i=>ou(i,0,1,e,n);return i=>i===0||i===1?i:hl(r(i),t,s)}const ml=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,gl=e=>t=>1-e(1-t),pl=_n(.33,1.53,.69,.99),ao=gl(pl),yl=ml(ao),xl=e=>(e*=2)<1?.5*ao(e):.5*(2-Math.pow(2,-10*(e-1))),lo=e=>1-Math.sin(Math.acos(e)),bl=gl(lo),vl=ml(lo),iu=_n(.42,0,1,1),au=_n(0,0,.58,1),wl=_n(.42,0,.58,1),lu=e=>Array.isArray(e)&&typeof e[0]!="number",Sl=e=>Array.isArray(e)&&typeof e[0]=="number",ei={linear:nt,easeIn:iu,easeInOut:wl,easeOut:au,circIn:lo,circInOut:vl,circOut:bl,backIn:ao,backInOut:yl,backOut:pl,anticipate:xl},cu=e=>typeof e=="string",ti=e=>{if(Sl(e)){xt(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,s,r]=e;return _n(t,n,s,r)}else if(cu(e))return xt(ei[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),ei[e];return e},qn=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function du(e,t){let n=new Set,s=new Set,r=!1,i=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function c(u){o.has(u)&&(d.schedule(u),e()),u(a)}const d={schedule:(u,f=!1,h=!1)=>{const x=h&&r?n:s;return f&&o.add(u),x.has(u)||x.add(u),u},cancel:u=>{s.delete(u),o.delete(u)},process:u=>{if(a=u,r){i=!0;return}r=!0,[n,s]=[s,n],n.forEach(c),n.clear(),r=!1,i&&(i=!1,d.process(u))}};return d}const uu=40;function Cl(e,t){let n=!1,s=!0;const r={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,o=qn.reduce((T,k)=>(T[k]=du(i),T),{}),{setup:a,read:c,resolveKeyframes:d,preUpdate:u,update:f,preRender:h,render:p,postRender:x}=o,m=()=>{const T=bt.useManualTiming?r.timestamp:performance.now();n=!1,bt.useManualTiming||(r.delta=s?1e3/60:Math.max(Math.min(T-r.timestamp,uu),1)),r.timestamp=T,r.isProcessing=!0,a.process(r),c.process(r),d.process(r),u.process(r),f.process(r),h.process(r),p.process(r),x.process(r),r.isProcessing=!1,n&&t&&(s=!1,e(m))},b=()=>{n=!0,s=!0,r.isProcessing||e(m)};return{schedule:qn.reduce((T,k)=>{const v=o[k];return T[k]=(j,V=!1,E=!1)=>(n||b(),v.schedule(j,V,E)),T},{}),cancel:T=>{for(let k=0;k<qn.length;k++)o[qn[k]].cancel(T)},state:r,steps:o}}const{schedule:je,cancel:At,state:Ue,steps:Us}=Cl(typeof requestAnimationFrame<"u"?requestAnimationFrame:nt,!0);let ls;function fu(){ls=void 0}const Ge={now:()=>(ls===void 0&&Ge.set(Ue.isProcessing||bt.useManualTiming?Ue.timestamp:performance.now()),ls),set:e=>{ls=e,queueMicrotask(fu)}},kl=e=>t=>typeof t=="string"&&t.startsWith(e),co=kl("--"),hu=kl("var(--"),uo=e=>hu(e)?mu.test(e.split("/*")[0].trim()):!1,mu=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,mn={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Rn={...mn,transform:e=>yt(0,1,e)},Xn={...mn,default:1},En=e=>Math.round(e*1e5)/1e5,fo=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function gu(e){return e==null}const pu=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,ho=(e,t)=>n=>!!(typeof n=="string"&&pu.test(n)&&n.startsWith(e)||t&&!gu(n)&&Object.prototype.hasOwnProperty.call(n,t)),Tl=(e,t,n)=>s=>{if(typeof s!="string")return s;const[r,i,o,a]=s.match(fo);return{[e]:parseFloat(r),[t]:parseFloat(i),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},yu=e=>yt(0,255,e),zs={...mn,transform:e=>Math.round(yu(e))},Ft={test:ho("rgb","red"),parse:Tl("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:s=1})=>"rgba("+zs.transform(e)+", "+zs.transform(t)+", "+zs.transform(n)+", "+En(Rn.transform(s))+")"};function xu(e){let t="",n="",s="",r="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),s=e.substring(5,7),r=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),s=e.substring(3,4),r=e.substring(4,5),t+=t,n+=n,s+=s,r+=r),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:r?parseInt(r,16)/255:1}}const wr={test:ho("#"),parse:xu,transform:Ft.transform},Bn=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),kt=Bn("deg"),ut=Bn("%"),ce=Bn("px"),bu=Bn("vh"),vu=Bn("vw"),ni={...ut,parse:e=>ut.parse(e)/100,transform:e=>ut.transform(e*100)},en={test:ho("hsl","hue"),parse:Tl("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:s=1})=>"hsla("+Math.round(e)+", "+ut.transform(En(t))+", "+ut.transform(En(n))+", "+En(Rn.transform(s))+")"},Le={test:e=>Ft.test(e)||wr.test(e)||en.test(e),parse:e=>Ft.test(e)?Ft.parse(e):en.test(e)?en.parse(e):wr.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Ft.transform(e):en.transform(e),getAnimatableNone:e=>{const t=Le.parse(e);return t.alpha=0,Le.transform(t)}},wu=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Su(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(fo))==null?void 0:t.length)||0)+(((n=e.match(wu))==null?void 0:n.length)||0)>0}const El="number",Al="color",Cu="var",ku="var(",si="${}",Tu=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function In(e){const t=e.toString(),n=[],s={color:[],number:[],var:[]},r=[];let i=0;const a=t.replace(Tu,c=>(Le.test(c)?(s.color.push(i),r.push(Al),n.push(Le.parse(c))):c.startsWith(ku)?(s.var.push(i),r.push(Cu),n.push(c)):(s.number.push(i),r.push(El),n.push(parseFloat(c))),++i,si)).split(si);return{values:n,split:a,indexes:s,types:r}}function jl(e){return In(e).values}function Nl(e){const{split:t,types:n}=In(e),s=t.length;return r=>{let i="";for(let o=0;o<s;o++)if(i+=t[o],r[o]!==void 0){const a=n[o];a===El?i+=En(r[o]):a===Al?i+=Le.transform(r[o]):i+=r[o]}return i}}const Eu=e=>typeof e=="number"?0:Le.test(e)?Le.getAnimatableNone(e):e;function Au(e){const t=jl(e);return Nl(e)(t.map(Eu))}const jt={test:Su,parse:jl,createTransformer:Nl,getAnimatableNone:Au};function Ws(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function ju({hue:e,saturation:t,lightness:n,alpha:s}){e/=360,t/=100,n/=100;let r=0,i=0,o=0;if(!t)r=i=o=n;else{const a=n<.5?n*(1+t):n+t-n*t,c=2*n-a;r=Ws(c,a,e+1/3),i=Ws(c,a,e),o=Ws(c,a,e-1/3)}return{red:Math.round(r*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:s}}function ys(e,t){return n=>n>0?t:e}const Ve=(e,t,n)=>e+(t-e)*n,Zs=(e,t,n)=>{const s=e*e,r=n*(t*t-s)+s;return r<0?0:Math.sqrt(r)},Nu=[wr,Ft,en],Mu=e=>Nu.find(t=>t.test(e));function ri(e){const t=Mu(e);if(hn(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===en&&(n=ju(n)),n}const oi=(e,t)=>{const n=ri(e),s=ri(t);if(!n||!s)return ys(e,t);const r={...n};return i=>(r.red=Zs(n.red,s.red,i),r.green=Zs(n.green,s.green,i),r.blue=Zs(n.blue,s.blue,i),r.alpha=Ve(n.alpha,s.alpha,i),Ft.transform(r))},Sr=new Set(["none","hidden"]);function Vu(e,t){return Sr.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Pu(e,t){return n=>Ve(e,t,n)}function mo(e){return typeof e=="number"?Pu:typeof e=="string"?uo(e)?ys:Le.test(e)?oi:Du:Array.isArray(e)?Ml:typeof e=="object"?Le.test(e)?oi:Ru:ys}function Ml(e,t){const n=[...e],s=n.length,r=e.map((i,o)=>mo(i)(i,t[o]));return i=>{for(let o=0;o<s;o++)n[o]=r[o](i);return n}}function Ru(e,t){const n={...e,...t},s={};for(const r in n)e[r]!==void 0&&t[r]!==void 0&&(s[r]=mo(e[r])(e[r],t[r]));return r=>{for(const i in s)n[i]=s[i](r);return n}}function Iu(e,t){const n=[],s={color:0,var:0,number:0};for(let r=0;r<t.values.length;r++){const i=t.types[r],o=e.indexes[i][s[i]],a=e.values[o]??0;n[r]=a,s[i]++}return n}const Du=(e,t)=>{const n=jt.createTransformer(t),s=In(e),r=In(t);return s.indexes.var.length===r.indexes.var.length&&s.indexes.color.length===r.indexes.color.length&&s.indexes.number.length>=r.indexes.number.length?Sr.has(e)&&!r.values.length||Sr.has(t)&&!s.values.length?Vu(e,t):Ln(Ml(Iu(s,r),r.values),n):(hn(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),ys(e,t))};function Vl(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Ve(e,t,n):mo(e)(e,t)}const $u=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>je.update(t,n),stop:()=>At(t),now:()=>Ue.isProcessing?Ue.timestamp:Ge.now()}},Pl=(e,t,n=10)=>{let s="";const r=Math.max(Math.round(t/n),2);for(let i=0;i<r;i++)s+=Math.round(e(i/(r-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},xs=2e4;function go(e){let t=0;const n=50;let s=e.next(t);for(;!s.done&&t<xs;)t+=n,s=e.next(t);return t>=xs?1/0:t}function Fu(e,t=100,n){const s=n({...e,keyframes:[0,t]}),r=Math.min(go(s),xs);return{type:"keyframes",ease:i=>s.next(r*i).value/t,duration:dt(r)}}const Ou=5;function Rl(e,t,n){const s=Math.max(t-Ou,0);return fl(n-e(s),t-s)}const Me={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Gs=.001;function Lu({duration:e=Me.duration,bounce:t=Me.bounce,velocity:n=Me.velocity,mass:s=Me.mass}){let r,i;hn(e<=at(Me.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-t;o=yt(Me.minDamping,Me.maxDamping,o),e=yt(Me.minDuration,Me.maxDuration,dt(e)),o<1?(r=d=>{const u=d*o,f=u*e,h=u-n,p=Cr(d,o),x=Math.exp(-f);return Gs-h/p*x},i=d=>{const f=d*o*e,h=f*n+n,p=Math.pow(o,2)*Math.pow(d,2)*e,x=Math.exp(-f),m=Cr(Math.pow(d,2),o);return(-r(d)+Gs>0?-1:1)*((h-p)*x)/m}):(r=d=>{const u=Math.exp(-d*e),f=(d-n)*e+1;return-Gs+u*f},i=d=>{const u=Math.exp(-d*e),f=(n-d)*(e*e);return u*f});const a=5/e,c=Bu(r,i,a);if(e=at(e),isNaN(c))return{stiffness:Me.stiffness,damping:Me.damping,duration:e};{const d=Math.pow(c,2)*s;return{stiffness:d,damping:o*2*Math.sqrt(s*d),duration:e}}}const _u=12;function Bu(e,t,n){let s=n;for(let r=1;r<_u;r++)s=s-e(s)/t(s);return s}function Cr(e,t){return e*Math.sqrt(1-t*t)}const Hu=["duration","bounce"],Uu=["stiffness","damping","mass"];function ii(e,t){return t.some(n=>e[n]!==void 0)}function zu(e){let t={velocity:Me.velocity,stiffness:Me.stiffness,damping:Me.damping,mass:Me.mass,isResolvedFromDuration:!1,...e};if(!ii(e,Uu)&&ii(e,Hu))if(e.visualDuration){const n=e.visualDuration,s=2*Math.PI/(n*1.2),r=s*s,i=2*yt(.05,1,1-(e.bounce||0))*Math.sqrt(r);t={...t,mass:Me.mass,stiffness:r,damping:i}}else{const n=Lu(e);t={...t,...n,mass:Me.mass},t.isResolvedFromDuration=!0}return t}function bs(e=Me.visualDuration,t=Me.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:s,restDelta:r}=n;const i=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:i},{stiffness:c,damping:d,mass:u,duration:f,velocity:h,isResolvedFromDuration:p}=zu({...n,velocity:-dt(n.velocity||0)}),x=h||0,m=d/(2*Math.sqrt(c*u)),b=o-i,S=dt(Math.sqrt(c/u)),C=Math.abs(b)<5;s||(s=C?Me.restSpeed.granular:Me.restSpeed.default),r||(r=C?Me.restDelta.granular:Me.restDelta.default);let T;if(m<1){const v=Cr(S,m);T=j=>{const V=Math.exp(-m*S*j);return o-V*((x+m*S*b)/v*Math.sin(v*j)+b*Math.cos(v*j))}}else if(m===1)T=v=>o-Math.exp(-S*v)*(b+(x+S*b)*v);else{const v=S*Math.sqrt(m*m-1);T=j=>{const V=Math.exp(-m*S*j),E=Math.min(v*j,300);return o-V*((x+m*S*b)*Math.sinh(E)+v*b*Math.cosh(E))/v}}const k={calculatedDuration:p&&f||null,next:v=>{const j=T(v);if(p)a.done=v>=f;else{let V=v===0?x:0;m<1&&(V=v===0?at(x):Rl(T,v,j));const E=Math.abs(V)<=s,_=Math.abs(o-j)<=r;a.done=E&&_}return a.value=a.done?o:j,a},toString:()=>{const v=Math.min(go(k),xs),j=Pl(V=>k.next(v*V).value,v,30);return v+"ms "+j},toTransition:()=>{}};return k}bs.applyToOptions=e=>{const t=Fu(e,100,bs);return e.ease=t.ease,e.duration=at(t.duration),e.type="keyframes",e};function kr({keyframes:e,velocity:t=0,power:n=.8,timeConstant:s=325,bounceDamping:r=10,bounceStiffness:i=500,modifyTarget:o,min:a,max:c,restDelta:d=.5,restSpeed:u}){const f=e[0],h={done:!1,value:f},p=E=>a!==void 0&&E<a||c!==void 0&&E>c,x=E=>a===void 0?c:c===void 0||Math.abs(a-E)<Math.abs(c-E)?a:c;let m=n*t;const b=f+m,S=o===void 0?b:o(b);S!==b&&(m=S-f);const C=E=>-m*Math.exp(-E/s),T=E=>S+C(E),k=E=>{const _=C(E),y=T(E);h.done=Math.abs(_)<=d,h.value=h.done?S:y};let v,j;const V=E=>{p(h.value)&&(v=E,j=bs({keyframes:[h.value,x(h.value)],velocity:Rl(T,E,h.value),damping:r,stiffness:i,restDelta:d,restSpeed:u}))};return V(0),{calculatedDuration:null,next:E=>{let _=!1;return!j&&v===void 0&&(_=!0,k(E),V(E)),v!==void 0&&E>=v?j.next(E-v):(!_&&k(E),h)}}}function Wu(e,t,n){const s=[],r=n||bt.mix||Vl,i=e.length-1;for(let o=0;o<i;o++){let a=r(e[o],e[o+1]);if(t){const c=Array.isArray(t)?t[o]||nt:t;a=Ln(c,a)}s.push(a)}return s}function Zu(e,t,{clamp:n=!0,ease:s,mixer:r}={}){const i=e.length;if(xt(i===t.length,"Both input and output ranges must be the same length","range-length"),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=Wu(t,s,r),c=a.length,d=u=>{if(o&&u<e[0])return t[0];let f=0;if(c>1)for(;f<e.length-2&&!(u<e[f+1]);f++);const h=Pn(e[f],e[f+1],u);return a[f](h)};return n?u=>d(yt(e[0],e[i-1],u)):d}function Gu(e,t){const n=e[e.length-1];for(let s=1;s<=t;s++){const r=Pn(0,t,s);e.push(Ve(n,1,r))}}function Ku(e){const t=[0];return Gu(t,e.length-1),t}function Yu(e,t){return e.map(n=>n*t)}function qu(e,t){return e.map(()=>t||wl).splice(0,e.length-1)}function tn({duration:e=300,keyframes:t,times:n,ease:s="easeInOut"}){const r=lu(s)?s.map(ti):ti(s),i={done:!1,value:t[0]},o=Yu(n&&n.length===t.length?n:Ku(t),e),a=Zu(o,t,{ease:Array.isArray(r)?r:qu(t,r)});return{calculatedDuration:e,next:c=>(i.value=a(c),i.done=c>=e,i)}}const Xu=e=>e!==null;function po(e,{repeat:t,repeatType:n="loop"},s,r=1){const i=e.filter(Xu),a=r<0||t&&n!=="loop"&&t%2===1?0:i.length-1;return!a||s===void 0?i[a]:s}const Ju={decay:kr,inertia:kr,tween:tn,keyframes:tn,spring:bs};function Il(e){typeof e.type=="string"&&(e.type=Ju[e.type])}class yo{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const Qu=e=>e/100;class xo extends yo{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var s,r;const{motionValue:n}=this.options;n&&n.updatedAt!==Ge.now()&&this.tick(Ge.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(r=(s=this.options).onStop)==null||r.call(s))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;Il(t);const{type:n=tn,repeat:s=0,repeatDelay:r=0,repeatType:i,velocity:o=0}=t;let{keyframes:a}=t;const c=n||tn;process.env.NODE_ENV!=="production"&&c!==tn&&xt(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),c!==tn&&typeof a[0]!="number"&&(this.mixKeyframes=Ln(Qu,Vl(a[0],a[1])),a=[0,100]);const d=c({...t,keyframes:a});i==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...a].reverse(),velocity:-o})),d.calculatedDuration===null&&(d.calculatedDuration=go(d));const{calculatedDuration:u}=d;this.calculatedDuration=u,this.resolvedDuration=u+r,this.totalDuration=this.resolvedDuration*(s+1)-r,this.generator=d}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:s,totalDuration:r,mixKeyframes:i,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:c}=this;if(this.startTime===null)return s.next(0);const{delay:d=0,keyframes:u,repeat:f,repeatType:h,repeatDelay:p,type:x,onUpdate:m,finalKeyframe:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-r/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const S=this.currentTime-d*(this.playbackSpeed>=0?1:-1),C=this.playbackSpeed>=0?S<0:S>r;this.currentTime=Math.max(S,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=r);let T=this.currentTime,k=s;if(f){const E=Math.min(this.currentTime,r)/a;let _=Math.floor(E),y=E%1;!y&&E>=1&&(y=1),y===1&&_--,_=Math.min(_,f+1),!!(_%2)&&(h==="reverse"?(y=1-y,p&&(y-=p/a)):h==="mirror"&&(k=o)),T=yt(0,1,y)*a}const v=C?{done:!1,value:u[0]}:k.next(T);i&&(v.value=i(v.value));let{done:j}=v;!C&&c!==null&&(j=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);const V=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&j);return V&&x!==kr&&(v.value=po(u,this.options,b,this.speed)),m&&m(v.value),V&&this.finish(),v}then(t,n){return this.finished.then(t,n)}get duration(){return dt(this.calculatedDuration)}get time(){return dt(this.currentTime)}set time(t){var n;t=at(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Ge.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=dt(this.currentTime))}play(){var r,i;if(this.isStopped)return;const{driver:t=$u,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),(i=(r=this.options).onPlay)==null||i.call(r);const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=n??s),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Ge.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function ef(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Ot=e=>e*180/Math.PI,Tr=e=>{const t=Ot(Math.atan2(e[1],e[0]));return Er(t)},tf={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Tr,rotateZ:Tr,skewX:e=>Ot(Math.atan(e[1])),skewY:e=>Ot(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Er=e=>(e=e%360,e<0&&(e+=360),e),ai=Tr,li=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),ci=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),nf={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:li,scaleY:ci,scale:e=>(li(e)+ci(e))/2,rotateX:e=>Er(Ot(Math.atan2(e[6],e[5]))),rotateY:e=>Er(Ot(Math.atan2(-e[2],e[0]))),rotateZ:ai,rotate:ai,skewX:e=>Ot(Math.atan(e[4])),skewY:e=>Ot(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Ar(e){return e.includes("scale")?1:0}function jr(e,t){if(!e||e==="none")return Ar(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,r;if(n)s=nf,r=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=tf,r=a}if(!r)return Ar(t);const i=s[t],o=r[1].split(",").map(rf);return typeof i=="function"?i(o):o[i]}const sf=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return jr(n,t)};function rf(e){return parseFloat(e.trim())}const gn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],pn=new Set(gn),di=e=>e===mn||e===ce,of=new Set(["x","y","z"]),af=gn.filter(e=>!of.has(e));function lf(e){const t=[];return af.forEach(n=>{const s=e.getValue(n);s!==void 0&&(t.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),t}const _t={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>jr(t,"x"),y:(e,{transform:t})=>jr(t,"y")};_t.translateX=_t.x;_t.translateY=_t.y;const Bt=new Set;let Nr=!1,Mr=!1,Vr=!1;function Dl(){if(Mr){const e=Array.from(Bt).filter(s=>s.needsMeasurement),t=new Set(e.map(s=>s.element)),n=new Map;t.forEach(s=>{const r=lf(s);r.length&&(n.set(s,r),s.render())}),e.forEach(s=>s.measureInitialState()),t.forEach(s=>{s.render();const r=n.get(s);r&&r.forEach(([i,o])=>{var a;(a=s.getValue(i))==null||a.set(o)})}),e.forEach(s=>s.measureEndState()),e.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}Mr=!1,Nr=!1,Bt.forEach(e=>e.complete(Vr)),Bt.clear()}function $l(){Bt.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Mr=!0)})}function cf(){Vr=!0,$l(),Dl(),Vr=!1}class bo{constructor(t,n,s,r,i,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=s,this.motionValue=r,this.element=i,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Bt.add(this),Nr||(Nr=!0,je.read($l),je.resolveKeyframes(Dl))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:s,motionValue:r}=this;if(t[0]===null){const i=r==null?void 0:r.get(),o=t[t.length-1];if(i!==void 0)t[0]=i;else if(s&&n){const a=s.readValue(n,o);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=o),r&&i===void 0&&r.set(t[0])}ef(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Bt.delete(this)}cancel(){this.state==="scheduled"&&(Bt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const df=e=>e.startsWith("--");function uf(e,t,n){df(t)?e.style.setProperty(t,n):e.style[t]=n}const ff=ro(()=>window.ScrollTimeline!==void 0),hf={};function mf(e,t){const n=ro(e);return()=>hf[t]??n()}const Fl=mf(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Cn=([e,t,n,s])=>`cubic-bezier(${e}, ${t}, ${n}, ${s})`,ui={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Cn([0,.65,.55,1]),circOut:Cn([.55,0,1,.45]),backIn:Cn([.31,.01,.66,-.59]),backOut:Cn([.33,1.53,.69,.99])};function Ol(e,t){if(e)return typeof e=="function"?Fl()?Pl(e,t):"ease-out":Sl(e)?Cn(e):Array.isArray(e)?e.map(n=>Ol(n,t)||ui.easeOut):ui[e]}function gf(e,t,n,{delay:s=0,duration:r=300,repeat:i=0,repeatType:o="loop",ease:a="easeOut",times:c}={},d=void 0){const u={[t]:n};c&&(u.offset=c);const f=Ol(a,r);Array.isArray(f)&&(u.easing=f);const h={delay:s,duration:r,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:i+1,direction:o==="reverse"?"alternate":"normal"};return d&&(h.pseudoElement=d),e.animate(u,h)}function Ll(e){return typeof e=="function"&&"applyToOptions"in e}function pf({type:e,...t}){return Ll(e)&&Fl()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class yf extends yo{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:s,keyframes:r,pseudoElement:i,allowFlatten:o=!1,finalKeyframe:a,onComplete:c}=t;this.isPseudoElement=!!i,this.allowFlatten=o,this.options=t,xt(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const d=pf(t);this.animation=gf(n,s,r,d,i),d.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const u=po(r,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(u):uf(n,s,u),this.animation.cancel()}c==null||c(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var t,n;this.isPseudoElement||(n=(t=this.animation).commitStyles)==null||n.call(t)}get duration(){var n,s;const t=((s=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:s.call(n).duration)||0;return dt(Number(t))}get time(){return dt(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=at(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){var s;return this.allowFlatten&&((s=this.animation.effect)==null||s.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&ff()?(this.animation.timeline=t,nt):n(this)}}const _l={anticipate:xl,backInOut:yl,circInOut:vl};function xf(e){return e in _l}function bf(e){typeof e.ease=="string"&&xf(e.ease)&&(e.ease=_l[e.ease])}const fi=10;class vf extends yf{constructor(t){bf(t),Il(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:s,onComplete:r,element:i,...o}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new xo({...o,autoplay:!1}),c=at(this.finishedTime??this.time);n.setWithVelocity(a.sample(c-fi).value,a.sample(c).value,fi),a.stop()}}const hi=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(jt.test(e)||e==="0")&&!e.startsWith("url("));function wf(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function Sf(e,t,n,s){const r=e[0];if(r===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],o=hi(r,t),a=hi(i,t);return hn(o===a,`You are trying to animate ${t} from "${r}" to "${i}". "${o?i:r}" is not an animatable value.`,"value-not-animatable"),!o||!a?!1:wf(e)||(n==="spring"||Ll(n))&&s}function Pr(e){e.duration=0,e.type}const Cf=new Set(["opacity","clipPath","filter","transform"]),kf=ro(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Tf(e){var u;const{motionValue:t,name:n,repeatDelay:s,repeatType:r,damping:i,type:o}=e;if(!(((u=t==null?void 0:t.owner)==null?void 0:u.current)instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:d}=t.owner.getProps();return kf()&&n&&Cf.has(n)&&(n!=="transform"||!d)&&!c&&!s&&r!=="mirror"&&i!==0&&o!=="inertia"}const Ef=40;class Af extends yo{constructor({autoplay:t=!0,delay:n=0,type:s="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:o="loop",keyframes:a,name:c,motionValue:d,element:u,...f}){var x;super(),this.stop=()=>{var m,b;this._animation&&(this._animation.stop(),(m=this.stopTimeline)==null||m.call(this)),(b=this.keyframeResolver)==null||b.cancel()},this.createdAt=Ge.now();const h={autoplay:t,delay:n,type:s,repeat:r,repeatDelay:i,repeatType:o,name:c,motionValue:d,element:u,...f},p=(u==null?void 0:u.KeyframeResolver)||bo;this.keyframeResolver=new p(a,(m,b,S)=>this.onKeyframesResolved(m,b,h,!S),c,d,u),(x=this.keyframeResolver)==null||x.scheduleResolve()}onKeyframesResolved(t,n,s,r){this.keyframeResolver=void 0;const{name:i,type:o,velocity:a,delay:c,isHandoff:d,onUpdate:u}=s;this.resolvedAt=Ge.now(),Sf(t,i,o,a)||((bt.instantAnimations||!c)&&(u==null||u(po(t,s,n))),t[0]=t[t.length-1],Pr(s),s.repeat=0);const h={startTime:r?this.resolvedAt?this.resolvedAt-this.createdAt>Ef?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:t},p=!d&&Tf(h)?new vf({...h,element:h.motionValue.owner.current}):new xo(h);p.finished.then(()=>this.notifyFinished()).catch(nt),this.pendingTimeline&&(this.stopTimeline=p.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=p}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),cf()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}const jf=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Nf(e){const t=jf.exec(e);if(!t)return[,];const[,n,s,r]=t;return[`--${n??s}`,r]}const Mf=4;function Bl(e,t,n=1){xt(n<=Mf,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,r]=Nf(e);if(!s)return;const i=window.getComputedStyle(t).getPropertyValue(s);if(i){const o=i.trim();return cl(o)?parseFloat(o):o}return uo(r)?Bl(r,t,n+1):r}function vo(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const Hl=new Set(["width","height","top","left","right","bottom",...gn]),Vf={test:e=>e==="auto",parse:e=>e},Ul=e=>t=>t.test(e),zl=[mn,ce,ut,kt,vu,bu,Vf],mi=e=>zl.find(Ul(e));function Pf(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||ul(e):!0}const Rf=new Set(["brightness","contrast","saturate","opacity"]);function If(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[s]=n.match(fo)||[];if(!s)return e;const r=n.replace(s,"");let i=Rf.has(t)?1:0;return s!==n&&(i*=100),t+"("+i+r+")"}const Df=/\b([a-z-]*)\(.*?\)/gu,Rr={...jt,getAnimatableNone:e=>{const t=e.match(Df);return t?t.map(If).join(" "):e}},gi={...mn,transform:Math.round},$f={rotate:kt,rotateX:kt,rotateY:kt,rotateZ:kt,scale:Xn,scaleX:Xn,scaleY:Xn,scaleZ:Xn,skew:kt,skewX:kt,skewY:kt,distance:ce,translateX:ce,translateY:ce,translateZ:ce,x:ce,y:ce,z:ce,perspective:ce,transformPerspective:ce,opacity:Rn,originX:ni,originY:ni,originZ:ce},wo={borderWidth:ce,borderTopWidth:ce,borderRightWidth:ce,borderBottomWidth:ce,borderLeftWidth:ce,borderRadius:ce,radius:ce,borderTopLeftRadius:ce,borderTopRightRadius:ce,borderBottomRightRadius:ce,borderBottomLeftRadius:ce,width:ce,maxWidth:ce,height:ce,maxHeight:ce,top:ce,right:ce,bottom:ce,left:ce,padding:ce,paddingTop:ce,paddingRight:ce,paddingBottom:ce,paddingLeft:ce,margin:ce,marginTop:ce,marginRight:ce,marginBottom:ce,marginLeft:ce,backgroundPositionX:ce,backgroundPositionY:ce,...$f,zIndex:gi,fillOpacity:Rn,strokeOpacity:Rn,numOctaves:gi},Ff={...wo,color:Le,backgroundColor:Le,outlineColor:Le,fill:Le,stroke:Le,borderColor:Le,borderTopColor:Le,borderRightColor:Le,borderBottomColor:Le,borderLeftColor:Le,filter:Rr,WebkitFilter:Rr},Wl=e=>Ff[e];function Zl(e,t){let n=Wl(e);return n!==Rr&&(n=jt),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Of=new Set(["auto","none","0"]);function Lf(e,t,n){let s=0,r;for(;s<e.length&&!r;){const i=e[s];typeof i=="string"&&!Of.has(i)&&In(i).values.length&&(r=e[s]),s++}if(r&&n)for(const i of t)e[i]=Zl(n,r)}class _f extends bo{constructor(t,n,s,r,i){super(t,n,s,r,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let d=t[c];if(typeof d=="string"&&(d=d.trim(),uo(d))){const u=Bl(d,n.current);u!==void 0&&(t[c]=u),c===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!Hl.has(s)||t.length!==2)return;const[r,i]=t,o=mi(r),a=mi(i);if(o!==a)if(di(o)&&di(a))for(let c=0;c<t.length;c++){const d=t[c];typeof d=="string"&&(t[c]=parseFloat(d))}else _t[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,s=[];for(let r=0;r<t.length;r++)(t[r]===null||Pf(t[r]))&&s.push(r);s.length&&Lf(t,s,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:s}=this;if(!t||!t.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=_t[s](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const r=n[n.length-1];r!==void 0&&t.getValue(s,r).jump(r,!1)}measureEndState(){var a;const{element:t,name:n,unresolvedKeyframes:s}=this;if(!t||!t.current)return;const r=t.getValue(n);r&&r.jump(this.measuredOrigin,!1);const i=s.length-1,o=s[i];s[i]=_t[n](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([c,d])=>{t.getValue(c).set(d)}),this.resolveNoneKeyframes()}}function Bf(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let s=document;const r=(n==null?void 0:n[e])??s.querySelectorAll(e);return r?Array.from(r):[]}return Array.from(e)}const Gl=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Kl(e){return dl(e)&&"offsetHeight"in e}const pi=30,Hf=e=>!isNaN(parseFloat(e));class Uf{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{var i;const r=Ge.now();if(this.updatedAt!==r&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&((i=this.events.change)==null||i.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Ge.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Hf(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&io(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new oo);const s=this.events[t].add(n);return t==="change"?()=>{s(),je.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-s}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Ge.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>pi)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,pi);return fl(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function cn(e,t){return new Uf(e,t)}const{schedule:So}=Cl(queueMicrotask,!1),it={x:!1,y:!1};function Yl(){return it.x||it.y}function zf(e){return e==="x"||e==="y"?it[e]?null:(it[e]=!0,()=>{it[e]=!1}):it.x||it.y?null:(it.x=it.y=!0,()=>{it.x=it.y=!1})}function ql(e,t){const n=Bf(e),s=new AbortController,r={passive:!0,...t,signal:s.signal};return[n,r,()=>s.abort()]}function yi(e){return!(e.pointerType==="touch"||Yl())}function Wf(e,t,n={}){const[s,r,i]=ql(e,n),o=a=>{if(!yi(a))return;const{target:c}=a,d=t(c,a);if(typeof d!="function"||!c)return;const u=f=>{yi(f)&&(d(f),c.removeEventListener("pointerleave",u))};c.addEventListener("pointerleave",u,r)};return s.forEach(a=>{a.addEventListener("pointerenter",o,r)}),i}const Xl=(e,t)=>t?e===t?!0:Xl(e,t.parentElement):!1,Co=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Zf=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Gf(e){return Zf.has(e.tagName)||e.tabIndex!==-1}const cs=new WeakSet;function xi(e){return t=>{t.key==="Enter"&&e(t)}}function Ks(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Kf=(e,t)=>{const n=e.currentTarget;if(!n)return;const s=xi(()=>{if(cs.has(n))return;Ks(n,"down");const r=xi(()=>{Ks(n,"up")}),i=()=>Ks(n,"cancel");n.addEventListener("keyup",r,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",s,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),t)};function bi(e){return Co(e)&&!Yl()}function Yf(e,t,n={}){const[s,r,i]=ql(e,n),o=a=>{const c=a.currentTarget;if(!bi(a))return;cs.add(c);const d=t(c,a),u=(p,x)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",h),cs.has(c)&&cs.delete(c),bi(p)&&typeof d=="function"&&d(p,{success:x})},f=p=>{u(p,c===window||c===document||n.useGlobalTarget||Xl(c,p.target))},h=p=>{u(p,!1)};window.addEventListener("pointerup",f,r),window.addEventListener("pointercancel",h,r)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,r),Kl(a)&&(a.addEventListener("focus",d=>Kf(d,r)),!Gf(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),i}function Jl(e){return dl(e)&&"ownerSVGElement"in e}function qf(e){return Jl(e)&&e.tagName==="svg"}const We=e=>!!(e&&e.getVelocity),Xf=[...zl,Le,jt],Jf=e=>Xf.find(Ul(e)),ko=w.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class Qf extends g.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const s=n.offsetParent,r=Kl(s)&&s.offsetWidth||0,i=this.props.sizeRef.current;i.height=n.offsetHeight||0,i.width=n.offsetWidth||0,i.top=n.offsetTop,i.left=n.offsetLeft,i.right=r-i.width-i.left}return null}componentDidUpdate(){}render(){return this.props.children}}function eh({children:e,isPresent:t,anchorX:n,root:s}){const r=w.useId(),i=w.useRef(null),o=w.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=w.useContext(ko);return w.useInsertionEffect(()=>{const{width:c,height:d,top:u,left:f,right:h}=o.current;if(t||!i.current||!c||!d)return;const p=n==="left"?`left: ${f}`:`right: ${h}`;i.current.dataset.motionPopId=r;const x=document.createElement("style");a&&(x.nonce=a);const m=s??document.head;return m.appendChild(x),x.sheet&&x.sheet.insertRule(`
22
22
  [data-motion-pop-id="${r}"] {
23
23
  position: absolute !important;
24
- width: ${l}px !important;
24
+ width: ${c}px !important;
25
25
  height: ${d}px !important;
26
- ${g}px !important;
26
+ ${p}px !important;
27
27
  top: ${u}px !important;
28
28
  }
29
- `),()=>{f.contains(x)&&f.removeChild(x)}},[t]),c.jsx(Qf,{isPresent:t,childRef:i,sizeRef:o,children:p.cloneElement(e,{ref:i})})}const th=({children:e,initial:t,isPresent:n,onExitComplete:s,custom:r,presenceAffectsLayout:i,mode:o,anchorX:a,root:l})=>{const d=eo(nh),u=v.useId();let h=!0,m=v.useMemo(()=>(h=!1,{id:u,initial:t,isPresent:n,custom:r,onExitComplete:g=>{d.set(g,!0);for(const x of d.values())if(!x)return;s&&s()},register:g=>(d.set(g,!1),()=>d.delete(g))}),[n,d,s]);return i&&h&&(m={...m}),v.useMemo(()=>{d.forEach((g,x)=>d.set(x,!1))},[n]),p.useEffect(()=>{!n&&!d.size&&s&&s()},[n]),o==="popLayout"&&(e=c.jsx(eh,{isPresent:n,anchorX:a,root:l,children:e})),c.jsx(Es.Provider,{value:m,children:e})};function nh(){return new Map}function Jc(e=!0){const t=v.useContext(Es);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:r}=t,i=v.useId();v.useEffect(()=>{if(e)return r(i)},[e]);const o=v.useCallback(()=>e&&s&&s(i),[i,s,e]);return!n&&s?[!1,o]:[!0]}const Jn=e=>e.key||"";function bi(e){const t=[];return v.Children.forEach(e,n=>{v.isValidElement(n)&&t.push(n)}),t}const an=({children:e,custom:t,initial:n=!0,onExitComplete:s,presenceAffectsLayout:r=!0,mode:i="sync",propagate:o=!1,anchorX:a="left",root:l})=>{const[d,u]=Jc(o),h=v.useMemo(()=>bi(e),[e]),m=o&&!d?[]:h.map(Jn),g=v.useRef(!0),x=v.useRef(h),f=eo(()=>new Map),[b,k]=v.useState(h),[S,T]=v.useState(h);ac(()=>{g.current=!1,x.current=h;for(let A=0;A<S.length;A++){const V=Jn(S[A]);m.includes(V)?f.delete(V):f.get(V)!==!0&&f.set(V,!1)}},[S,m.length,m.join("-")]);const C=[];if(h!==b){let A=[...h];for(let V=0;V<S.length;V++){const E=S[V],F=Jn(E);m.includes(F)||(A.splice(V,0,E),C.push(E))}return i==="wait"&&C.length&&(A=C),T(bi(A)),k(h),null}process.env.NODE_ENV!=="production"&&i==="wait"&&S.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:w}=v.useContext(Qr);return c.jsx(c.Fragment,{children:S.map(A=>{const V=Jn(A),E=o&&!d?!1:h===S||m.includes(V),F=()=>{if(f.has(V))f.set(V,!0);else return;let y=!0;f.forEach(R=>{R||(y=!1)}),y&&(w==null||w(),T(x.current),o&&(u==null||u()),s&&s())};return c.jsx(th,{isPresent:E,initial:!g.current||n?void 0:!1,custom:t,presenceAffectsLayout:r,mode:i,root:l,onExitComplete:E?void 0:F,anchorX:a,children:A},V)})})},Qc=v.createContext({strict:!1}),vi={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},un={};for(const e in vi)un[e]={isEnabled:t=>vi[e].some(n=>!!t[n])};function sh(e){for(const t in e)un[t]={...un[t],...e[t]}}const rh=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function vs(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||rh.has(e)}let el=e=>!vs(e);function oh(e){typeof e=="function"&&(el=t=>t.startsWith("on")?!vs(t):e(t))}try{oh(require("@emotion/is-prop-valid").default)}catch{}function ih(e,t,n){const s={};for(const r in e)r==="values"&&typeof e.values=="object"||(el(r)||n===!0&&vs(r)||!t&&!vs(r)||e.draggable&&r.startsWith("onDrag"))&&(s[r]=e[r]);return s}const As=v.createContext({});function js(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Fn(e){return typeof e=="string"||Array.isArray(e)}const To=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Eo=["initial",...To];function Ms(e){return js(e.animate)||Eo.some(t=>Fn(e[t]))}function tl(e){return!!(Ms(e)||e.variants)}function ah(e,t){if(Ms(e)){const{initial:n,animate:s}=e;return{initial:n===!1||Fn(n)?n:void 0,animate:Fn(s)?s:void 0}}return e.inherit!==!1?t:{}}function ch(e){const{initial:t,animate:n}=ah(e,v.useContext(As));return v.useMemo(()=>({initial:t,animate:n}),[wi(t),wi(n)])}function wi(e){return Array.isArray(e)?e.join(" "):e}const On={};function lh(e){for(const t in e)On[t]=e[t],lo(t)&&(On[t].isCSSVariable=!0)}function nl(e,{layout:t,layoutId:n}){return yn.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!On[e]||e==="opacity")}const dh={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},uh=gn.length;function fh(e,t,n){let s="",r=!0;for(let i=0;i<uh;i++){const o=gn[i],a=e[o];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(o.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const d=Zc(a,wo[o]);if(!l){r=!1;const u=dh[o]||o;s+=`${u}(${d}) `}n&&(t[o]=d)}}return s=s.trim(),n?s=n(t,r?"":s):r&&(s="none"),s}function Ao(e,t,n){const{style:s,vars:r,transformOrigin:i}=e;let o=!1,a=!1;for(const l in t){const d=t[l];if(yn.has(l)){o=!0;continue}else if(lo(l)){r[l]=d;continue}else{const u=Zc(d,wo[l]);l.startsWith("origin")?(a=!0,i[l]=u):s[l]=u}}if(t.transform||(o||n?s.transform=fh(t,e.transform,n):s.transform&&(s.transform="none")),a){const{originX:l="50%",originY:d="50%",originZ:u=0}=i;s.transformOrigin=`${l} ${d} ${u}`}}const jo=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function sl(e,t,n){for(const s in t)!He(t[s])&&!nl(s,n)&&(e[s]=t[s])}function hh({transformTemplate:e},t){return v.useMemo(()=>{const n=jo();return Ao(n,t,e),Object.assign({},n.vars,n.style)},[t])}function mh(e,t){const n=e.style||{},s={};return sl(s,n,e),Object.assign(s,hh(e,t)),s}function ph(e,t){const n={},s=mh(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=s,n}const gh={offset:"stroke-dashoffset",array:"stroke-dasharray"},yh={offset:"strokeDashoffset",array:"strokeDasharray"};function xh(e,t,n=1,s=0,r=!0){e.pathLength=1;const i=r?gh:yh;e[i.offset]=ie.transform(-s);const o=ie.transform(t),a=ie.transform(n);e[i.array]=`${o} ${a}`}function rl(e,{attrX:t,attrY:n,attrScale:s,pathLength:r,pathSpacing:i=1,pathOffset:o=0,...a},l,d,u){if(Ao(e,a,d),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:m}=e;h.transform&&(m.transform=h.transform,delete h.transform),(m.transform||h.transformOrigin)&&(m.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),m.transform&&(m.transformBox=(u==null?void 0:u.transformBox)??"fill-box",delete h.transformBox),t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),s!==void 0&&(h.scale=s),r!==void 0&&xh(h,r,i,o,!1)}const ol=()=>({...jo(),attrs:{}}),il=e=>typeof e=="string"&&e.toLowerCase()==="svg";function bh(e,t,n,s){const r=v.useMemo(()=>{const i=ol();return rl(i,t,il(s),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};sl(i,e.style,e),r.style={...i,...r.style}}return r}const vh=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Mo(e){return typeof e!="string"||e.includes("-")?!1:!!(vh.indexOf(e)>-1||/[A-Z]/u.test(e))}function wh(e,t,n,{latestValues:s},r,i=!1){const a=(Mo(e)?bh:ph)(t,s,r,e),l=ih(t,typeof e=="string",i),d=e!==v.Fragment?{...l,...a,ref:n}:{},{children:u}=t,h=v.useMemo(()=>He(u)?u.get():u,[u]);return v.createElement(e,{...d,children:h})}function Si(e){const t=[{},{}];return e==null||e.values.forEach((n,s)=>{t[0][s]=n.get(),t[1][s]=n.getVelocity()}),t}function Vo(e,t,n,s){if(typeof t=="function"){const[r,i]=Si(s);t=t(n!==void 0?n:e.custom,r,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[r,i]=Si(s);t=t(n!==void 0?n:e.custom,r,i)}return t}function ds(e){return He(e)?e.get():e}function Sh({scrapeMotionValuesFromProps:e,createRenderState:t},n,s,r){return{latestValues:Ch(n,s,r,e),renderState:t()}}function Ch(e,t,n,s){const r={},i=s(e,{});for(const m in i)r[m]=ds(i[m]);let{initial:o,animate:a}=e;const l=Ms(e),d=tl(e);t&&d&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let u=n?n.initial===!1:!1;u=u||o===!1;const h=u?a:o;if(h&&typeof h!="boolean"&&!js(h)){const m=Array.isArray(h)?h:[h];for(let g=0;g<m.length;g++){const x=Vo(e,m[g]);if(x){const{transitionEnd:f,transition:b,...k}=x;for(const S in k){let T=k[S];if(Array.isArray(T)){const C=u?T.length-1:0;T=T[C]}T!==null&&(r[S]=T)}for(const S in f)r[S]=f[S]}}}return r}const al=e=>(t,n)=>{const s=v.useContext(As),r=v.useContext(Es),i=()=>Sh(e,t,s,r);return n?i():eo(i)};function No(e,t,n){var i;const{style:s}=e,r={};for(const o in s)(He(s[o])||t.style&&He(t.style[o])||nl(o,e)||((i=n==null?void 0:n.getValue(o))==null?void 0:i.liveStyle)!==void 0)&&(r[o]=s[o]);return r}const kh=al({scrapeMotionValuesFromProps:No,createRenderState:jo});function cl(e,t,n){const s=No(e,t,n);for(const r in e)if(He(e[r])||He(t[r])){const i=gn.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;s[i]=e[r]}return s}const Th=al({scrapeMotionValuesFromProps:cl,createRenderState:ol}),Eh=Symbol.for("motionComponentSymbol");function nn(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Ah(e,t,n){return v.useCallback(s=>{s&&e.onMount&&e.onMount(s),t&&(s?t.mount(s):t.unmount()),n&&(typeof n=="function"?n(s):nn(n)&&(n.current=s))},[t])}const Po=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),jh="framerAppearId",ll="data-"+Po(jh),dl=v.createContext({});function Mh(e,t,n,s,r){var f,b;const{visualElement:i}=v.useContext(As),o=v.useContext(Qc),a=v.useContext(Es),l=v.useContext(ko).reducedMotion,d=v.useRef(null);s=s||o.renderer,!d.current&&s&&(d.current=s(e,{visualState:t,parent:i,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const u=d.current,h=v.useContext(dl);u&&!u.projection&&r&&(u.type==="html"||u.type==="svg")&&Vh(d.current,n,r,h);const m=v.useRef(!1);v.useInsertionEffect(()=>{u&&m.current&&u.update(n,a)});const g=n[ll],x=v.useRef(!!g&&!((f=window.MotionHandoffIsComplete)!=null&&f.call(window,g))&&((b=window.MotionHasOptimisedAnimation)==null?void 0:b.call(window,g)));return ac(()=>{u&&(m.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),u.scheduleRenderMicrotask(),x.current&&u.animationState&&u.animationState.animateChanges())}),v.useEffect(()=>{u&&(!x.current&&u.animationState&&u.animationState.animateChanges(),x.current&&(queueMicrotask(()=>{var k;(k=window.MotionHandoffMarkAsComplete)==null||k.call(window,g)}),x.current=!1),u.enteringChildren=void 0)}),u}function Vh(e,t,n,s){const{layoutId:r,layout:i,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:d,layoutCrossfade:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:ul(e.parent)),e.projection.setOptions({layoutId:r,layout:i,alwaysMeasureLayout:!!o||a&&nn(a),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:s,crossfade:u,layoutScroll:l,layoutRoot:d})}function ul(e){if(e)return e.options.allowProjection!==!1?e.projection:ul(e.parent)}function Ys(e,{forwardMotionProps:t=!1}={},n,s){n&&sh(n);const r=Mo(e)?Th:kh;function i(a,l){let d;const u={...v.useContext(ko),...a,layoutId:Nh(a)},{isStatic:h}=u,m=ch(a),g=r(a,h);if(!h&&to){Ph(u,n);const x=Rh(u);d=x.MeasureLayout,m.visualElement=Mh(e,g,u,s,x.ProjectionNode)}return c.jsxs(As.Provider,{value:m,children:[d&&m.visualElement?c.jsx(d,{visualElement:m.visualElement,...u}):null,wh(e,a,Ah(g,m.visualElement,l),g,h,t)]})}i.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const o=v.forwardRef(i);return o[Eh]=e,o}function Nh({layoutId:e}){const t=v.useContext(Qr).id;return t&&e!==void 0?t+"-"+e:e}function Ph(e,t){const n=v.useContext(Qc).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const s="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?mn(!1,s,"lazy-strict-mode"):gt(!1,s,"lazy-strict-mode")}}function Rh(e){const{drag:t,layout:n}=un;if(!t&&!n)return{};const s={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function Ih(e,t){if(typeof Proxy>"u")return Ys;const n=new Map,s=(i,o)=>Ys(i,o,e,t),r=(i,o)=>(process.env.NODE_ENV!=="production"&&io(!1,"motion() is deprecated. Use motion.create() instead."),s(i,o));return new Proxy(r,{get:(i,o)=>o==="create"?s:(n.has(o)||n.set(o,Ys(o,void 0,e,t)),n.get(o))})}function fl({top:e,left:t,right:n,bottom:s}){return{x:{min:t,max:n},y:{min:e,max:s}}}function Dh({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function $h(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),s=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function qs(e){return e===void 0||e===1}function Ir({scale:e,scaleX:t,scaleY:n}){return!qs(e)||!qs(t)||!qs(n)}function It(e){return Ir(e)||hl(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function hl(e){return Ci(e.x)||Ci(e.y)}function Ci(e){return e&&e!=="0%"}function ws(e,t,n){const s=e-n,r=t*s;return n+r}function ki(e,t,n,s,r){return r!==void 0&&(e=ws(e,r,s)),ws(e,n,s)+t}function Dr(e,t=0,n=1,s,r){e.min=ki(e.min,t,n,s,r),e.max=ki(e.max,t,n,s,r)}function ml(e,{x:t,y:n}){Dr(e.x,t.translate,t.scale,t.originPoint),Dr(e.y,n.translate,n.scale,n.originPoint)}const Ti=.999999999999,Ei=1.0000000000001;function Fh(e,t,n,s=!1){const r=n.length;if(!r)return;t.x=t.y=1;let i,o;for(let a=0;a<r;a++){i=n[a],o=i.projectionDelta;const{visualElement:l}=i.options;l&&l.props.style&&l.props.style.display==="contents"||(s&&i.options.layoutScroll&&i.scroll&&i!==i.root&&rn(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,ml(e,o)),s&&It(i.latestValues)&&rn(e,i.latestValues))}t.x<Ei&&t.x>Ti&&(t.x=1),t.y<Ei&&t.y>Ti&&(t.y=1)}function sn(e,t){e.min=e.min+t,e.max=e.max+t}function Ai(e,t,n,s,r=.5){const i=je(e.min,e.max,r);Dr(e,t,n,i,s)}function rn(e,t){Ai(e.x,t.x,t.scaleX,t.scale,t.originX),Ai(e.y,t.y,t.scaleY,t.scale,t.originY)}function pl(e,t){return fl($h(e.getBoundingClientRect(),t))}function Oh(e,t,n){const s=pl(e,n),{scroll:r}=t;return r&&(sn(s.x,r.offset.x),sn(s.y,r.offset.y)),s}const ji=()=>({translate:0,scale:1,origin:0,originPoint:0}),on=()=>({x:ji(),y:ji()}),Mi=()=>({min:0,max:0}),Re=()=>({x:Mi(),y:Mi()}),$r={current:null},gl={current:!1};function Lh(){if(gl.current=!0,!!to)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>$r.current=e.matches;e.addEventListener("change",t),t()}else $r.current=!1}const _h=new WeakMap;function Bh(e,t,n){for(const s in t){const r=t[s],i=n[s];if(He(r))e.addValue(s,r);else if(He(i))e.addValue(s,dn(r,{owner:e}));else if(i!==r)if(e.hasValue(s)){const o=e.getValue(s);o.liveStyle===!0?o.jump(r):o.hasAnimated||o.set(r)}else{const o=e.getStaticValue(s);e.addValue(s,dn(o!==void 0?o:r,{owner:e}))}}for(const s in n)t[s]===void 0&&e.removeValue(s);return t}const Vi=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Hh{scrapeMotionValuesFromProps(t,n,s){return{}}constructor({parent:t,props:n,presenceContext:s,reducedMotionConfig:r,blockInitialAnimation:i,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=bo,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const m=We.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,Te.render(this.render,!1,!0))};const{latestValues:l,renderState:d}=o;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=d,this.parent=t,this.props=n,this.presenceContext=s,this.depth=t?t.depth+1:0,this.reducedMotionConfig=r,this.options=a,this.blockInitialAnimation=!!i,this.isControllingVariants=Ms(n),this.isVariantNode=tl(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const m in h){const g=h[m];l[m]!==void 0&&He(g)&&g.set(l[m])}}mount(t){var n;this.current=t,_h.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((s,r)=>this.bindToMotionValue(r,s)),gl.current||Lh(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:$r.current,process.env.NODE_ENV!=="production"&&io(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var t;this.projection&&this.projection.unmount(),kt(this.notifyUpdate),kt(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const s=this.features[n];s&&(s.unmount(),s.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const s=yn.has(t);s&&this.onBindTransform&&this.onBindTransform();const r=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&Te.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{r(),i&&i(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in un){const n=un[t];if(!n)continue;const{isEnabled:s,Feature:r}=n;if(!this.features[t]&&r&&s(this.props)&&(this.features[t]=new r(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Re()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<Vi.length;s++){const r=Vi[s];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);const i="on"+r,o=t[i];o&&(this.propEventSubscriptions[r]=this.on(r,o))}this.prevMotionValues=Bh(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const s=this.values.get(t);n!==s&&(s&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let s=this.values.get(t);return s===void 0&&n!==void 0&&(s=dn(n===null?void 0:n,{owner:this}),this.addValue(t,s)),s}readValue(t,n){let s=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return s!=null&&(typeof s=="string"&&(cc(s)||dc(s))?s=parseFloat(s):!Jf(s)&&Tt.test(n)&&(s=Wc(t,n)),this.setBaseTarget(t,He(s)?s.get():s)),He(s)?s.get():s}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var i;const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const o=Vo(this.props,n,(i=this.presenceContext)==null?void 0:i.custom);o&&(s=o[t])}if(n&&s!==void 0)return s;const r=this.getBaseTargetFromProps(this.props,t);return r!==void 0&&!He(r)?r:this.initialValues[t]!==void 0&&s===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new oo),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){So.render(this.render)}}class yl extends Hh{constructor(){super(...arguments),this.KeyframeResolver=_f}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:s}){delete n[t],delete s[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;He(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function xl(e,{style:t,vars:n},s,r){const i=e.style;let o;for(o in t)i[o]=t[o];r==null||r.applyProjectionStyles(i,s);for(o in n)i.setProperty(o,n[o])}function Uh(e){return window.getComputedStyle(e)}class zh extends yl{constructor(){super(...arguments),this.type="html",this.renderInstance=xl}readValueFromInstance(t,n){var s;if(yn.has(n))return(s=this.projection)!=null&&s.isProjecting?Ar(n):sf(t,n);{const r=Uh(t),i=(lo(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return pl(t,n)}build(t,n,s){Ao(t,n,s.transformTemplate)}scrapeMotionValuesFromProps(t,n,s){return No(t,n,s)}}const bl=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Wh(e,t,n,s){xl(e,t,void 0,s);for(const r in t.attrs)e.setAttribute(bl.has(r)?r:Po(r),t.attrs[r])}class Zh extends yl{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Re}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(yn.has(n)){const s=zc(n);return s&&s.default||0}return n=bl.has(n)?n:Po(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,s){return cl(t,n,s)}build(t,n,s){rl(t,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(t,n,s,r){Wh(t,n,s,r)}mount(t){this.isSVGTag=il(t.tagName),super.mount(t)}}const Gh=(e,t)=>Mo(e)?new Zh(t):new zh(t,{allowProjection:e!==v.Fragment});function cn(e,t,n){const s=e.getProps();return Vo(s,t,n!==void 0?n:s.custom,e)}const Fr=e=>Array.isArray(e);function Kh(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,dn(n))}function Yh(e){return Fr(e)?e[e.length-1]||0:e}function qh(e,t){const n=cn(e,t);let{transitionEnd:s={},transition:r={},...i}=n||{};i={...i,...s};for(const o in i){const a=Yh(i[o]);Kh(e,o,a)}}function Xh(e){return!!(He(e)&&e.add)}function Or(e,t){const n=e.getValue("willChange");if(Xh(n))return n.add(t);if(!n&&yt.WillChange){const s=new yt.WillChange("auto");e.addValue("willChange",s),s.add(t)}}function vl(e){return e.props[ll]}const Jh=e=>e!==null;function Qh(e,{repeat:t,repeatType:n="loop"},s){const r=e.filter(Jh),i=t&&n!=="loop"&&t%2===1?0:r.length-1;return r[i]}const em={type:"spring",stiffness:500,damping:25,restSpeed:10},tm=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),nm={type:"keyframes",duration:.8},sm={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},rm=(e,{keyframes:t})=>t.length>2?nm:yn.has(e)?e.startsWith("scale")?tm(t[1]):em:sm;function om({when:e,delay:t,delayChildren:n,staggerChildren:s,staggerDirection:r,repeat:i,repeatType:o,repeatDelay:a,from:l,elapsed:d,...u}){return!!Object.keys(u).length}const Ro=(e,t,n,s={},r,i)=>o=>{const a=vo(s,e)||{},l=a.delay||s.delay||0;let{elapsed:d=0}=s;d=d-st(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-d,onUpdate:m=>{t.set(m),a.onUpdate&&a.onUpdate(m)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:i?void 0:r};om(a)||Object.assign(u,rm(e,u)),u.duration&&(u.duration=st(u.duration)),u.repeatDelay&&(u.repeatDelay=st(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let h=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Pr(u),u.delay===0&&(h=!0)),(yt.instantAnimations||yt.skipAnimations)&&(h=!0,Pr(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,h&&!i&&t.get()!==void 0){const m=Qh(u.keyframes,a);if(m!==void 0){Te.update(()=>{u.onUpdate(m),u.onComplete()});return}}return a.isSync?new xo(u):new Af(u)};function im({protectedKeys:e,needsAnimating:t},n){const s=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,s}function wl(e,t,{delay:n=0,transitionOverride:s,type:r}={}){let{transition:i=e.getDefaultTransition(),transitionEnd:o,...a}=t;s&&(i=s);const l=[],d=r&&e.animationState&&e.animationState.getState()[r];for(const u in a){const h=e.getValue(u,e.latestValues[u]??null),m=a[u];if(m===void 0||d&&im(d,u))continue;const g={delay:n,...vo(i||{},u)},x=h.get();if(x!==void 0&&!h.isAnimating&&!Array.isArray(m)&&m===x&&!g.velocity)continue;let f=!1;if(window.MotionHandoffAnimation){const k=vl(e);if(k){const S=window.MotionHandoffAnimation(k,u,Te);S!==null&&(g.startTime=S,f=!0)}}Or(e,u),h.start(Ro(u,h,m,e.shouldReduceMotion&&Bc.has(u)?{type:!1}:g,e,f));const b=h.animation;b&&l.push(b)}return o&&Promise.all(l).then(()=>{Te.update(()=>{o&&qh(e,o)})}),l}function Sl(e,t,n,s=0,r=1){const i=Array.from(e).sort((d,u)=>d.sortNodePosition(u)).indexOf(t),o=e.size,a=(o-1)*s;return typeof n=="function"?n(i,o):r===1?i*s:a-i*s}function Lr(e,t,n={}){var l;const s=cn(e,t,n.type==="exit"?(l=e.presenceContext)==null?void 0:l.custom:void 0);let{transition:r=e.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(r=n.transitionOverride);const i=s?()=>Promise.all(wl(e,s,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(d=0)=>{const{delayChildren:u=0,staggerChildren:h,staggerDirection:m}=r;return am(e,t,d,u,h,m,n)}:()=>Promise.resolve(),{when:a}=r;if(a){const[d,u]=a==="beforeChildren"?[i,o]:[o,i];return d().then(()=>u())}else return Promise.all([i(),o(n.delay)])}function am(e,t,n=0,s=0,r=0,i=1,o){const a=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),a.push(Lr(l,t,{...o,delay:n+(typeof s=="function"?0:s)+Sl(e.variantChildren,l,s,r,i)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function cm(e,t,n={}){e.notify("AnimationStart",t);let s;if(Array.isArray(t)){const r=t.map(i=>Lr(e,i,n));s=Promise.all(r)}else if(typeof t=="string")s=Lr(e,t,n);else{const r=typeof t=="function"?cn(e,t,n.custom):t;s=Promise.all(wl(e,r,n))}return s.then(()=>{e.notify("AnimationComplete",t)})}function Cl(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let s=0;s<n;s++)if(t[s]!==e[s])return!1;return!0}const lm=Eo.length;function kl(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?kl(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<lm;n++){const s=Eo[n],r=e.props[s];(Fn(r)||r===!1)&&(t[s]=r)}return t}const dm=[...To].reverse(),um=To.length;function fm(e){return t=>Promise.all(t.map(({animation:n,options:s})=>cm(e,n,s)))}function hm(e){let t=fm(e),n=Ni(),s=!0;const r=l=>(d,u)=>{var m;const h=cn(e,u,l==="exit"?(m=e.presenceContext)==null?void 0:m.custom:void 0);if(h){const{transition:g,transitionEnd:x,...f}=h;d={...d,...f,...x}}return d};function i(l){t=l(e)}function o(l){const{props:d}=e,u=kl(e.parent)||{},h=[],m=new Set;let g={},x=1/0;for(let b=0;b<um;b++){const k=dm[b],S=n[k],T=d[k]!==void 0?d[k]:u[k],C=Fn(T),w=k===l?S.isActive:null;w===!1&&(x=b);let A=T===u[k]&&T!==d[k]&&C;if(A&&s&&e.manuallyAnimateOnMount&&(A=!1),S.protectedKeys={...g},!S.isActive&&w===null||!T&&!S.prevProp||js(T)||typeof T=="boolean")continue;const V=mm(S.prevProp,T);let E=V||k===l&&S.isActive&&!A&&C||b>x&&C,F=!1;const y=Array.isArray(T)?T:[T];let R=y.reduce(r(k),{});w===!1&&(R={});const{prevResolvedValues:H={}}=S,se={...H,...R},ne=ee=>{E=!0,m.has(ee)&&(F=!0,m.delete(ee)),S.needsAnimating[ee]=!0;const I=e.getValue(ee);I&&(I.liveStyle=!1)};for(const ee in se){const I=R[ee],W=H[ee];if(g.hasOwnProperty(ee))continue;let j=!1;Fr(I)&&Fr(W)?j=!Cl(I,W):j=I!==W,j?I!=null?ne(ee):m.add(ee):I!==void 0&&m.has(ee)?ne(ee):S.protectedKeys[ee]=!0}S.prevProp=T,S.prevResolvedValues=R,S.isActive&&(g={...g,...R}),s&&e.blockInitialAnimation&&(E=!1);const oe=A&&V;E&&(!oe||F)&&h.push(...y.map(ee=>{const I={type:k};if(typeof ee=="string"&&s&&!oe&&e.manuallyAnimateOnMount&&e.parent){const{parent:W}=e,j=cn(W,ee);if(W.enteringChildren&&j){const{delayChildren:B}=j.transition||{};I.delay=Sl(W.enteringChildren,e,B)}}return{animation:ee,options:I}}))}if(m.size){const b={};if(typeof d.initial!="boolean"){const k=cn(e,Array.isArray(d.initial)?d.initial[0]:d.initial);k&&k.transition&&(b.transition=k.transition)}m.forEach(k=>{const S=e.getBaseTarget(k),T=e.getValue(k);T&&(T.liveStyle=!0),b[k]=S??null}),h.push({animation:b})}let f=!!h.length;return s&&(d.initial===!1||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(f=!1),s=!1,f?t(h):Promise.resolve()}function a(l,d){var h;if(n[l].isActive===d)return Promise.resolve();(h=e.variantChildren)==null||h.forEach(m=>{var g;return(g=m.animationState)==null?void 0:g.setActive(l,d)}),n[l].isActive=d;const u=o(l);for(const m in n)n[m].protectedKeys={};return u}return{animateChanges:o,setActive:a,setAnimateFunction:i,getState:()=>n,reset:()=>{n=Ni(),s=!0}}}function mm(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Cl(t,e):!1}function Pt(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Ni(){return{animate:Pt(!0),whileInView:Pt(),whileHover:Pt(),whileTap:Pt(),whileDrag:Pt(),whileFocus:Pt(),exit:Pt()}}class jt{constructor(t){this.isMounted=!1,this.node=t}update(){}}class pm extends jt{constructor(t){super(t),t.animationState||(t.animationState=hm(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();js(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let gm=0;class ym extends jt{constructor(){super(...arguments),this.id=gm++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===s)return;const r=this.node.animationState.setActive("exit",!t);n&&!t&&r.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const xm={animation:{Feature:pm},exit:{Feature:ym}};function Ln(e,t,n,s={passive:!0}){return e.addEventListener(t,n,s),()=>e.removeEventListener(t,n)}function zn(e){return{point:{x:e.pageX,y:e.pageY}}}const bm=e=>t=>Co(t)&&e(t,zn(t));function Mn(e,t,n,s){return Ln(e,t,bm(n),s)}const Tl=1e-4,vm=1-Tl,wm=1+Tl,El=.01,Sm=0-El,Cm=0+El;function Ue(e){return e.max-e.min}function km(e,t,n){return Math.abs(e-t)<=n}function Pi(e,t,n,s=.5){e.origin=s,e.originPoint=je(t.min,t.max,e.origin),e.scale=Ue(n)/Ue(t),e.translate=je(n.min,n.max,e.origin)-e.originPoint,(e.scale>=vm&&e.scale<=wm||isNaN(e.scale))&&(e.scale=1),(e.translate>=Sm&&e.translate<=Cm||isNaN(e.translate))&&(e.translate=0)}function Vn(e,t,n,s){Pi(e.x,t.x,n.x,s?s.originX:void 0),Pi(e.y,t.y,n.y,s?s.originY:void 0)}function Ri(e,t,n){e.min=n.min+t.min,e.max=e.min+Ue(t)}function Tm(e,t,n){Ri(e.x,t.x,n.x),Ri(e.y,t.y,n.y)}function Ii(e,t,n){e.min=t.min-n.min,e.max=e.min+Ue(t)}function Nn(e,t,n){Ii(e.x,t.x,n.x),Ii(e.y,t.y,n.y)}function Xe(e){return[e("x"),e("y")]}const Al=({current:e})=>e?e.ownerDocument.defaultView:null,Di=(e,t)=>Math.abs(e-t);function Em(e,t){const n=Di(e.x,t.x),s=Di(e.y,t.y);return Math.sqrt(n**2+s**2)}class jl{constructor(t,n,{transformPagePoint:s,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:o=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const m=Js(this.lastMoveEventInfo,this.history),g=this.startEvent!==null,x=Em(m.offset,{x:0,y:0})>=this.distanceThreshold;if(!g&&!x)return;const{point:f}=m,{timestamp:b}=_e;this.history.push({...f,timestamp:b});const{onStart:k,onMove:S}=this.handlers;g||(k&&k(this.lastMoveEvent,m),this.startEvent=this.lastMoveEvent),S&&S(this.lastMoveEvent,m)},this.handlePointerMove=(m,g)=>{this.lastMoveEvent=m,this.lastMoveEventInfo=Xs(g,this.transformPagePoint),Te.update(this.updatePoint,!0)},this.handlePointerUp=(m,g)=>{this.end();const{onEnd:x,onSessionEnd:f,resumeAnimation:b}=this.handlers;if(this.dragSnapToOrigin&&b&&b(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const k=Js(m.type==="pointercancel"?this.lastMoveEventInfo:Xs(g,this.transformPagePoint),this.history);this.startEvent&&x&&x(m,k),f&&f(m,k)},!Co(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=s,this.distanceThreshold=o,this.contextWindow=r||window;const a=zn(t),l=Xs(a,this.transformPagePoint),{point:d}=l,{timestamp:u}=_e;this.history=[{...d,timestamp:u}];const{onSessionStart:h}=n;h&&h(t,Js(l,this.history)),this.removeListeners=Bn(Mn(this.contextWindow,"pointermove",this.handlePointerMove),Mn(this.contextWindow,"pointerup",this.handlePointerUp),Mn(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),kt(this.updatePoint)}}function Xs(e,t){return t?{point:t(e.point)}:e}function $i(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Js({point:e},t){return{point:e,delta:$i(e,Ml(t)),offset:$i(e,Am(t)),velocity:jm(t,.1)}}function Am(e){return e[0]}function Ml(e){return e[e.length-1]}function jm(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,s=null;const r=Ml(e);for(;n>=0&&(s=e[n],!(r.timestamp-s.timestamp>st(t)));)n--;if(!s)return{x:0,y:0};const i=at(r.timestamp-s.timestamp);if(i===0)return{x:0,y:0};const o={x:(r.x-s.x)/i,y:(r.y-s.y)/i};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Mm(e,{min:t,max:n},s){return t!==void 0&&e<t?e=s?je(t,e,s.min):Math.max(e,t):n!==void 0&&e>n&&(e=s?je(n,e,s.max):Math.min(e,n)),e}function Fi(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function Vm(e,{top:t,left:n,bottom:s,right:r}){return{x:Fi(e.x,n,r),y:Fi(e.y,t,s)}}function Oi(e,t){let n=t.min-e.min,s=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,s]=[s,n]),{min:n,max:s}}function Nm(e,t){return{x:Oi(e.x,t.x),y:Oi(e.y,t.y)}}function Pm(e,t){let n=.5;const s=Ue(e),r=Ue(t);return r>s?n=In(t.min,t.max-s,e.min):s>r&&(n=In(e.min,e.max-r,t.min)),pt(0,1,n)}function Rm(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const _r=.35;function Im(e=_r){return e===!1?e=0:e===!0&&(e=_r),{x:Li(e,"left","right"),y:Li(e,"top","bottom")}}function Li(e,t,n){return{min:_i(e,t),max:_i(e,n)}}function _i(e,t){return typeof e=="number"?e:e[t]||0}const Dm=new WeakMap;class $m{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Re(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:s}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=h=>{const{dragSnapToOrigin:m}=this.getProps();m?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(zn(h).point)},o=(h,m)=>{const{drag:g,dragPropagation:x,onDragStart:f}=this.getProps();if(g&&!x&&(this.openDragLock&&this.openDragLock(),this.openDragLock=zf(g),!this.openDragLock))return;this.latestPointerEvent=h,this.latestPanInfo=m,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Xe(k=>{let S=this.getAxisMotionValue(k).get()||0;if(ct.test(S)){const{projection:T}=this.visualElement;if(T&&T.layout){const C=T.layout.layoutBox[k];C&&(S=Ue(C)*(parseFloat(S)/100))}}this.originPoint[k]=S}),f&&Te.postRender(()=>f(h,m)),Or(this.visualElement,"transform");const{animationState:b}=this.visualElement;b&&b.setActive("whileDrag",!0)},a=(h,m)=>{this.latestPointerEvent=h,this.latestPanInfo=m;const{dragPropagation:g,dragDirectionLock:x,onDirectionLock:f,onDrag:b}=this.getProps();if(!g&&!this.openDragLock)return;const{offset:k}=m;if(x&&this.currentDirection===null){this.currentDirection=Fm(k),this.currentDirection!==null&&f&&f(this.currentDirection);return}this.updateAxis("x",m.point,k),this.updateAxis("y",m.point,k),this.visualElement.render(),b&&b(h,m)},l=(h,m)=>{this.latestPointerEvent=h,this.latestPanInfo=m,this.stop(h,m),this.latestPointerEvent=null,this.latestPanInfo=null},d=()=>Xe(h=>{var m;return this.getAnimationState(h)==="paused"&&((m=this.getAxisMotionValue(h).animation)==null?void 0:m.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new jl(t,{onSessionStart:i,onStart:o,onMove:a,onSessionEnd:l,resumeAnimation:d},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:s,contextWindow:Al(this.visualElement)})}stop(t,n){const s=t||this.latestPointerEvent,r=n||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!s)return;const{velocity:o}=r;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&Te.postRender(()=>a(s,r))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,s){const{drag:r}=this.getProps();if(!s||!Qn(t,r,this.currentDirection))return;const i=this.getAxisMotionValue(t);let o=this.originPoint[t]+s[t];this.constraints&&this.constraints[t]&&(o=Mm(o,this.constraints[t],this.elastic[t])),i.set(o)}resolveConstraints(){var i;const{dragConstraints:t,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(i=this.visualElement.projection)==null?void 0:i.layout,r=this.constraints;t&&nn(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&s?this.constraints=Vm(s.layoutBox,t):this.constraints=!1,this.elastic=Im(n),r!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&Xe(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=Rm(s.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!nn(t))return!1;const s=t.current;gt(s!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const i=Oh(s,r.root,this.visualElement.getTransformPagePoint());let o=Nm(r.layout.layoutBox,i);if(n){const a=n(Dh(o));this.hasMutatedConstraints=!!a,a&&(o=fl(a))}return o}startAnimation(t){const{drag:n,dragMomentum:s,dragElastic:r,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},d=Xe(u=>{if(!Qn(u,n,this.currentDirection))return;let h=l&&l[u]||{};o&&(h={min:0,max:0});const m=r?200:1e6,g=r?40:1e7,x={type:"inertia",velocity:s?t[u]:0,bounceStiffness:m,bounceDamping:g,timeConstant:750,restDelta:1,restSpeed:10,...i,...h};return this.startAxisValueAnimation(u,x)});return Promise.all(d).then(a)}startAxisValueAnimation(t,n){const s=this.getAxisMotionValue(t);return Or(this.visualElement,t),s.start(Ro(t,s,0,n,this.visualElement,!1))}stopAnimation(){Xe(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Xe(t=>{var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,s=this.visualElement.getProps(),r=s[n];return r||this.visualElement.getValue(t,(s.initial?s.initial[t]:void 0)||0)}snapToCursor(t){Xe(n=>{const{drag:s}=this.getProps();if(!Qn(n,s,this.currentDirection))return;const{projection:r}=this.visualElement,i=this.getAxisMotionValue(n);if(r&&r.layout){const{min:o,max:a}=r.layout.layoutBox[n];i.set(t[n]-je(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!nn(n)||!s||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};Xe(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();r[o]=Pm({min:l,max:l},this.constraints[o])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),Xe(o=>{if(!Qn(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:d}=this.constraints[o];a.set(je(l,d,r[o]))})}addListeners(){if(!this.visualElement.current)return;Dm.set(this.visualElement,this);const t=this.visualElement.current,n=Mn(t,"pointerdown",l=>{const{drag:d,dragListener:u=!0}=this.getProps();d&&u&&this.start(l)}),s=()=>{const{dragConstraints:l}=this.getProps();nn(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,i=r.addEventListener("measure",s);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),Te.read(s);const o=Ln(window,"resize",()=>this.scalePositionWithinConstraints()),a=r.addEventListener("didUpdate",({delta:l,hasLayoutChanged:d})=>{this.isDragging&&d&&(Xe(u=>{const h=this.getAxisMotionValue(u);h&&(this.originPoint[u]+=l[u].translate,h.set(h.get()+l[u].translate))}),this.visualElement.render())});return()=>{o(),n(),i(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:o=_r,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:s,dragPropagation:r,dragConstraints:i,dragElastic:o,dragMomentum:a}}}function Qn(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Fm(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Om extends jt{constructor(t){super(t),this.removeGroupControls=et,this.removeListeners=et,this.controls=new $m(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||et}unmount(){this.removeGroupControls(),this.removeListeners()}}const Bi=e=>(t,n)=>{e&&Te.postRender(()=>e(t,n))};class Lm extends jt{constructor(){super(...arguments),this.removePointerDownListener=et}onPointerDown(t){this.session=new jl(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Al(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:s,onPanEnd:r}=this.node.getProps();return{onSessionStart:Bi(t),onStart:Bi(n),onMove:s,onEnd:(i,o)=>{delete this.session,r&&Te.postRender(()=>r(i,o))}}}mount(){this.removePointerDownListener=Mn(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const us={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Hi(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Sn={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ie.test(e))e=parseFloat(e);else return e;const n=Hi(e,t.target.x),s=Hi(e,t.target.y);return`${n}% ${s}%`}},_m={correct:(e,{treeScale:t,projectionDelta:n})=>{const s=e,r=Tt.parse(e);if(r.length>5)return s;const i=Tt.createTransformer(e),o=typeof r[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;r[0+o]/=a,r[1+o]/=l;const d=je(a,l,.5);return typeof r[2+o]=="number"&&(r[2+o]/=d),typeof r[3+o]=="number"&&(r[3+o]/=d),i(r)}};let Qs=!1;class Bm extends v.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:s,layoutId:r}=this.props,{projection:i}=t;lh(Hm),i&&(n.group&&n.group.add(i),s&&s.register&&r&&s.register(i),Qs&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),us.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:s,drag:r,isPresent:i}=this.props,{projection:o}=s;return o&&(o.isPresent=i,Qs=!0,r||t.layoutDependency!==n||n===void 0||t.isPresent!==i?o.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?o.promote():o.relegate()||Te.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),So.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:r}=t;Qs=!0,r&&(r.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(r),s&&s.deregister&&s.deregister(r))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Vl(e){const[t,n]=Jc(),s=v.useContext(Qr);return c.jsx(Bm,{...e,layoutGroup:s,switchLayoutGroup:v.useContext(dl),isPresent:t,safeToRemove:n})}const Hm={borderRadius:{...Sn,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Sn,borderTopRightRadius:Sn,borderBottomLeftRadius:Sn,borderBottomRightRadius:Sn,boxShadow:_m};function Um(e,t,n){const s=He(e)?e:dn(e);return s.start(Ro("",s,t,n)),s.animation}const zm=(e,t)=>e.depth-t.depth;class Wm{constructor(){this.children=[],this.isDirty=!1}add(t){no(this.children,t),this.isDirty=!0}remove(t){so(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(zm),this.isDirty=!1,this.children.forEach(t)}}function Zm(e,t){const n=We.now(),s=({timestamp:r})=>{const i=r-n;i>=t&&(kt(s),e(i-t))};return Te.setup(s,!0),()=>kt(s)}const Nl=["TopLeft","TopRight","BottomLeft","BottomRight"],Gm=Nl.length,Ui=e=>typeof e=="string"?parseFloat(e):e,zi=e=>typeof e=="number"||ie.test(e);function Km(e,t,n,s,r,i){r?(e.opacity=je(0,n.opacity??1,Ym(s)),e.opacityExit=je(t.opacity??1,0,qm(s))):i&&(e.opacity=je(t.opacity??1,n.opacity??1,s));for(let o=0;o<Gm;o++){const a=`border${Nl[o]}Radius`;let l=Wi(t,a),d=Wi(n,a);if(l===void 0&&d===void 0)continue;l||(l=0),d||(d=0),l===0||d===0||zi(l)===zi(d)?(e[a]=Math.max(je(Ui(l),Ui(d),s),0),(ct.test(d)||ct.test(l))&&(e[a]+="%")):e[a]=d}(t.rotate||n.rotate)&&(e.rotate=je(t.rotate||0,n.rotate||0,s))}function Wi(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Ym=Pl(0,.5,xc),qm=Pl(.5,.95,et);function Pl(e,t,n){return s=>s<e?0:s>t?1:n(In(e,t,s))}function Zi(e,t){e.min=t.min,e.max=t.max}function qe(e,t){Zi(e.x,t.x),Zi(e.y,t.y)}function Gi(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Ki(e,t,n,s,r){return e-=t,e=ws(e,1/n,s),r!==void 0&&(e=ws(e,1/r,s)),e}function Xm(e,t=0,n=1,s=.5,r,i=e,o=e){if(ct.test(t)&&(t=parseFloat(t),t=je(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=je(i.min,i.max,s);e===i&&(a-=t),e.min=Ki(e.min,t,n,a,r),e.max=Ki(e.max,t,n,a,r)}function Yi(e,t,[n,s,r],i,o){Xm(e,t[n],t[s],t[r],t.scale,i,o)}const Jm=["x","scaleX","originX"],Qm=["y","scaleY","originY"];function qi(e,t,n,s){Yi(e.x,t,Jm,n?n.x:void 0,s?s.x:void 0),Yi(e.y,t,Qm,n?n.y:void 0,s?s.y:void 0)}function Xi(e){return e.translate===0&&e.scale===1}function Rl(e){return Xi(e.x)&&Xi(e.y)}function Ji(e,t){return e.min===t.min&&e.max===t.max}function ep(e,t){return Ji(e.x,t.x)&&Ji(e.y,t.y)}function Qi(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Il(e,t){return Qi(e.x,t.x)&&Qi(e.y,t.y)}function ea(e){return Ue(e.x)/Ue(e.y)}function ta(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class tp{constructor(){this.members=[]}add(t){no(this.members,t),t.scheduleRender()}remove(t){if(so(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(r=>t===r);if(n===0)return!1;let s;for(let r=n;r>=0;r--){const i=this.members[r];if(i.isPresent!==!1){s=i;break}}return s?(this.promote(s),!0):!1}promote(t,n){const s=this.lead;if(t!==s&&(this.prevLead=s,this.lead=t,t.show(),s)){s.instance&&s.scheduleRender(),t.scheduleRender(),t.resumeFrom=s,n&&(t.resumeFrom.preserveOpacity=!0),s.snapshot&&(t.snapshot=s.snapshot,t.snapshot.latestValues=s.animationValues||s.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:r}=t.options;r===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:s}=t;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function np(e,t,n){let s="";const r=e.x.translate/t.x,i=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((r||i||o)&&(s=`translate3d(${r}px, ${i}px, ${o}px) `),(t.x!==1||t.y!==1)&&(s+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:d,rotate:u,rotateX:h,rotateY:m,skewX:g,skewY:x}=n;d&&(s=`perspective(${d}px) ${s}`),u&&(s+=`rotate(${u}deg) `),h&&(s+=`rotateX(${h}deg) `),m&&(s+=`rotateY(${m}deg) `),g&&(s+=`skewX(${g}deg) `),x&&(s+=`skewY(${x}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(s+=`scale(${a}, ${l})`),s||"none"}const er=["","X","Y","Z"],sp=1e3;let rp=0;function tr(e,t,n,s){const{latestValues:r}=t;r[e]&&(n[e]=r[e],t.setStaticValue(e,0),s&&(s[e]=0))}function Dl(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=vl(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:r,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Te,!(r||i))}const{parent:s}=e;s&&!s.hasCheckedOptimisedAppear&&Dl(s)}function $l({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:s,resetTransform:r}){return class{constructor(o={},a=t==null?void 0:t()){this.id=rp++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(ap),this.nodes.forEach(up),this.nodes.forEach(fp),this.nodes.forEach(cp)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Wm)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new oo),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=Xc(o)&&!qf(o),this.instance=o;const{layoutId:a,layout:l,visualElement:d}=this.options;if(d&&!d.current&&d.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),e){let u,h=0;const m=()=>this.root.updateBlockedByResize=!1;Te.read(()=>{h=window.innerWidth}),e(o,()=>{const g=window.innerWidth;g!==h&&(h=g,this.root.updateBlockedByResize=!0,u&&u(),u=Zm(m,250),us.hasAnimatedSinceResize&&(us.hasAnimatedSinceResize=!1,this.nodes.forEach(ra)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&d&&(a||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h,hasRelativeLayoutChanged:m,layout:g})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const x=this.options.transition||d.getDefaultTransition()||yp,{onLayoutAnimationStart:f,onLayoutAnimationComplete:b}=d.getProps(),k=!this.targetLayout||!Il(this.targetLayout,g),S=!h&&m;if(this.options.layoutRoot||this.resumeFrom||S||h&&(k||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const T={...vo(x,"layout"),onPlay:f,onComplete:b};(d.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T),this.setAnimationOrigin(u,S)}else h||ra(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=g})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),kt(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(hp),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Dl(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const h=this.path[u];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const d=this.getTransformTemplate();this.prevTransformTemplateValue=d?d(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(na);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(sa);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(dp),this.nodes.forEach(op),this.nodes.forEach(ip)):this.nodes.forEach(sa),this.clearAllSnapshots();const a=We.now();_e.delta=pt(0,1e3/60,a-_e.timestamp),_e.timestamp=a,_e.isProcessing=!0,Us.update.process(_e),Us.preRender.process(_e),Us.render.process(_e),_e.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,So.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(lp),this.sharedNodes.forEach(mp)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Te.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Te.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Ue(this.snapshot.measuredBox.x)&&!Ue(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Re(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){const l=s(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!r)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Rl(this.projectionDelta),l=this.getTransformTemplate(),d=l?l(this.latestValues,""):void 0,u=d!==this.prevTransformTemplateValue;o&&this.instance&&(a||It(this.latestValues)||u)&&(r(this.instance,d),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),xp(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var d;const{visualElement:o}=this.options;if(!o)return Re();const a=o.measureViewportBox();if(!(((d=this.scroll)==null?void 0:d.wasRoot)||this.path.some(bp))){const{scroll:u}=this.root;u&&(sn(a.x,u.offset.x),sn(a.y,u.offset.y))}return a}removeElementScroll(o){var l;const a=Re();if(qe(a,o),(l=this.scroll)!=null&&l.wasRoot)return a;for(let d=0;d<this.path.length;d++){const u=this.path[d],{scroll:h,options:m}=u;u!==this.root&&h&&m.layoutScroll&&(h.wasRoot&&qe(a,o),sn(a.x,h.offset.x),sn(a.y,h.offset.y))}return a}applyTransform(o,a=!1){const l=Re();qe(l,o);for(let d=0;d<this.path.length;d++){const u=this.path[d];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&rn(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),It(u.latestValues)&&rn(l,u.latestValues)}return It(this.latestValues)&&rn(l,this.latestValues),l}removeTransform(o){const a=Re();qe(a,o);for(let l=0;l<this.path.length;l++){const d=this.path[l];if(!d.instance||!It(d.latestValues))continue;Ir(d.latestValues)&&d.updateSnapshot();const u=Re(),h=d.measurePageBox();qe(u,h),qi(a,d.latestValues,d.snapshot?d.snapshot.layoutBox:void 0,u)}return It(this.latestValues)&&qi(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==_e.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var m;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(o||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:h}=this.options;if(!(!this.layout||!(u||h))){if(this.resolvedRelativeTargetAt=_e.timestamp,!this.targetDelta&&!this.relativeTarget){const g=this.getClosestProjectingParent();g&&g.layout&&this.animationProgress!==1?(this.relativeParent=g,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Re(),this.relativeTargetOrigin=Re(),Nn(this.relativeTargetOrigin,this.layout.layoutBox,g.layout.layoutBox),qe(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Re(),this.targetWithTransforms=Re()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Tm(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):qe(this.target,this.layout.layoutBox),ml(this.target,this.targetDelta)):qe(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const g=this.getClosestProjectingParent();g&&!!g.resumingFrom==!!this.resumingFrom&&!g.options.layoutScroll&&g.target&&this.animationProgress!==1?(this.relativeParent=g,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Re(),this.relativeTargetOrigin=Re(),Nn(this.relativeTargetOrigin,this.target,g.target),qe(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Ir(this.parent.latestValues)||hl(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var x;const o=this.getLead(),a=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||(x=this.parent)!=null&&x.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===_e.timestamp&&(l=!1),l)return;const{layout:d,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(d||u))return;qe(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,m=this.treeScale.y;Fh(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=Re());const{target:g}=o;if(!g){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Gi(this.prevProjectionDelta.x,this.projectionDelta.x),Gi(this.prevProjectionDelta.y,this.projectionDelta.y)),Vn(this.projectionDelta,this.layoutCorrected,g,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==m||!ta(this.projectionDelta.x,this.prevProjectionDelta.x)||!ta(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",g))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=on(),this.projectionDelta=on(),this.projectionDeltaWithTransform=on()}setAnimationOrigin(o,a=!1){const l=this.snapshot,d=l?l.latestValues:{},u={...this.latestValues},h=on();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const m=Re(),g=l?l.source:void 0,x=this.layout?this.layout.source:void 0,f=g!==x,b=this.getStack(),k=!b||b.members.length<=1,S=!!(f&&!k&&this.options.crossfade===!0&&!this.path.some(gp));this.animationProgress=0;let T;this.mixTargetDelta=C=>{const w=C/1e3;oa(h.x,o.x,w),oa(h.y,o.y,w),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Nn(m,this.layout.layoutBox,this.relativeParent.layout.layoutBox),pp(this.relativeTarget,this.relativeTargetOrigin,m,w),T&&ep(this.relativeTarget,T)&&(this.isProjectionDirty=!1),T||(T=Re()),qe(T,this.relativeTarget)),f&&(this.animationValues=u,Km(u,d,this.latestValues,w,S,k)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=w},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,l,d;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(d=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||d.stop(),this.pendingAnimation&&(kt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Te.update(()=>{us.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=dn(0)),this.currentAnimation=Um(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:u=>{this.mixTargetDelta(u),o.onUpdate&&o.onUpdate(u)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(sp),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:d,latestValues:u}=o;if(!(!a||!l||!d)){if(this!==o&&this.layout&&d&&Fl(this.options.animationType,this.layout.layoutBox,d.layoutBox)){l=this.target||Re();const h=Ue(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+h;const m=Ue(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+m}qe(a,l),rn(a,u),Vn(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new tp),this.sharedNodes.get(o).add(a);const d=a.options.initialPromotionConfig;a.promote({transition:d?d.transition:void 0,preserveFollowOpacity:d&&d.shouldPreserveFollowOpacity?d.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var a;const{layoutId:o}=this.options;return o?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:o}=this.options;return o?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const d=this.getStack();d&&d.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const d={};l.z&&tr("z",o,d,this.animationValues);for(let u=0;u<er.length;u++)tr(`rotate${er[u]}`,o,d,this.animationValues),tr(`skew${er[u]}`,o,d,this.animationValues);o.render();for(const u in d)o.setStaticValue(u,d[u]),this.animationValues&&(this.animationValues[u]=d[u]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=ds(a==null?void 0:a.pointerEvents)||"",o.transform=l?l(this.latestValues,""):"none";return}const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=ds(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!It(this.latestValues)&&(o.transform=l?l({},""):"none",this.hasProjected=!1);return}o.visibility="";const u=d.animationValues||d.latestValues;this.applyTransformsToTarget();let h=np(this.projectionDeltaWithTransform,this.treeScale,u);l&&(h=l(u,h)),o.transform=h;const{x:m,y:g}=this.projectionDelta;o.transformOrigin=`${m.origin*100}% ${g.origin*100}% 0`,d.animationValues?o.opacity=d===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:o.opacity=d===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const x in On){if(u[x]===void 0)continue;const{correct:f,applyTo:b,isCSSVariable:k}=On[x],S=h==="none"?u[x]:f(u[x],d);if(b){const T=b.length;for(let C=0;C<T;C++)o[b[C]]=S}else k?this.options.visualElement.renderState.vars[x]=S:o[x]=S}this.options.layoutId&&(o.pointerEvents=d===this?ds(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(na),this.root.sharedNodes.clear()}}}function op(e){e.updateLayout()}function ip(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:r}=e.layout,{animationType:i}=e.options,o=t.source!==e.layout.source;i==="size"?Xe(h=>{const m=o?t.measuredBox[h]:t.layoutBox[h],g=Ue(m);m.min=s[h].min,m.max=m.min+g}):Fl(i,t.layoutBox,s)&&Xe(h=>{const m=o?t.measuredBox[h]:t.layoutBox[h],g=Ue(s[h]);m.max=m.min+g,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[h].max=e.relativeTarget[h].min+g)});const a=on();Vn(a,s,t.layoutBox);const l=on();o?Vn(l,e.applyTransform(r,!0),t.measuredBox):Vn(l,s,t.layoutBox);const d=!Rl(a);let u=!1;if(!e.resumeFrom){const h=e.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:m,layout:g}=h;if(m&&g){const x=Re();Nn(x,t.layoutBox,m.layoutBox);const f=Re();Nn(f,s,g.layoutBox),Il(x,f)||(u=!0),h.options.layoutRoot&&(e.relativeTarget=f,e.relativeTargetOrigin=x,e.relativeParent=h)}}}e.notifyListeners("didUpdate",{layout:s,snapshot:t,delta:l,layoutDelta:a,hasLayoutChanged:d,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:s}=e.options;s&&s()}e.options.transition=void 0}function ap(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function cp(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function lp(e){e.clearSnapshot()}function na(e){e.clearMeasurements()}function sa(e){e.isLayoutDirty=!1}function dp(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function ra(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function up(e){e.resolveTargetDelta()}function fp(e){e.calcProjection()}function hp(e){e.resetSkewAndRotation()}function mp(e){e.removeLeadSnapshot()}function oa(e,t,n){e.translate=je(t.translate,0,n),e.scale=je(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function ia(e,t,n,s){e.min=je(t.min,n.min,s),e.max=je(t.max,n.max,s)}function pp(e,t,n,s){ia(e.x,t.x,n.x,s),ia(e.y,t.y,n.y,s)}function gp(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const yp={duration:.45,ease:[.4,0,.1,1]},aa=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),ca=aa("applewebkit/")&&!aa("chrome/")?Math.round:et;function la(e){e.min=ca(e.min),e.max=ca(e.max)}function xp(e){la(e.x),la(e.y)}function Fl(e,t,n){return e==="position"||e==="preserve-aspect"&&!km(ea(t),ea(n),.2)}function bp(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const vp=$l({attachResizeListener:(e,t)=>Ln(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),nr={current:void 0},Ol=$l({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!nr.current){const e=new vp({});e.mount(window),e.setOptions({layoutScroll:!0}),nr.current=e}return nr.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),wp={pan:{Feature:Lm},drag:{Feature:Om,ProjectionNode:Ol,MeasureLayout:Vl}};function da(e,t,n){const{props:s}=e;e.animationState&&s.whileHover&&e.animationState.setActive("whileHover",n==="Start");const r="onHover"+n,i=s[r];i&&Te.postRender(()=>i(t,zn(t)))}class Sp extends jt{mount(){const{current:t}=this.node;t&&(this.unmount=Wf(t,(n,s)=>(da(this.node,s,"Start"),r=>da(this.node,r,"End"))))}unmount(){}}class Cp extends jt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Bn(Ln(this.node.current,"focus",()=>this.onFocus()),Ln(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function ua(e,t,n){const{props:s}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&s.whileTap&&e.animationState.setActive("whileTap",n==="Start");const r="onTap"+(n==="End"?"":n),i=s[r];i&&Te.postRender(()=>i(t,zn(t)))}class kp extends jt{mount(){const{current:t}=this.node;t&&(this.unmount=Yf(t,(n,s)=>(ua(this.node,s,"Start"),(r,{success:i})=>ua(this.node,r,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Br=new WeakMap,sr=new WeakMap,Tp=e=>{const t=Br.get(e.target);t&&t(e)},Ep=e=>{e.forEach(Tp)};function Ap({root:e,...t}){const n=e||document;sr.has(n)||sr.set(n,{});const s=sr.get(n),r=JSON.stringify(t);return s[r]||(s[r]=new IntersectionObserver(Ep,{root:e,...t})),s[r]}function jp(e,t,n){const s=Ap(t);return Br.set(e,n),s.observe(e),()=>{Br.delete(e),s.unobserve(e)}}const Mp={some:0,all:1};class Vp extends jt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:s,amount:r="some",once:i}=t,o={root:n?n.current:void 0,rootMargin:s,threshold:typeof r=="number"?r:Mp[r]},a=l=>{const{isIntersecting:d}=l;if(this.isInView===d||(this.isInView=d,i&&!d&&this.hasEnteredView))return;d&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",d);const{onViewportEnter:u,onViewportLeave:h}=this.node.getProps(),m=d?u:h;m&&m(l)};return jp(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(Np(t,n))&&this.startObserver()}unmount(){}}function Np({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Pp={inView:{Feature:Vp},tap:{Feature:kp},focus:{Feature:Cp},hover:{Feature:Sp}},Rp={layout:{ProjectionNode:Ol,MeasureLayout:Vl}},Ip={...xm,...Pp,...wp,...Rp},ue=Ih(Ip,Gh),rt=p.forwardRef((e,t)=>{const{alt:n,color:s="currentColor",size:r="1em",weight:i="regular",mirrored:o=!1,children:a,weights:l,...d}=e;return p.createElement("svg",{ref:t,xmlns:"http://www.w3.org/2000/svg",width:r,height:r,fill:s,viewBox:"0 0 256 256",transform:o?"scale(-1, 1)":void 0,...d},!!n&&p.createElement("title",null,n),a,l.get(i))});rt.displayName="SSRBase";const Dp=new Map([["bold",p.createElement(p.Fragment,null,p.createElement("path",{d:"M216.49,104.49l-80,80a12,12,0,0,1-17,0l-80-80a12,12,0,0,1,17-17L128,159l71.51-71.52a12,12,0,0,1,17,17Z"}))],["duotone",p.createElement(p.Fragment,null,p.createElement("path",{d:"M208,96l-80,80L48,96Z",opacity:"0.2"}),p.createElement("path",{d:"M215.39,92.94A8,8,0,0,0,208,88H48a8,8,0,0,0-5.66,13.66l80,80a8,8,0,0,0,11.32,0l80-80A8,8,0,0,0,215.39,92.94ZM128,164.69,67.31,104H188.69Z"}))],["fill",p.createElement(p.Fragment,null,p.createElement("path",{d:"M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,48,88H208a8,8,0,0,1,5.66,13.66Z"}))],["light",p.createElement(p.Fragment,null,p.createElement("path",{d:"M212.24,100.24l-80,80a6,6,0,0,1-8.48,0l-80-80a6,6,0,0,1,8.48-8.48L128,167.51l75.76-75.75a6,6,0,0,1,8.48,8.48Z"}))],["regular",p.createElement(p.Fragment,null,p.createElement("path",{d:"M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z"}))],["thin",p.createElement(p.Fragment,null,p.createElement("path",{d:"M210.83,98.83l-80,80a4,4,0,0,1-5.66,0l-80-80a4,4,0,0,1,5.66-5.66L128,170.34l77.17-77.17a4,4,0,1,1,5.66,5.66Z"}))]]),Io=p.forwardRef((e,t)=>p.createElement(rt,{ref:t,...e,weights:Dp}));Io.displayName="CaretDownIcon";const $p=new Map([["bold",p.createElement(p.Fragment,null,p.createElement("path",{d:"M216.49,168.49a12,12,0,0,1-17,0L128,97,56.49,168.49a12,12,0,0,1-17-17l80-80a12,12,0,0,1,17,0l80,80A12,12,0,0,1,216.49,168.49Z"}))],["duotone",p.createElement(p.Fragment,null,p.createElement("path",{d:"M208,160H48l80-80Z",opacity:"0.2"}),p.createElement("path",{d:"M213.66,154.34l-80-80a8,8,0,0,0-11.32,0l-80,80A8,8,0,0,0,48,168H208a8,8,0,0,0,5.66-13.66ZM67.31,152,128,91.31,188.69,152Z"}))],["fill",p.createElement(p.Fragment,null,p.createElement("path",{d:"M215.39,163.06A8,8,0,0,1,208,168H48a8,8,0,0,1-5.66-13.66l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,215.39,163.06Z"}))],["light",p.createElement(p.Fragment,null,p.createElement("path",{d:"M212.24,164.24a6,6,0,0,1-8.48,0L128,88.49,52.24,164.24a6,6,0,0,1-8.48-8.48l80-80a6,6,0,0,1,8.48,0l80,80A6,6,0,0,1,212.24,164.24Z"}))],["regular",p.createElement(p.Fragment,null,p.createElement("path",{d:"M213.66,165.66a8,8,0,0,1-11.32,0L128,91.31,53.66,165.66a8,8,0,0,1-11.32-11.32l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,213.66,165.66Z"}))],["thin",p.createElement(p.Fragment,null,p.createElement("path",{d:"M210.83,162.83a4,4,0,0,1-5.66,0L128,85.66,50.83,162.83a4,4,0,0,1-5.66-5.66l80-80a4,4,0,0,1,5.66,0l80,80A4,4,0,0,1,210.83,162.83Z"}))]]),Ll=p.forwardRef((e,t)=>p.createElement(rt,{ref:t,...e,weights:$p}));Ll.displayName="CaretUpIcon";const Fp=new Map([["bold",p.createElement(p.Fragment,null,p.createElement("path",{d:"M216,44H40A20,20,0,0,0,20,64V224A19.82,19.82,0,0,0,31.56,242.1a20.14,20.14,0,0,0,8.49,1.9,19.91,19.91,0,0,0,12.82-4.72l.12-.11L84.47,212H216a20,20,0,0,0,20-20V64A20,20,0,0,0,216,44Zm-4,144H80a11.93,11.93,0,0,0-7.84,2.92L44,215.23V68H212ZM84,108A12,12,0,0,1,96,96h64a12,12,0,1,1,0,24H96A12,12,0,0,1,84,108Zm0,40a12,12,0,0,1,12-12h64a12,12,0,0,1,0,24H96A12,12,0,0,1,84,148Z"}))],["duotone",p.createElement(p.Fragment,null,p.createElement("path",{d:"M224,64V192a8,8,0,0,1-8,8H80L45.15,230.11A8,8,0,0,1,32,224V64a8,8,0,0,1,8-8H216A8,8,0,0,1,224,64Z",opacity:"0.2"}),p.createElement("path",{d:"M216,48H40A16,16,0,0,0,24,64V224a15.85,15.85,0,0,0,9.24,14.5A16.13,16.13,0,0,0,40,240a15.89,15.89,0,0,0,10.25-3.78l.09-.07L83,208H216a16,16,0,0,0,16-16V64A16,16,0,0,0,216,48ZM40,224h0ZM216,192H80a8,8,0,0,0-5.23,1.95L40,224V64H216ZM88,112a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H96A8,8,0,0,1,88,112Zm0,32a8,8,0,0,1,8-8h64a8,8,0,1,1,0,16H96A8,8,0,0,1,88,144Z"}))],["fill",p.createElement(p.Fragment,null,p.createElement("path",{d:"M216,48H40A16,16,0,0,0,24,64V224a15.84,15.84,0,0,0,9.25,14.5A16.05,16.05,0,0,0,40,240a15.89,15.89,0,0,0,10.25-3.78l.09-.07L83,208H216a16,16,0,0,0,16-16V64A16,16,0,0,0,216,48ZM160,152H96a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Zm0-32H96a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Z"}))],["light",p.createElement(p.Fragment,null,p.createElement("path",{d:"M216,50H40A14,14,0,0,0,26,64V224a13.88,13.88,0,0,0,8.09,12.69A14.11,14.11,0,0,0,40,238a13.87,13.87,0,0,0,9-3.31l.06-.05L82.23,206H216a14,14,0,0,0,14-14V64A14,14,0,0,0,216,50Zm2,142a2,2,0,0,1-2,2H80a6,6,0,0,0-3.92,1.46L41.26,225.53A2,2,0,0,1,38,224V64a2,2,0,0,1,2-2H216a2,2,0,0,1,2,2Zm-52-80a6,6,0,0,1-6,6H96a6,6,0,0,1,0-12h64A6,6,0,0,1,166,112Zm0,32a6,6,0,0,1-6,6H96a6,6,0,0,1,0-12h64A6,6,0,0,1,166,144Z"}))],["regular",p.createElement(p.Fragment,null,p.createElement("path",{d:"M216,48H40A16,16,0,0,0,24,64V224a15.85,15.85,0,0,0,9.24,14.5A16.13,16.13,0,0,0,40,240a15.89,15.89,0,0,0,10.25-3.78l.09-.07L83,208H216a16,16,0,0,0,16-16V64A16,16,0,0,0,216,48ZM40,224h0ZM216,192H80a8,8,0,0,0-5.23,1.95L40,224V64H216ZM88,112a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H96A8,8,0,0,1,88,112Zm0,32a8,8,0,0,1,8-8h64a8,8,0,1,1,0,16H96A8,8,0,0,1,88,144Z"}))],["thin",p.createElement(p.Fragment,null,p.createElement("path",{d:"M216,52H40A12,12,0,0,0,28,64V224a11.89,11.89,0,0,0,6.93,10.88A12.17,12.17,0,0,0,40,236a11.89,11.89,0,0,0,7.69-2.83l0,0L81.49,204H216a12,12,0,0,0,12-12V64A12,12,0,0,0,216,52Zm4,140a4,4,0,0,1-4,4H80a4,4,0,0,0-2.62,1L42.56,227.06A4,4,0,0,1,36,224V64a4,4,0,0,1,4-4H216a4,4,0,0,1,4,4Zm-56-80a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h64A4,4,0,0,1,164,112Zm0,32a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h64A4,4,0,0,1,164,144Z"}))]]),_l=p.forwardRef((e,t)=>p.createElement(rt,{ref:t,...e,weights:Fp}));_l.displayName="ChatTextIcon";const Op=new Map([["bold",p.createElement(p.Fragment,null,p.createElement("path",{d:"M232.49,80.49l-128,128a12,12,0,0,1-17,0l-56-56a12,12,0,1,1,17-17L96,183,215.51,63.51a12,12,0,0,1,17,17Z"}))],["duotone",p.createElement(p.Fragment,null,p.createElement("path",{d:"M232,56V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56Z",opacity:"0.2"}),p.createElement("path",{d:"M205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z"}))],["fill",p.createElement(p.Fragment,null,p.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z"}))],["light",p.createElement(p.Fragment,null,p.createElement("path",{d:"M228.24,76.24l-128,128a6,6,0,0,1-8.48,0l-56-56a6,6,0,0,1,8.48-8.48L96,191.51,219.76,67.76a6,6,0,0,1,8.48,8.48Z"}))],["regular",p.createElement(p.Fragment,null,p.createElement("path",{d:"M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z"}))],["thin",p.createElement(p.Fragment,null,p.createElement("path",{d:"M226.83,74.83l-128,128a4,4,0,0,1-5.66,0l-56-56a4,4,0,0,1,5.66-5.66L96,194.34,221.17,69.17a4,4,0,1,1,5.66,5.66Z"}))]]),Bl=p.forwardRef((e,t)=>p.createElement(rt,{ref:t,...e,weights:Op}));Bl.displayName="CheckIcon";const Lp=new Map([["bold",p.createElement(p.Fragment,null,p.createElement("path",{d:"M128,180a52.06,52.06,0,0,0,52-52V64A52,52,0,0,0,76,64v64A52.06,52.06,0,0,0,128,180ZM100,64a28,28,0,0,1,56,0v64a28,28,0,0,1-56,0Zm40,155.22V240a12,12,0,0,1-24,0V219.22A92.14,92.14,0,0,1,36,128a12,12,0,0,1,24,0,68,68,0,0,0,136,0,12,12,0,0,1,24,0A92.14,92.14,0,0,1,140,219.22Z"}))],["duotone",p.createElement(p.Fragment,null,p.createElement("path",{d:"M168,64v64a40,40,0,0,1-40,40h0a40,40,0,0,1-40-40V64a40,40,0,0,1,40-40h0A40,40,0,0,1,168,64Z",opacity:"0.2"}),p.createElement("path",{d:"M128,176a48.05,48.05,0,0,0,48-48V64a48,48,0,0,0-96,0v64A48.05,48.05,0,0,0,128,176ZM96,64a32,32,0,0,1,64,0v64a32,32,0,0,1-64,0Zm40,143.6V240a8,8,0,0,1-16,0V207.6A80.11,80.11,0,0,1,48,128a8,8,0,0,1,16,0,64,64,0,0,0,128,0,8,8,0,0,1,16,0A80.11,80.11,0,0,1,136,207.6Z"}))],["fill",p.createElement(p.Fragment,null,p.createElement("path",{d:"M80,128V64a48,48,0,0,1,96,0v64a48,48,0,0,1-96,0Zm128,0a8,8,0,0,0-16,0,64,64,0,0,1-128,0,8,8,0,0,0-16,0,80.11,80.11,0,0,0,72,79.6V240a8,8,0,0,0,16,0V207.6A80.11,80.11,0,0,0,208,128Z"}))],["light",p.createElement(p.Fragment,null,p.createElement("path",{d:"M128,174a46.06,46.06,0,0,0,46-46V64a46,46,0,0,0-92,0v64A46.06,46.06,0,0,0,128,174ZM94,64a34,34,0,0,1,68,0v64a34,34,0,0,1-68,0Zm40,141.75V240a6,6,0,0,1-12,0V205.75A78.09,78.09,0,0,1,50,128a6,6,0,0,1,12,0,66,66,0,0,0,132,0,6,6,0,0,1,12,0A78.09,78.09,0,0,1,134,205.75Z"}))],["regular",p.createElement(p.Fragment,null,p.createElement("path",{d:"M128,176a48.05,48.05,0,0,0,48-48V64a48,48,0,0,0-96,0v64A48.05,48.05,0,0,0,128,176ZM96,64a32,32,0,0,1,64,0v64a32,32,0,0,1-64,0Zm40,143.6V240a8,8,0,0,1-16,0V207.6A80.11,80.11,0,0,1,48,128a8,8,0,0,1,16,0,64,64,0,0,0,128,0,8,8,0,0,1,16,0A80.11,80.11,0,0,1,136,207.6Z"}))],["thin",p.createElement(p.Fragment,null,p.createElement("path",{d:"M128,172a44.05,44.05,0,0,0,44-44V64a44,44,0,0,0-88,0v64A44.05,44.05,0,0,0,128,172ZM92,64a36,36,0,0,1,72,0v64a36,36,0,0,1-72,0Zm40,139.89V240a4,4,0,0,1-8,0V203.89A76.09,76.09,0,0,1,52,128a4,4,0,0,1,8,0,68,68,0,0,0,136,0,4,4,0,0,1,8,0A76.09,76.09,0,0,1,132,203.89Z"}))]]),Hl=p.forwardRef((e,t)=>p.createElement(rt,{ref:t,...e,weights:Lp}));Hl.displayName="MicrophoneIcon";const _p=new Map([["bold",p.createElement(p.Fragment,null,p.createElement("path",{d:"M56.88,39.93A12,12,0,1,0,39.12,56.07L76,96.64V128a52,52,0,0,0,72.11,48l11.26,12.39A67.34,67.34,0,0,1,128,196a68.07,68.07,0,0,1-68-68,12,12,0,0,0-24,0,92.14,92.14,0,0,0,80,91.22V240a12,12,0,0,0,24,0V219.23a90.39,90.39,0,0,0,35.92-12.68l23.2,25.52a12,12,0,0,0,17.76-16.14ZM128,156a28,28,0,0,1-28-28v-5l29.9,32.89C129.27,156,128.64,156,128,156Zm63-2.42A67.63,67.63,0,0,0,196,128a12,12,0,0,1,24,0,91.48,91.48,0,0,1-6.74,34.61,12,12,0,0,1-22.23-9ZM85.7,33.75A52,52,0,0,1,180,64v56.54a12,12,0,0,1-24,0V64a28,28,0,0,0-50.79-16.28,12,12,0,0,1-19.51-14Z"}))],["duotone",p.createElement(p.Fragment,null,p.createElement("path",{d:"M168,64v64a40,40,0,0,1-40,40h0a40,40,0,0,1-40-40V64a40,40,0,0,1,40-40h0A40,40,0,0,1,168,64Z",opacity:"0.2"}),p.createElement("path",{d:"M213.92,218.62l-160-176A8,8,0,0,0,42.08,53.38L80,95.09V128a48,48,0,0,0,69.11,43.12l11.1,12.2A63.41,63.41,0,0,1,128,192a64.07,64.07,0,0,1-64-64,8,8,0,0,0-16,0,80.11,80.11,0,0,0,72,79.6V240a8,8,0,0,0,16,0V207.59a78.83,78.83,0,0,0,35.16-12.22l30.92,34a8,8,0,1,0,11.84-10.76ZM128,160a32,32,0,0,1-32-32V112.69l41.66,45.82A32,32,0,0,1,128,160Zm57.52-3.91A63.32,63.32,0,0,0,192,128a8,8,0,0,1,16,0,79.16,79.16,0,0,1-8.11,35.12,8,8,0,0,1-7.19,4.49,7.88,7.88,0,0,1-3.51-.82A8,8,0,0,1,185.52,156.09ZM84,44.87A48,48,0,0,1,176,64v64a49.19,49.19,0,0,1-.26,5,8,8,0,0,1-8,7.17,8.13,8.13,0,0,1-.84,0,8,8,0,0,1-7.12-8.79c.11-1.1.17-2.24.17-3.36V64A32,32,0,0,0,98.64,51.25,8,8,0,1,1,84,44.87Z"}))],["fill",p.createElement(p.Fragment,null,p.createElement("path",{d:"M213.38,229.92a8,8,0,0,1-11.3-.54l-30.92-34A78.83,78.83,0,0,1,136,207.59V240a8,8,0,0,1-16,0V207.6A80.11,80.11,0,0,1,48,128a8,8,0,0,1,16,0,64.07,64.07,0,0,0,64,64,63.41,63.41,0,0,0,32.21-8.68l-11.1-12.2A48,48,0,0,1,80,128V95.09L42.08,53.38A8,8,0,0,1,53.92,42.62l160,176A8,8,0,0,1,213.38,229.92Zm-24.19-63.13a7.88,7.88,0,0,0,3.51.82,8,8,0,0,0,7.19-4.49A79.16,79.16,0,0,0,208,128a8,8,0,0,0-16,0,63.32,63.32,0,0,1-6.48,28.09A8,8,0,0,0,189.19,166.79Zm-27.33-29.22A8,8,0,0,0,175.74,133a49.49,49.49,0,0,0,.26-5V64A48,48,0,0,0,84,44.87a8,8,0,0,0,1.41,8.57Z"}))],["light",p.createElement(p.Fragment,null,p.createElement("path",{d:"M212.44,220,52.44,44A6,6,0,0,0,43.56,52L82,94.32V128a46,46,0,0,0,67.56,40.64l13.75,15.12A65.26,65.26,0,0,1,128,194a66.08,66.08,0,0,1-66-66,6,6,0,0,0-12,0,78.09,78.09,0,0,0,72,77.75V240a6,6,0,0,0,12,0V205.77a76.93,76.93,0,0,0,37.48-13L203.56,228a6,6,0,0,0,8.88-8.08ZM128,162a34,34,0,0,1-34-34V107.52l47.12,51.84A33.82,33.82,0,0,1,128,162Zm59.32-5A65.38,65.38,0,0,0,194,128a6,6,0,0,1,12,0,77.33,77.33,0,0,1-7.9,34.25A6,6,0,1,1,187.32,157ZM85.8,45.67A46,46,0,0,1,174,64v64a45.17,45.17,0,0,1-.25,4.81,6,6,0,0,1-6,5.38q-.31,0-.63,0a6,6,0,0,1-5.34-6.59A35.41,35.41,0,0,0,162,128V64A34,34,0,0,0,96.8,50.45a6,6,0,0,1-11-4.78Z"}))],["regular",p.createElement(p.Fragment,null,p.createElement("path",{d:"M213.92,218.62l-160-176A8,8,0,0,0,42.08,53.38L80,95.09V128a48,48,0,0,0,69.11,43.12l11.1,12.2A63.41,63.41,0,0,1,128,192a64.07,64.07,0,0,1-64-64,8,8,0,0,0-16,0,80.11,80.11,0,0,0,72,79.6V240a8,8,0,0,0,16,0V207.59a78.83,78.83,0,0,0,35.16-12.22l30.92,34a8,8,0,1,0,11.84-10.76ZM128,160a32,32,0,0,1-32-32V112.69l41.66,45.82A32,32,0,0,1,128,160Zm57.52-3.91A63.32,63.32,0,0,0,192,128a8,8,0,0,1,16,0,79.16,79.16,0,0,1-8.11,35.12,8,8,0,0,1-7.19,4.49,7.88,7.88,0,0,1-3.51-.82A8,8,0,0,1,185.52,156.09ZM84,44.87A48,48,0,0,1,176,64v64a49.19,49.19,0,0,1-.26,5,8,8,0,0,1-8,7.17,8.13,8.13,0,0,1-.84,0,8,8,0,0,1-7.12-8.79c.11-1.1.17-2.24.17-3.36V64A32,32,0,0,0,98.64,51.25,8,8,0,1,1,84,44.87Z"}))],["thin",p.createElement(p.Fragment,null,p.createElement("path",{d:"M211,221.31,51,45.31A4,4,0,0,0,45,50.69L84,93.55V128a44,44,0,0,0,66,38.12l16.38,18A67.21,67.21,0,0,1,128,196a68.07,68.07,0,0,1-68-68,4,4,0,0,0-8,0,76.09,76.09,0,0,0,72,75.89V240a4,4,0,0,0,8,0V203.89a75.1,75.1,0,0,0,39.79-13.77L205,226.69a4,4,0,1,0,5.92-5.38ZM128,164a36,36,0,0,1-36-36V102.35L144.43,160A35.83,35.83,0,0,1,128,164Zm61.12-6.15A67.44,67.44,0,0,0,196,128a4,4,0,0,1,8,0,75.28,75.28,0,0,1-7.7,33.37,4,4,0,0,1-7.18-3.52ZM87.63,46.46A44,44,0,0,1,172,64v64a44.2,44.2,0,0,1-.24,4.61,4,4,0,0,1-4,3.58l-.42,0a4,4,0,0,1-3.57-4.39A36.67,36.67,0,0,0,164,128V64A36,36,0,0,0,95,49.66a4,4,0,0,1-7.34-3.2Z"}))]]),Ul=p.forwardRef((e,t)=>p.createElement(rt,{ref:t,...e,weights:_p}));Ul.displayName="MicrophoneSlashIcon";const Bp=new Map([["bold",p.createElement(p.Fragment,null,p.createElement("path",{d:"M208,36H48A28,28,0,0,0,20,64V176a28,28,0,0,0,28,28H208a28,28,0,0,0,28-28V64A28,28,0,0,0,208,36Zm4,140a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V64a4,4,0,0,1,4-4H208a4,4,0,0,1,4,4Zm-40,52a12,12,0,0,1-12,12H96a12,12,0,0,1,0-24h64A12,12,0,0,1,172,228ZM160.49,103.51a12,12,0,0,1-17,17L140,117v35a12,12,0,0,1-24,0V117l-3.51,3.52a12,12,0,0,1-17-17l24-24a12,12,0,0,1,17,0Z"}))],["duotone",p.createElement(p.Fragment,null,p.createElement("path",{d:"M224,64V176a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V64A16,16,0,0,1,48,48H208A16,16,0,0,1,224,64Z",opacity:"0.2"}),p.createElement("path",{d:"M208,40H48A24,24,0,0,0,24,64V176a24,24,0,0,0,24,24H208a24,24,0,0,0,24-24V64A24,24,0,0,0,208,40Zm8,136a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V64a8,8,0,0,1,8-8H208a8,8,0,0,1,8,8Zm-48,48a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,224ZM157.66,106.34a8,8,0,0,1-11.32,11.32L136,107.31V152a8,8,0,0,1-16,0V107.31l-10.34,10.35a8,8,0,0,1-11.32-11.32l24-24a8,8,0,0,1,11.32,0Z"}))],["fill",p.createElement(p.Fragment,null,p.createElement("path",{d:"M168,224a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,224ZM232,64V176a24,24,0,0,1-24,24H48a24,24,0,0,1-24-24V64A24,24,0,0,1,48,40H208A24,24,0,0,1,232,64Zm-74.34,42.34-24-24a8,8,0,0,0-11.32,0l-24,24a8,8,0,0,0,11.32,11.32L120,107.31V152a8,8,0,0,0,16,0V107.31l10.34,10.35a8,8,0,0,0,11.32-11.32Z"}))],["light",p.createElement(p.Fragment,null,p.createElement("path",{d:"M208,42H48A22,22,0,0,0,26,64V176a22,22,0,0,0,22,22H208a22,22,0,0,0,22-22V64A22,22,0,0,0,208,42Zm10,134a10,10,0,0,1-10,10H48a10,10,0,0,1-10-10V64A10,10,0,0,1,48,54H208a10,10,0,0,1,10,10Zm-52,48a6,6,0,0,1-6,6H96a6,6,0,0,1,0-12h64A6,6,0,0,1,166,224Zm-9.76-116.24a6,6,0,1,1-8.48,8.48L134,102.49V152a6,6,0,0,1-12,0V102.49l-13.76,13.75a6,6,0,0,1-8.48-8.48l24-24a6,6,0,0,1,8.48,0Z"}))],["regular",p.createElement(p.Fragment,null,p.createElement("path",{d:"M208,40H48A24,24,0,0,0,24,64V176a24,24,0,0,0,24,24H208a24,24,0,0,0,24-24V64A24,24,0,0,0,208,40Zm8,136a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V64a8,8,0,0,1,8-8H208a8,8,0,0,1,8,8Zm-48,48a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,224ZM157.66,106.34a8,8,0,0,1-11.32,11.32L136,107.31V152a8,8,0,0,1-16,0V107.31l-10.34,10.35a8,8,0,0,1-11.32-11.32l24-24a8,8,0,0,1,11.32,0Z"}))],["thin",p.createElement(p.Fragment,null,p.createElement("path",{d:"M208,44H48A20,20,0,0,0,28,64V176a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V64A20,20,0,0,0,208,44Zm12,132a12,12,0,0,1-12,12H48a12,12,0,0,1-12-12V64A12,12,0,0,1,48,52H208a12,12,0,0,1,12,12Zm-56,48a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h64A4,4,0,0,1,164,224Zm-9.17-114.83a4,4,0,0,1-5.66,5.66L132,97.66V152a4,4,0,0,1-8,0V97.66l-17.17,17.17a4,4,0,0,1-5.66-5.66l24-24a4,4,0,0,1,5.66,0Z"}))]]),zl=p.forwardRef((e,t)=>p.createElement(rt,{ref:t,...e,weights:Bp}));zl.displayName="MonitorArrowUpIcon";const Hp=new Map([["bold",p.createElement(p.Fragment,null,p.createElement("path",{d:"M140,32V64a12,12,0,0,1-24,0V32a12,12,0,0,1,24,0Zm33.25,62.75a12,12,0,0,0,8.49-3.52L204.37,68.6a12,12,0,0,0-17-17L164.77,74.26a12,12,0,0,0,8.48,20.49ZM224,116H192a12,12,0,0,0,0,24h32a12,12,0,0,0,0-24Zm-42.26,48.77a12,12,0,1,0-17,17l22.63,22.63a12,12,0,0,0,17-17ZM128,180a12,12,0,0,0-12,12v32a12,12,0,0,0,24,0V192A12,12,0,0,0,128,180ZM74.26,164.77,51.63,187.4a12,12,0,0,0,17,17l22.63-22.63a12,12,0,1,0-17-17ZM76,128a12,12,0,0,0-12-12H32a12,12,0,0,0,0,24H64A12,12,0,0,0,76,128ZM68.6,51.63a12,12,0,1,0-17,17L74.26,91.23a12,12,0,0,0,17-17Z"}))],["duotone",p.createElement(p.Fragment,null,p.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),p.createElement("path",{d:"M136,32V64a8,8,0,0,1-16,0V32a8,8,0,0,1,16,0Zm37.25,58.75a8,8,0,0,0,5.66-2.35l22.63-22.62a8,8,0,0,0-11.32-11.32L167.6,77.09a8,8,0,0,0,5.65,13.66ZM224,120H192a8,8,0,0,0,0,16h32a8,8,0,0,0,0-16Zm-45.09,47.6a8,8,0,0,0-11.31,11.31l22.62,22.63a8,8,0,0,0,11.32-11.32ZM128,184a8,8,0,0,0-8,8v32a8,8,0,0,0,16,0V192A8,8,0,0,0,128,184ZM77.09,167.6,54.46,190.22a8,8,0,0,0,11.32,11.32L88.4,178.91A8,8,0,0,0,77.09,167.6ZM72,128a8,8,0,0,0-8-8H32a8,8,0,0,0,0,16H64A8,8,0,0,0,72,128ZM65.78,54.46A8,8,0,0,0,54.46,65.78L77.09,88.4A8,8,0,0,0,88.4,77.09Z"}))],["fill",p.createElement(p.Fragment,null,p.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm33.94,58.75,17-17a8,8,0,0,1,11.32,11.32l-17,17a8,8,0,0,1-11.31-11.31ZM48,136a8,8,0,0,1,0-16H72a8,8,0,0,1,0,16Zm46.06,37.25-17,17a8,8,0,0,1-11.32-11.32l17-17a8,8,0,0,1,11.31,11.31Zm0-79.19a8,8,0,0,1-11.31,0l-17-17A8,8,0,0,1,77.09,65.77l17,17A8,8,0,0,1,94.06,94.06ZM136,208a8,8,0,0,1-16,0V184a8,8,0,0,1,16,0Zm0-136a8,8,0,0,1-16,0V48a8,8,0,0,1,16,0Zm54.23,118.23a8,8,0,0,1-11.32,0l-17-17a8,8,0,0,1,11.31-11.31l17,17A8,8,0,0,1,190.23,190.23ZM208,136H184a8,8,0,0,1,0-16h24a8,8,0,0,1,0,16Z"}))],["light",p.createElement(p.Fragment,null,p.createElement("path",{d:"M134,32V64a6,6,0,0,1-12,0V32a6,6,0,0,1,12,0Zm39.25,56.75A6,6,0,0,0,177.5,87l22.62-22.63a6,6,0,0,0-8.48-8.48L169,78.5a6,6,0,0,0,4.24,10.25ZM224,122H192a6,6,0,0,0,0,12h32a6,6,0,0,0,0-12Zm-46.5,47A6,6,0,0,0,169,177.5l22.63,22.62a6,6,0,0,0,8.48-8.48ZM128,186a6,6,0,0,0-6,6v32a6,6,0,0,0,12,0V192A6,6,0,0,0,128,186ZM78.5,169,55.88,191.64a6,6,0,1,0,8.48,8.48L87,177.5A6,6,0,1,0,78.5,169ZM70,128a6,6,0,0,0-6-6H32a6,6,0,0,0,0,12H64A6,6,0,0,0,70,128ZM64.36,55.88a6,6,0,0,0-8.48,8.48L78.5,87A6,6,0,1,0,87,78.5Z"}))],["regular",p.createElement(p.Fragment,null,p.createElement("path",{d:"M136,32V64a8,8,0,0,1-16,0V32a8,8,0,0,1,16,0Zm37.25,58.75a8,8,0,0,0,5.66-2.35l22.63-22.62a8,8,0,0,0-11.32-11.32L167.6,77.09a8,8,0,0,0,5.65,13.66ZM224,120H192a8,8,0,0,0,0,16h32a8,8,0,0,0,0-16Zm-45.09,47.6a8,8,0,0,0-11.31,11.31l22.62,22.63a8,8,0,0,0,11.32-11.32ZM128,184a8,8,0,0,0-8,8v32a8,8,0,0,0,16,0V192A8,8,0,0,0,128,184ZM77.09,167.6,54.46,190.22a8,8,0,0,0,11.32,11.32L88.4,178.91A8,8,0,0,0,77.09,167.6ZM72,128a8,8,0,0,0-8-8H32a8,8,0,0,0,0,16H64A8,8,0,0,0,72,128ZM65.78,54.46A8,8,0,0,0,54.46,65.78L77.09,88.4A8,8,0,0,0,88.4,77.09Z"}))],["thin",p.createElement(p.Fragment,null,p.createElement("path",{d:"M132,32V64a4,4,0,0,1-8,0V32a4,4,0,0,1,8,0Zm41.25,54.75a4,4,0,0,0,2.83-1.18L198.71,63a4,4,0,0,0-5.66-5.66L170.43,79.92a4,4,0,0,0,2.82,6.83ZM224,124H192a4,4,0,0,0,0,8h32a4,4,0,0,0,0-8Zm-47.92,46.43a4,4,0,1,0-5.65,5.65l22.62,22.63a4,4,0,0,0,5.66-5.66ZM128,188a4,4,0,0,0-4,4v32a4,4,0,0,0,8,0V192A4,4,0,0,0,128,188ZM79.92,170.43,57.29,193.05A4,4,0,0,0,63,198.71l22.62-22.63a4,4,0,1,0-5.65-5.65ZM68,128a4,4,0,0,0-4-4H32a4,4,0,0,0,0,8H64A4,4,0,0,0,68,128ZM63,57.29A4,4,0,0,0,57.29,63L79.92,85.57a4,4,0,1,0,5.65-5.65Z"}))]]),Do=p.forwardRef((e,t)=>p.createElement(rt,{ref:t,...e,weights:Hp}));Do.displayName="SpinnerIcon";const Up=new Map([["bold",p.createElement(p.Fragment,null,p.createElement("path",{d:"M249.45,69.31a12,12,0,0,0-12.51,1L212,88.43V72a20,20,0,0,0-20-20H32A20,20,0,0,0,12,72V184a20,20,0,0,0,20,20H192a20,20,0,0,0,20-20V167.57l24.94,18.14A12,12,0,0,0,256,176V80A12,12,0,0,0,249.45,69.31ZM188,180H36V76H188Zm44-27.57-20-14.54V118.11l20-14.54Z"}))],["duotone",p.createElement(p.Fragment,null,p.createElement("path",{d:"M200,72V184a8,8,0,0,1-8,8H32a8,8,0,0,1-8-8V72a8,8,0,0,1,8-8H192A8,8,0,0,1,200,72Z",opacity:"0.2"}),p.createElement("path",{d:"M251.77,73a8,8,0,0,0-8.21.39L208,97.05V72a16,16,0,0,0-16-16H32A16,16,0,0,0,16,72V184a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V159l35.56,23.71A8,8,0,0,0,248,184a8,8,0,0,0,8-8V80A8,8,0,0,0,251.77,73ZM192,184H32V72H192V184Zm48-22.95-32-21.33V116.28L240,95Z"}))],["fill",p.createElement(p.Fragment,null,p.createElement("path",{d:"M192,72V184a16,16,0,0,1-16,16H32a16,16,0,0,1-16-16V72A16,16,0,0,1,32,56H176A16,16,0,0,1,192,72Zm58,.25a8.23,8.23,0,0,0-6.63,1.22L209.78,95.86A4,4,0,0,0,208,99.19v57.62a4,4,0,0,0,1.78,3.33l33.78,22.52a8,8,0,0,0,8.58.19,8.33,8.33,0,0,0,3.86-7.17V80A8,8,0,0,0,250,72.25Z"}))],["light",p.createElement(p.Fragment,null,p.createElement("path",{d:"M250.83,74.71a6,6,0,0,0-6.16.3L206,100.79V72a14,14,0,0,0-14-14H32A14,14,0,0,0,18,72V184a14,14,0,0,0,14,14H192a14,14,0,0,0,14-14V155.21L244.67,181a6,6,0,0,0,9.33-5V80A6,6,0,0,0,250.83,74.71ZM194,184a2,2,0,0,1-2,2H32a2,2,0,0,1-2-2V72a2,2,0,0,1,2-2H192a2,2,0,0,1,2,2Zm48-19.21-36-24V115.21l36-24Z"}))],["regular",p.createElement(p.Fragment,null,p.createElement("path",{d:"M251.77,73a8,8,0,0,0-8.21.39L208,97.05V72a16,16,0,0,0-16-16H32A16,16,0,0,0,16,72V184a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V159l35.56,23.71A8,8,0,0,0,248,184a8,8,0,0,0,8-8V80A8,8,0,0,0,251.77,73ZM192,184H32V72H192V184Zm48-22.95-32-21.33V116.28L240,95Z"}))],["thin",p.createElement(p.Fragment,null,p.createElement("path",{d:"M249.89,76.47a4,4,0,0,0-4.11.2L204,104.53V72a12,12,0,0,0-12-12H32A12,12,0,0,0,20,72V184a12,12,0,0,0,12,12H192a12,12,0,0,0,12-12V151.47l41.78,27.86A4,4,0,0,0,252,176V80A4,4,0,0,0,249.89,76.47ZM196,184a4,4,0,0,1-4,4H32a4,4,0,0,1-4-4V72a4,4,0,0,1,4-4H192a4,4,0,0,1,4,4Zm48-15.47-40-26.67V114.14l40-26.67Z"}))]]),Wl=p.forwardRef((e,t)=>p.createElement(rt,{ref:t,...e,weights:Up}));Wl.displayName="VideoCameraIcon";const zp=new Map([["bold",p.createElement(p.Fragment,null,p.createElement("path",{d:"M249.45,69.31a12,12,0,0,0-12.51,1L212,88.43V72a20,20,0,0,0-20-20H123.88a12,12,0,0,0,0,24H188v68a12,12,0,0,0,4.46,9.33c.15.13.31.25.48.38l44,32A12,12,0,0,0,256,176V80A12,12,0,0,0,249.45,69.31ZM232,152.43l-20-14.54V118.11l20-14.54ZM56.88,31.93A12,12,0,1,0,39.12,48.07L42.69,52H32A20,20,0,0,0,12,72V184a20,20,0,0,0,20,20H180.87l18.25,20.07a12,12,0,0,0,17.76-16.14ZM36,180V76H64.51l94.55,104Z"}))],["duotone",p.createElement(p.Fragment,null,p.createElement("path",{d:"M200,72V184a8,8,0,0,1-8,8H32a8,8,0,0,1-8-8V72a8,8,0,0,1,8-8H192A8,8,0,0,1,200,72Z",opacity:"0.2"}),p.createElement("path",{d:"M251.77,73a8,8,0,0,0-8.21.39L208,97.05V72a16,16,0,0,0-16-16H113.06a8,8,0,0,0,0,16H192v87.63a8,8,0,0,0,16,0V159l35.56,23.71A8,8,0,0,0,248,184a8,8,0,0,0,8-8V80A8,8,0,0,0,251.77,73ZM240,161.05l-32-21.33V116.28L240,95ZM53.92,34.62A8,8,0,1,0,42.08,45.38L51.73,56H32A16,16,0,0,0,16,72V184a16,16,0,0,0,16,16H182.64l19.44,21.38a8,8,0,1,0,11.84-10.76ZM32,184V72H66.28L168.1,184Z"}))],["fill",p.createElement(p.Fragment,null,p.createElement("path",{d:"M256,80.23v95.45a8.33,8.33,0,0,1-3.86,7.17,8,8,0,0,1-8.58-.19l-33.78-22.52a4,4,0,0,1-1.78-3.33V99.19a4,4,0,0,1,1.78-3.32l33.78-22.53a8,8,0,0,1,9.73.66A8.23,8.23,0,0,1,256,80.23ZM53.92,34.62A8,8,0,1,0,42.08,45.38L51.73,56H32A16,16,0,0,0,16,72V184a16,16,0,0,0,16,16H182.64l19.44,21.38a8,8,0,1,0,11.84-10.76ZM185,155.07a4,4,0,0,0,7-2.7V72a16,16,0,0,0-16-16H104a4,4,0,0,0-3,6.69Z"}))],["light",p.createElement(p.Fragment,null,p.createElement("path",{d:"M250.83,74.71a6,6,0,0,0-6.16.3L206,100.79V72a14,14,0,0,0-14-14H113.06a6,6,0,0,0,0,12H192a2,2,0,0,1,2,2v87.63a6,6,0,0,0,12,0v-4.42L244.67,181a6,6,0,0,0,9.33-5V80A6,6,0,0,0,250.83,74.71ZM242,164.79l-36-24V115.21l36-24ZM52.44,36A6,6,0,0,0,43.56,44L56.25,58H32A14,14,0,0,0,18,72V184a14,14,0,0,0,14,14H183.53l20,22a6,6,0,0,0,8.88-8.08ZM32,186a2,2,0,0,1-2-2V72a2,2,0,0,1,2-2H67.16L172.62,186Z"}))],["regular",p.createElement(p.Fragment,null,p.createElement("path",{d:"M251.77,73a8,8,0,0,0-8.21.39L208,97.05V72a16,16,0,0,0-16-16H113.06a8,8,0,0,0,0,16H192v87.63a8,8,0,0,0,16,0V159l35.56,23.71A8,8,0,0,0,248,184a8,8,0,0,0,8-8V80A8,8,0,0,0,251.77,73ZM240,161.05l-32-21.33V116.28L240,95ZM53.92,34.62A8,8,0,1,0,42.08,45.38L51.73,56H32A16,16,0,0,0,16,72V184a16,16,0,0,0,16,16H182.64l19.44,21.38a8,8,0,1,0,11.84-10.76ZM32,184V72H66.28L168.1,184Z"}))],["thin",p.createElement(p.Fragment,null,p.createElement("path",{d:"M249.89,76.47a4,4,0,0,0-4.11.2L204,104.53V72a12,12,0,0,0-12-12H113.06a4,4,0,0,0,0,8H192a4,4,0,0,1,4,4v87.63a4,4,0,0,0,8,0v-8.16l41.78,27.86A4,4,0,0,0,252,176V80A4,4,0,0,0,249.89,76.47ZM244,168.53l-40-26.67V114.14l40-26.67ZM51,37.31A4,4,0,0,0,45,42.69L60.78,60H32A12,12,0,0,0,20,72V184a12,12,0,0,0,12,12H184.41L205,218.69a4,4,0,1,0,5.92-5.38ZM32,188a4,4,0,0,1-4-4V72a4,4,0,0,1,4-4H68.05L177.14,188Z"}))]]),Zl=p.forwardRef((e,t)=>p.createElement(rt,{ref:t,...e,weights:zp}));Zl.displayName="VideoCameraSlashIcon";function fa(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Wp(...e){return t=>{let n=!1;const s=e.map(r=>{const i=fa(r,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let r=0;r<s.length;r++){const i=s[r];typeof i=="function"?i():fa(e[r],null)}}}}function Zp(e){const t=Kp(e),n=p.forwardRef((s,r)=>{const{children:i,...o}=s,a=p.Children.toArray(i),l=a.find(qp);if(l){const d=l.props.children,u=a.map(h=>h===l?p.Children.count(d)>1?p.Children.only(null):p.isValidElement(d)?d.props.children:null:h);return c.jsx(t,{...o,ref:r,children:p.isValidElement(d)?p.cloneElement(d,void 0,u):null})}return c.jsx(t,{...o,ref:r,children:i})});return n.displayName=`${e}.Slot`,n}var Gp=Zp("Slot");function Kp(e){const t=p.forwardRef((n,s)=>{const{children:r,...i}=n;if(p.isValidElement(r)){const o=Jp(r),a=Xp(i,r.props);return r.type!==p.Fragment&&(a.ref=s?Wp(s,o):o),p.cloneElement(r,a)}return p.Children.count(r)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Yp=Symbol("radix.slottable");function qp(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Yp}function Xp(e,t){const n={...t};for(const s in t){const r=e[s],i=t[s];/^on[A-Z]/.test(s)?r&&i?n[s]=(...a)=>{const l=i(...a);return r(...a),l}:r&&(n[s]=r):s==="style"?n[s]={...r,...i}:s==="className"&&(n[s]=[r,i].filter(Boolean).join(" "))}return{...e,...n}}function Jp(e){var s,r;let t=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const $o="-",Qp=e=>{const t=tg(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:s}=e;return{getClassGroupId:o=>{const a=o.split($o);return a[0]===""&&a.length!==1&&a.shift(),Gl(a,t)||eg(o)},getConflictingClassGroupIds:(o,a)=>{const l=n[o]||[];return a&&s[o]?[...l,...s[o]]:l}}},Gl=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],s=t.nextPart.get(n),r=s?Gl(e.slice(1),s):void 0;if(r)return r;if(t.validators.length===0)return;const i=e.join($o);return(o=t.validators.find(({validator:a})=>a(i)))==null?void 0:o.classGroupId},ha=/^\[(.+)\]$/,eg=e=>{if(ha.test(e)){const t=ha.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},tg=e=>{const{theme:t,classGroups:n}=e,s={nextPart:new Map,validators:[]};for(const r in n)Hr(n[r],s,r,t);return s},Hr=(e,t,n,s)=>{e.forEach(r=>{if(typeof r=="string"){const i=r===""?t:ma(t,r);i.classGroupId=n;return}if(typeof r=="function"){if(ng(r)){Hr(r(s),t,n,s);return}t.validators.push({validator:r,classGroupId:n});return}Object.entries(r).forEach(([i,o])=>{Hr(o,ma(t,i),n,s)})})},ma=(e,t)=>{let n=e;return t.split($o).forEach(s=>{n.nextPart.has(s)||n.nextPart.set(s,{nextPart:new Map,validators:[]}),n=n.nextPart.get(s)}),n},ng=e=>e.isThemeGetter,sg=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,s=new Map;const r=(i,o)=>{n.set(i,o),t++,t>e&&(t=0,s=n,n=new Map)};return{get(i){let o=n.get(i);if(o!==void 0)return o;if((o=s.get(i))!==void 0)return r(i,o),o},set(i,o){n.has(i)?n.set(i,o):r(i,o)}}},Ur="!",zr=":",rg=zr.length,og=e=>{const{prefix:t,experimentalParseClassName:n}=e;let s=r=>{const i=[];let o=0,a=0,l=0,d;for(let x=0;x<r.length;x++){let f=r[x];if(o===0&&a===0){if(f===zr){i.push(r.slice(l,x)),l=x+rg;continue}if(f==="/"){d=x;continue}}f==="["?o++:f==="]"?o--:f==="("?a++:f===")"&&a--}const u=i.length===0?r:r.substring(l),h=ig(u),m=h!==u,g=d&&d>l?d-l:void 0;return{modifiers:i,hasImportantModifier:m,baseClassName:h,maybePostfixModifierPosition:g}};if(t){const r=t+zr,i=s;s=o=>o.startsWith(r)?i(o.substring(r.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:o,maybePostfixModifierPosition:void 0}}if(n){const r=s;s=i=>n({className:i,parseClassName:r})}return s},ig=e=>e.endsWith(Ur)?e.substring(0,e.length-1):e.startsWith(Ur)?e.substring(1):e,ag=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(s=>[s,!0]));return s=>{if(s.length<=1)return s;const r=[];let i=[];return s.forEach(o=>{o[0]==="["||t[o]?(r.push(...i.sort(),o),i=[]):i.push(o)}),r.push(...i.sort()),r}},cg=e=>({cache:sg(e.cacheSize),parseClassName:og(e),sortModifiers:ag(e),...Qp(e)}),lg=/\s+/,dg=(e,t)=>{const{parseClassName:n,getClassGroupId:s,getConflictingClassGroupIds:r,sortModifiers:i}=t,o=[],a=e.trim().split(lg);let l="";for(let d=a.length-1;d>=0;d-=1){const u=a[d],{isExternal:h,modifiers:m,hasImportantModifier:g,baseClassName:x,maybePostfixModifierPosition:f}=n(u);if(h){l=u+(l.length>0?" "+l:l);continue}let b=!!f,k=s(b?x.substring(0,f):x);if(!k){if(!b){l=u+(l.length>0?" "+l:l);continue}if(k=s(x),!k){l=u+(l.length>0?" "+l:l);continue}b=!1}const S=i(m).join(":"),T=g?S+Ur:S,C=T+k;if(o.includes(C))continue;o.push(C);const w=r(k,b);for(let A=0;A<w.length;++A){const V=w[A];o.push(T+V)}l=u+(l.length>0?" "+l:l)}return l};function ug(){let e=0,t,n,s="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Kl(t))&&(s&&(s+=" "),s+=n);return s}const Kl=e=>{if(typeof e=="string")return e;let t,n="";for(let s=0;s<e.length;s++)e[s]&&(t=Kl(e[s]))&&(n&&(n+=" "),n+=t);return n};function fg(e,...t){let n,s,r,i=o;function o(l){const d=t.reduce((u,h)=>h(u),e());return n=cg(d),s=n.cache.get,r=n.cache.set,i=a,a(l)}function a(l){const d=s(l);if(d)return d;const u=dg(l,n);return r(l,u),u}return function(){return i(ug.apply(null,arguments))}}const Oe=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Yl=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ql=/^\((?:(\w[\w-]*):)?(.+)\)$/i,hg=/^\d+\/\d+$/,mg=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,pg=/\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$/,gg=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,yg=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,xg=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Gt=e=>hg.test(e),he=e=>!!e&&!Number.isNaN(Number(e)),vt=e=>!!e&&Number.isInteger(Number(e)),rr=e=>e.endsWith("%")&&he(e.slice(0,-1)),ut=e=>mg.test(e),bg=()=>!0,vg=e=>pg.test(e)&&!gg.test(e),Xl=()=>!1,wg=e=>yg.test(e),Sg=e=>xg.test(e),Cg=e=>!X(e)&&!J(e),kg=e=>xn(e,ed,Xl),X=e=>Yl.test(e),Rt=e=>xn(e,td,vg),or=e=>xn(e,Mg,he),pa=e=>xn(e,Jl,Xl),Tg=e=>xn(e,Ql,Sg),es=e=>xn(e,nd,wg),J=e=>ql.test(e),Cn=e=>bn(e,td),Eg=e=>bn(e,Vg),ga=e=>bn(e,Jl),Ag=e=>bn(e,ed),jg=e=>bn(e,Ql),ts=e=>bn(e,nd,!0),xn=(e,t,n)=>{const s=Yl.exec(e);return s?s[1]?t(s[1]):n(s[2]):!1},bn=(e,t,n=!1)=>{const s=ql.exec(e);return s?s[1]?t(s[1]):n:!1},Jl=e=>e==="position"||e==="percentage",Ql=e=>e==="image"||e==="url",ed=e=>e==="length"||e==="size"||e==="bg-size",td=e=>e==="length",Mg=e=>e==="number",Vg=e=>e==="family-name",nd=e=>e==="shadow",Ng=()=>{const e=Oe("color"),t=Oe("font"),n=Oe("text"),s=Oe("font-weight"),r=Oe("tracking"),i=Oe("leading"),o=Oe("breakpoint"),a=Oe("container"),l=Oe("spacing"),d=Oe("radius"),u=Oe("shadow"),h=Oe("inset-shadow"),m=Oe("text-shadow"),g=Oe("drop-shadow"),x=Oe("blur"),f=Oe("perspective"),b=Oe("aspect"),k=Oe("ease"),S=Oe("animate"),T=()=>["auto","avoid","all","avoid-page","page","left","right","column"],C=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],w=()=>[...C(),J,X],A=()=>["auto","hidden","clip","visible","scroll"],V=()=>["auto","contain","none"],E=()=>[J,X,l],F=()=>[Gt,"full","auto",...E()],y=()=>[vt,"none","subgrid",J,X],R=()=>["auto",{span:["full",vt,J,X]},vt,J,X],H=()=>[vt,"auto",J,X],se=()=>["auto","min","max","fr",J,X],ne=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],oe=()=>["start","end","center","stretch","center-safe","end-safe"],ce=()=>["auto",...E()],ee=()=>[Gt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...E()],I=()=>[e,J,X],W=()=>[...C(),ga,pa,{position:[J,X]}],j=()=>["no-repeat",{repeat:["","x","y","space","round"]}],B=()=>["auto","cover","contain",Ag,kg,{size:[J,X]}],L=()=>[rr,Cn,Rt],Z=()=>["","none","full",d,J,X],O=()=>["",he,Cn,Rt],Q=()=>["solid","dashed","dotted","double"],G=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],K=()=>[he,rr,ga,pa],q=()=>["","none",x,J,X],N=()=>["none",he,J,X],$=()=>["none",he,J,X],de=()=>[he,J,X],P=()=>[Gt,"full",...E()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ut],breakpoint:[ut],color:[bg],container:[ut],"drop-shadow":[ut],ease:["in","out","in-out"],font:[Cg],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ut],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ut],shadow:[ut],spacing:["px",he],text:[ut],"text-shadow":[ut],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Gt,X,J,b]}],container:["container"],columns:[{columns:[he,X,J,a]}],"break-after":[{"break-after":T()}],"break-before":[{"break-before":T()}],"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:w()}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:V()}],"overscroll-x":[{"overscroll-x":V()}],"overscroll-y":[{"overscroll-y":V()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:F()}],"inset-x":[{"inset-x":F()}],"inset-y":[{"inset-y":F()}],start:[{start:F()}],end:[{end:F()}],top:[{top:F()}],right:[{right:F()}],bottom:[{bottom:F()}],left:[{left:F()}],visibility:["visible","invisible","collapse"],z:[{z:[vt,"auto",J,X]}],basis:[{basis:[Gt,"full","auto",a,...E()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[he,Gt,"auto","initial","none",X]}],grow:[{grow:["",he,J,X]}],shrink:[{shrink:["",he,J,X]}],order:[{order:[vt,"first","last","none",J,X]}],"grid-cols":[{"grid-cols":y()}],"col-start-end":[{col:R()}],"col-start":[{"col-start":H()}],"col-end":[{"col-end":H()}],"grid-rows":[{"grid-rows":y()}],"row-start-end":[{row:R()}],"row-start":[{"row-start":H()}],"row-end":[{"row-end":H()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":se()}],"auto-rows":[{"auto-rows":se()}],gap:[{gap:E()}],"gap-x":[{"gap-x":E()}],"gap-y":[{"gap-y":E()}],"justify-content":[{justify:[...ne(),"normal"]}],"justify-items":[{"justify-items":[...oe(),"normal"]}],"justify-self":[{"justify-self":["auto",...oe()]}],"align-content":[{content:["normal",...ne()]}],"align-items":[{items:[...oe(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...oe(),{baseline:["","last"]}]}],"place-content":[{"place-content":ne()}],"place-items":[{"place-items":[...oe(),"baseline"]}],"place-self":[{"place-self":["auto",...oe()]}],p:[{p:E()}],px:[{px:E()}],py:[{py:E()}],ps:[{ps:E()}],pe:[{pe:E()}],pt:[{pt:E()}],pr:[{pr:E()}],pb:[{pb:E()}],pl:[{pl:E()}],m:[{m:ce()}],mx:[{mx:ce()}],my:[{my:ce()}],ms:[{ms:ce()}],me:[{me:ce()}],mt:[{mt:ce()}],mr:[{mr:ce()}],mb:[{mb:ce()}],ml:[{ml:ce()}],"space-x":[{"space-x":E()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":E()}],"space-y-reverse":["space-y-reverse"],size:[{size:ee()}],w:[{w:[a,"screen",...ee()]}],"min-w":[{"min-w":[a,"screen","none",...ee()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[o]},...ee()]}],h:[{h:["screen","lh",...ee()]}],"min-h":[{"min-h":["screen","lh","none",...ee()]}],"max-h":[{"max-h":["screen","lh",...ee()]}],"font-size":[{text:["base",n,Cn,Rt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,J,or]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",rr,X]}],"font-family":[{font:[Eg,X,t]}],"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:[r,J,X]}],"line-clamp":[{"line-clamp":[he,"none",J,or]}],leading:[{leading:[i,...E()]}],"list-image":[{"list-image":["none",J,X]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",J,X]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:I()}],"text-color":[{text:I()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Q(),"wavy"]}],"text-decoration-thickness":[{decoration:[he,"from-font","auto",J,Rt]}],"text-decoration-color":[{decoration:I()}],"underline-offset":[{"underline-offset":[he,"auto",J,X]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:E()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",J,X]}],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",J,X]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:W()}],"bg-repeat":[{bg:j()}],"bg-size":[{bg:B()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},vt,J,X],radial:["",J,X],conic:[vt,J,X]},jg,Tg]}],"bg-color":[{bg:I()}],"gradient-from-pos":[{from:L()}],"gradient-via-pos":[{via:L()}],"gradient-to-pos":[{to:L()}],"gradient-from":[{from:I()}],"gradient-via":[{via:I()}],"gradient-to":[{to:I()}],rounded:[{rounded:Z()}],"rounded-s":[{"rounded-s":Z()}],"rounded-e":[{"rounded-e":Z()}],"rounded-t":[{"rounded-t":Z()}],"rounded-r":[{"rounded-r":Z()}],"rounded-b":[{"rounded-b":Z()}],"rounded-l":[{"rounded-l":Z()}],"rounded-ss":[{"rounded-ss":Z()}],"rounded-se":[{"rounded-se":Z()}],"rounded-ee":[{"rounded-ee":Z()}],"rounded-es":[{"rounded-es":Z()}],"rounded-tl":[{"rounded-tl":Z()}],"rounded-tr":[{"rounded-tr":Z()}],"rounded-br":[{"rounded-br":Z()}],"rounded-bl":[{"rounded-bl":Z()}],"border-w":[{border:O()}],"border-w-x":[{"border-x":O()}],"border-w-y":[{"border-y":O()}],"border-w-s":[{"border-s":O()}],"border-w-e":[{"border-e":O()}],"border-w-t":[{"border-t":O()}],"border-w-r":[{"border-r":O()}],"border-w-b":[{"border-b":O()}],"border-w-l":[{"border-l":O()}],"divide-x":[{"divide-x":O()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":O()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Q(),"hidden","none"]}],"divide-style":[{divide:[...Q(),"hidden","none"]}],"border-color":[{border:I()}],"border-color-x":[{"border-x":I()}],"border-color-y":[{"border-y":I()}],"border-color-s":[{"border-s":I()}],"border-color-e":[{"border-e":I()}],"border-color-t":[{"border-t":I()}],"border-color-r":[{"border-r":I()}],"border-color-b":[{"border-b":I()}],"border-color-l":[{"border-l":I()}],"divide-color":[{divide:I()}],"outline-style":[{outline:[...Q(),"none","hidden"]}],"outline-offset":[{"outline-offset":[he,J,X]}],"outline-w":[{outline:["",he,Cn,Rt]}],"outline-color":[{outline:I()}],shadow:[{shadow:["","none",u,ts,es]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":["none",h,ts,es]}],"inset-shadow-color":[{"inset-shadow":I()}],"ring-w":[{ring:O()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:I()}],"ring-offset-w":[{"ring-offset":[he,Rt]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":O()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":["none",m,ts,es]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[he,J,X]}],"mix-blend":[{"mix-blend":[...G(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":G()}],"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":[he]}],"mask-image-linear-from-pos":[{"mask-linear-from":K()}],"mask-image-linear-to-pos":[{"mask-linear-to":K()}],"mask-image-linear-from-color":[{"mask-linear-from":I()}],"mask-image-linear-to-color":[{"mask-linear-to":I()}],"mask-image-t-from-pos":[{"mask-t-from":K()}],"mask-image-t-to-pos":[{"mask-t-to":K()}],"mask-image-t-from-color":[{"mask-t-from":I()}],"mask-image-t-to-color":[{"mask-t-to":I()}],"mask-image-r-from-pos":[{"mask-r-from":K()}],"mask-image-r-to-pos":[{"mask-r-to":K()}],"mask-image-r-from-color":[{"mask-r-from":I()}],"mask-image-r-to-color":[{"mask-r-to":I()}],"mask-image-b-from-pos":[{"mask-b-from":K()}],"mask-image-b-to-pos":[{"mask-b-to":K()}],"mask-image-b-from-color":[{"mask-b-from":I()}],"mask-image-b-to-color":[{"mask-b-to":I()}],"mask-image-l-from-pos":[{"mask-l-from":K()}],"mask-image-l-to-pos":[{"mask-l-to":K()}],"mask-image-l-from-color":[{"mask-l-from":I()}],"mask-image-l-to-color":[{"mask-l-to":I()}],"mask-image-x-from-pos":[{"mask-x-from":K()}],"mask-image-x-to-pos":[{"mask-x-to":K()}],"mask-image-x-from-color":[{"mask-x-from":I()}],"mask-image-x-to-color":[{"mask-x-to":I()}],"mask-image-y-from-pos":[{"mask-y-from":K()}],"mask-image-y-to-pos":[{"mask-y-to":K()}],"mask-image-y-from-color":[{"mask-y-from":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[J,X]}],"mask-image-radial-from-pos":[{"mask-radial-from":K()}],"mask-image-radial-to-pos":[{"mask-radial-to":K()}],"mask-image-radial-from-color":[{"mask-radial-from":I()}],"mask-image-radial-to-color":[{"mask-radial-to":I()}],"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":C()}],"mask-image-conic-pos":[{"mask-conic":[he]}],"mask-image-conic-from-pos":[{"mask-conic-from":K()}],"mask-image-conic-to-pos":[{"mask-conic-to":K()}],"mask-image-conic-from-color":[{"mask-conic-from":I()}],"mask-image-conic-to-color":[{"mask-conic-to":I()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:W()}],"mask-repeat":[{mask:j()}],"mask-size":[{mask:B()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",J,X]}],filter:[{filter:["","none",J,X]}],blur:[{blur:q()}],brightness:[{brightness:[he,J,X]}],contrast:[{contrast:[he,J,X]}],"drop-shadow":[{"drop-shadow":["","none",g,ts,es]}],"drop-shadow-color":[{"drop-shadow":I()}],grayscale:[{grayscale:["",he,J,X]}],"hue-rotate":[{"hue-rotate":[he,J,X]}],invert:[{invert:["",he,J,X]}],saturate:[{saturate:[he,J,X]}],sepia:[{sepia:["",he,J,X]}],"backdrop-filter":[{"backdrop-filter":["","none",J,X]}],"backdrop-blur":[{"backdrop-blur":q()}],"backdrop-brightness":[{"backdrop-brightness":[he,J,X]}],"backdrop-contrast":[{"backdrop-contrast":[he,J,X]}],"backdrop-grayscale":[{"backdrop-grayscale":["",he,J,X]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[he,J,X]}],"backdrop-invert":[{"backdrop-invert":["",he,J,X]}],"backdrop-opacity":[{"backdrop-opacity":[he,J,X]}],"backdrop-saturate":[{"backdrop-saturate":[he,J,X]}],"backdrop-sepia":[{"backdrop-sepia":["",he,J,X]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":E()}],"border-spacing-x":[{"border-spacing-x":E()}],"border-spacing-y":[{"border-spacing-y":E()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",J,X]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[he,"initial",J,X]}],ease:[{ease:["linear","initial",k,J,X]}],delay:[{delay:[he,J,X]}],animate:[{animate:["none",S,J,X]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[f,J,X]}],"perspective-origin":[{"perspective-origin":w()}],rotate:[{rotate:N()}],"rotate-x":[{"rotate-x":N()}],"rotate-y":[{"rotate-y":N()}],"rotate-z":[{"rotate-z":N()}],scale:[{scale:$()}],"scale-x":[{"scale-x":$()}],"scale-y":[{"scale-y":$()}],"scale-z":[{"scale-z":$()}],"scale-3d":["scale-3d"],skew:[{skew:de()}],"skew-x":[{"skew-x":de()}],"skew-y":[{"skew-y":de()}],transform:[{transform:[J,X,"","none","gpu","cpu"]}],"transform-origin":[{origin:w()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:P()}],"translate-x":[{"translate-x":P()}],"translate-y":[{"translate-y":P()}],"translate-z":[{"translate-z":P()}],"translate-none":["translate-none"],accent:[{accent:I()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:I()}],"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",J,X]}],"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":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-me":[{"scroll-me":E()}],"scroll-mt":[{"scroll-mt":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-p":[{"scroll-p":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-pe":[{"scroll-pe":E()}],"scroll-pt":[{"scroll-pt":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"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",J,X]}],fill:[{fill:["none",...I()]}],"stroke-w":[{stroke:[he,Cn,Rt,or]}],stroke:[{stroke:["none",...I()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","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","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","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-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-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-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-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"]}},Pg=fg(Ng);function re(...e){return Pg(Xr.clsx(e))}const Rg=qr.cva(["text-xs font-bold tracking-wider uppercase whitespace-nowrap","inline-flex items-center justify-center gap-2 shrink-0 rounded-full cursor-pointer outline-none transition-colors duration-300","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","disabled:pointer-events-none disabled:opacity-50","aria-invalid:ring-destructive/20 aria-invalid:border-destructive dark:aria-invalid:ring-destructive/40 ","[&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0"],{variants:{variant:{default:"bg-button text-button-foreground hover:bg-muted focus:bg-muted",destructive:["bg-destructive text-destructive-foreground","hover:bg-destructive-hover focus:bg-destructive-hover focus-visible:ring-destructive-foreground/20","dark:focus-visible:ring-destructive-foreground/40"],outline:["border bg-background","hover:bg-accent hover:text-accent-foreground","dark:bg-input/30 dark:border-input dark:hover:bg-input/50"],primary:"",secondary:"bg-secondary text-secondary-foregroun 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",sm:"h-8 gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function Ig({className:e,variant:t,size:n,asChild:s=!1,...r}){const i=s?Gp:"button";return c.jsx(i,{"data-slot":"button",className:re(Rg({variant:t,size:n,className:e})),...r})}const Dg=qr.cva(["inline-flex items-center justify-center gap-2 rounded-full","text-sm font-medium whitespace-nowrap","cursor-pointer outline-none transition-[color,border,background-color]","!focus:ring-0 !focus-visible:ring-0 !focus:border-none !focus-visible:border-none !ring-0 !border-none !outline-none","aria-invalid:ring-0 dark:aria-invalid:ring-0 aria-invalid:border-0","disabled:pointer-events-none disabled:opacity-50 disabled:not-allowed","data-[state=on]:bg-button-selected data-[state=on]:border-button-border-selected","[&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0"],{variants:{variant:{default:"bg-button hover:bg-muted focus:bg-muted hover:text-muted-foreground focus:text-muted-foreground",primary:"text-fg1 bg-button hover:bg-button-hover focus:bg-button-hover data-[state=off]:bg-button-primary hover:data-[state=off]:bg-button-hover data-[state=off]:text-button-primary-foreground",secondary:"text-fg1 bg-button hover:bg-button-hover focus:bg-button-hover data-[state=on]:bg-button-secondary hover:data-[state=on]:bg-button-secondary data-[state=on]:text-button-secondary-foreground",outline:["border border-button-border bg-button text-button-foreground","hover:bg-background focus:bg-background"]},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}});function sd({className:e,variant:t,size:n,...s}){return c.jsx(tu.Root,{"data-slot":"toggle",className:re(Dg({variant:t,size:n,className:e})),...s})}function $g(e){const[t,n]=v.useState(()=>e.getPublishPermissions());return v.useEffect(()=>{const s=()=>{n(e.getPublishPermissions())},r=()=>{s()};return e.on("connection.connected",r),e.on("connection.disconnected",r),()=>{e.off("connection.connected",r),e.off("connection.disconnected",r)}},[e]),t}function rd(e){const[t,n]=v.useState(()=>e.getLocalParticipant()),[s,r]=v.useState(()=>e.getMicrophoneTrack());return v.useEffect(()=>{const i=()=>{const a=e.getLocalParticipant(),l=e.getMicrophoneTrack();console.log("🎤 useVoxketLocalParticipant: Updating state:",{hasParticipant:!!a,hasMicTrack:!!l,isMicEnabled:e.isMicrophoneEnabled,trackPublications:a?a.trackPublications.size:0}),n(a),r(l)};i(),e.on("connection.connected",i),e.on("connection.disconnected",i),e.on("track.muted",i),e.on("track.unmuted",i);const o=e.getRoom();if(o){const a=()=>{console.log("🎤 Track published, updating participant state"),i()},l=()=>{console.log("🎤 Track unpublished, updating participant state"),i()};return o.on("localTrackPublished",a),o.on("localTrackUnpublished",l),()=>{e.off("connection.connected",i),e.off("connection.disconnected",i),e.off("track.muted",i),e.off("track.unmuted",i),o.off("localTrackPublished",a),o.off("localTrackUnpublished",l)}}else return()=>{e.off("connection.connected",i),e.off("connection.disconnected",i),e.off("track.muted",i),e.off("track.unmuted",i)}},[e]),{localParticipant:t,microphoneTrack:s}}function Pn(e,t,n){const[s,r]=v.useState(!1),[i,o]=v.useState(!1);return v.useEffect(()=>{const l=()=>{let d=!1;switch(t){case"microphone":d=e.isMicrophoneEnabled;break;case"camera":d=e.isCameraEnabled;break;case"screenShare":d=e.isScreenShareEnabled;break}console.log(`useVoxketTrackToggle: ${t} enabled state updated to:`,d),r(d)};return l(),e.on("track.muted",l),e.on("track.unmuted",l),e.on("connection.connected",l),()=>{e.off("track.muted",l),e.off("track.unmuted",l),e.off("connection.connected",l)}},[e,t]),{enabled:s,pending:i,toggle:async l=>{var d;try{o(!0);const u=l!==void 0?l:!s;switch(t){case"microphone":await e.toggleMicrophone(u);break;case"camera":await e.toggleCamera(u);break;case"screenShare":u?await e.startScreenShare():await e.stopScreenShare();break}}catch(u){(d=n==null?void 0:n.onDeviceError)==null||d.call(n,u)}finally{o(!1)}}}}function od(e){const[t,n]=v.useState(()=>e.getRoom()),[s,r]=v.useState(()=>e.getConnectionState());return v.useEffect(()=>{const i=()=>{n(e.getRoom()),r(e.getConnectionState())};return e.on("connection.connected",i),e.on("connection.disconnected",i),e.on("connection.connecting",i),()=>{e.off("connection.connected",i),e.off("connection.disconnected",i),e.off("connection.connecting",i)}},[e]),t}function Fg(e,t){const[n,s]=v.useState([]),[r,i]=v.useState("");return v.useEffect(()=>{var d;const a=async()=>{try{const u=t==="audioinput"?await e.getAudioInputDevices():await e.getVideoInputDevices();s(u)}catch(u){console.error("Failed to load devices:",u)}};a();const l=()=>{a()};return(d=navigator.mediaDevices)==null||d.addEventListener("devicechange",l),()=>{var u;(u=navigator.mediaDevices)==null||u.removeEventListener("devicechange",l)}},[e,t]),{devices:n,activeDeviceId:r,setActiveMediaDevice:async a=>{try{t==="audioinput"?await e.setAudioInputDevice(a):await e.setVideoInputDevice(a),i(a)}catch(l){console.error("Failed to set device:",l)}}}}function Og(e){const{preventSave:t=!1}=e||{};return{saveAudioInputEnabled:o=>{t||localStorage.setItem("voxket-audio-input-enabled",o.toString())},saveAudioInputDeviceId:o=>{t||localStorage.setItem("voxket-audio-input-device-id",o)},saveVideoInputEnabled:o=>{t||localStorage.setItem("voxket-video-input-enabled",o.toString())},saveVideoInputDeviceId:o=>{t||localStorage.setItem("voxket-video-input-device-id",o)}}}function id(e){const[t,n]=v.useState(()=>e.getIsAgentConnected()),[s,r]=v.useState(()=>e.getCurrentSession()),[i,o]=v.useState(()=>e.getCurrentAgentInfo()),[a,l]=v.useState(()=>e.getAgentState()),[d,u]=v.useState(()=>e.getAgentAudioTrack()),[h,m]=v.useState(()=>e.getAgentVideoTrack());return v.useEffect(()=>{const g=()=>{const T=e.getIsAgentConnected(),C=e.getCurrentSession(),w=e.getCurrentAgentInfo(),A=e.getAgentState(),V=e.getAgentAudioTrack(),E=e.getAgentVideoTrack();console.log("🤖 useVoxketVoiceAssistant: Updating state:",{isAgentConnected:T,hasSession:!!C,sessionId:C==null?void 0:C.id,hasAgentInfo:!!w,agentState:A,hasAudioTrack:!!V,hasVideoTrack:!!E}),n(T),r(C),o(w),l(A),u(V),m(E)};g();const x=()=>{console.log("🤖 useVoxketVoiceAssistant: Agent connected event"),g()},f=()=>{console.log("🤖 useVoxketVoiceAssistant: Agent disconnected event"),g()},b=()=>{console.log("🤖 useVoxketVoiceAssistant: Session changed event"),g()},k=()=>{console.log("🤖 useVoxketVoiceAssistant: Connection changed event"),g()},S=()=>{console.log("🤖 useVoxketVoiceAssistant: Agent state changed event"),g()};return e.on("agent.connected",x),e.on("agent.speaking",x),e.on("agent.thinking",x),e.on("agent.state.changed",S),e.on("connection.disconnected",f),e.on("session.created",b),e.on("session.ended",b),e.on("session.state.changed",b),e.on("connection.connected",k),()=>{e.off("agent.connected",x),e.off("agent.speaking",x),e.off("agent.thinking",x),e.off("agent.state.changed",S),e.off("connection.disconnected",f),e.off("session.created",b),e.off("session.ended",b),e.off("session.state.changed",b),e.off("connection.connected",k)}},[e]),{agent:{isActive:t,info:i},session:s,state:a,audioTrack:d,videoTrack:h}}function Lg(e){const[t,n]=v.useState(()=>e.getVideoTrackRefs()),[s,r]=v.useState(()=>e.getCameraTrackRefs()),[i,o]=v.useState(()=>e.getScreenShareTrackRefs());return v.useEffect(()=>{const a=()=>{const d=e.getVideoTrackRefs(),u=e.getCameraTrackRefs(),h=e.getScreenShareTrackRefs();console.log("📹 useVoxketVideoTracks: Updating tracks:",{videoCount:d.length,cameraCount:u.length,screenShareCount:h.length}),n(d),r(u),o(h)};a(),e.on("connection.connected",a),e.on("connection.disconnected",a),e.on("track.muted",a),e.on("track.unmuted",a),e.on("participant.joined",a),e.on("participant.left",a);const l=e.getRoom();if(l){const d=()=>{console.log("📹 Track event, updating video tracks"),a()};return l.on("localTrackPublished",d),l.on("localTrackUnpublished",d),l.on("trackPublished",d),l.on("trackUnpublished",d),l.on("trackSubscribed",d),l.on("trackUnsubscribed",d),()=>{e.off("connection.connected",a),e.off("connection.disconnected",a),e.off("track.muted",a),e.off("track.unmuted",a),e.off("participant.joined",a),e.off("participant.left",a),l.off("localTrackPublished",d),l.off("localTrackUnpublished",d),l.off("trackPublished",d),l.off("trackUnpublished",d),l.off("trackSubscribed",d),l.off("trackUnsubscribed",d)}}else return()=>{e.off("connection.connected",a),e.off("connection.disconnected",a),e.off("track.muted",a),e.off("track.unmuted",a),e.off("participant.joined",a),e.off("participant.left",a)}},[e]),{videoTrackRefs:t,cameraTrackRefs:s,screenShareTrackRefs:i}}function ya({...e}){return c.jsx(Qe.Root,{"data-slot":"select",...e})}function xa({...e}){return c.jsx(Qe.Value,{"data-slot":"select-value",...e})}function ba({className:e,size:t="default",children:n,...s}){return c.jsxs(Qe.Trigger,{"data-slot":"select-trigger","data-size":t,className:re(["flex w-fit cursor-pointer items-center justify-between gap-2","rounded-full px-3 py-2 text-sm whitespace-nowrap","bg-button transition-[color,border,background-color]","disabled:cursor-not-allowed disabled:opacity-50","hover:bg-muted hover:text-muted-foreground","!focus:ring-0 !focus-visible:ring-0 !focus:border-none !focus-visible:border-none !ring-0 !border-none !outline-none","aria-invalid:ring-0 dark:aria-invalid:ring-0","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","[&:not([class*='text-'])_svg:not([class*='text-'])]:text-muted-foreground","[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"],e),...s,children:[n,c.jsx(Qe.Icon,{asChild:!0,children:c.jsx(Io,{weight:"bold",className:"size-4 transition-colors"})})]})}function va({className:e,children:t,position:n="popper",...s}){return c.jsx(Qe.Portal,{children:c.jsxs(Qe.Content,{"data-slot":"select-content",className:re(["bg-[#18182a]/90 backdrop-blur-md text-white border border-[#23233a] shadow-2xl","relative z-50 overflow-x-hidden overflow-y-auto rounded-xl","max-h-(--radix-select-content-available-height) min-w-[8rem]","origin-(--radix-select-content-transform-origin)","data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95","data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95","data-[side=top]:slide-in-from-bottom-2","data-[side=right]:slide-in-from-left-2","data-[side=bottom]:slide-in-from-top-2","data-[side=left]:slide-in-from-right-2"],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,...s,children:[c.jsx(_g,{}),c.jsx(Qe.Viewport,{className:re("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),c.jsx(Bg,{})]})})}function wa({className:e,children:t,...n}){return c.jsxs(Qe.Item,{"data-slot":"select-item",className:re(["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","cursor-pointer disabled:cursor-not-allowed","focus:bg-accent focus:text-accent-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50","*:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2","[&_svg:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"],e),...n,children:[c.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:c.jsx(Qe.ItemIndicator,{children:c.jsx(Bl,{className:"size-4",weight:"bold"})})}),c.jsx(Qe.ItemText,{children:t})]})}function _g({className:e,...t}){return c.jsx(Qe.ScrollUpButton,{"data-slot":"select-scroll-up-button",className:re("flex cursor-default items-center justify-center py-1",e),...t,children:c.jsx(Ll,{className:"size-4",weight:"bold"})})}function Bg({className:e,...t}){return c.jsx(Qe.ScrollDownButton,{"data-slot":"select-scroll-down-button",className:re("flex cursor-default items-center justify-center py-1",e),...t,children:c.jsx(Io,{className:"size-4",weight:"bold"})})}const Sa=qr.cva(["w-full rounded-full px-3 py-2 text-sm cursor-pointer","disabled:not-allowed hover:bg-button-hover focus:bg-button-hover"],{variants:{size:{default:"w-[180px]",sm:"w-auto"}},defaultVariants:{size:"default"}});function Ca({kind:e,track:t,requestPermissions:n,onError:s,client:r,...i}){const o=i.size||"default";if(!r)return c.jsxs(ya,{disabled:!0,children:[c.jsx(ba,{className:re(Sa({size:o}),i.className),children:c.jsx(xa,{placeholder:`Select a ${e}`})}),c.jsx(va,{children:c.jsx(wa,{value:"none",children:"No devices available"})})]});const{devices:a,activeDeviceId:l,setActiveMediaDevice:d}=Fg(r,e==="audioinput"?"audioinput":"videoinput");return c.jsxs(ya,{value:l,onValueChange:d,children:[c.jsx(ba,{className:re(Sa({size:o}),i.className,"hover:bg"),children:o!=="sm"&&c.jsx(xa,{className:"font-mono text-sm",placeholder:`Select a ${e}`})}),c.jsx(va,{children:a.map(u=>c.jsx(wa,{value:u.deviceId,className:"font-mono text-xs",children:u.label},u.deviceId))})]})}function Hg(e,t,n=!1){if(n)return Do;switch(e){case U.Track.Source.Microphone:return t?Hl:Ul;case U.Track.Source.Camera:return t?Wl:Zl;case U.Track.Source.ScreenShare:return zl;default:return p.Fragment}}function ir({source:e,pressed:t,pending:n,className:s,...r}){const i=Hg(e,t??!1,n),o=e===U.Track.Source.Microphone&&!(t??!1)&&!n,a=e===U.Track.Source.Camera&&!(t??!1)&&!n;return p.useEffect(()=>{console.log(`TrackToggle for ${e} changed: pressed=${t}, pending=${n}, actualState=${t?"enabled":"disabled"}`)},[e,t,n]),c.jsxs(sd,{pressed:t,"aria-label":`Toggle ${e}`,className:re(s),...r,children:[c.jsx(i,{weight:"bold",className:re(n&&"animate-spin",o||a?"text-red-500":void 0)}),r.children]})}function Ug(e){return e?$g(e):{camera:!0,microphone:!0,screenShare:!0,data:!0}}function zg(e={}){const{controls:t,saveUserChoices:n=!0,client:s}=e,r={leave:!0,...t};if(!s)return{micTrackRef:{participant:void 0,source:U.Track.Source.Microphone,publication:void 0},visibleControls:r,microphoneToggle:{enabled:!1,pending:!1,toggle:async()=>{}},cameraToggle:{enabled:!1,pending:!1,toggle:async()=>{}},screenShareToggle:{enabled:!1,pending:!1,toggle:async()=>{}},handleDisconnect:()=>{},handleAudioDeviceChange:()=>{},handleVideoDeviceChange:()=>{}};const{microphoneTrack:i,localParticipant:o}=rd(s),a=Ug(s);od(s);const l=Pn(s,"microphone",{onDeviceError:A=>{var V;return(V=e.onDeviceError)==null?void 0:V.call(e,{source:U.Track.Source.Microphone,error:A})}}),d=Pn(s,"camera",{onDeviceError:A=>{var V;return(V=e.onDeviceError)==null?void 0:V.call(e,{source:U.Track.Source.Camera,error:A})}}),u=Pn(s,"screenShare",{onDeviceError:A=>{var V;return(V=e.onDeviceError)==null?void 0:V.call(e,{source:U.Track.Source.ScreenShare,error:A})}}),h=p.useMemo(()=>{let A;if(o){for(const[,V]of o.trackPublications)if(V.source===U.Track.Source.Microphone){A=V;break}}return console.log("🎤 Creating micTrackRef:",{hasParticipant:!!o,hasPublication:!!A,isTrackSubscribed:A==null?void 0:A.isSubscribed,isMuted:A==null?void 0:A.isMuted,trackSid:A==null?void 0:A.trackSid}),{participant:o??void 0,source:U.Track.Source.Microphone,publication:A}},[o,i]);r.microphone??(r.microphone=a.microphone),r.screenShare??(r.screenShare=a.screenShare),r.camera??(r.camera=a.camera),r.chat??(r.chat=a.data);const{saveAudioInputEnabled:m,saveAudioInputDeviceId:g,saveVideoInputEnabled:x,saveVideoInputDeviceId:f}=Og({preventSave:!n}),b=p.useCallback(()=>{s&&s.disconnect()},[s]),k=p.useCallback(A=>{g(A??"default"),s&&s.setAudioInputDevice(A)},[g,s]),S=p.useCallback(A=>{f(A??"default"),s&&s.setVideoInputDevice(A)},[f,s]),T=p.useCallback(async A=>{u.enabled&&await u.toggle(!1),await d.toggle(A),x(!d.enabled)},[d,x,u]),C=p.useCallback(async A=>{await l.toggle(A),m(!l.enabled)},[l,m]),w=p.useCallback(async A=>{d.enabled&&await d.toggle(!1),await u.toggle(A)},[d,u]);return{micTrackRef:h,visibleControls:r,cameraToggle:{...d,toggle:T},microphoneToggle:{...l,toggle:C},screenShareToggle:{...u,toggle:w},handleDisconnect:b,handleAudioDeviceChange:k,handleVideoDeviceChange:S}}const Wg={card:" bg-gradient-to-br from-black to-gray-900 border border-gray-900 w-full h-full flex flex-col justify-between overflow-hidden relative rounded-2xl shadow-lg",cardTopGradient:"pointer-events-none absolute top-0 left-0 w-full h-10 z-10 bg-gradient-to-b from-black/90 to-transparent",cardRadial:"absolute inset-0 bg-[radial-gradient(ellipse_at_center,_var(--tw-gradient-stops))] from-gray-800/20 via-transparent to-transparent",cardPurpleBlur:"absolute top-0 right-0 w-32 h-32 bg-gradient-to-br from-gray-600/10 to-transparent rounded-full blur-2xl",cardPinkBlur:"absolute bottom-0 left-0 w-24 h-24 bg-gradient-to-tr from-gray-500/8 to-transparent rounded-full blur-xl",cardPulse1:"absolute -top-2 -left-2 w-6 h-6 bg-gradient-to-br from-gray-400 to-gray-500 rounded-full blur-sm opacity-20 animate-pulse",cardPulse2:"absolute -bottom-2 -right-2 w-4 h-4 bg-gradient-to-br from-gray-500 to-gray-600 rounded-full blur-sm opacity-15 animate-pulse",main:"w-full flex flex-col items-center justify-center max-w-md mx-auto bg-gradient-to-br from-black to-gray-900 rounded-2xl shadow-xl p-0 overflow-hidden h-full",text:{primary:"text-white",secondary:"text-gray-300",muted:"text-gray-400",accent:"bg-clip-text text-transparent bg-gradient-to-r from-white via-gray-200 to-gray-300"},micButton:"absolute w-20 h-20 bg-gradient-to-br from-[#3B82F6] to-[#8B5CF6] rounded-full flex items-center justify-center hover:scale-105 transition-all duration-300 mic-glow shadow-2xl group",chatButton:"absolute w-20 h-20 bg-gradient-to-br from-[#10B981] to-[#059669] rounded-full flex items-center justify-center hover:scale-105 transition-all duration-300 shadow-2xl group",videoButton:"absolute w-20 h-20 bg-gradient-to-br from-[#8B5CF6] to-[#EC4899] rounded-full flex items-center justify-center hover:scale-105 transition-all duration-300 shadow-2xl group",popupTrigger:"bg-gradient-to-br from-[#3B82F6] to-[#8B5CF6] text-white font-medium hover:from-[#2563EB] hover:to-[#7C3AED] focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 focus:ring-offset-gray-900",promptSlider:"absolute w-full py-3 px-2 bg-gray-900 rounded-xl text-center text-white text-sm transition-opacity duration-700 ease-in-out border border-gray-600",statusIndicator:"w-2 h-2 bg-gray-400 rounded-full animate-pulse",pulseRings:{ring1:"w-32 h-32 rounded-full border-2 border-gray-600/30 pulse-ring",ring2:"absolute w-28 h-28 rounded-full border-2 border-gray-500/20 pulse-ring",ring3:"absolute w-24 h-24 rounded-full border-2 border-gray-400/15 pulse-ring"},controlBar:"border border-gray-600 rounded-3xl py-4 flex flex-col justify-end h-full bg-gray-900/50 backdrop-blur-sm",chatInput:{container:"bg-gray-900 w-full border-gray-600",textarea:"bg-gray-800 border-none text-white placeholder-gray-400",sendButton:"bg-blue-600 hover:bg-blue-700 disabled:bg-gray-600 disabled:opacity-50 text-white",attachButton:"text-gray-400 hover:text-gray-300 hover:bg-gray-700",endButton:"bg-red-900/20 hover:bg-red-800/30 text-red-400 border-red-800"},chatMessage:{own:"bg-gray-600 text-white",other:"bg-gray-700 text-white"},chatHeader:{container:"bg-gray-900 border-gray-600",backButton:"text-gray-400 hover:text-white hover:bg-gray-700"},spinner:"w-10 h-10 animate-spin text-gray-400 mb-2",suggestedResponse:{container:"bg-gray-800 text-blue-300 border-gray-700 hover:bg-gray-700 hover:text-white"},video:{container:"bg-gradient-to-br from-black to-gray-900 text-white",header:"border-gray-700 bg-gray-900/50",headerButton:"bg-gray-800 hover:bg-gray-700 text-gray-300",statusDot:"bg-green-500 animate-pulse",controlsBackground:"bg-gray-900/80 backdrop-blur-sm border-t border-gray-700",controlEnabled:"bg-blue-600 hover:bg-blue-700 text-white",controlDisabled:"bg-gray-700 hover:bg-gray-600 text-gray-300",endCall:"bg-red-600 hover:bg-red-700 text-white",tile:"bg-gray-800 border border-gray-700 shadow-lg",placeholder:"bg-gray-800 text-gray-300",avatar:"bg-gray-700 text-gray-300",nameOverlay:"bg-black/70 text-white",mutedIndicator:"bg-red-600/80 text-white"}},Zg={card:" bg-gradient-to-br from-white to-gray-50 border border-gray-200 w-full h-full flex flex-col justify-between overflow-hidden relative shadow-lg",cardTopGradient:"pointer-events-none absolute top-0 left-0 w-full h-10 z-10 bg-gradient-to-b from-white/90 to-transparent",cardRadial:"absolute inset-0 bg-[radial-gradient(ellipse_at_center,_var(--tw-gradient-stops))] from-blue-500/5 via-transparent to-transparent",cardPurpleBlur:"absolute top-0 right-0 w-32 h-32 bg-gradient-to-br from-purple-500/10 to-transparent rounded-full blur-2xl",cardPinkBlur:"absolute bottom-0 left-0 w-24 h-24 bg-gradient-to-tr from-pink-500/8 to-transparent rounded-full blur-xl",cardPulse1:"absolute -top-2 -left-2 w-6 h-6 bg-gradient-to-br from-blue-500 to-purple-500 rounded-full blur-sm opacity-30 animate-pulse",cardPulse2:"absolute -bottom-2 -right-2 w-4 h-4 bg-gradient-to-br from-pink-500 to-purple-500 rounded-full blur-sm opacity-20 animate-pulse",main:"w-full flex flex-col items-center justify-center max-w-md mx-auto bg-gradient-to-br from-white to-gray-50 rounded-2xl shadow-xl p-0 overflow-hidden h-full",text:{primary:"text-gray-900",secondary:"text-gray-700",muted:"text-gray-500",accent:"bg-clip-text text-transparent bg-gradient-to-r from-blue-600 via-purple-600 to-pink-600"},micButton:"absolute text-white w-20 h-20 bg-gradient-to-br from-[#3B82F6] to-[#8B5CF6] rounded-full flex items-center justify-center hover:scale-105 transition-all duration-300 mic-glow shadow-2xl group",chatButton:"absolute text-white w-20 h-20 bg-gradient-to-br from-[#10B981] to-[#059669] rounded-full flex items-center justify-center hover:scale-105 transition-all duration-300 shadow-2xl group",videoButton:"absolute text-white w-20 h-20 bg-gradient-to-br from-[#8B5CF6] to-[#EC4899] rounded-full flex items-center justify-center hover:scale-105 transition-all duration-300 shadow-2xl group",popupTrigger:"bg-gradient-to-br from-[#3B82F6] to-[#8B5CF6] text-white font-medium hover:from-[#2563EB] hover:to-[#7C3AED] focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 focus:ring-offset-white",promptSlider:"absolute w-full py-3 px-2 bg-gray-100 rounded-xl text-center text-gray-700 text-sm transition-opacity duration-700 ease-in-out border border-gray-200",statusIndicator:"w-2 h-2 bg-green-500 rounded-full animate-pulse",pulseRings:{ring1:"w-32 h-32 rounded-full border-2 border-blue-500/20 pulse-ring",ring2:"absolute w-28 h-28 rounded-full border-2 border-purple-500/15 pulse-ring",ring3:"absolute w-24 h-24 rounded-full border-2 border-pink-500/10 pulse-ring"},controlBar:"border border-gray-200 rounded-3xl py-4 flex flex-col justify-end h-full bg-white/80 backdrop-blur-sm",chatInput:{container:"bg-white/90 border-gray-200 shadow-sm",textarea:"bg-white border-none text-gray-900 placeholder-gray-500 ",sendButton:"bg-blue-600 hover:bg-blue-700 disabled:bg-gray-300 disabled:opacity-50 text-white",attachButton:"text-gray-500 hover:text-gray-700 hover:bg-gray-100 bg-blue-50",endButton:"bg-red-50 hover:bg-red-100 text-red-600 border-red-200"},chatMessage:{own:"bg-blue-50 text-gray-900 border border-blue-100",other:"bg-gray-50 text-gray-900 border border-gray-200"},chatHeader:{container:"bg-white border-gray-200",backButton:"text-gray-500 hover:text-gray-700 hover:bg-gray-100"},spinner:"w-10 h-10 animate-spin text-blue-500 mb-2",suggestedResponse:{container:"bg-white text-blue-700 border-blue-200 hover:bg-blue-50 hover:text-blue-900"},video:{container:"bg-gradient-to-br from-white to-gray-50 text-gray-900",header:"border-gray-200 bg-white/80",headerButton:"bg-gray-100 hover:bg-gray-200 text-gray-600",statusDot:"bg-green-500 animate-pulse",controlsBackground:"bg-white/90 backdrop-blur-sm border-t border-gray-200",controlEnabled:"bg-blue-600 hover:bg-blue-700 text-white",controlDisabled:"bg-gray-200 hover:bg-gray-300 text-gray-600",endCall:"bg-red-600 hover:bg-red-700 text-white",tile:"bg-white border border-gray-200 shadow-sm",placeholder:"bg-gray-50 text-gray-600",avatar:"bg-gray-200 text-gray-600",nameOverlay:"bg-black/70 text-white",mutedIndicator:"bg-red-600/80 text-white"}},Gg={card:" text-white bg-gradient-to-br from-[#171727] to-[#12121F] border border-gray-800 w-full h-full flex flex-col justify-between overflow-hidden relative",cardTopGradient:"pointer-events-none absolute top-0 left-0 w-full h-10 z-10 bg-gradient-to-b from-[#171727]/90 to-transparent",cardRadial:"absolute inset-0 bg-[radial-gradient(ellipse_at_center,_var(--tw-gradient-stops))] from-[#3B82F6]/15 via-transparent to-transparent",cardPurpleBlur:"absolute top-0 right-0 w-32 h-32 bg-gradient-to-br from-[#8B5CF6]/25 to-transparent rounded-full blur-2xl",cardPinkBlur:"absolute bottom-0 left-0 w-24 h-24 bg-gradient-to-tr from-[#EC4899]/20 to-transparent rounded-full blur-xl",cardPulse1:"absolute -top-2 -left-2 w-6 h-6 bg-gradient-to-br from-[#3B82F6] to-[#8B5CF6] rounded-full blur-sm opacity-50 animate-pulse",cardPulse2:"absolute -bottom-2 -right-2 w-4 h-4 bg-gradient-to-br from-[#EC4899] to-[#8B5CF6] rounded-full blur-sm opacity-40 animate-pulse",main:"w-full flex flex-col items-center justify-center max-w-md mx-auto bg-gradient-to-br from-[#171727] to-[#12121F] rounded-2xl shadow-xl p-0 overflow-hidden h-full",text:{primary:"text-white",secondary:"text-gray-300",muted:"text-gray-400",accent:"bg-clip-text text-transparent bg-gradient-to-r from-[#3B82F6] via-[#8B5CF6] to-[#EC4899]"},micButton:"absolute w-20 h-20 bg-gradient-to-br from-[#3B82F6] to-[#8B5CF6] rounded-full flex items-center justify-center hover:scale-105 transition-all duration-300 mic-glow shadow-2xl group",chatButton:"absolute w-20 h-20 bg-gradient-to-br from-[#10B981] to-[#059669] rounded-full flex items-center justify-center hover:scale-105 transition-all duration-300 shadow-2xl group",videoButton:"absolute w-20 h-20 bg-gradient-to-br from-[#8B5CF6] to-[#EC4899] rounded-full flex items-center justify-center hover:scale-105 transition-all duration-300 shadow-2xl group",popupTrigger:"bg-gradient-to-br from-[#3B82F6] to-[#8B5CF6] text-white font-medium hover:from-[#2563EB] hover:to-[#7C3AED] focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 focus:ring-offset-gray-900 shadow-xl",promptSlider:"absolute w-full py-3 px-2 bg-[#1E1E2E] rounded-xl text-center text-gray-200 text-sm transition-opacity duration-700 ease-in-out border border-gray-700",statusIndicator:"w-2 h-2 bg-[#10B981] rounded-full animate-pulse",pulseRings:{ring1:"w-32 h-32 rounded-full border-2 border-[#3B82F6]/40 pulse-ring",ring2:"absolute w-28 h-28 rounded-full border-2 border-[#8B5CF6]/30 pulse-ring",ring3:"absolute w-24 h-24 rounded-full border-2 border-[#EC4899]/20 pulse-ring"},controlBar:"border border-border rounded-3xl py-4 flex flex-col justify-end h-full",chatInput:{container:"bg-[#1E1E2E] border-gray-700",textarea:"bg-[#1E1E2E] border-none text-white placeholder-gray-400",sendButton:"bg-[#3B82F6] hover:bg-[#2563EB] disabled:bg-gray-600 disabled:opacity-50 text-white",attachButton:"text-gray-400 hover:text-gray-300 hover:bg-gray-700",endButton:"bg-red-900/20 hover:bg-red-800/30 text-red-400 border-red-800"},chatMessage:{own:"bg-[#1E1E2E]/80 text-white",other:"bg-[#1E1E2E] text-white border border-gray-700"},chatHeader:{container:"bg-[#1E1E2E] border-gray-700",backButton:"text-gray-400 hover:text-white hover:bg-gray-700"},spinner:"w-10 h-10 animate-spin text-blue-400 mb-2",suggestedResponse:{container:"bg-[#221f3f] text-white border-none"},video:{container:"bg-gradient-to-br from-[#171727] to-[#12121F] text-white",header:"border-gray-700 bg-[#1E1E2E]/80",headerButton:"bg-[#1E1E2E] hover:bg-gray-700 text-gray-300",statusDot:"bg-[#10B981] animate-pulse",controlsBackground:"bg-[#1E1E2E]/90 backdrop-blur-sm border-t border-gray-700",controlEnabled:"bg-[#3B82F6] hover:bg-[#2563EB] text-white",controlDisabled:"bg-gray-700 hover:bg-gray-600 text-gray-300",endCall:"bg-red-600 hover:bg-red-700 text-white",tile:"bg-[#1E1E2E] border border-gray-700 shadow-xl",placeholder:"bg-[#1E1E2E] text-gray-300",avatar:"bg-gray-700 text-gray-300",nameOverlay:"bg-black/70 text-white",mutedIndicator:"bg-red-600/80 text-white"}},ka={dark:Wg,light:Zg,vox:Gg};function Le(e){return ka[e]||ka.vox}function Kg({onSend:e,disabled:t=!1,className:n,placeholder:s="Type a message..."}){const[r,i]=p.useState(""),[o,a]=p.useState(!1),l=async u=>{if(u.preventDefault(),r.trim()&&!t&&!o){a(!0);try{await e(r.trim()),i("")}catch(h){console.error("Failed to send message:",h)}finally{a(!1)}}},d=u=>{u.key==="Enter"&&!u.shiftKey&&(u.preventDefault(),l(u))};return c.jsxs("form",{onSubmit:l,className:re("flex w-full",n),children:[c.jsx("input",{type:"text",value:r,onChange:u=>i(u.target.value),onKeyDown:d,disabled:t||o,placeholder:s,className:"flex-1 px-2 py-1 text-sm bg-transparent border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-1 focus:ring-blue-500 disabled:opacity-50"}),c.jsx(Ig,{type:"submit",size:"sm",disabled:!r.trim()||t||o,className:"ml-2 px-2 py-1 text-xs",children:o?"...":"Send"})]})}function Yg({controls:e,saveUserChoices:t=!0,capabilities:n,className:s,onSendMessage:r,onChatOpenChange:i,onDisconnect:o,onDeviceError:a,theme:l="vox",client:d,...u}){const[h,m]=p.useState(!1),[g,x]=p.useState(!1),f=Le(l),{micTrackRef:b,visibleControls:k,cameraToggle:S,microphoneToggle:T,screenShareToggle:C,handleAudioDeviceChange:w,handleVideoDeviceChange:A,handleDisconnect:V}=zg({controls:e,saveUserChoices:t,client:d}),E=async F=>{x(!0);try{await(r==null?void 0:r(F))}finally{x(!1)}};return p.useEffect(()=>{i==null||i(h)},[h,i]),p.useEffect(()=>{var F,y,R,H;console.log("🎤 AgentControlBar: micTrackRef changed:",{hasParticipant:!!b.participant,hasPublication:!!b.publication,source:b.source,isSubscribed:(F=b.publication)==null?void 0:F.isSubscribed,isMuted:(y=b.publication)==null?void 0:y.isMuted,trackSid:(R=b.publication)==null?void 0:R.trackSid,hasTrack:!!((H=b.publication)!=null&&H.track)})},[b]),c.jsxs("div",{"aria-label":"Voice assistant controls",className:re(f.controlBar,s),...u,children:[n.suportsChatInput&&c.jsxs("div",{"data-inert":h?void 0:"true",className:re("overflow-hidden transition-[height] relative duration-300 ease-in-out",h?"h-[56px] mb-2":"h-0"),children:[c.jsx("div",{className:"flex h-8 px-3 w-full",children:c.jsx(Kg,{onSend:E,disabled:g,className:re("w-full",f.chatInput),placeholder:"Type a message..."})}),c.jsx("hr",{className:"border-border my-1 mx-3"})]}),c.jsxs("div",{className:re("flex flex-row items-center gap-2 rounded-2xl mx-auto border-none backdrop-blur-lg px-2 py-1",l==="light"?"bg-white/80":"bg-[#18182a]/80"),children:[c.jsxs("div",{className:"flex gap-y-2 justify-start",children:[k.microphone&&c.jsxs("div",{className:"flex gap-y-2 items-center rounded-full overflow-hidden border-none ",children:[c.jsx(ir,{variant:"primary",source:U.Track.Source.Microphone,pressed:T.enabled,disabled:T.pending,onPressedChange:T.toggle,className:"w-auto py-1 rounded-none border-none bg-transparent text-inherit focus:bg-primary/80 hover:bg-primary/80 transition-colors"}),c.jsx(Ze.BarVisualizer,{barCount:3,trackRef:b,options:{minHeight:5},className:"flex h-full w-auto items-center justify-center gap-x-0.5",children:c.jsx("span",{className:re(["h-full w-0.5 origin-center rounded-2xl","bg-white","group-data-[state=on]/track:bg-white group-data-[state=off]/track:bg-white","data-lk-muted:bg-muted"])})}),c.jsx(Ca,{size:"sm",kind:"audioinput",client:d,onError:a?F=>F instanceof Error?a({source:U.Track.Source.Microphone,error:F}):void 0:void 0,onActiveDeviceChange:w,className:re(["h-full py-1 rounded-none border-none bg-transparent text-inherit focus:bg-primary/80 hover:bg-primary/30 transition-colors","min-w-[2.5rem]"])})]}),n.suportsVideoInput&&k.camera&&c.jsxs("div",{className:"flex items-center rounded-full overflow-hidden border-none ",children:[c.jsx(ir,{variant:"primary",source:U.Track.Source.Camera,pressed:S.enabled,pending:S.pending,disabled:S.pending,onPressedChange:S.toggle,className:"w-auto py-1 rounded-none border-none bg-transparent text-inherit focus:bg-primary/80 hover:bg-primary/80 transition-colors"}),c.jsx(Ca,{size:"sm",kind:"videoinput",client:d,onError:a?F=>F instanceof Error?a({source:U.Track.Source.Camera,error:F}):void 0:void 0,onActiveDeviceChange:A,className:re(["h-full py-1 rounded-none border-none bg-transparent text-inherit focus:bg-primary/80 hover:bg-primary/80 transition-colors","min-w-[2.5rem]"])})]}),n.suportsScreenShare&&k.screenShare&&c.jsx("div",{className:"flex items-center rounded-full overflow-hidden border-none ",children:c.jsx(ir,{variant:"secondary",source:U.Track.Source.ScreenShare,pressed:C.enabled,disabled:C.pending,onPressedChange:C.toggle,className:"w-auto py-1 disabled:opacity-70 rounded-none border-none bg-transparent text-inherit focus:bg-primary/80 hover:bg-primary/80 transition-colors"})})]}),k.chat&&c.jsx("div",{className:"flex items-center rounded-full overflow-hidden bg-secondary text-secondary-foreground border-none ",children:c.jsx(sd,{variant:"secondary","aria-label":"Toggle chat",pressed:h,onPressedChange:F=>{m(F)},className:"aspect-square h-full py-1 rounded-none border-none bg-transparent text-inherit focus:bg-secondary/80 hover:bg-secondary/80 transition-colors flex items-center",children:c.jsx(_l,{weight:"bold",className:"h-4 w-4"})})})]})]})}const ad=v.forwardRef(({state:e,audioTrack:t,className:n},s)=>c.jsx("div",{ref:s,className:re("",n),children:t?c.jsx(Ze.BarVisualizer,{barCount:5,state:e,options:{minHeight:5},trackRef:t,className:re("flex aspect-video w-40 items-center justify-center gap-1"),children:c.jsx("span",{className:re(["bg-[#6721a4] min-h-2 w-2 rounded-full","origin-center transition-colors duration-250 ease-linear","data-[lk-highlighted=true]:bg-[#5c64f6]","data-[lk-muted=true]:bg-[#222222]"])})}):c.jsx("div",{className:re("flex aspect-video w-40 items-center justify-center"),children:c.jsx("div",{className:"flex flex-col items-center justify-center",children:c.jsx("div",{className:"flex gap-1",children:Array.from({length:5}).map((r,i)=>c.jsx("span",{className:re(["bg-[#6721a4] min-h-2 w-2 rounded-full","origin-center transition-colors duration-250 ease-linear",e==="speaking"&&"animate-pulse bg-[#5c64f6]",e==="thinking"&&"animate-pulse bg-yellow-500"])},i))})})})}));ad.displayName="AgentTile";const qg=({videoTrack:e,className:t,ref:n})=>{var s,r;return!e||!e.publication||!e.participant?c.jsx("div",{ref:n,className:re(t),children:c.jsx("div",{className:"w-full h-full bg-gray-200 rounded-md flex items-center justify-center",children:c.jsx("span",{className:"text-gray-500",children:"No video available"})})}):c.jsx("div",{ref:n,className:re(t),children:c.jsx(Ze.VideoTrack,{trackRef:e,width:((s=e.publication.dimensions)==null?void 0:s.width)??0,height:((r=e.publication.dimensions)==null?void 0:r.height)??0,className:"rounded-md"})})},Xg=ue.create(Ze.VideoTrack),Jg=({trackRef:e,className:t,ref:n})=>{var s,r;return c.jsx("div",{className:re("bg-muted overflow-hidden rounded-md",t),children:c.jsx(Xg,{ref:n,trackRef:e,width:((s=e==null?void 0:e.publication.dimensions)==null?void 0:s.width)??0,height:((r=e==null?void 0:e.publication.dimensions)==null?void 0:r.height)??0,className:re("h-full w-auto")})})},Ta=ue.create(Jg),Qg=ue.create(ad),e0=ue.create(qg),ft={initial:{opacity:0,scale:0},animate:{opacity:1,scale:1},exit:{opacity:0,scale:0},transition:{type:"spring",stiffness:675,damping:75,mass:1}},Kt={grid:["h-full w-full","grid gap-x-2 place-content-center","grid-cols-[1fr_1fr] grid-rows-[90px_1fr_90px]"],agentChatOpenWithSecondTile:["col-start-1 row-start-1","self-center justify-self-end"],agentChatOpenWithoutSecondTile:["col-start-1 row-start-1","col-span-2","place-content-center"],agentChatClosed:["col-start-1 row-start-1","col-span-2 row-span-3","place-content-center"],secondTileChatOpen:["col-start-2 row-start-1","self-center justify-self-start"],secondTileChatClosed:["col-start-2 row-start-3","place-content-end"]};function t0(e,t){const{localParticipant:n}=rd(t),s=n==null?void 0:n.getTrackPublication(e);return v.useMemo(()=>s&&n?{source:e,participant:n,publication:s}:void 0,[e,s,n])}function n0({chatOpen:e,client:t}){const{agent:{isActive:n=!1}={},session:s,state:r="idle",audioTrack:i,videoTrack:o}=t?id(t):{agent:{isActive:!1},session:null,state:"idle",audioTrack:null,videoTrack:null},[a]=Ze.useTracks([U.Track.Source.ScreenShare]),l=t0(U.Track.Source.Camera,t),d=l&&!l.publication.isMuted,u=a&&!a.publication.isMuted,h=d||u,m=n||s&&s.state==="active",g={...ft.transition,delay:e?0:.15},x={...ft.animate,scale:e?1:3,transition:g},f={...ft.animate,transition:g},b=g,k=g,S=o&&o.publication&&o.participant;return c.jsx("div",{className:"relative w-full h-full z-10 flex items-center justify-center",children:c.jsx("div",{className:"relative w-full h-full max-w-2xl px-4 md:px-0",children:c.jsxs("div",{className:re(Kt.grid),children:[m&&c.jsx("div",{className:re(["grid",!e&&Kt.agentChatClosed,e&&h&&Kt.agentChatOpenWithSecondTile,e&&!h&&Kt.agentChatOpenWithoutSecondTile]),children:c.jsxs("div",{className:"h-full flex items-center justify-center",children:[!S&&c.jsx(Qg,{layoutId:"agent",...ft,animate:x,transition:b,state:r,audioTrack:i||void 0,className:re(e?"h-[90px]":"h-auto w-full")},"agent"),S&&o&&c.jsx(e0,{layoutId:"avatar",...ft,animate:f,transition:k,videoTrack:o,className:re(e?"h-[90px] [&>video]:h-[90px] [&>video]:w-auto":"h-auto w-full")},"avatar")]})}),c.jsx("div",{className:re(["grid",e&&Kt.secondTileChatOpen,!e&&Kt.secondTileChatClosed]),children:c.jsxs("div",{className:"w-full px-10 flex items-center shadow-2xl justify-between",children:[l&&d&&c.jsx(Ta,{layout:"position",layoutId:"camera",...ft,trackRef:l,transition:{...ft.transition,delay:e?0:.15},className:"h-[60px] order-1"},"camera"),u&&c.jsx(Ta,{layout:"position",layoutId:"screen",...ft,trackRef:a,transition:{...ft.transition,delay:e?0:.15},className:"h-[70px] order-2"},"screen")]})})]})})})}function Ea({timeout:e}){const[t,n]=v.useState(100),s=v.useRef(null),r=v.useRef(null);return v.useEffect(()=>{if(!e||e<=0)return;n(100),r.current=Date.now();const i=()=>{if(!e||r.current===null)return;const o=Date.now()-r.current,a=Math.max(0,100-o/e*100);n(a),a>0&&(s.current=requestAnimationFrame(i))};return s.current=requestAnimationFrame(i),()=>{s.current&&cancelAnimationFrame(s.current)}},[e]),!e||e<=0?null:c.jsx("div",{className:"w-full h-1 relative top-1 rounded-t-4xl bg-gray-700 overflow-hidden",children:c.jsx(ue.div,{className:"h-1 rounded-t-4xl dark:bg-white bg-blue-200 ",initial:{width:"100%"},animate:{width:`${Math.max(t,2)}%`},transition:{duration:.1,ease:"linear"},style:{minWidth:"2%"}})})}function fn({interaction:e,theme:t,onDismiss:n,client:s,addLocalMessage:r}){var a;if(!e||!e.isVisible||!e.component)return null;const[i]=p.useState(()=>Date.now()),o=()=>e.component?p.createElement(e.component,{handler:e.handler||void 0,timeout:e.timeout,loadData:async d=>{console.log("InteractiveComponent: Loading data:",d)},presentationMode:e.presentationMode,data:e.data,client:s,addLocalMessage:r}):c.jsx("div",{className:"p-4 text-red-500",children:"Component not found"});switch(e.presentationMode){case"fullscreen":return c.jsx(an,{children:c.jsxs(ue.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-[9999] bg-black",children:[c.jsxs("div",{className:"flex flex-col",children:[c.jsx(Ea,{timeout:e.timeout}),c.jsxs("div",{className:"flex items-center justify-between p-4 bg-black/80 text-white border-b border-gray-700",children:[c.jsx("h3",{className:"text-lg font-semibold",children:e.methodName.replace(/_/g," ").replace(/\b\w/g,l=>l.toUpperCase())}),c.jsx("button",{onClick:n||((a=e.handler)==null?void 0:a.dismissView),className:"p-2 rounded-full bg-white/20 hover:bg-white/30 text-white transition-colors",children:c.jsx($e.X,{className:"w-5 h-5"})})]})]}),c.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:o()})]})});case"embedded":default:return c.jsx(an,{children:c.jsx(ue.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},className:"w-fit rounded-lg ",children:c.jsxs("div",{children:[c.jsx(Ea,{timeout:e.timeout}),o()]})})})}}const s0=({logLevel:e}={})=>{const t=Ze.useRoomContext();p.useEffect(()=>(U.setLogLevel(e??"debug"),window.__lk_room=t,()=>{window.__lk_room=void 0}),[t,e])},Aa=e=>e,r0=()=>{let e=Aa;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Aa}}},o0=r0();function Et(e,...t){const n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(s=>n.searchParams.append("args[]",s)),`Minified MUI error #${e}; visit ${n} for the full message.`}function Ht(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":Et(7));return e.charAt(0).toUpperCase()+e.slice(1)}function i0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ns={exports:{}},ss={exports:{}},ge={};/** @license React v16.13.1
29
+ `),()=>{m.contains(x)&&m.removeChild(x)}},[t]),l.jsx(Qf,{isPresent:t,childRef:i,sizeRef:o,children:g.cloneElement(e,{ref:i})})}const th=({children:e,initial:t,isPresent:n,onExitComplete:s,custom:r,presenceAffectsLayout:i,mode:o,anchorX:a,root:c})=>{const d=eo(nh),u=w.useId();let f=!0,h=w.useMemo(()=>(f=!1,{id:u,initial:t,isPresent:n,custom:r,onExitComplete:p=>{d.set(p,!0);for(const x of d.values())if(!x)return;s&&s()},register:p=>(d.set(p,!1),()=>d.delete(p))}),[n,d,s]);return i&&f&&(h={...h}),w.useMemo(()=>{d.forEach((p,x)=>d.set(x,!1))},[n]),g.useEffect(()=>{!n&&!d.size&&s&&s()},[n]),o==="popLayout"&&(e=l.jsx(eh,{isPresent:n,anchorX:a,root:c,children:e})),l.jsx(Es.Provider,{value:h,children:e})};function nh(){return new Map}function Ql(e=!0){const t=w.useContext(Es);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:r}=t,i=w.useId();w.useEffect(()=>{if(e)return r(i)},[e]);const o=w.useCallback(()=>e&&s&&s(i),[i,s,e]);return!n&&s?[!1,o]:[!0]}const Jn=e=>e.key||"";function vi(e){const t=[];return w.Children.forEach(e,n=>{w.isValidElement(n)&&t.push(n)}),t}const Et=({children:e,custom:t,initial:n=!0,onExitComplete:s,presenceAffectsLayout:r=!0,mode:i="sync",propagate:o=!1,anchorX:a="left",root:c})=>{const[d,u]=Ql(o),f=w.useMemo(()=>vi(e),[e]),h=o&&!d?[]:f.map(Jn),p=w.useRef(!0),x=w.useRef(f),m=eo(()=>new Map),[b,S]=w.useState(f),[C,T]=w.useState(f);ll(()=>{p.current=!1,x.current=f;for(let j=0;j<C.length;j++){const V=Jn(C[j]);h.includes(V)?m.delete(V):m.get(V)!==!0&&m.set(V,!1)}},[C,h.length,h.join("-")]);const k=[];if(f!==b){let j=[...f];for(let V=0;V<C.length;V++){const E=C[V],_=Jn(E);h.includes(_)||(j.splice(V,0,E),k.push(E))}return i==="wait"&&k.length&&(j=k),T(vi(j)),S(f),null}process.env.NODE_ENV!=="production"&&i==="wait"&&C.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:v}=w.useContext(Qr);return l.jsx(l.Fragment,{children:C.map(j=>{const V=Jn(j),E=o&&!d?!1:f===C||h.includes(V),_=()=>{if(m.has(V))m.set(V,!0);else return;let y=!0;m.forEach(D=>{D||(y=!1)}),y&&(v==null||v(),T(x.current),o&&(u==null||u()),s&&s())};return l.jsx(th,{isPresent:E,initial:!p.current||n?void 0:!1,custom:t,presenceAffectsLayout:r,mode:i,root:c,onExitComplete:E?void 0:_,anchorX:a,children:j},V)})})},ec=w.createContext({strict:!1}),wi={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},dn={};for(const e in wi)dn[e]={isEnabled:t=>wi[e].some(n=>!!t[n])};function sh(e){for(const t in e)dn[t]={...dn[t],...e[t]}}const rh=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function vs(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||rh.has(e)}let tc=e=>!vs(e);function oh(e){typeof e=="function"&&(tc=t=>t.startsWith("on")?!vs(t):e(t))}try{oh(require("@emotion/is-prop-valid").default)}catch{}function ih(e,t,n){const s={};for(const r in e)r==="values"&&typeof e.values=="object"||(tc(r)||n===!0&&vs(r)||!t&&!vs(r)||e.draggable&&r.startsWith("onDrag"))&&(s[r]=e[r]);return s}const As=w.createContext({});function js(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Dn(e){return typeof e=="string"||Array.isArray(e)}const To=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Eo=["initial",...To];function Ns(e){return js(e.animate)||Eo.some(t=>Dn(e[t]))}function nc(e){return!!(Ns(e)||e.variants)}function ah(e,t){if(Ns(e)){const{initial:n,animate:s}=e;return{initial:n===!1||Dn(n)?n:void 0,animate:Dn(s)?s:void 0}}return e.inherit!==!1?t:{}}function lh(e){const{initial:t,animate:n}=ah(e,w.useContext(As));return w.useMemo(()=>({initial:t,animate:n}),[Si(t),Si(n)])}function Si(e){return Array.isArray(e)?e.join(" "):e}const $n={};function ch(e){for(const t in e)$n[t]=e[t],co(t)&&($n[t].isCSSVariable=!0)}function sc(e,{layout:t,layoutId:n}){return pn.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!$n[e]||e==="opacity")}const dh={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},uh=gn.length;function fh(e,t,n){let s="",r=!0;for(let i=0;i<uh;i++){const o=gn[i],a=e[o];if(a===void 0)continue;let c=!0;if(typeof a=="number"?c=a===(o.startsWith("scale")?1:0):c=parseFloat(a)===0,!c||n){const d=Gl(a,wo[o]);if(!c){r=!1;const u=dh[o]||o;s+=`${u}(${d}) `}n&&(t[o]=d)}}return s=s.trim(),n?s=n(t,r?"":s):r&&(s="none"),s}function Ao(e,t,n){const{style:s,vars:r,transformOrigin:i}=e;let o=!1,a=!1;for(const c in t){const d=t[c];if(pn.has(c)){o=!0;continue}else if(co(c)){r[c]=d;continue}else{const u=Gl(d,wo[c]);c.startsWith("origin")?(a=!0,i[c]=u):s[c]=u}}if(t.transform||(o||n?s.transform=fh(t,e.transform,n):s.transform&&(s.transform="none")),a){const{originX:c="50%",originY:d="50%",originZ:u=0}=i;s.transformOrigin=`${c} ${d} ${u}`}}const jo=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function rc(e,t,n){for(const s in t)!We(t[s])&&!sc(s,n)&&(e[s]=t[s])}function hh({transformTemplate:e},t){return w.useMemo(()=>{const n=jo();return Ao(n,t,e),Object.assign({},n.vars,n.style)},[t])}function mh(e,t){const n=e.style||{},s={};return rc(s,n,e),Object.assign(s,hh(e,t)),s}function gh(e,t){const n={},s=mh(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=s,n}const ph={offset:"stroke-dashoffset",array:"stroke-dasharray"},yh={offset:"strokeDashoffset",array:"strokeDasharray"};function xh(e,t,n=1,s=0,r=!0){e.pathLength=1;const i=r?ph:yh;e[i.offset]=ce.transform(-s);const o=ce.transform(t),a=ce.transform(n);e[i.array]=`${o} ${a}`}function oc(e,{attrX:t,attrY:n,attrScale:s,pathLength:r,pathSpacing:i=1,pathOffset:o=0,...a},c,d,u){if(Ao(e,a,d),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:h}=e;f.transform&&(h.transform=f.transform,delete f.transform),(h.transform||f.transformOrigin)&&(h.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),h.transform&&(h.transformBox=(u==null?void 0:u.transformBox)??"fill-box",delete f.transformBox),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),s!==void 0&&(f.scale=s),r!==void 0&&xh(f,r,i,o,!1)}const ic=()=>({...jo(),attrs:{}}),ac=e=>typeof e=="string"&&e.toLowerCase()==="svg";function bh(e,t,n,s){const r=w.useMemo(()=>{const i=ic();return oc(i,t,ac(s),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};rc(i,e.style,e),r.style={...i,...r.style}}return r}const vh=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function No(e){return typeof e!="string"||e.includes("-")?!1:!!(vh.indexOf(e)>-1||/[A-Z]/u.test(e))}function wh(e,t,n,{latestValues:s},r,i=!1){const a=(No(e)?bh:gh)(t,s,r,e),c=ih(t,typeof e=="string",i),d=e!==w.Fragment?{...c,...a,ref:n}:{},{children:u}=t,f=w.useMemo(()=>We(u)?u.get():u,[u]);return w.createElement(e,{...d,children:f})}function Ci(e){const t=[{},{}];return e==null||e.values.forEach((n,s)=>{t[0][s]=n.get(),t[1][s]=n.getVelocity()}),t}function Mo(e,t,n,s){if(typeof t=="function"){const[r,i]=Ci(s);t=t(n!==void 0?n:e.custom,r,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[r,i]=Ci(s);t=t(n!==void 0?n:e.custom,r,i)}return t}function ds(e){return We(e)?e.get():e}function Sh({scrapeMotionValuesFromProps:e,createRenderState:t},n,s,r){return{latestValues:Ch(n,s,r,e),renderState:t()}}function Ch(e,t,n,s){const r={},i=s(e,{});for(const h in i)r[h]=ds(i[h]);let{initial:o,animate:a}=e;const c=Ns(e),d=nc(e);t&&d&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let u=n?n.initial===!1:!1;u=u||o===!1;const f=u?a:o;if(f&&typeof f!="boolean"&&!js(f)){const h=Array.isArray(f)?f:[f];for(let p=0;p<h.length;p++){const x=Mo(e,h[p]);if(x){const{transitionEnd:m,transition:b,...S}=x;for(const C in S){let T=S[C];if(Array.isArray(T)){const k=u?T.length-1:0;T=T[k]}T!==null&&(r[C]=T)}for(const C in m)r[C]=m[C]}}}return r}const lc=e=>(t,n)=>{const s=w.useContext(As),r=w.useContext(Es),i=()=>Sh(e,t,s,r);return n?i():eo(i)};function Vo(e,t,n){var i;const{style:s}=e,r={};for(const o in s)(We(s[o])||t.style&&We(t.style[o])||sc(o,e)||((i=n==null?void 0:n.getValue(o))==null?void 0:i.liveStyle)!==void 0)&&(r[o]=s[o]);return r}const kh=lc({scrapeMotionValuesFromProps:Vo,createRenderState:jo});function cc(e,t,n){const s=Vo(e,t,n);for(const r in e)if(We(e[r])||We(t[r])){const i=gn.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;s[i]=e[r]}return s}const Th=lc({scrapeMotionValuesFromProps:cc,createRenderState:ic}),Eh=Symbol.for("motionComponentSymbol");function nn(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Ah(e,t,n){return w.useCallback(s=>{s&&e.onMount&&e.onMount(s),t&&(s?t.mount(s):t.unmount()),n&&(typeof n=="function"?n(s):nn(n)&&(n.current=s))},[t])}const Po=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),jh="framerAppearId",dc="data-"+Po(jh),uc=w.createContext({});function Nh(e,t,n,s,r){var m,b;const{visualElement:i}=w.useContext(As),o=w.useContext(ec),a=w.useContext(Es),c=w.useContext(ko).reducedMotion,d=w.useRef(null);s=s||o.renderer,!d.current&&s&&(d.current=s(e,{visualState:t,parent:i,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:c}));const u=d.current,f=w.useContext(uc);u&&!u.projection&&r&&(u.type==="html"||u.type==="svg")&&Mh(d.current,n,r,f);const h=w.useRef(!1);w.useInsertionEffect(()=>{u&&h.current&&u.update(n,a)});const p=n[dc],x=w.useRef(!!p&&!((m=window.MotionHandoffIsComplete)!=null&&m.call(window,p))&&((b=window.MotionHasOptimisedAnimation)==null?void 0:b.call(window,p)));return ll(()=>{u&&(h.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),u.scheduleRenderMicrotask(),x.current&&u.animationState&&u.animationState.animateChanges())}),w.useEffect(()=>{u&&(!x.current&&u.animationState&&u.animationState.animateChanges(),x.current&&(queueMicrotask(()=>{var S;(S=window.MotionHandoffMarkAsComplete)==null||S.call(window,p)}),x.current=!1),u.enteringChildren=void 0)}),u}function Mh(e,t,n,s){const{layoutId:r,layout:i,drag:o,dragConstraints:a,layoutScroll:c,layoutRoot:d,layoutCrossfade:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:fc(e.parent)),e.projection.setOptions({layoutId:r,layout:i,alwaysMeasureLayout:!!o||a&&nn(a),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:s,crossfade:u,layoutScroll:c,layoutRoot:d})}function fc(e){if(e)return e.options.allowProjection!==!1?e.projection:fc(e.parent)}function Ys(e,{forwardMotionProps:t=!1}={},n,s){n&&sh(n);const r=No(e)?Th:kh;function i(a,c){let d;const u={...w.useContext(ko),...a,layoutId:Vh(a)},{isStatic:f}=u,h=lh(a),p=r(a,f);if(!f&&to){Ph(u,n);const x=Rh(u);d=x.MeasureLayout,h.visualElement=Nh(e,p,u,s,x.ProjectionNode)}return l.jsxs(As.Provider,{value:h,children:[d&&h.visualElement?l.jsx(d,{visualElement:h.visualElement,...u}):null,wh(e,a,Ah(p,h.visualElement,c),p,f,t)]})}i.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const o=w.forwardRef(i);return o[Eh]=e,o}function Vh({layoutId:e}){const t=w.useContext(Qr).id;return t&&e!==void 0?t+"-"+e:e}function Ph(e,t){const n=w.useContext(ec).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const s="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?hn(!1,s,"lazy-strict-mode"):xt(!1,s,"lazy-strict-mode")}}function Rh(e){const{drag:t,layout:n}=dn;if(!t&&!n)return{};const s={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function Ih(e,t){if(typeof Proxy>"u")return Ys;const n=new Map,s=(i,o)=>Ys(i,o,e,t),r=(i,o)=>(process.env.NODE_ENV!=="production"&&io(!1,"motion() is deprecated. Use motion.create() instead."),s(i,o));return new Proxy(r,{get:(i,o)=>o==="create"?s:(n.has(o)||n.set(o,Ys(o,void 0,e,t)),n.get(o))})}function hc({top:e,left:t,right:n,bottom:s}){return{x:{min:t,max:n},y:{min:e,max:s}}}function Dh({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function $h(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),s=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function qs(e){return e===void 0||e===1}function Ir({scale:e,scaleX:t,scaleY:n}){return!qs(e)||!qs(t)||!qs(n)}function $t(e){return Ir(e)||mc(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function mc(e){return ki(e.x)||ki(e.y)}function ki(e){return e&&e!=="0%"}function ws(e,t,n){const s=e-n,r=t*s;return n+r}function Ti(e,t,n,s,r){return r!==void 0&&(e=ws(e,r,s)),ws(e,n,s)+t}function Dr(e,t=0,n=1,s,r){e.min=Ti(e.min,t,n,s,r),e.max=Ti(e.max,t,n,s,r)}function gc(e,{x:t,y:n}){Dr(e.x,t.translate,t.scale,t.originPoint),Dr(e.y,n.translate,n.scale,n.originPoint)}const Ei=.999999999999,Ai=1.0000000000001;function Fh(e,t,n,s=!1){const r=n.length;if(!r)return;t.x=t.y=1;let i,o;for(let a=0;a<r;a++){i=n[a],o=i.projectionDelta;const{visualElement:c}=i.options;c&&c.props.style&&c.props.style.display==="contents"||(s&&i.options.layoutScroll&&i.scroll&&i!==i.root&&rn(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,gc(e,o)),s&&$t(i.latestValues)&&rn(e,i.latestValues))}t.x<Ai&&t.x>Ei&&(t.x=1),t.y<Ai&&t.y>Ei&&(t.y=1)}function sn(e,t){e.min=e.min+t,e.max=e.max+t}function ji(e,t,n,s,r=.5){const i=Ve(e.min,e.max,r);Dr(e,t,n,i,s)}function rn(e,t){ji(e.x,t.x,t.scaleX,t.scale,t.originX),ji(e.y,t.y,t.scaleY,t.scale,t.originY)}function pc(e,t){return hc($h(e.getBoundingClientRect(),t))}function Oh(e,t,n){const s=pc(e,n),{scroll:r}=t;return r&&(sn(s.x,r.offset.x),sn(s.y,r.offset.y)),s}const Ni=()=>({translate:0,scale:1,origin:0,originPoint:0}),on=()=>({x:Ni(),y:Ni()}),Mi=()=>({min:0,max:0}),De=()=>({x:Mi(),y:Mi()}),$r={current:null},yc={current:!1};function Lh(){if(yc.current=!0,!!to)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>$r.current=e.matches;e.addEventListener("change",t),t()}else $r.current=!1}const _h=new WeakMap;function Bh(e,t,n){for(const s in t){const r=t[s],i=n[s];if(We(r))e.addValue(s,r);else if(We(i))e.addValue(s,cn(r,{owner:e}));else if(i!==r)if(e.hasValue(s)){const o=e.getValue(s);o.liveStyle===!0?o.jump(r):o.hasAnimated||o.set(r)}else{const o=e.getStaticValue(s);e.addValue(s,cn(o!==void 0?o:r,{owner:e}))}}for(const s in n)t[s]===void 0&&e.removeValue(s);return t}const Vi=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Hh{scrapeMotionValuesFromProps(t,n,s){return{}}constructor({parent:t,props:n,presenceContext:s,reducedMotionConfig:r,blockInitialAnimation:i,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=bo,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const h=Ge.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,je.render(this.render,!1,!0))};const{latestValues:c,renderState:d}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=d,this.parent=t,this.props=n,this.presenceContext=s,this.depth=t?t.depth+1:0,this.reducedMotionConfig=r,this.options=a,this.blockInitialAnimation=!!i,this.isControllingVariants=Ns(n),this.isVariantNode=nc(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in f){const p=f[h];c[h]!==void 0&&We(p)&&p.set(c[h])}}mount(t){var n;this.current=t,_h.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((s,r)=>this.bindToMotionValue(r,s)),yc.current||Lh(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:$r.current,process.env.NODE_ENV!=="production"&&io(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var t;this.projection&&this.projection.unmount(),At(this.notifyUpdate),At(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const s=this.features[n];s&&(s.unmount(),s.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const s=pn.has(t);s&&this.onBindTransform&&this.onBindTransform();const r=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&je.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{r(),i&&i(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in dn){const n=dn[t];if(!n)continue;const{isEnabled:s,Feature:r}=n;if(!this.features[t]&&r&&s(this.props)&&(this.features[t]=new r(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):De()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<Vi.length;s++){const r=Vi[s];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);const i="on"+r,o=t[i];o&&(this.propEventSubscriptions[r]=this.on(r,o))}this.prevMotionValues=Bh(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const s=this.values.get(t);n!==s&&(s&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let s=this.values.get(t);return s===void 0&&n!==void 0&&(s=cn(n===null?void 0:n,{owner:this}),this.addValue(t,s)),s}readValue(t,n){let s=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return s!=null&&(typeof s=="string"&&(cl(s)||ul(s))?s=parseFloat(s):!Jf(s)&&jt.test(n)&&(s=Zl(t,n)),this.setBaseTarget(t,We(s)?s.get():s)),We(s)?s.get():s}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var i;const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const o=Mo(this.props,n,(i=this.presenceContext)==null?void 0:i.custom);o&&(s=o[t])}if(n&&s!==void 0)return s;const r=this.getBaseTargetFromProps(this.props,t);return r!==void 0&&!We(r)?r:this.initialValues[t]!==void 0&&s===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new oo),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){So.render(this.render)}}class xc extends Hh{constructor(){super(...arguments),this.KeyframeResolver=_f}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:s}){delete n[t],delete s[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;We(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function bc(e,{style:t,vars:n},s,r){const i=e.style;let o;for(o in t)i[o]=t[o];r==null||r.applyProjectionStyles(i,s);for(o in n)i.setProperty(o,n[o])}function Uh(e){return window.getComputedStyle(e)}class zh extends xc{constructor(){super(...arguments),this.type="html",this.renderInstance=bc}readValueFromInstance(t,n){var s;if(pn.has(n))return(s=this.projection)!=null&&s.isProjecting?Ar(n):sf(t,n);{const r=Uh(t),i=(co(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return pc(t,n)}build(t,n,s){Ao(t,n,s.transformTemplate)}scrapeMotionValuesFromProps(t,n,s){return Vo(t,n,s)}}const vc=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Wh(e,t,n,s){bc(e,t,void 0,s);for(const r in t.attrs)e.setAttribute(vc.has(r)?r:Po(r),t.attrs[r])}class Zh extends xc{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=De}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(pn.has(n)){const s=Wl(n);return s&&s.default||0}return n=vc.has(n)?n:Po(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,s){return cc(t,n,s)}build(t,n,s){oc(t,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(t,n,s,r){Wh(t,n,s,r)}mount(t){this.isSVGTag=ac(t.tagName),super.mount(t)}}const Gh=(e,t)=>No(e)?new Zh(t):new zh(t,{allowProjection:e!==w.Fragment});function an(e,t,n){const s=e.getProps();return Mo(s,t,n!==void 0?n:s.custom,e)}const Fr=e=>Array.isArray(e);function Kh(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,cn(n))}function Yh(e){return Fr(e)?e[e.length-1]||0:e}function qh(e,t){const n=an(e,t);let{transitionEnd:s={},transition:r={},...i}=n||{};i={...i,...s};for(const o in i){const a=Yh(i[o]);Kh(e,o,a)}}function Xh(e){return!!(We(e)&&e.add)}function Or(e,t){const n=e.getValue("willChange");if(Xh(n))return n.add(t);if(!n&&bt.WillChange){const s=new bt.WillChange("auto");e.addValue("willChange",s),s.add(t)}}function wc(e){return e.props[dc]}const Jh=e=>e!==null;function Qh(e,{repeat:t,repeatType:n="loop"},s){const r=e.filter(Jh),i=t&&n!=="loop"&&t%2===1?0:r.length-1;return r[i]}const em={type:"spring",stiffness:500,damping:25,restSpeed:10},tm=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),nm={type:"keyframes",duration:.8},sm={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},rm=(e,{keyframes:t})=>t.length>2?nm:pn.has(e)?e.startsWith("scale")?tm(t[1]):em:sm;function om({when:e,delay:t,delayChildren:n,staggerChildren:s,staggerDirection:r,repeat:i,repeatType:o,repeatDelay:a,from:c,elapsed:d,...u}){return!!Object.keys(u).length}const Ro=(e,t,n,s={},r,i)=>o=>{const a=vo(s,e)||{},c=a.delay||s.delay||0;let{elapsed:d=0}=s;d=d-at(c);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-d,onUpdate:h=>{t.set(h),a.onUpdate&&a.onUpdate(h)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:i?void 0:r};om(a)||Object.assign(u,rm(e,u)),u.duration&&(u.duration=at(u.duration)),u.repeatDelay&&(u.repeatDelay=at(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let f=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Pr(u),u.delay===0&&(f=!0)),(bt.instantAnimations||bt.skipAnimations)&&(f=!0,Pr(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,f&&!i&&t.get()!==void 0){const h=Qh(u.keyframes,a);if(h!==void 0){je.update(()=>{u.onUpdate(h),u.onComplete()});return}}return a.isSync?new xo(u):new Af(u)};function im({protectedKeys:e,needsAnimating:t},n){const s=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,s}function Sc(e,t,{delay:n=0,transitionOverride:s,type:r}={}){let{transition:i=e.getDefaultTransition(),transitionEnd:o,...a}=t;s&&(i=s);const c=[],d=r&&e.animationState&&e.animationState.getState()[r];for(const u in a){const f=e.getValue(u,e.latestValues[u]??null),h=a[u];if(h===void 0||d&&im(d,u))continue;const p={delay:n,...vo(i||{},u)},x=f.get();if(x!==void 0&&!f.isAnimating&&!Array.isArray(h)&&h===x&&!p.velocity)continue;let m=!1;if(window.MotionHandoffAnimation){const S=wc(e);if(S){const C=window.MotionHandoffAnimation(S,u,je);C!==null&&(p.startTime=C,m=!0)}}Or(e,u),f.start(Ro(u,f,h,e.shouldReduceMotion&&Hl.has(u)?{type:!1}:p,e,m));const b=f.animation;b&&c.push(b)}return o&&Promise.all(c).then(()=>{je.update(()=>{o&&qh(e,o)})}),c}function Cc(e,t,n,s=0,r=1){const i=Array.from(e).sort((d,u)=>d.sortNodePosition(u)).indexOf(t),o=e.size,a=(o-1)*s;return typeof n=="function"?n(i,o):r===1?i*s:a-i*s}function Lr(e,t,n={}){var c;const s=an(e,t,n.type==="exit"?(c=e.presenceContext)==null?void 0:c.custom:void 0);let{transition:r=e.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(r=n.transitionOverride);const i=s?()=>Promise.all(Sc(e,s,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(d=0)=>{const{delayChildren:u=0,staggerChildren:f,staggerDirection:h}=r;return am(e,t,d,u,f,h,n)}:()=>Promise.resolve(),{when:a}=r;if(a){const[d,u]=a==="beforeChildren"?[i,o]:[o,i];return d().then(()=>u())}else return Promise.all([i(),o(n.delay)])}function am(e,t,n=0,s=0,r=0,i=1,o){const a=[];for(const c of e.variantChildren)c.notify("AnimationStart",t),a.push(Lr(c,t,{...o,delay:n+(typeof s=="function"?0:s)+Cc(e.variantChildren,c,s,r,i)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(a)}function lm(e,t,n={}){e.notify("AnimationStart",t);let s;if(Array.isArray(t)){const r=t.map(i=>Lr(e,i,n));s=Promise.all(r)}else if(typeof t=="string")s=Lr(e,t,n);else{const r=typeof t=="function"?an(e,t,n.custom):t;s=Promise.all(Sc(e,r,n))}return s.then(()=>{e.notify("AnimationComplete",t)})}function kc(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let s=0;s<n;s++)if(t[s]!==e[s])return!1;return!0}const cm=Eo.length;function Tc(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Tc(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<cm;n++){const s=Eo[n],r=e.props[s];(Dn(r)||r===!1)&&(t[s]=r)}return t}const dm=[...To].reverse(),um=To.length;function fm(e){return t=>Promise.all(t.map(({animation:n,options:s})=>lm(e,n,s)))}function hm(e){let t=fm(e),n=Pi(),s=!0;const r=c=>(d,u)=>{var h;const f=an(e,u,c==="exit"?(h=e.presenceContext)==null?void 0:h.custom:void 0);if(f){const{transition:p,transitionEnd:x,...m}=f;d={...d,...m,...x}}return d};function i(c){t=c(e)}function o(c){const{props:d}=e,u=Tc(e.parent)||{},f=[],h=new Set;let p={},x=1/0;for(let b=0;b<um;b++){const S=dm[b],C=n[S],T=d[S]!==void 0?d[S]:u[S],k=Dn(T),v=S===c?C.isActive:null;v===!1&&(x=b);let j=T===u[S]&&T!==d[S]&&k;if(j&&s&&e.manuallyAnimateOnMount&&(j=!1),C.protectedKeys={...p},!C.isActive&&v===null||!T&&!C.prevProp||js(T)||typeof T=="boolean")continue;const V=mm(C.prevProp,T);let E=V||S===c&&C.isActive&&!j&&k||b>x&&k,_=!1;const y=Array.isArray(T)?T:[T];let D=y.reduce(r(S),{});v===!1&&(D={});const{prevResolvedValues:W={}}=C,te={...W,...D},ue=ne=>{E=!0,h.has(ne)&&(_=!0,h.delete(ne)),C.needsAnimating[ne]=!0;const R=e.getValue(ne);R&&(R.liveStyle=!1)};for(const ne in te){const R=D[ne],B=W[ne];if(p.hasOwnProperty(ne))continue;let M=!1;Fr(R)&&Fr(B)?M=!kc(R,B):M=R!==B,M?R!=null?ue(ne):h.add(ne):R!==void 0&&h.has(ne)?ue(ne):C.protectedKeys[ne]=!0}C.prevProp=T,C.prevResolvedValues=D,C.isActive&&(p={...p,...D}),s&&e.blockInitialAnimation&&(E=!1);const ie=j&&V;E&&(!ie||_)&&f.push(...y.map(ne=>{const R={type:S};if(typeof ne=="string"&&s&&!ie&&e.manuallyAnimateOnMount&&e.parent){const{parent:B}=e,M=an(B,ne);if(B.enteringChildren&&M){const{delayChildren:O}=M.transition||{};R.delay=Cc(B.enteringChildren,e,O)}}return{animation:ne,options:R}}))}if(h.size){const b={};if(typeof d.initial!="boolean"){const S=an(e,Array.isArray(d.initial)?d.initial[0]:d.initial);S&&S.transition&&(b.transition=S.transition)}h.forEach(S=>{const C=e.getBaseTarget(S),T=e.getValue(S);T&&(T.liveStyle=!0),b[S]=C??null}),f.push({animation:b})}let m=!!f.length;return s&&(d.initial===!1||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(m=!1),s=!1,m?t(f):Promise.resolve()}function a(c,d){var f;if(n[c].isActive===d)return Promise.resolve();(f=e.variantChildren)==null||f.forEach(h=>{var p;return(p=h.animationState)==null?void 0:p.setActive(c,d)}),n[c].isActive=d;const u=o(c);for(const h in n)n[h].protectedKeys={};return u}return{animateChanges:o,setActive:a,setAnimateFunction:i,getState:()=>n,reset:()=>{n=Pi(),s=!0}}}function mm(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!kc(t,e):!1}function It(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Pi(){return{animate:It(!0),whileInView:It(),whileHover:It(),whileTap:It(),whileDrag:It(),whileFocus:It(),exit:It()}}class Vt{constructor(t){this.isMounted=!1,this.node=t}update(){}}class gm extends Vt{constructor(t){super(t),t.animationState||(t.animationState=hm(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();js(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let pm=0;class ym extends Vt{constructor(){super(...arguments),this.id=pm++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===s)return;const r=this.node.animationState.setActive("exit",!t);n&&!t&&r.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const xm={animation:{Feature:gm},exit:{Feature:ym}};function Fn(e,t,n,s={passive:!0}){return e.addEventListener(t,n,s),()=>e.removeEventListener(t,n)}function Hn(e){return{point:{x:e.pageX,y:e.pageY}}}const bm=e=>t=>Co(t)&&e(t,Hn(t));function An(e,t,n,s){return Fn(e,t,bm(n),s)}const Ec=1e-4,vm=1-Ec,wm=1+Ec,Ac=.01,Sm=0-Ac,Cm=0+Ac;function Ze(e){return e.max-e.min}function km(e,t,n){return Math.abs(e-t)<=n}function Ri(e,t,n,s=.5){e.origin=s,e.originPoint=Ve(t.min,t.max,e.origin),e.scale=Ze(n)/Ze(t),e.translate=Ve(n.min,n.max,e.origin)-e.originPoint,(e.scale>=vm&&e.scale<=wm||isNaN(e.scale))&&(e.scale=1),(e.translate>=Sm&&e.translate<=Cm||isNaN(e.translate))&&(e.translate=0)}function jn(e,t,n,s){Ri(e.x,t.x,n.x,s?s.originX:void 0),Ri(e.y,t.y,n.y,s?s.originY:void 0)}function Ii(e,t,n){e.min=n.min+t.min,e.max=e.min+Ze(t)}function Tm(e,t,n){Ii(e.x,t.x,n.x),Ii(e.y,t.y,n.y)}function Di(e,t,n){e.min=t.min-n.min,e.max=e.min+Ze(t)}function Nn(e,t,n){Di(e.x,t.x,n.x),Di(e.y,t.y,n.y)}function Qe(e){return[e("x"),e("y")]}const jc=({current:e})=>e?e.ownerDocument.defaultView:null,$i=(e,t)=>Math.abs(e-t);function Em(e,t){const n=$i(e.x,t.x),s=$i(e.y,t.y);return Math.sqrt(n**2+s**2)}class Nc{constructor(t,n,{transformPagePoint:s,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:o=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=Js(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,x=Em(h.offset,{x:0,y:0})>=this.distanceThreshold;if(!p&&!x)return;const{point:m}=h,{timestamp:b}=Ue;this.history.push({...m,timestamp:b});const{onStart:S,onMove:C}=this.handlers;p||(S&&S(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),C&&C(this.lastMoveEvent,h)},this.handlePointerMove=(h,p)=>{this.lastMoveEvent=h,this.lastMoveEventInfo=Xs(p,this.transformPagePoint),je.update(this.updatePoint,!0)},this.handlePointerUp=(h,p)=>{this.end();const{onEnd:x,onSessionEnd:m,resumeAnimation:b}=this.handlers;if(this.dragSnapToOrigin&&b&&b(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const S=Js(h.type==="pointercancel"?this.lastMoveEventInfo:Xs(p,this.transformPagePoint),this.history);this.startEvent&&x&&x(h,S),m&&m(h,S)},!Co(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=s,this.distanceThreshold=o,this.contextWindow=r||window;const a=Hn(t),c=Xs(a,this.transformPagePoint),{point:d}=c,{timestamp:u}=Ue;this.history=[{...d,timestamp:u}];const{onSessionStart:f}=n;f&&f(t,Js(c,this.history)),this.removeListeners=Ln(An(this.contextWindow,"pointermove",this.handlePointerMove),An(this.contextWindow,"pointerup",this.handlePointerUp),An(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),At(this.updatePoint)}}function Xs(e,t){return t?{point:t(e.point)}:e}function Fi(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Js({point:e},t){return{point:e,delta:Fi(e,Mc(t)),offset:Fi(e,Am(t)),velocity:jm(t,.1)}}function Am(e){return e[0]}function Mc(e){return e[e.length-1]}function jm(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,s=null;const r=Mc(e);for(;n>=0&&(s=e[n],!(r.timestamp-s.timestamp>at(t)));)n--;if(!s)return{x:0,y:0};const i=dt(r.timestamp-s.timestamp);if(i===0)return{x:0,y:0};const o={x:(r.x-s.x)/i,y:(r.y-s.y)/i};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Nm(e,{min:t,max:n},s){return t!==void 0&&e<t?e=s?Ve(t,e,s.min):Math.max(e,t):n!==void 0&&e>n&&(e=s?Ve(n,e,s.max):Math.min(e,n)),e}function Oi(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function Mm(e,{top:t,left:n,bottom:s,right:r}){return{x:Oi(e.x,n,r),y:Oi(e.y,t,s)}}function Li(e,t){let n=t.min-e.min,s=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,s]=[s,n]),{min:n,max:s}}function Vm(e,t){return{x:Li(e.x,t.x),y:Li(e.y,t.y)}}function Pm(e,t){let n=.5;const s=Ze(e),r=Ze(t);return r>s?n=Pn(t.min,t.max-s,e.min):s>r&&(n=Pn(e.min,e.max-r,t.min)),yt(0,1,n)}function Rm(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const _r=.35;function Im(e=_r){return e===!1?e=0:e===!0&&(e=_r),{x:_i(e,"left","right"),y:_i(e,"top","bottom")}}function _i(e,t,n){return{min:Bi(e,t),max:Bi(e,n)}}function Bi(e,t){return typeof e=="number"?e:e[t]||0}const Dm=new WeakMap;class $m{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=De(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:s}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=f=>{const{dragSnapToOrigin:h}=this.getProps();h?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Hn(f).point)},o=(f,h)=>{const{drag:p,dragPropagation:x,onDragStart:m}=this.getProps();if(p&&!x&&(this.openDragLock&&this.openDragLock(),this.openDragLock=zf(p),!this.openDragLock))return;this.latestPointerEvent=f,this.latestPanInfo=h,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Qe(S=>{let C=this.getAxisMotionValue(S).get()||0;if(ut.test(C)){const{projection:T}=this.visualElement;if(T&&T.layout){const k=T.layout.layoutBox[S];k&&(C=Ze(k)*(parseFloat(C)/100))}}this.originPoint[S]=C}),m&&je.postRender(()=>m(f,h)),Or(this.visualElement,"transform");const{animationState:b}=this.visualElement;b&&b.setActive("whileDrag",!0)},a=(f,h)=>{this.latestPointerEvent=f,this.latestPanInfo=h;const{dragPropagation:p,dragDirectionLock:x,onDirectionLock:m,onDrag:b}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:S}=h;if(x&&this.currentDirection===null){this.currentDirection=Fm(S),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",h.point,S),this.updateAxis("y",h.point,S),this.visualElement.render(),b&&b(f,h)},c=(f,h)=>{this.latestPointerEvent=f,this.latestPanInfo=h,this.stop(f,h),this.latestPointerEvent=null,this.latestPanInfo=null},d=()=>Qe(f=>{var h;return this.getAnimationState(f)==="paused"&&((h=this.getAxisMotionValue(f).animation)==null?void 0:h.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new Nc(t,{onSessionStart:i,onStart:o,onMove:a,onSessionEnd:c,resumeAnimation:d},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:s,contextWindow:jc(this.visualElement)})}stop(t,n){const s=t||this.latestPointerEvent,r=n||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!s)return;const{velocity:o}=r;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&je.postRender(()=>a(s,r))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,s){const{drag:r}=this.getProps();if(!s||!Qn(t,r,this.currentDirection))return;const i=this.getAxisMotionValue(t);let o=this.originPoint[t]+s[t];this.constraints&&this.constraints[t]&&(o=Nm(o,this.constraints[t],this.elastic[t])),i.set(o)}resolveConstraints(){var i;const{dragConstraints:t,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(i=this.visualElement.projection)==null?void 0:i.layout,r=this.constraints;t&&nn(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&s?this.constraints=Mm(s.layoutBox,t):this.constraints=!1,this.elastic=Im(n),r!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&Qe(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=Rm(s.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!nn(t))return!1;const s=t.current;xt(s!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const i=Oh(s,r.root,this.visualElement.getTransformPagePoint());let o=Vm(r.layout.layoutBox,i);if(n){const a=n(Dh(o));this.hasMutatedConstraints=!!a,a&&(o=hc(a))}return o}startAnimation(t){const{drag:n,dragMomentum:s,dragElastic:r,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),c=this.constraints||{},d=Qe(u=>{if(!Qn(u,n,this.currentDirection))return;let f=c&&c[u]||{};o&&(f={min:0,max:0});const h=r?200:1e6,p=r?40:1e7,x={type:"inertia",velocity:s?t[u]:0,bounceStiffness:h,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...i,...f};return this.startAxisValueAnimation(u,x)});return Promise.all(d).then(a)}startAxisValueAnimation(t,n){const s=this.getAxisMotionValue(t);return Or(this.visualElement,t),s.start(Ro(t,s,0,n,this.visualElement,!1))}stopAnimation(){Qe(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Qe(t=>{var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,s=this.visualElement.getProps(),r=s[n];return r||this.visualElement.getValue(t,(s.initial?s.initial[t]:void 0)||0)}snapToCursor(t){Qe(n=>{const{drag:s}=this.getProps();if(!Qn(n,s,this.currentDirection))return;const{projection:r}=this.visualElement,i=this.getAxisMotionValue(n);if(r&&r.layout){const{min:o,max:a}=r.layout.layoutBox[n];i.set(t[n]-Ve(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!nn(n)||!s||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};Qe(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const c=a.get();r[o]=Pm({min:c,max:c},this.constraints[o])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),Qe(o=>{if(!Qn(o,t,null))return;const a=this.getAxisMotionValue(o),{min:c,max:d}=this.constraints[o];a.set(Ve(c,d,r[o]))})}addListeners(){if(!this.visualElement.current)return;Dm.set(this.visualElement,this);const t=this.visualElement.current,n=An(t,"pointerdown",c=>{const{drag:d,dragListener:u=!0}=this.getProps();d&&u&&this.start(c)}),s=()=>{const{dragConstraints:c}=this.getProps();nn(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,i=r.addEventListener("measure",s);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),je.read(s);const o=Fn(window,"resize",()=>this.scalePositionWithinConstraints()),a=r.addEventListener("didUpdate",({delta:c,hasLayoutChanged:d})=>{this.isDragging&&d&&(Qe(u=>{const f=this.getAxisMotionValue(u);f&&(this.originPoint[u]+=c[u].translate,f.set(f.get()+c[u].translate))}),this.visualElement.render())});return()=>{o(),n(),i(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:o=_r,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:s,dragPropagation:r,dragConstraints:i,dragElastic:o,dragMomentum:a}}}function Qn(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Fm(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Om extends Vt{constructor(t){super(t),this.removeGroupControls=nt,this.removeListeners=nt,this.controls=new $m(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||nt}unmount(){this.removeGroupControls(),this.removeListeners()}}const Hi=e=>(t,n)=>{e&&je.postRender(()=>e(t,n))};class Lm extends Vt{constructor(){super(...arguments),this.removePointerDownListener=nt}onPointerDown(t){this.session=new Nc(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:jc(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:s,onPanEnd:r}=this.node.getProps();return{onSessionStart:Hi(t),onStart:Hi(n),onMove:s,onEnd:(i,o)=>{delete this.session,r&&je.postRender(()=>r(i,o))}}}mount(){this.removePointerDownListener=An(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const us={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Ui(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const vn={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ce.test(e))e=parseFloat(e);else return e;const n=Ui(e,t.target.x),s=Ui(e,t.target.y);return`${n}% ${s}%`}},_m={correct:(e,{treeScale:t,projectionDelta:n})=>{const s=e,r=jt.parse(e);if(r.length>5)return s;const i=jt.createTransformer(e),o=typeof r[0]!="number"?1:0,a=n.x.scale*t.x,c=n.y.scale*t.y;r[0+o]/=a,r[1+o]/=c;const d=Ve(a,c,.5);return typeof r[2+o]=="number"&&(r[2+o]/=d),typeof r[3+o]=="number"&&(r[3+o]/=d),i(r)}};let Qs=!1;class Bm extends w.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:s,layoutId:r}=this.props,{projection:i}=t;ch(Hm),i&&(n.group&&n.group.add(i),s&&s.register&&r&&s.register(i),Qs&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),us.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:s,drag:r,isPresent:i}=this.props,{projection:o}=s;return o&&(o.isPresent=i,Qs=!0,r||t.layoutDependency!==n||n===void 0||t.isPresent!==i?o.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?o.promote():o.relegate()||je.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),So.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:r}=t;Qs=!0,r&&(r.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(r),s&&s.deregister&&s.deregister(r))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Vc(e){const[t,n]=Ql(),s=w.useContext(Qr);return l.jsx(Bm,{...e,layoutGroup:s,switchLayoutGroup:w.useContext(uc),isPresent:t,safeToRemove:n})}const Hm={borderRadius:{...vn,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:vn,borderTopRightRadius:vn,borderBottomLeftRadius:vn,borderBottomRightRadius:vn,boxShadow:_m};function Um(e,t,n){const s=We(e)?e:cn(e);return s.start(Ro("",s,t,n)),s.animation}const zm=(e,t)=>e.depth-t.depth;class Wm{constructor(){this.children=[],this.isDirty=!1}add(t){no(this.children,t),this.isDirty=!0}remove(t){so(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(zm),this.isDirty=!1,this.children.forEach(t)}}function Zm(e,t){const n=Ge.now(),s=({timestamp:r})=>{const i=r-n;i>=t&&(At(s),e(i-t))};return je.setup(s,!0),()=>At(s)}const Pc=["TopLeft","TopRight","BottomLeft","BottomRight"],Gm=Pc.length,zi=e=>typeof e=="string"?parseFloat(e):e,Wi=e=>typeof e=="number"||ce.test(e);function Km(e,t,n,s,r,i){r?(e.opacity=Ve(0,n.opacity??1,Ym(s)),e.opacityExit=Ve(t.opacity??1,0,qm(s))):i&&(e.opacity=Ve(t.opacity??1,n.opacity??1,s));for(let o=0;o<Gm;o++){const a=`border${Pc[o]}Radius`;let c=Zi(t,a),d=Zi(n,a);if(c===void 0&&d===void 0)continue;c||(c=0),d||(d=0),c===0||d===0||Wi(c)===Wi(d)?(e[a]=Math.max(Ve(zi(c),zi(d),s),0),(ut.test(d)||ut.test(c))&&(e[a]+="%")):e[a]=d}(t.rotate||n.rotate)&&(e.rotate=Ve(t.rotate||0,n.rotate||0,s))}function Zi(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Ym=Rc(0,.5,bl),qm=Rc(.5,.95,nt);function Rc(e,t,n){return s=>s<e?0:s>t?1:n(Pn(e,t,s))}function Gi(e,t){e.min=t.min,e.max=t.max}function Je(e,t){Gi(e.x,t.x),Gi(e.y,t.y)}function Ki(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Yi(e,t,n,s,r){return e-=t,e=ws(e,1/n,s),r!==void 0&&(e=ws(e,1/r,s)),e}function Xm(e,t=0,n=1,s=.5,r,i=e,o=e){if(ut.test(t)&&(t=parseFloat(t),t=Ve(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=Ve(i.min,i.max,s);e===i&&(a-=t),e.min=Yi(e.min,t,n,a,r),e.max=Yi(e.max,t,n,a,r)}function qi(e,t,[n,s,r],i,o){Xm(e,t[n],t[s],t[r],t.scale,i,o)}const Jm=["x","scaleX","originX"],Qm=["y","scaleY","originY"];function Xi(e,t,n,s){qi(e.x,t,Jm,n?n.x:void 0,s?s.x:void 0),qi(e.y,t,Qm,n?n.y:void 0,s?s.y:void 0)}function Ji(e){return e.translate===0&&e.scale===1}function Ic(e){return Ji(e.x)&&Ji(e.y)}function Qi(e,t){return e.min===t.min&&e.max===t.max}function eg(e,t){return Qi(e.x,t.x)&&Qi(e.y,t.y)}function ea(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Dc(e,t){return ea(e.x,t.x)&&ea(e.y,t.y)}function ta(e){return Ze(e.x)/Ze(e.y)}function na(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class tg{constructor(){this.members=[]}add(t){no(this.members,t),t.scheduleRender()}remove(t){if(so(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(r=>t===r);if(n===0)return!1;let s;for(let r=n;r>=0;r--){const i=this.members[r];if(i.isPresent!==!1){s=i;break}}return s?(this.promote(s),!0):!1}promote(t,n){const s=this.lead;if(t!==s&&(this.prevLead=s,this.lead=t,t.show(),s)){s.instance&&s.scheduleRender(),t.scheduleRender(),t.resumeFrom=s,n&&(t.resumeFrom.preserveOpacity=!0),s.snapshot&&(t.snapshot=s.snapshot,t.snapshot.latestValues=s.animationValues||s.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:r}=t.options;r===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:s}=t;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function ng(e,t,n){let s="";const r=e.x.translate/t.x,i=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((r||i||o)&&(s=`translate3d(${r}px, ${i}px, ${o}px) `),(t.x!==1||t.y!==1)&&(s+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:d,rotate:u,rotateX:f,rotateY:h,skewX:p,skewY:x}=n;d&&(s=`perspective(${d}px) ${s}`),u&&(s+=`rotate(${u}deg) `),f&&(s+=`rotateX(${f}deg) `),h&&(s+=`rotateY(${h}deg) `),p&&(s+=`skewX(${p}deg) `),x&&(s+=`skewY(${x}deg) `)}const a=e.x.scale*t.x,c=e.y.scale*t.y;return(a!==1||c!==1)&&(s+=`scale(${a}, ${c})`),s||"none"}const er=["","X","Y","Z"],sg=1e3;let rg=0;function tr(e,t,n,s){const{latestValues:r}=t;r[e]&&(n[e]=r[e],t.setStaticValue(e,0),s&&(s[e]=0))}function $c(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=wc(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:r,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",je,!(r||i))}const{parent:s}=e;s&&!s.hasCheckedOptimisedAppear&&$c(s)}function Fc({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:s,resetTransform:r}){return class{constructor(o={},a=t==null?void 0:t()){this.id=rg++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(ag),this.nodes.forEach(ug),this.nodes.forEach(fg),this.nodes.forEach(lg)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new Wm)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new oo),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const c=this.eventHandlers.get(o);c&&c.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=Jl(o)&&!qf(o),this.instance=o;const{layoutId:a,layout:c,visualElement:d}=this.options;if(d&&!d.current&&d.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||a)&&(this.isLayoutDirty=!0),e){let u,f=0;const h=()=>this.root.updateBlockedByResize=!1;je.read(()=>{f=window.innerWidth}),e(o,()=>{const p=window.innerWidth;p!==f&&(f=p,this.root.updateBlockedByResize=!0,u&&u(),u=Zm(h,250),us.hasAnimatedSinceResize&&(us.hasAnimatedSinceResize=!1,this.nodes.forEach(oa)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&d&&(a||c)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:f,hasRelativeLayoutChanged:h,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const x=this.options.transition||d.getDefaultTransition()||yg,{onLayoutAnimationStart:m,onLayoutAnimationComplete:b}=d.getProps(),S=!this.targetLayout||!Dc(this.targetLayout,p),C=!f&&h;if(this.options.layoutRoot||this.resumeFrom||C||f&&(S||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const T={...vo(x,"layout"),onPlay:m,onComplete:b};(d.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T),this.setAnimationOrigin(u,C)}else f||oa(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),At(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(hg),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&$c(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const f=this.path[u];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:a,layout:c}=this.options;if(a===void 0&&!c)return;const d=this.getTransformTemplate();this.prevTransformTemplateValue=d?d(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(sa);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(ra);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(dg),this.nodes.forEach(og),this.nodes.forEach(ig)):this.nodes.forEach(ra),this.clearAllSnapshots();const a=Ge.now();Ue.delta=yt(0,1e3/60,a-Ue.timestamp),Ue.timestamp=a,Ue.isProcessing=!0,Us.update.process(Ue),Us.preRender.process(Ue),Us.render.process(Ue),Ue.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,So.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(cg),this.sharedNodes.forEach(mg)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,je.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){je.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Ze(this.snapshot.measuredBox.x)&&!Ze(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=De(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){const c=s(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!r)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Ic(this.projectionDelta),c=this.getTransformTemplate(),d=c?c(this.latestValues,""):void 0,u=d!==this.prevTransformTemplateValue;o&&this.instance&&(a||$t(this.latestValues)||u)&&(r(this.instance,d),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let c=this.removeElementScroll(a);return o&&(c=this.removeTransform(c)),xg(c),{animationId:this.root.animationId,measuredBox:a,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var d;const{visualElement:o}=this.options;if(!o)return De();const a=o.measureViewportBox();if(!(((d=this.scroll)==null?void 0:d.wasRoot)||this.path.some(bg))){const{scroll:u}=this.root;u&&(sn(a.x,u.offset.x),sn(a.y,u.offset.y))}return a}removeElementScroll(o){var c;const a=De();if(Je(a,o),(c=this.scroll)!=null&&c.wasRoot)return a;for(let d=0;d<this.path.length;d++){const u=this.path[d],{scroll:f,options:h}=u;u!==this.root&&f&&h.layoutScroll&&(f.wasRoot&&Je(a,o),sn(a.x,f.offset.x),sn(a.y,f.offset.y))}return a}applyTransform(o,a=!1){const c=De();Je(c,o);for(let d=0;d<this.path.length;d++){const u=this.path[d];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&rn(c,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),$t(u.latestValues)&&rn(c,u.latestValues)}return $t(this.latestValues)&&rn(c,this.latestValues),c}removeTransform(o){const a=De();Je(a,o);for(let c=0;c<this.path.length;c++){const d=this.path[c];if(!d.instance||!$t(d.latestValues))continue;Ir(d.latestValues)&&d.updateSnapshot();const u=De(),f=d.measurePageBox();Je(u,f),Xi(a,d.latestValues,d.snapshot?d.snapshot.layoutBox:void 0,u)}return $t(this.latestValues)&&Xi(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Ue.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var h;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==a;if(!(o||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(h=this.parent)!=null&&h.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:f}=this.options;if(!(!this.layout||!(u||f))){if(this.resolvedRelativeTargetAt=Ue.timestamp,!this.targetDelta&&!this.relativeTarget){const p=this.getClosestProjectingParent();p&&p.layout&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=De(),this.relativeTargetOrigin=De(),Nn(this.relativeTargetOrigin,this.layout.layoutBox,p.layout.layoutBox),Je(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=De(),this.targetWithTransforms=De()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Tm(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Je(this.target,this.layout.layoutBox),gc(this.target,this.targetDelta)):Je(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const p=this.getClosestProjectingParent();p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=De(),this.relativeTargetOrigin=De(),Nn(this.relativeTargetOrigin,this.target,p.target),Je(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Ir(this.parent.latestValues)||mc(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var x;const o=this.getLead(),a=!!this.resumingFrom||this!==o;let c=!0;if((this.isProjectionDirty||(x=this.parent)!=null&&x.isProjectionDirty)&&(c=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Ue.timestamp&&(c=!1),c)return;const{layout:d,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(d||u))return;Je(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,h=this.treeScale.y;Fh(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=De());const{target:p}=o;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Ki(this.prevProjectionDelta.x,this.projectionDelta.x),Ki(this.prevProjectionDelta.y,this.projectionDelta.y)),jn(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==h||!na(this.projectionDelta.x,this.prevProjectionDelta.x)||!na(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),o){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=on(),this.projectionDelta=on(),this.projectionDeltaWithTransform=on()}setAnimationOrigin(o,a=!1){const c=this.snapshot,d=c?c.latestValues:{},u={...this.latestValues},f=on();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const h=De(),p=c?c.source:void 0,x=this.layout?this.layout.source:void 0,m=p!==x,b=this.getStack(),S=!b||b.members.length<=1,C=!!(m&&!S&&this.options.crossfade===!0&&!this.path.some(pg));this.animationProgress=0;let T;this.mixTargetDelta=k=>{const v=k/1e3;ia(f.x,o.x,v),ia(f.y,o.y,v),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Nn(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),gg(this.relativeTarget,this.relativeTargetOrigin,h,v),T&&eg(this.relativeTarget,T)&&(this.isProjectionDirty=!1),T||(T=De()),Je(T,this.relativeTarget)),m&&(this.animationValues=u,Km(u,d,this.latestValues,v,C,S)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=v},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,c,d;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(d=(c=this.resumingFrom)==null?void 0:c.currentAnimation)==null||d.stop(),this.pendingAnimation&&(At(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=je.update(()=>{us.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=cn(0)),this.currentAnimation=Um(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:u=>{this.mixTargetDelta(u),o.onUpdate&&o.onUpdate(u)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(sg),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:c,layout:d,latestValues:u}=o;if(!(!a||!c||!d)){if(this!==o&&this.layout&&d&&Oc(this.options.animationType,this.layout.layoutBox,d.layoutBox)){c=this.target||De();const f=Ze(this.layout.layoutBox.x);c.x.min=o.target.x.min,c.x.max=c.x.min+f;const h=Ze(this.layout.layoutBox.y);c.y.min=o.target.y.min,c.y.max=c.y.min+h}Je(a,c),rn(a,u),jn(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new tg),this.sharedNodes.get(o).add(a);const d=a.options.initialPromotionConfig;a.promote({transition:d?d.transition:void 0,preserveFollowOpacity:d&&d.shouldPreserveFollowOpacity?d.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var a;const{layoutId:o}=this.options;return o?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:o}=this.options;return o?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:c}={}){const d=this.getStack();d&&d.promote(this,c),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:c}=o;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(a=!0),!a)return;const d={};c.z&&tr("z",o,d,this.animationValues);for(let u=0;u<er.length;u++)tr(`rotate${er[u]}`,o,d,this.animationValues),tr(`skew${er[u]}`,o,d,this.animationValues);o.render();for(const u in d)o.setStaticValue(u,d[u]),this.animationValues&&(this.animationValues[u]=d[u]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=ds(a==null?void 0:a.pointerEvents)||"",o.transform=c?c(this.latestValues,""):"none";return}const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=ds(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!$t(this.latestValues)&&(o.transform=c?c({},""):"none",this.hasProjected=!1);return}o.visibility="";const u=d.animationValues||d.latestValues;this.applyTransformsToTarget();let f=ng(this.projectionDeltaWithTransform,this.treeScale,u);c&&(f=c(u,f)),o.transform=f;const{x:h,y:p}=this.projectionDelta;o.transformOrigin=`${h.origin*100}% ${p.origin*100}% 0`,d.animationValues?o.opacity=d===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:o.opacity=d===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const x in $n){if(u[x]===void 0)continue;const{correct:m,applyTo:b,isCSSVariable:S}=$n[x],C=f==="none"?u[x]:m(u[x],d);if(b){const T=b.length;for(let k=0;k<T;k++)o[b[k]]=C}else S?this.options.visualElement.renderState.vars[x]=C:o[x]=C}this.options.layoutId&&(o.pointerEvents=d===this?ds(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(sa),this.root.sharedNodes.clear()}}}function og(e){e.updateLayout()}function ig(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:r}=e.layout,{animationType:i}=e.options,o=t.source!==e.layout.source;i==="size"?Qe(f=>{const h=o?t.measuredBox[f]:t.layoutBox[f],p=Ze(h);h.min=s[f].min,h.max=h.min+p}):Oc(i,t.layoutBox,s)&&Qe(f=>{const h=o?t.measuredBox[f]:t.layoutBox[f],p=Ze(s[f]);h.max=h.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+p)});const a=on();jn(a,s,t.layoutBox);const c=on();o?jn(c,e.applyTransform(r,!0),t.measuredBox):jn(c,s,t.layoutBox);const d=!Ic(a);let u=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:h,layout:p}=f;if(h&&p){const x=De();Nn(x,t.layoutBox,h.layoutBox);const m=De();Nn(m,s,p.layoutBox),Dc(x,m)||(u=!0),f.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=x,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:s,snapshot:t,delta:c,layoutDelta:a,hasLayoutChanged:d,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:s}=e.options;s&&s()}e.options.transition=void 0}function ag(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function lg(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function cg(e){e.clearSnapshot()}function sa(e){e.clearMeasurements()}function ra(e){e.isLayoutDirty=!1}function dg(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function oa(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function ug(e){e.resolveTargetDelta()}function fg(e){e.calcProjection()}function hg(e){e.resetSkewAndRotation()}function mg(e){e.removeLeadSnapshot()}function ia(e,t,n){e.translate=Ve(t.translate,0,n),e.scale=Ve(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function aa(e,t,n,s){e.min=Ve(t.min,n.min,s),e.max=Ve(t.max,n.max,s)}function gg(e,t,n,s){aa(e.x,t.x,n.x,s),aa(e.y,t.y,n.y,s)}function pg(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const yg={duration:.45,ease:[.4,0,.1,1]},la=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),ca=la("applewebkit/")&&!la("chrome/")?Math.round:nt;function da(e){e.min=ca(e.min),e.max=ca(e.max)}function xg(e){da(e.x),da(e.y)}function Oc(e,t,n){return e==="position"||e==="preserve-aspect"&&!km(ta(t),ta(n),.2)}function bg(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const vg=Fc({attachResizeListener:(e,t)=>Fn(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),nr={current:void 0},Lc=Fc({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!nr.current){const e=new vg({});e.mount(window),e.setOptions({layoutScroll:!0}),nr.current=e}return nr.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),wg={pan:{Feature:Lm},drag:{Feature:Om,ProjectionNode:Lc,MeasureLayout:Vc}};function ua(e,t,n){const{props:s}=e;e.animationState&&s.whileHover&&e.animationState.setActive("whileHover",n==="Start");const r="onHover"+n,i=s[r];i&&je.postRender(()=>i(t,Hn(t)))}class Sg extends Vt{mount(){const{current:t}=this.node;t&&(this.unmount=Wf(t,(n,s)=>(ua(this.node,s,"Start"),r=>ua(this.node,r,"End"))))}unmount(){}}class Cg extends Vt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Ln(Fn(this.node.current,"focus",()=>this.onFocus()),Fn(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function fa(e,t,n){const{props:s}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&s.whileTap&&e.animationState.setActive("whileTap",n==="Start");const r="onTap"+(n==="End"?"":n),i=s[r];i&&je.postRender(()=>i(t,Hn(t)))}class kg extends Vt{mount(){const{current:t}=this.node;t&&(this.unmount=Yf(t,(n,s)=>(fa(this.node,s,"Start"),(r,{success:i})=>fa(this.node,r,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Br=new WeakMap,sr=new WeakMap,Tg=e=>{const t=Br.get(e.target);t&&t(e)},Eg=e=>{e.forEach(Tg)};function Ag({root:e,...t}){const n=e||document;sr.has(n)||sr.set(n,{});const s=sr.get(n),r=JSON.stringify(t);return s[r]||(s[r]=new IntersectionObserver(Eg,{root:e,...t})),s[r]}function jg(e,t,n){const s=Ag(t);return Br.set(e,n),s.observe(e),()=>{Br.delete(e),s.unobserve(e)}}const Ng={some:0,all:1};class Mg extends Vt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:s,amount:r="some",once:i}=t,o={root:n?n.current:void 0,rootMargin:s,threshold:typeof r=="number"?r:Ng[r]},a=c=>{const{isIntersecting:d}=c;if(this.isInView===d||(this.isInView=d,i&&!d&&this.hasEnteredView))return;d&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",d);const{onViewportEnter:u,onViewportLeave:f}=this.node.getProps(),h=d?u:f;h&&h(c)};return jg(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(Vg(t,n))&&this.startObserver()}unmount(){}}function Vg({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Pg={inView:{Feature:Mg},tap:{Feature:kg},focus:{Feature:Cg},hover:{Feature:Sg}},Rg={layout:{ProjectionNode:Lc,MeasureLayout:Vc}},Ig={...xm,...Pg,...wg,...Rg},le=Ih(Ig,Gh),lt=g.forwardRef((e,t)=>{const{alt:n,color:s="currentColor",size:r="1em",weight:i="regular",mirrored:o=!1,children:a,weights:c,...d}=e;return g.createElement("svg",{ref:t,xmlns:"http://www.w3.org/2000/svg",width:r,height:r,fill:s,viewBox:"0 0 256 256",transform:o?"scale(-1, 1)":void 0,...d},!!n&&g.createElement("title",null,n),a,c.get(i))});lt.displayName="SSRBase";const Dg=new Map([["bold",g.createElement(g.Fragment,null,g.createElement("path",{d:"M216.49,104.49l-80,80a12,12,0,0,1-17,0l-80-80a12,12,0,0,1,17-17L128,159l71.51-71.52a12,12,0,0,1,17,17Z"}))],["duotone",g.createElement(g.Fragment,null,g.createElement("path",{d:"M208,96l-80,80L48,96Z",opacity:"0.2"}),g.createElement("path",{d:"M215.39,92.94A8,8,0,0,0,208,88H48a8,8,0,0,0-5.66,13.66l80,80a8,8,0,0,0,11.32,0l80-80A8,8,0,0,0,215.39,92.94ZM128,164.69,67.31,104H188.69Z"}))],["fill",g.createElement(g.Fragment,null,g.createElement("path",{d:"M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,48,88H208a8,8,0,0,1,5.66,13.66Z"}))],["light",g.createElement(g.Fragment,null,g.createElement("path",{d:"M212.24,100.24l-80,80a6,6,0,0,1-8.48,0l-80-80a6,6,0,0,1,8.48-8.48L128,167.51l75.76-75.75a6,6,0,0,1,8.48,8.48Z"}))],["regular",g.createElement(g.Fragment,null,g.createElement("path",{d:"M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z"}))],["thin",g.createElement(g.Fragment,null,g.createElement("path",{d:"M210.83,98.83l-80,80a4,4,0,0,1-5.66,0l-80-80a4,4,0,0,1,5.66-5.66L128,170.34l77.17-77.17a4,4,0,1,1,5.66,5.66Z"}))]]),Io=g.forwardRef((e,t)=>g.createElement(lt,{ref:t,...e,weights:Dg}));Io.displayName="CaretDownIcon";const $g=new Map([["bold",g.createElement(g.Fragment,null,g.createElement("path",{d:"M216.49,168.49a12,12,0,0,1-17,0L128,97,56.49,168.49a12,12,0,0,1-17-17l80-80a12,12,0,0,1,17,0l80,80A12,12,0,0,1,216.49,168.49Z"}))],["duotone",g.createElement(g.Fragment,null,g.createElement("path",{d:"M208,160H48l80-80Z",opacity:"0.2"}),g.createElement("path",{d:"M213.66,154.34l-80-80a8,8,0,0,0-11.32,0l-80,80A8,8,0,0,0,48,168H208a8,8,0,0,0,5.66-13.66ZM67.31,152,128,91.31,188.69,152Z"}))],["fill",g.createElement(g.Fragment,null,g.createElement("path",{d:"M215.39,163.06A8,8,0,0,1,208,168H48a8,8,0,0,1-5.66-13.66l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,215.39,163.06Z"}))],["light",g.createElement(g.Fragment,null,g.createElement("path",{d:"M212.24,164.24a6,6,0,0,1-8.48,0L128,88.49,52.24,164.24a6,6,0,0,1-8.48-8.48l80-80a6,6,0,0,1,8.48,0l80,80A6,6,0,0,1,212.24,164.24Z"}))],["regular",g.createElement(g.Fragment,null,g.createElement("path",{d:"M213.66,165.66a8,8,0,0,1-11.32,0L128,91.31,53.66,165.66a8,8,0,0,1-11.32-11.32l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,213.66,165.66Z"}))],["thin",g.createElement(g.Fragment,null,g.createElement("path",{d:"M210.83,162.83a4,4,0,0,1-5.66,0L128,85.66,50.83,162.83a4,4,0,0,1-5.66-5.66l80-80a4,4,0,0,1,5.66,0l80,80A4,4,0,0,1,210.83,162.83Z"}))]]),_c=g.forwardRef((e,t)=>g.createElement(lt,{ref:t,...e,weights:$g}));_c.displayName="CaretUpIcon";const Fg=new Map([["bold",g.createElement(g.Fragment,null,g.createElement("path",{d:"M216,44H40A20,20,0,0,0,20,64V224A19.82,19.82,0,0,0,31.56,242.1a20.14,20.14,0,0,0,8.49,1.9,19.91,19.91,0,0,0,12.82-4.72l.12-.11L84.47,212H216a20,20,0,0,0,20-20V64A20,20,0,0,0,216,44Zm-4,144H80a11.93,11.93,0,0,0-7.84,2.92L44,215.23V68H212ZM84,108A12,12,0,0,1,96,96h64a12,12,0,1,1,0,24H96A12,12,0,0,1,84,108Zm0,40a12,12,0,0,1,12-12h64a12,12,0,0,1,0,24H96A12,12,0,0,1,84,148Z"}))],["duotone",g.createElement(g.Fragment,null,g.createElement("path",{d:"M224,64V192a8,8,0,0,1-8,8H80L45.15,230.11A8,8,0,0,1,32,224V64a8,8,0,0,1,8-8H216A8,8,0,0,1,224,64Z",opacity:"0.2"}),g.createElement("path",{d:"M216,48H40A16,16,0,0,0,24,64V224a15.85,15.85,0,0,0,9.24,14.5A16.13,16.13,0,0,0,40,240a15.89,15.89,0,0,0,10.25-3.78l.09-.07L83,208H216a16,16,0,0,0,16-16V64A16,16,0,0,0,216,48ZM40,224h0ZM216,192H80a8,8,0,0,0-5.23,1.95L40,224V64H216ZM88,112a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H96A8,8,0,0,1,88,112Zm0,32a8,8,0,0,1,8-8h64a8,8,0,1,1,0,16H96A8,8,0,0,1,88,144Z"}))],["fill",g.createElement(g.Fragment,null,g.createElement("path",{d:"M216,48H40A16,16,0,0,0,24,64V224a15.84,15.84,0,0,0,9.25,14.5A16.05,16.05,0,0,0,40,240a15.89,15.89,0,0,0,10.25-3.78l.09-.07L83,208H216a16,16,0,0,0,16-16V64A16,16,0,0,0,216,48ZM160,152H96a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Zm0-32H96a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Z"}))],["light",g.createElement(g.Fragment,null,g.createElement("path",{d:"M216,50H40A14,14,0,0,0,26,64V224a13.88,13.88,0,0,0,8.09,12.69A14.11,14.11,0,0,0,40,238a13.87,13.87,0,0,0,9-3.31l.06-.05L82.23,206H216a14,14,0,0,0,14-14V64A14,14,0,0,0,216,50Zm2,142a2,2,0,0,1-2,2H80a6,6,0,0,0-3.92,1.46L41.26,225.53A2,2,0,0,1,38,224V64a2,2,0,0,1,2-2H216a2,2,0,0,1,2,2Zm-52-80a6,6,0,0,1-6,6H96a6,6,0,0,1,0-12h64A6,6,0,0,1,166,112Zm0,32a6,6,0,0,1-6,6H96a6,6,0,0,1,0-12h64A6,6,0,0,1,166,144Z"}))],["regular",g.createElement(g.Fragment,null,g.createElement("path",{d:"M216,48H40A16,16,0,0,0,24,64V224a15.85,15.85,0,0,0,9.24,14.5A16.13,16.13,0,0,0,40,240a15.89,15.89,0,0,0,10.25-3.78l.09-.07L83,208H216a16,16,0,0,0,16-16V64A16,16,0,0,0,216,48ZM40,224h0ZM216,192H80a8,8,0,0,0-5.23,1.95L40,224V64H216ZM88,112a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H96A8,8,0,0,1,88,112Zm0,32a8,8,0,0,1,8-8h64a8,8,0,1,1,0,16H96A8,8,0,0,1,88,144Z"}))],["thin",g.createElement(g.Fragment,null,g.createElement("path",{d:"M216,52H40A12,12,0,0,0,28,64V224a11.89,11.89,0,0,0,6.93,10.88A12.17,12.17,0,0,0,40,236a11.89,11.89,0,0,0,7.69-2.83l0,0L81.49,204H216a12,12,0,0,0,12-12V64A12,12,0,0,0,216,52Zm4,140a4,4,0,0,1-4,4H80a4,4,0,0,0-2.62,1L42.56,227.06A4,4,0,0,1,36,224V64a4,4,0,0,1,4-4H216a4,4,0,0,1,4,4Zm-56-80a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h64A4,4,0,0,1,164,112Zm0,32a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h64A4,4,0,0,1,164,144Z"}))]]),Bc=g.forwardRef((e,t)=>g.createElement(lt,{ref:t,...e,weights:Fg}));Bc.displayName="ChatTextIcon";const Og=new Map([["bold",g.createElement(g.Fragment,null,g.createElement("path",{d:"M232.49,80.49l-128,128a12,12,0,0,1-17,0l-56-56a12,12,0,1,1,17-17L96,183,215.51,63.51a12,12,0,0,1,17,17Z"}))],["duotone",g.createElement(g.Fragment,null,g.createElement("path",{d:"M232,56V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56Z",opacity:"0.2"}),g.createElement("path",{d:"M205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z"}))],["fill",g.createElement(g.Fragment,null,g.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z"}))],["light",g.createElement(g.Fragment,null,g.createElement("path",{d:"M228.24,76.24l-128,128a6,6,0,0,1-8.48,0l-56-56a6,6,0,0,1,8.48-8.48L96,191.51,219.76,67.76a6,6,0,0,1,8.48,8.48Z"}))],["regular",g.createElement(g.Fragment,null,g.createElement("path",{d:"M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z"}))],["thin",g.createElement(g.Fragment,null,g.createElement("path",{d:"M226.83,74.83l-128,128a4,4,0,0,1-5.66,0l-56-56a4,4,0,0,1,5.66-5.66L96,194.34,221.17,69.17a4,4,0,1,1,5.66,5.66Z"}))]]),Hc=g.forwardRef((e,t)=>g.createElement(lt,{ref:t,...e,weights:Og}));Hc.displayName="CheckIcon";const Lg=new Map([["bold",g.createElement(g.Fragment,null,g.createElement("path",{d:"M128,180a52.06,52.06,0,0,0,52-52V64A52,52,0,0,0,76,64v64A52.06,52.06,0,0,0,128,180ZM100,64a28,28,0,0,1,56,0v64a28,28,0,0,1-56,0Zm40,155.22V240a12,12,0,0,1-24,0V219.22A92.14,92.14,0,0,1,36,128a12,12,0,0,1,24,0,68,68,0,0,0,136,0,12,12,0,0,1,24,0A92.14,92.14,0,0,1,140,219.22Z"}))],["duotone",g.createElement(g.Fragment,null,g.createElement("path",{d:"M168,64v64a40,40,0,0,1-40,40h0a40,40,0,0,1-40-40V64a40,40,0,0,1,40-40h0A40,40,0,0,1,168,64Z",opacity:"0.2"}),g.createElement("path",{d:"M128,176a48.05,48.05,0,0,0,48-48V64a48,48,0,0,0-96,0v64A48.05,48.05,0,0,0,128,176ZM96,64a32,32,0,0,1,64,0v64a32,32,0,0,1-64,0Zm40,143.6V240a8,8,0,0,1-16,0V207.6A80.11,80.11,0,0,1,48,128a8,8,0,0,1,16,0,64,64,0,0,0,128,0,8,8,0,0,1,16,0A80.11,80.11,0,0,1,136,207.6Z"}))],["fill",g.createElement(g.Fragment,null,g.createElement("path",{d:"M80,128V64a48,48,0,0,1,96,0v64a48,48,0,0,1-96,0Zm128,0a8,8,0,0,0-16,0,64,64,0,0,1-128,0,8,8,0,0,0-16,0,80.11,80.11,0,0,0,72,79.6V240a8,8,0,0,0,16,0V207.6A80.11,80.11,0,0,0,208,128Z"}))],["light",g.createElement(g.Fragment,null,g.createElement("path",{d:"M128,174a46.06,46.06,0,0,0,46-46V64a46,46,0,0,0-92,0v64A46.06,46.06,0,0,0,128,174ZM94,64a34,34,0,0,1,68,0v64a34,34,0,0,1-68,0Zm40,141.75V240a6,6,0,0,1-12,0V205.75A78.09,78.09,0,0,1,50,128a6,6,0,0,1,12,0,66,66,0,0,0,132,0,6,6,0,0,1,12,0A78.09,78.09,0,0,1,134,205.75Z"}))],["regular",g.createElement(g.Fragment,null,g.createElement("path",{d:"M128,176a48.05,48.05,0,0,0,48-48V64a48,48,0,0,0-96,0v64A48.05,48.05,0,0,0,128,176ZM96,64a32,32,0,0,1,64,0v64a32,32,0,0,1-64,0Zm40,143.6V240a8,8,0,0,1-16,0V207.6A80.11,80.11,0,0,1,48,128a8,8,0,0,1,16,0,64,64,0,0,0,128,0,8,8,0,0,1,16,0A80.11,80.11,0,0,1,136,207.6Z"}))],["thin",g.createElement(g.Fragment,null,g.createElement("path",{d:"M128,172a44.05,44.05,0,0,0,44-44V64a44,44,0,0,0-88,0v64A44.05,44.05,0,0,0,128,172ZM92,64a36,36,0,0,1,72,0v64a36,36,0,0,1-72,0Zm40,139.89V240a4,4,0,0,1-8,0V203.89A76.09,76.09,0,0,1,52,128a4,4,0,0,1,8,0,68,68,0,0,0,136,0,4,4,0,0,1,8,0A76.09,76.09,0,0,1,132,203.89Z"}))]]),Uc=g.forwardRef((e,t)=>g.createElement(lt,{ref:t,...e,weights:Lg}));Uc.displayName="MicrophoneIcon";const _g=new Map([["bold",g.createElement(g.Fragment,null,g.createElement("path",{d:"M56.88,39.93A12,12,0,1,0,39.12,56.07L76,96.64V128a52,52,0,0,0,72.11,48l11.26,12.39A67.34,67.34,0,0,1,128,196a68.07,68.07,0,0,1-68-68,12,12,0,0,0-24,0,92.14,92.14,0,0,0,80,91.22V240a12,12,0,0,0,24,0V219.23a90.39,90.39,0,0,0,35.92-12.68l23.2,25.52a12,12,0,0,0,17.76-16.14ZM128,156a28,28,0,0,1-28-28v-5l29.9,32.89C129.27,156,128.64,156,128,156Zm63-2.42A67.63,67.63,0,0,0,196,128a12,12,0,0,1,24,0,91.48,91.48,0,0,1-6.74,34.61,12,12,0,0,1-22.23-9ZM85.7,33.75A52,52,0,0,1,180,64v56.54a12,12,0,0,1-24,0V64a28,28,0,0,0-50.79-16.28,12,12,0,0,1-19.51-14Z"}))],["duotone",g.createElement(g.Fragment,null,g.createElement("path",{d:"M168,64v64a40,40,0,0,1-40,40h0a40,40,0,0,1-40-40V64a40,40,0,0,1,40-40h0A40,40,0,0,1,168,64Z",opacity:"0.2"}),g.createElement("path",{d:"M213.92,218.62l-160-176A8,8,0,0,0,42.08,53.38L80,95.09V128a48,48,0,0,0,69.11,43.12l11.1,12.2A63.41,63.41,0,0,1,128,192a64.07,64.07,0,0,1-64-64,8,8,0,0,0-16,0,80.11,80.11,0,0,0,72,79.6V240a8,8,0,0,0,16,0V207.59a78.83,78.83,0,0,0,35.16-12.22l30.92,34a8,8,0,1,0,11.84-10.76ZM128,160a32,32,0,0,1-32-32V112.69l41.66,45.82A32,32,0,0,1,128,160Zm57.52-3.91A63.32,63.32,0,0,0,192,128a8,8,0,0,1,16,0,79.16,79.16,0,0,1-8.11,35.12,8,8,0,0,1-7.19,4.49,7.88,7.88,0,0,1-3.51-.82A8,8,0,0,1,185.52,156.09ZM84,44.87A48,48,0,0,1,176,64v64a49.19,49.19,0,0,1-.26,5,8,8,0,0,1-8,7.17,8.13,8.13,0,0,1-.84,0,8,8,0,0,1-7.12-8.79c.11-1.1.17-2.24.17-3.36V64A32,32,0,0,0,98.64,51.25,8,8,0,1,1,84,44.87Z"}))],["fill",g.createElement(g.Fragment,null,g.createElement("path",{d:"M213.38,229.92a8,8,0,0,1-11.3-.54l-30.92-34A78.83,78.83,0,0,1,136,207.59V240a8,8,0,0,1-16,0V207.6A80.11,80.11,0,0,1,48,128a8,8,0,0,1,16,0,64.07,64.07,0,0,0,64,64,63.41,63.41,0,0,0,32.21-8.68l-11.1-12.2A48,48,0,0,1,80,128V95.09L42.08,53.38A8,8,0,0,1,53.92,42.62l160,176A8,8,0,0,1,213.38,229.92Zm-24.19-63.13a7.88,7.88,0,0,0,3.51.82,8,8,0,0,0,7.19-4.49A79.16,79.16,0,0,0,208,128a8,8,0,0,0-16,0,63.32,63.32,0,0,1-6.48,28.09A8,8,0,0,0,189.19,166.79Zm-27.33-29.22A8,8,0,0,0,175.74,133a49.49,49.49,0,0,0,.26-5V64A48,48,0,0,0,84,44.87a8,8,0,0,0,1.41,8.57Z"}))],["light",g.createElement(g.Fragment,null,g.createElement("path",{d:"M212.44,220,52.44,44A6,6,0,0,0,43.56,52L82,94.32V128a46,46,0,0,0,67.56,40.64l13.75,15.12A65.26,65.26,0,0,1,128,194a66.08,66.08,0,0,1-66-66,6,6,0,0,0-12,0,78.09,78.09,0,0,0,72,77.75V240a6,6,0,0,0,12,0V205.77a76.93,76.93,0,0,0,37.48-13L203.56,228a6,6,0,0,0,8.88-8.08ZM128,162a34,34,0,0,1-34-34V107.52l47.12,51.84A33.82,33.82,0,0,1,128,162Zm59.32-5A65.38,65.38,0,0,0,194,128a6,6,0,0,1,12,0,77.33,77.33,0,0,1-7.9,34.25A6,6,0,1,1,187.32,157ZM85.8,45.67A46,46,0,0,1,174,64v64a45.17,45.17,0,0,1-.25,4.81,6,6,0,0,1-6,5.38q-.31,0-.63,0a6,6,0,0,1-5.34-6.59A35.41,35.41,0,0,0,162,128V64A34,34,0,0,0,96.8,50.45a6,6,0,0,1-11-4.78Z"}))],["regular",g.createElement(g.Fragment,null,g.createElement("path",{d:"M213.92,218.62l-160-176A8,8,0,0,0,42.08,53.38L80,95.09V128a48,48,0,0,0,69.11,43.12l11.1,12.2A63.41,63.41,0,0,1,128,192a64.07,64.07,0,0,1-64-64,8,8,0,0,0-16,0,80.11,80.11,0,0,0,72,79.6V240a8,8,0,0,0,16,0V207.59a78.83,78.83,0,0,0,35.16-12.22l30.92,34a8,8,0,1,0,11.84-10.76ZM128,160a32,32,0,0,1-32-32V112.69l41.66,45.82A32,32,0,0,1,128,160Zm57.52-3.91A63.32,63.32,0,0,0,192,128a8,8,0,0,1,16,0,79.16,79.16,0,0,1-8.11,35.12,8,8,0,0,1-7.19,4.49,7.88,7.88,0,0,1-3.51-.82A8,8,0,0,1,185.52,156.09ZM84,44.87A48,48,0,0,1,176,64v64a49.19,49.19,0,0,1-.26,5,8,8,0,0,1-8,7.17,8.13,8.13,0,0,1-.84,0,8,8,0,0,1-7.12-8.79c.11-1.1.17-2.24.17-3.36V64A32,32,0,0,0,98.64,51.25,8,8,0,1,1,84,44.87Z"}))],["thin",g.createElement(g.Fragment,null,g.createElement("path",{d:"M211,221.31,51,45.31A4,4,0,0,0,45,50.69L84,93.55V128a44,44,0,0,0,66,38.12l16.38,18A67.21,67.21,0,0,1,128,196a68.07,68.07,0,0,1-68-68,4,4,0,0,0-8,0,76.09,76.09,0,0,0,72,75.89V240a4,4,0,0,0,8,0V203.89a75.1,75.1,0,0,0,39.79-13.77L205,226.69a4,4,0,1,0,5.92-5.38ZM128,164a36,36,0,0,1-36-36V102.35L144.43,160A35.83,35.83,0,0,1,128,164Zm61.12-6.15A67.44,67.44,0,0,0,196,128a4,4,0,0,1,8,0,75.28,75.28,0,0,1-7.7,33.37,4,4,0,0,1-7.18-3.52ZM87.63,46.46A44,44,0,0,1,172,64v64a44.2,44.2,0,0,1-.24,4.61,4,4,0,0,1-4,3.58l-.42,0a4,4,0,0,1-3.57-4.39A36.67,36.67,0,0,0,164,128V64A36,36,0,0,0,95,49.66a4,4,0,0,1-7.34-3.2Z"}))]]),zc=g.forwardRef((e,t)=>g.createElement(lt,{ref:t,...e,weights:_g}));zc.displayName="MicrophoneSlashIcon";const Bg=new Map([["bold",g.createElement(g.Fragment,null,g.createElement("path",{d:"M208,36H48A28,28,0,0,0,20,64V176a28,28,0,0,0,28,28H208a28,28,0,0,0,28-28V64A28,28,0,0,0,208,36Zm4,140a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V64a4,4,0,0,1,4-4H208a4,4,0,0,1,4,4Zm-40,52a12,12,0,0,1-12,12H96a12,12,0,0,1,0-24h64A12,12,0,0,1,172,228ZM160.49,103.51a12,12,0,0,1-17,17L140,117v35a12,12,0,0,1-24,0V117l-3.51,3.52a12,12,0,0,1-17-17l24-24a12,12,0,0,1,17,0Z"}))],["duotone",g.createElement(g.Fragment,null,g.createElement("path",{d:"M224,64V176a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V64A16,16,0,0,1,48,48H208A16,16,0,0,1,224,64Z",opacity:"0.2"}),g.createElement("path",{d:"M208,40H48A24,24,0,0,0,24,64V176a24,24,0,0,0,24,24H208a24,24,0,0,0,24-24V64A24,24,0,0,0,208,40Zm8,136a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V64a8,8,0,0,1,8-8H208a8,8,0,0,1,8,8Zm-48,48a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,224ZM157.66,106.34a8,8,0,0,1-11.32,11.32L136,107.31V152a8,8,0,0,1-16,0V107.31l-10.34,10.35a8,8,0,0,1-11.32-11.32l24-24a8,8,0,0,1,11.32,0Z"}))],["fill",g.createElement(g.Fragment,null,g.createElement("path",{d:"M168,224a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,224ZM232,64V176a24,24,0,0,1-24,24H48a24,24,0,0,1-24-24V64A24,24,0,0,1,48,40H208A24,24,0,0,1,232,64Zm-74.34,42.34-24-24a8,8,0,0,0-11.32,0l-24,24a8,8,0,0,0,11.32,11.32L120,107.31V152a8,8,0,0,0,16,0V107.31l10.34,10.35a8,8,0,0,0,11.32-11.32Z"}))],["light",g.createElement(g.Fragment,null,g.createElement("path",{d:"M208,42H48A22,22,0,0,0,26,64V176a22,22,0,0,0,22,22H208a22,22,0,0,0,22-22V64A22,22,0,0,0,208,42Zm10,134a10,10,0,0,1-10,10H48a10,10,0,0,1-10-10V64A10,10,0,0,1,48,54H208a10,10,0,0,1,10,10Zm-52,48a6,6,0,0,1-6,6H96a6,6,0,0,1,0-12h64A6,6,0,0,1,166,224Zm-9.76-116.24a6,6,0,1,1-8.48,8.48L134,102.49V152a6,6,0,0,1-12,0V102.49l-13.76,13.75a6,6,0,0,1-8.48-8.48l24-24a6,6,0,0,1,8.48,0Z"}))],["regular",g.createElement(g.Fragment,null,g.createElement("path",{d:"M208,40H48A24,24,0,0,0,24,64V176a24,24,0,0,0,24,24H208a24,24,0,0,0,24-24V64A24,24,0,0,0,208,40Zm8,136a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V64a8,8,0,0,1,8-8H208a8,8,0,0,1,8,8Zm-48,48a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,224ZM157.66,106.34a8,8,0,0,1-11.32,11.32L136,107.31V152a8,8,0,0,1-16,0V107.31l-10.34,10.35a8,8,0,0,1-11.32-11.32l24-24a8,8,0,0,1,11.32,0Z"}))],["thin",g.createElement(g.Fragment,null,g.createElement("path",{d:"M208,44H48A20,20,0,0,0,28,64V176a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V64A20,20,0,0,0,208,44Zm12,132a12,12,0,0,1-12,12H48a12,12,0,0,1-12-12V64A12,12,0,0,1,48,52H208a12,12,0,0,1,12,12Zm-56,48a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h64A4,4,0,0,1,164,224Zm-9.17-114.83a4,4,0,0,1-5.66,5.66L132,97.66V152a4,4,0,0,1-8,0V97.66l-17.17,17.17a4,4,0,0,1-5.66-5.66l24-24a4,4,0,0,1,5.66,0Z"}))]]),Wc=g.forwardRef((e,t)=>g.createElement(lt,{ref:t,...e,weights:Bg}));Wc.displayName="MonitorArrowUpIcon";const Hg=new Map([["bold",g.createElement(g.Fragment,null,g.createElement("path",{d:"M140,32V64a12,12,0,0,1-24,0V32a12,12,0,0,1,24,0Zm33.25,62.75a12,12,0,0,0,8.49-3.52L204.37,68.6a12,12,0,0,0-17-17L164.77,74.26a12,12,0,0,0,8.48,20.49ZM224,116H192a12,12,0,0,0,0,24h32a12,12,0,0,0,0-24Zm-42.26,48.77a12,12,0,1,0-17,17l22.63,22.63a12,12,0,0,0,17-17ZM128,180a12,12,0,0,0-12,12v32a12,12,0,0,0,24,0V192A12,12,0,0,0,128,180ZM74.26,164.77,51.63,187.4a12,12,0,0,0,17,17l22.63-22.63a12,12,0,1,0-17-17ZM76,128a12,12,0,0,0-12-12H32a12,12,0,0,0,0,24H64A12,12,0,0,0,76,128ZM68.6,51.63a12,12,0,1,0-17,17L74.26,91.23a12,12,0,0,0,17-17Z"}))],["duotone",g.createElement(g.Fragment,null,g.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),g.createElement("path",{d:"M136,32V64a8,8,0,0,1-16,0V32a8,8,0,0,1,16,0Zm37.25,58.75a8,8,0,0,0,5.66-2.35l22.63-22.62a8,8,0,0,0-11.32-11.32L167.6,77.09a8,8,0,0,0,5.65,13.66ZM224,120H192a8,8,0,0,0,0,16h32a8,8,0,0,0,0-16Zm-45.09,47.6a8,8,0,0,0-11.31,11.31l22.62,22.63a8,8,0,0,0,11.32-11.32ZM128,184a8,8,0,0,0-8,8v32a8,8,0,0,0,16,0V192A8,8,0,0,0,128,184ZM77.09,167.6,54.46,190.22a8,8,0,0,0,11.32,11.32L88.4,178.91A8,8,0,0,0,77.09,167.6ZM72,128a8,8,0,0,0-8-8H32a8,8,0,0,0,0,16H64A8,8,0,0,0,72,128ZM65.78,54.46A8,8,0,0,0,54.46,65.78L77.09,88.4A8,8,0,0,0,88.4,77.09Z"}))],["fill",g.createElement(g.Fragment,null,g.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm33.94,58.75,17-17a8,8,0,0,1,11.32,11.32l-17,17a8,8,0,0,1-11.31-11.31ZM48,136a8,8,0,0,1,0-16H72a8,8,0,0,1,0,16Zm46.06,37.25-17,17a8,8,0,0,1-11.32-11.32l17-17a8,8,0,0,1,11.31,11.31Zm0-79.19a8,8,0,0,1-11.31,0l-17-17A8,8,0,0,1,77.09,65.77l17,17A8,8,0,0,1,94.06,94.06ZM136,208a8,8,0,0,1-16,0V184a8,8,0,0,1,16,0Zm0-136a8,8,0,0,1-16,0V48a8,8,0,0,1,16,0Zm54.23,118.23a8,8,0,0,1-11.32,0l-17-17a8,8,0,0,1,11.31-11.31l17,17A8,8,0,0,1,190.23,190.23ZM208,136H184a8,8,0,0,1,0-16h24a8,8,0,0,1,0,16Z"}))],["light",g.createElement(g.Fragment,null,g.createElement("path",{d:"M134,32V64a6,6,0,0,1-12,0V32a6,6,0,0,1,12,0Zm39.25,56.75A6,6,0,0,0,177.5,87l22.62-22.63a6,6,0,0,0-8.48-8.48L169,78.5a6,6,0,0,0,4.24,10.25ZM224,122H192a6,6,0,0,0,0,12h32a6,6,0,0,0,0-12Zm-46.5,47A6,6,0,0,0,169,177.5l22.63,22.62a6,6,0,0,0,8.48-8.48ZM128,186a6,6,0,0,0-6,6v32a6,6,0,0,0,12,0V192A6,6,0,0,0,128,186ZM78.5,169,55.88,191.64a6,6,0,1,0,8.48,8.48L87,177.5A6,6,0,1,0,78.5,169ZM70,128a6,6,0,0,0-6-6H32a6,6,0,0,0,0,12H64A6,6,0,0,0,70,128ZM64.36,55.88a6,6,0,0,0-8.48,8.48L78.5,87A6,6,0,1,0,87,78.5Z"}))],["regular",g.createElement(g.Fragment,null,g.createElement("path",{d:"M136,32V64a8,8,0,0,1-16,0V32a8,8,0,0,1,16,0Zm37.25,58.75a8,8,0,0,0,5.66-2.35l22.63-22.62a8,8,0,0,0-11.32-11.32L167.6,77.09a8,8,0,0,0,5.65,13.66ZM224,120H192a8,8,0,0,0,0,16h32a8,8,0,0,0,0-16Zm-45.09,47.6a8,8,0,0,0-11.31,11.31l22.62,22.63a8,8,0,0,0,11.32-11.32ZM128,184a8,8,0,0,0-8,8v32a8,8,0,0,0,16,0V192A8,8,0,0,0,128,184ZM77.09,167.6,54.46,190.22a8,8,0,0,0,11.32,11.32L88.4,178.91A8,8,0,0,0,77.09,167.6ZM72,128a8,8,0,0,0-8-8H32a8,8,0,0,0,0,16H64A8,8,0,0,0,72,128ZM65.78,54.46A8,8,0,0,0,54.46,65.78L77.09,88.4A8,8,0,0,0,88.4,77.09Z"}))],["thin",g.createElement(g.Fragment,null,g.createElement("path",{d:"M132,32V64a4,4,0,0,1-8,0V32a4,4,0,0,1,8,0Zm41.25,54.75a4,4,0,0,0,2.83-1.18L198.71,63a4,4,0,0,0-5.66-5.66L170.43,79.92a4,4,0,0,0,2.82,6.83ZM224,124H192a4,4,0,0,0,0,8h32a4,4,0,0,0,0-8Zm-47.92,46.43a4,4,0,1,0-5.65,5.65l22.62,22.63a4,4,0,0,0,5.66-5.66ZM128,188a4,4,0,0,0-4,4v32a4,4,0,0,0,8,0V192A4,4,0,0,0,128,188ZM79.92,170.43,57.29,193.05A4,4,0,0,0,63,198.71l22.62-22.63a4,4,0,1,0-5.65-5.65ZM68,128a4,4,0,0,0-4-4H32a4,4,0,0,0,0,8H64A4,4,0,0,0,68,128ZM63,57.29A4,4,0,0,0,57.29,63L79.92,85.57a4,4,0,1,0,5.65-5.65Z"}))]]),Do=g.forwardRef((e,t)=>g.createElement(lt,{ref:t,...e,weights:Hg}));Do.displayName="SpinnerIcon";const Ug=new Map([["bold",g.createElement(g.Fragment,null,g.createElement("path",{d:"M249.45,69.31a12,12,0,0,0-12.51,1L212,88.43V72a20,20,0,0,0-20-20H32A20,20,0,0,0,12,72V184a20,20,0,0,0,20,20H192a20,20,0,0,0,20-20V167.57l24.94,18.14A12,12,0,0,0,256,176V80A12,12,0,0,0,249.45,69.31ZM188,180H36V76H188Zm44-27.57-20-14.54V118.11l20-14.54Z"}))],["duotone",g.createElement(g.Fragment,null,g.createElement("path",{d:"M200,72V184a8,8,0,0,1-8,8H32a8,8,0,0,1-8-8V72a8,8,0,0,1,8-8H192A8,8,0,0,1,200,72Z",opacity:"0.2"}),g.createElement("path",{d:"M251.77,73a8,8,0,0,0-8.21.39L208,97.05V72a16,16,0,0,0-16-16H32A16,16,0,0,0,16,72V184a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V159l35.56,23.71A8,8,0,0,0,248,184a8,8,0,0,0,8-8V80A8,8,0,0,0,251.77,73ZM192,184H32V72H192V184Zm48-22.95-32-21.33V116.28L240,95Z"}))],["fill",g.createElement(g.Fragment,null,g.createElement("path",{d:"M192,72V184a16,16,0,0,1-16,16H32a16,16,0,0,1-16-16V72A16,16,0,0,1,32,56H176A16,16,0,0,1,192,72Zm58,.25a8.23,8.23,0,0,0-6.63,1.22L209.78,95.86A4,4,0,0,0,208,99.19v57.62a4,4,0,0,0,1.78,3.33l33.78,22.52a8,8,0,0,0,8.58.19,8.33,8.33,0,0,0,3.86-7.17V80A8,8,0,0,0,250,72.25Z"}))],["light",g.createElement(g.Fragment,null,g.createElement("path",{d:"M250.83,74.71a6,6,0,0,0-6.16.3L206,100.79V72a14,14,0,0,0-14-14H32A14,14,0,0,0,18,72V184a14,14,0,0,0,14,14H192a14,14,0,0,0,14-14V155.21L244.67,181a6,6,0,0,0,9.33-5V80A6,6,0,0,0,250.83,74.71ZM194,184a2,2,0,0,1-2,2H32a2,2,0,0,1-2-2V72a2,2,0,0,1,2-2H192a2,2,0,0,1,2,2Zm48-19.21-36-24V115.21l36-24Z"}))],["regular",g.createElement(g.Fragment,null,g.createElement("path",{d:"M251.77,73a8,8,0,0,0-8.21.39L208,97.05V72a16,16,0,0,0-16-16H32A16,16,0,0,0,16,72V184a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V159l35.56,23.71A8,8,0,0,0,248,184a8,8,0,0,0,8-8V80A8,8,0,0,0,251.77,73ZM192,184H32V72H192V184Zm48-22.95-32-21.33V116.28L240,95Z"}))],["thin",g.createElement(g.Fragment,null,g.createElement("path",{d:"M249.89,76.47a4,4,0,0,0-4.11.2L204,104.53V72a12,12,0,0,0-12-12H32A12,12,0,0,0,20,72V184a12,12,0,0,0,12,12H192a12,12,0,0,0,12-12V151.47l41.78,27.86A4,4,0,0,0,252,176V80A4,4,0,0,0,249.89,76.47ZM196,184a4,4,0,0,1-4,4H32a4,4,0,0,1-4-4V72a4,4,0,0,1,4-4H192a4,4,0,0,1,4,4Zm48-15.47-40-26.67V114.14l40-26.67Z"}))]]),Zc=g.forwardRef((e,t)=>g.createElement(lt,{ref:t,...e,weights:Ug}));Zc.displayName="VideoCameraIcon";const zg=new Map([["bold",g.createElement(g.Fragment,null,g.createElement("path",{d:"M249.45,69.31a12,12,0,0,0-12.51,1L212,88.43V72a20,20,0,0,0-20-20H123.88a12,12,0,0,0,0,24H188v68a12,12,0,0,0,4.46,9.33c.15.13.31.25.48.38l44,32A12,12,0,0,0,256,176V80A12,12,0,0,0,249.45,69.31ZM232,152.43l-20-14.54V118.11l20-14.54ZM56.88,31.93A12,12,0,1,0,39.12,48.07L42.69,52H32A20,20,0,0,0,12,72V184a20,20,0,0,0,20,20H180.87l18.25,20.07a12,12,0,0,0,17.76-16.14ZM36,180V76H64.51l94.55,104Z"}))],["duotone",g.createElement(g.Fragment,null,g.createElement("path",{d:"M200,72V184a8,8,0,0,1-8,8H32a8,8,0,0,1-8-8V72a8,8,0,0,1,8-8H192A8,8,0,0,1,200,72Z",opacity:"0.2"}),g.createElement("path",{d:"M251.77,73a8,8,0,0,0-8.21.39L208,97.05V72a16,16,0,0,0-16-16H113.06a8,8,0,0,0,0,16H192v87.63a8,8,0,0,0,16,0V159l35.56,23.71A8,8,0,0,0,248,184a8,8,0,0,0,8-8V80A8,8,0,0,0,251.77,73ZM240,161.05l-32-21.33V116.28L240,95ZM53.92,34.62A8,8,0,1,0,42.08,45.38L51.73,56H32A16,16,0,0,0,16,72V184a16,16,0,0,0,16,16H182.64l19.44,21.38a8,8,0,1,0,11.84-10.76ZM32,184V72H66.28L168.1,184Z"}))],["fill",g.createElement(g.Fragment,null,g.createElement("path",{d:"M256,80.23v95.45a8.33,8.33,0,0,1-3.86,7.17,8,8,0,0,1-8.58-.19l-33.78-22.52a4,4,0,0,1-1.78-3.33V99.19a4,4,0,0,1,1.78-3.32l33.78-22.53a8,8,0,0,1,9.73.66A8.23,8.23,0,0,1,256,80.23ZM53.92,34.62A8,8,0,1,0,42.08,45.38L51.73,56H32A16,16,0,0,0,16,72V184a16,16,0,0,0,16,16H182.64l19.44,21.38a8,8,0,1,0,11.84-10.76ZM185,155.07a4,4,0,0,0,7-2.7V72a16,16,0,0,0-16-16H104a4,4,0,0,0-3,6.69Z"}))],["light",g.createElement(g.Fragment,null,g.createElement("path",{d:"M250.83,74.71a6,6,0,0,0-6.16.3L206,100.79V72a14,14,0,0,0-14-14H113.06a6,6,0,0,0,0,12H192a2,2,0,0,1,2,2v87.63a6,6,0,0,0,12,0v-4.42L244.67,181a6,6,0,0,0,9.33-5V80A6,6,0,0,0,250.83,74.71ZM242,164.79l-36-24V115.21l36-24ZM52.44,36A6,6,0,0,0,43.56,44L56.25,58H32A14,14,0,0,0,18,72V184a14,14,0,0,0,14,14H183.53l20,22a6,6,0,0,0,8.88-8.08ZM32,186a2,2,0,0,1-2-2V72a2,2,0,0,1,2-2H67.16L172.62,186Z"}))],["regular",g.createElement(g.Fragment,null,g.createElement("path",{d:"M251.77,73a8,8,0,0,0-8.21.39L208,97.05V72a16,16,0,0,0-16-16H113.06a8,8,0,0,0,0,16H192v87.63a8,8,0,0,0,16,0V159l35.56,23.71A8,8,0,0,0,248,184a8,8,0,0,0,8-8V80A8,8,0,0,0,251.77,73ZM240,161.05l-32-21.33V116.28L240,95ZM53.92,34.62A8,8,0,1,0,42.08,45.38L51.73,56H32A16,16,0,0,0,16,72V184a16,16,0,0,0,16,16H182.64l19.44,21.38a8,8,0,1,0,11.84-10.76ZM32,184V72H66.28L168.1,184Z"}))],["thin",g.createElement(g.Fragment,null,g.createElement("path",{d:"M249.89,76.47a4,4,0,0,0-4.11.2L204,104.53V72a12,12,0,0,0-12-12H113.06a4,4,0,0,0,0,8H192a4,4,0,0,1,4,4v87.63a4,4,0,0,0,8,0v-8.16l41.78,27.86A4,4,0,0,0,252,176V80A4,4,0,0,0,249.89,76.47ZM244,168.53l-40-26.67V114.14l40-26.67ZM51,37.31A4,4,0,0,0,45,42.69L60.78,60H32A12,12,0,0,0,20,72V184a12,12,0,0,0,12,12H184.41L205,218.69a4,4,0,1,0,5.92-5.38ZM32,188a4,4,0,0,1-4-4V72a4,4,0,0,1,4-4H68.05L177.14,188Z"}))]]),Gc=g.forwardRef((e,t)=>g.createElement(lt,{ref:t,...e,weights:zg}));Gc.displayName="VideoCameraSlashIcon";function ha(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Wg(...e){return t=>{let n=!1;const s=e.map(r=>{const i=ha(r,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let r=0;r<s.length;r++){const i=s[r];typeof i=="function"?i():ha(e[r],null)}}}}function Zg(e){const t=Kg(e),n=g.forwardRef((s,r)=>{const{children:i,...o}=s,a=g.Children.toArray(i),c=a.find(qg);if(c){const d=c.props.children,u=a.map(f=>f===c?g.Children.count(d)>1?g.Children.only(null):g.isValidElement(d)?d.props.children:null:f);return l.jsx(t,{...o,ref:r,children:g.isValidElement(d)?g.cloneElement(d,void 0,u):null})}return l.jsx(t,{...o,ref:r,children:i})});return n.displayName=`${e}.Slot`,n}var Gg=Zg("Slot");function Kg(e){const t=g.forwardRef((n,s)=>{const{children:r,...i}=n;if(g.isValidElement(r)){const o=Jg(r),a=Xg(i,r.props);return r.type!==g.Fragment&&(a.ref=s?Wg(s,o):o),g.cloneElement(r,a)}return g.Children.count(r)>1?g.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Yg=Symbol("radix.slottable");function qg(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Yg}function Xg(e,t){const n={...t};for(const s in t){const r=e[s],i=t[s];/^on[A-Z]/.test(s)?r&&i?n[s]=(...a)=>{const c=i(...a);return r(...a),c}:r&&(n[s]=r):s==="style"?n[s]={...r,...i}:s==="className"&&(n[s]=[r,i].filter(Boolean).join(" "))}return{...e,...n}}function Jg(e){var s,r;let t=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const $o="-",Qg=e=>{const t=tp(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:s}=e;return{getClassGroupId:o=>{const a=o.split($o);return a[0]===""&&a.length!==1&&a.shift(),Kc(a,t)||ep(o)},getConflictingClassGroupIds:(o,a)=>{const c=n[o]||[];return a&&s[o]?[...c,...s[o]]:c}}},Kc=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],s=t.nextPart.get(n),r=s?Kc(e.slice(1),s):void 0;if(r)return r;if(t.validators.length===0)return;const i=e.join($o);return(o=t.validators.find(({validator:a})=>a(i)))==null?void 0:o.classGroupId},ma=/^\[(.+)\]$/,ep=e=>{if(ma.test(e)){const t=ma.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},tp=e=>{const{theme:t,classGroups:n}=e,s={nextPart:new Map,validators:[]};for(const r in n)Hr(n[r],s,r,t);return s},Hr=(e,t,n,s)=>{e.forEach(r=>{if(typeof r=="string"){const i=r===""?t:ga(t,r);i.classGroupId=n;return}if(typeof r=="function"){if(np(r)){Hr(r(s),t,n,s);return}t.validators.push({validator:r,classGroupId:n});return}Object.entries(r).forEach(([i,o])=>{Hr(o,ga(t,i),n,s)})})},ga=(e,t)=>{let n=e;return t.split($o).forEach(s=>{n.nextPart.has(s)||n.nextPart.set(s,{nextPart:new Map,validators:[]}),n=n.nextPart.get(s)}),n},np=e=>e.isThemeGetter,sp=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,s=new Map;const r=(i,o)=>{n.set(i,o),t++,t>e&&(t=0,s=n,n=new Map)};return{get(i){let o=n.get(i);if(o!==void 0)return o;if((o=s.get(i))!==void 0)return r(i,o),o},set(i,o){n.has(i)?n.set(i,o):r(i,o)}}},Ur="!",zr=":",rp=zr.length,op=e=>{const{prefix:t,experimentalParseClassName:n}=e;let s=r=>{const i=[];let o=0,a=0,c=0,d;for(let x=0;x<r.length;x++){let m=r[x];if(o===0&&a===0){if(m===zr){i.push(r.slice(c,x)),c=x+rp;continue}if(m==="/"){d=x;continue}}m==="["?o++:m==="]"?o--:m==="("?a++:m===")"&&a--}const u=i.length===0?r:r.substring(c),f=ip(u),h=f!==u,p=d&&d>c?d-c:void 0;return{modifiers:i,hasImportantModifier:h,baseClassName:f,maybePostfixModifierPosition:p}};if(t){const r=t+zr,i=s;s=o=>o.startsWith(r)?i(o.substring(r.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:o,maybePostfixModifierPosition:void 0}}if(n){const r=s;s=i=>n({className:i,parseClassName:r})}return s},ip=e=>e.endsWith(Ur)?e.substring(0,e.length-1):e.startsWith(Ur)?e.substring(1):e,ap=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(s=>[s,!0]));return s=>{if(s.length<=1)return s;const r=[];let i=[];return s.forEach(o=>{o[0]==="["||t[o]?(r.push(...i.sort(),o),i=[]):i.push(o)}),r.push(...i.sort()),r}},lp=e=>({cache:sp(e.cacheSize),parseClassName:op(e),sortModifiers:ap(e),...Qg(e)}),cp=/\s+/,dp=(e,t)=>{const{parseClassName:n,getClassGroupId:s,getConflictingClassGroupIds:r,sortModifiers:i}=t,o=[],a=e.trim().split(cp);let c="";for(let d=a.length-1;d>=0;d-=1){const u=a[d],{isExternal:f,modifiers:h,hasImportantModifier:p,baseClassName:x,maybePostfixModifierPosition:m}=n(u);if(f){c=u+(c.length>0?" "+c:c);continue}let b=!!m,S=s(b?x.substring(0,m):x);if(!S){if(!b){c=u+(c.length>0?" "+c:c);continue}if(S=s(x),!S){c=u+(c.length>0?" "+c:c);continue}b=!1}const C=i(h).join(":"),T=p?C+Ur:C,k=T+S;if(o.includes(k))continue;o.push(k);const v=r(S,b);for(let j=0;j<v.length;++j){const V=v[j];o.push(T+V)}c=u+(c.length>0?" "+c:c)}return c};function up(){let e=0,t,n,s="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Yc(t))&&(s&&(s+=" "),s+=n);return s}const Yc=e=>{if(typeof e=="string")return e;let t,n="";for(let s=0;s<e.length;s++)e[s]&&(t=Yc(e[s]))&&(n&&(n+=" "),n+=t);return n};function fp(e,...t){let n,s,r,i=o;function o(c){const d=t.reduce((u,f)=>f(u),e());return n=lp(d),s=n.cache.get,r=n.cache.set,i=a,a(c)}function a(c){const d=s(c);if(d)return d;const u=dp(c,n);return r(c,u),u}return function(){return i(up.apply(null,arguments))}}const He=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},qc=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Xc=/^\((?:(\w[\w-]*):)?(.+)\)$/i,hp=/^\d+\/\d+$/,mp=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,gp=/\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$/,pp=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,yp=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,xp=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Gt=e=>hp.test(e),he=e=>!!e&&!Number.isNaN(Number(e)),St=e=>!!e&&Number.isInteger(Number(e)),rr=e=>e.endsWith("%")&&he(e.slice(0,-1)),ht=e=>mp.test(e),bp=()=>!0,vp=e=>gp.test(e)&&!pp.test(e),Jc=()=>!1,wp=e=>yp.test(e),Sp=e=>xp.test(e),Cp=e=>!X(e)&&!J(e),kp=e=>yn(e,td,Jc),X=e=>qc.test(e),Dt=e=>yn(e,nd,vp),or=e=>yn(e,Np,he),pa=e=>yn(e,Qc,Jc),Tp=e=>yn(e,ed,Sp),es=e=>yn(e,sd,wp),J=e=>Xc.test(e),wn=e=>xn(e,nd),Ep=e=>xn(e,Mp),ya=e=>xn(e,Qc),Ap=e=>xn(e,td),jp=e=>xn(e,ed),ts=e=>xn(e,sd,!0),yn=(e,t,n)=>{const s=qc.exec(e);return s?s[1]?t(s[1]):n(s[2]):!1},xn=(e,t,n=!1)=>{const s=Xc.exec(e);return s?s[1]?t(s[1]):n:!1},Qc=e=>e==="position"||e==="percentage",ed=e=>e==="image"||e==="url",td=e=>e==="length"||e==="size"||e==="bg-size",nd=e=>e==="length",Np=e=>e==="number",Mp=e=>e==="family-name",sd=e=>e==="shadow",Vp=()=>{const e=He("color"),t=He("font"),n=He("text"),s=He("font-weight"),r=He("tracking"),i=He("leading"),o=He("breakpoint"),a=He("container"),c=He("spacing"),d=He("radius"),u=He("shadow"),f=He("inset-shadow"),h=He("text-shadow"),p=He("drop-shadow"),x=He("blur"),m=He("perspective"),b=He("aspect"),S=He("ease"),C=He("animate"),T=()=>["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"],v=()=>[...k(),J,X],j=()=>["auto","hidden","clip","visible","scroll"],V=()=>["auto","contain","none"],E=()=>[J,X,c],_=()=>[Gt,"full","auto",...E()],y=()=>[St,"none","subgrid",J,X],D=()=>["auto",{span:["full",St,J,X]},St,J,X],W=()=>[St,"auto",J,X],te=()=>["auto","min","max","fr",J,X],ue=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ie=()=>["start","end","center","stretch","center-safe","end-safe"],fe=()=>["auto",...E()],ne=()=>[Gt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...E()],R=()=>[e,J,X],B=()=>[...k(),ya,pa,{position:[J,X]}],M=()=>["no-repeat",{repeat:["","x","y","space","round"]}],O=()=>["auto","cover","contain",Ap,kp,{size:[J,X]}],q=()=>[rr,wn,Dt],Y=()=>["","none","full",d,J,X],H=()=>["",he,wn,Dt],re=()=>["solid","dashed","dotted","double"],$=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],I=()=>[he,rr,ya,pa],L=()=>["","none",x,J,X],N=()=>["none",he,J,X],F=()=>["none",he,J,X],se=()=>[he,J,X],A=()=>[Gt,"full",...E()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ht],breakpoint:[ht],color:[bp],container:[ht],"drop-shadow":[ht],ease:["in","out","in-out"],font:[Cp],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ht],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ht],shadow:[ht],spacing:["px",he],text:[ht],"text-shadow":[ht],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Gt,X,J,b]}],container:["container"],columns:[{columns:[he,X,J,a]}],"break-after":[{"break-after":T()}],"break-before":[{"break-before":T()}],"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:v()}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:V()}],"overscroll-x":[{"overscroll-x":V()}],"overscroll-y":[{"overscroll-y":V()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:_()}],"inset-x":[{"inset-x":_()}],"inset-y":[{"inset-y":_()}],start:[{start:_()}],end:[{end:_()}],top:[{top:_()}],right:[{right:_()}],bottom:[{bottom:_()}],left:[{left:_()}],visibility:["visible","invisible","collapse"],z:[{z:[St,"auto",J,X]}],basis:[{basis:[Gt,"full","auto",a,...E()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[he,Gt,"auto","initial","none",X]}],grow:[{grow:["",he,J,X]}],shrink:[{shrink:["",he,J,X]}],order:[{order:[St,"first","last","none",J,X]}],"grid-cols":[{"grid-cols":y()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":W()}],"col-end":[{"col-end":W()}],"grid-rows":[{"grid-rows":y()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":W()}],"row-end":[{"row-end":W()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":te()}],"auto-rows":[{"auto-rows":te()}],gap:[{gap:E()}],"gap-x":[{"gap-x":E()}],"gap-y":[{"gap-y":E()}],"justify-content":[{justify:[...ue(),"normal"]}],"justify-items":[{"justify-items":[...ie(),"normal"]}],"justify-self":[{"justify-self":["auto",...ie()]}],"align-content":[{content:["normal",...ue()]}],"align-items":[{items:[...ie(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ie(),{baseline:["","last"]}]}],"place-content":[{"place-content":ue()}],"place-items":[{"place-items":[...ie(),"baseline"]}],"place-self":[{"place-self":["auto",...ie()]}],p:[{p:E()}],px:[{px:E()}],py:[{py:E()}],ps:[{ps:E()}],pe:[{pe:E()}],pt:[{pt:E()}],pr:[{pr:E()}],pb:[{pb:E()}],pl:[{pl:E()}],m:[{m:fe()}],mx:[{mx:fe()}],my:[{my:fe()}],ms:[{ms:fe()}],me:[{me:fe()}],mt:[{mt:fe()}],mr:[{mr:fe()}],mb:[{mb:fe()}],ml:[{ml:fe()}],"space-x":[{"space-x":E()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":E()}],"space-y-reverse":["space-y-reverse"],size:[{size:ne()}],w:[{w:[a,"screen",...ne()]}],"min-w":[{"min-w":[a,"screen","none",...ne()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[o]},...ne()]}],h:[{h:["screen","lh",...ne()]}],"min-h":[{"min-h":["screen","lh","none",...ne()]}],"max-h":[{"max-h":["screen","lh",...ne()]}],"font-size":[{text:["base",n,wn,Dt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,J,or]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",rr,X]}],"font-family":[{font:[Ep,X,t]}],"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:[r,J,X]}],"line-clamp":[{"line-clamp":[he,"none",J,or]}],leading:[{leading:[i,...E()]}],"list-image":[{"list-image":["none",J,X]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",J,X]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:R()}],"text-color":[{text:R()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...re(),"wavy"]}],"text-decoration-thickness":[{decoration:[he,"from-font","auto",J,Dt]}],"text-decoration-color":[{decoration:R()}],"underline-offset":[{"underline-offset":[he,"auto",J,X]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:E()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",J,X]}],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",J,X]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:B()}],"bg-repeat":[{bg:M()}],"bg-size":[{bg:O()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},St,J,X],radial:["",J,X],conic:[St,J,X]},jp,Tp]}],"bg-color":[{bg:R()}],"gradient-from-pos":[{from:q()}],"gradient-via-pos":[{via:q()}],"gradient-to-pos":[{to:q()}],"gradient-from":[{from:R()}],"gradient-via":[{via:R()}],"gradient-to":[{to:R()}],rounded:[{rounded:Y()}],"rounded-s":[{"rounded-s":Y()}],"rounded-e":[{"rounded-e":Y()}],"rounded-t":[{"rounded-t":Y()}],"rounded-r":[{"rounded-r":Y()}],"rounded-b":[{"rounded-b":Y()}],"rounded-l":[{"rounded-l":Y()}],"rounded-ss":[{"rounded-ss":Y()}],"rounded-se":[{"rounded-se":Y()}],"rounded-ee":[{"rounded-ee":Y()}],"rounded-es":[{"rounded-es":Y()}],"rounded-tl":[{"rounded-tl":Y()}],"rounded-tr":[{"rounded-tr":Y()}],"rounded-br":[{"rounded-br":Y()}],"rounded-bl":[{"rounded-bl":Y()}],"border-w":[{border:H()}],"border-w-x":[{"border-x":H()}],"border-w-y":[{"border-y":H()}],"border-w-s":[{"border-s":H()}],"border-w-e":[{"border-e":H()}],"border-w-t":[{"border-t":H()}],"border-w-r":[{"border-r":H()}],"border-w-b":[{"border-b":H()}],"border-w-l":[{"border-l":H()}],"divide-x":[{"divide-x":H()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":H()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...re(),"hidden","none"]}],"divide-style":[{divide:[...re(),"hidden","none"]}],"border-color":[{border:R()}],"border-color-x":[{"border-x":R()}],"border-color-y":[{"border-y":R()}],"border-color-s":[{"border-s":R()}],"border-color-e":[{"border-e":R()}],"border-color-t":[{"border-t":R()}],"border-color-r":[{"border-r":R()}],"border-color-b":[{"border-b":R()}],"border-color-l":[{"border-l":R()}],"divide-color":[{divide:R()}],"outline-style":[{outline:[...re(),"none","hidden"]}],"outline-offset":[{"outline-offset":[he,J,X]}],"outline-w":[{outline:["",he,wn,Dt]}],"outline-color":[{outline:R()}],shadow:[{shadow:["","none",u,ts,es]}],"shadow-color":[{shadow:R()}],"inset-shadow":[{"inset-shadow":["none",f,ts,es]}],"inset-shadow-color":[{"inset-shadow":R()}],"ring-w":[{ring:H()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:R()}],"ring-offset-w":[{"ring-offset":[he,Dt]}],"ring-offset-color":[{"ring-offset":R()}],"inset-ring-w":[{"inset-ring":H()}],"inset-ring-color":[{"inset-ring":R()}],"text-shadow":[{"text-shadow":["none",h,ts,es]}],"text-shadow-color":[{"text-shadow":R()}],opacity:[{opacity:[he,J,X]}],"mix-blend":[{"mix-blend":[...$(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":$()}],"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":[he]}],"mask-image-linear-from-pos":[{"mask-linear-from":I()}],"mask-image-linear-to-pos":[{"mask-linear-to":I()}],"mask-image-linear-from-color":[{"mask-linear-from":R()}],"mask-image-linear-to-color":[{"mask-linear-to":R()}],"mask-image-t-from-pos":[{"mask-t-from":I()}],"mask-image-t-to-pos":[{"mask-t-to":I()}],"mask-image-t-from-color":[{"mask-t-from":R()}],"mask-image-t-to-color":[{"mask-t-to":R()}],"mask-image-r-from-pos":[{"mask-r-from":I()}],"mask-image-r-to-pos":[{"mask-r-to":I()}],"mask-image-r-from-color":[{"mask-r-from":R()}],"mask-image-r-to-color":[{"mask-r-to":R()}],"mask-image-b-from-pos":[{"mask-b-from":I()}],"mask-image-b-to-pos":[{"mask-b-to":I()}],"mask-image-b-from-color":[{"mask-b-from":R()}],"mask-image-b-to-color":[{"mask-b-to":R()}],"mask-image-l-from-pos":[{"mask-l-from":I()}],"mask-image-l-to-pos":[{"mask-l-to":I()}],"mask-image-l-from-color":[{"mask-l-from":R()}],"mask-image-l-to-color":[{"mask-l-to":R()}],"mask-image-x-from-pos":[{"mask-x-from":I()}],"mask-image-x-to-pos":[{"mask-x-to":I()}],"mask-image-x-from-color":[{"mask-x-from":R()}],"mask-image-x-to-color":[{"mask-x-to":R()}],"mask-image-y-from-pos":[{"mask-y-from":I()}],"mask-image-y-to-pos":[{"mask-y-to":I()}],"mask-image-y-from-color":[{"mask-y-from":R()}],"mask-image-y-to-color":[{"mask-y-to":R()}],"mask-image-radial":[{"mask-radial":[J,X]}],"mask-image-radial-from-pos":[{"mask-radial-from":I()}],"mask-image-radial-to-pos":[{"mask-radial-to":I()}],"mask-image-radial-from-color":[{"mask-radial-from":R()}],"mask-image-radial-to-color":[{"mask-radial-to":R()}],"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":[he]}],"mask-image-conic-from-pos":[{"mask-conic-from":I()}],"mask-image-conic-to-pos":[{"mask-conic-to":I()}],"mask-image-conic-from-color":[{"mask-conic-from":R()}],"mask-image-conic-to-color":[{"mask-conic-to":R()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:B()}],"mask-repeat":[{mask:M()}],"mask-size":[{mask:O()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",J,X]}],filter:[{filter:["","none",J,X]}],blur:[{blur:L()}],brightness:[{brightness:[he,J,X]}],contrast:[{contrast:[he,J,X]}],"drop-shadow":[{"drop-shadow":["","none",p,ts,es]}],"drop-shadow-color":[{"drop-shadow":R()}],grayscale:[{grayscale:["",he,J,X]}],"hue-rotate":[{"hue-rotate":[he,J,X]}],invert:[{invert:["",he,J,X]}],saturate:[{saturate:[he,J,X]}],sepia:[{sepia:["",he,J,X]}],"backdrop-filter":[{"backdrop-filter":["","none",J,X]}],"backdrop-blur":[{"backdrop-blur":L()}],"backdrop-brightness":[{"backdrop-brightness":[he,J,X]}],"backdrop-contrast":[{"backdrop-contrast":[he,J,X]}],"backdrop-grayscale":[{"backdrop-grayscale":["",he,J,X]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[he,J,X]}],"backdrop-invert":[{"backdrop-invert":["",he,J,X]}],"backdrop-opacity":[{"backdrop-opacity":[he,J,X]}],"backdrop-saturate":[{"backdrop-saturate":[he,J,X]}],"backdrop-sepia":[{"backdrop-sepia":["",he,J,X]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":E()}],"border-spacing-x":[{"border-spacing-x":E()}],"border-spacing-y":[{"border-spacing-y":E()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",J,X]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[he,"initial",J,X]}],ease:[{ease:["linear","initial",S,J,X]}],delay:[{delay:[he,J,X]}],animate:[{animate:["none",C,J,X]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,J,X]}],"perspective-origin":[{"perspective-origin":v()}],rotate:[{rotate:N()}],"rotate-x":[{"rotate-x":N()}],"rotate-y":[{"rotate-y":N()}],"rotate-z":[{"rotate-z":N()}],scale:[{scale:F()}],"scale-x":[{"scale-x":F()}],"scale-y":[{"scale-y":F()}],"scale-z":[{"scale-z":F()}],"scale-3d":["scale-3d"],skew:[{skew:se()}],"skew-x":[{"skew-x":se()}],"skew-y":[{"skew-y":se()}],transform:[{transform:[J,X,"","none","gpu","cpu"]}],"transform-origin":[{origin:v()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:A()}],"translate-x":[{"translate-x":A()}],"translate-y":[{"translate-y":A()}],"translate-z":[{"translate-z":A()}],"translate-none":["translate-none"],accent:[{accent:R()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:R()}],"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",J,X]}],"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":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-me":[{"scroll-me":E()}],"scroll-mt":[{"scroll-mt":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-p":[{"scroll-p":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-pe":[{"scroll-pe":E()}],"scroll-pt":[{"scroll-pt":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"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",J,X]}],fill:[{fill:["none",...R()]}],"stroke-w":[{stroke:[he,wn,Dt,or]}],stroke:[{stroke:["none",...R()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","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","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","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-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-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-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-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"]}},Pp=fp(Vp);function Q(...e){return Pp(Xr.clsx(e))}const Rp=qr.cva(["text-xs font-bold tracking-wider uppercase whitespace-nowrap","inline-flex items-center justify-center gap-2 shrink-0 rounded-full cursor-pointer outline-none transition-colors duration-300","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","disabled:pointer-events-none disabled:opacity-50","aria-invalid:ring-destructive/20 aria-invalid:border-destructive dark:aria-invalid:ring-destructive/40 ","[&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0"],{variants:{variant:{default:"bg-button text-button-foreground hover:bg-muted focus:bg-muted",destructive:["bg-destructive text-destructive-foreground","hover:bg-destructive-hover focus:bg-destructive-hover focus-visible:ring-destructive-foreground/20","dark:focus-visible:ring-destructive-foreground/40"],outline:["border bg-background","hover:bg-accent hover:text-accent-foreground","dark:bg-input/30 dark:border-input dark:hover:bg-input/50"],primary:"",secondary:"bg-secondary text-secondary-foregroun 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",sm:"h-8 gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function Ip({className:e,variant:t,size:n,asChild:s=!1,...r}){const i=s?Gg:"button";return l.jsx(i,{"data-slot":"button",className:Q(Rp({variant:t,size:n,className:e})),...r})}const Dp=qr.cva(["inline-flex items-center justify-center gap-2 rounded-full","text-sm font-medium whitespace-nowrap","cursor-pointer outline-none transition-[color,border,background-color]","!focus:ring-0 !focus-visible:ring-0 !focus:border-none !focus-visible:border-none !ring-0 !border-none !outline-none","aria-invalid:ring-0 dark:aria-invalid:ring-0 aria-invalid:border-0","disabled:pointer-events-none disabled:opacity-50 disabled:not-allowed","data-[state=on]:bg-button-selected data-[state=on]:border-button-border-selected","[&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0"],{variants:{variant:{default:"bg-button hover:bg-muted focus:bg-muted hover:text-muted-foreground focus:text-muted-foreground",primary:"text-fg1 bg-button hover:bg-button-hover focus:bg-button-hover data-[state=off]:bg-button-primary hover:data-[state=off]:bg-button-hover data-[state=off]:text-button-primary-foreground",secondary:"text-fg1 bg-button hover:bg-button-hover focus:bg-button-hover data-[state=on]:bg-button-secondary hover:data-[state=on]:bg-button-secondary data-[state=on]:text-button-secondary-foreground",outline:["border border-button-border bg-button text-button-foreground","hover:bg-background focus:bg-background"]},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}});function rd({className:e,variant:t,size:n,...s}){return l.jsx(tu.Root,{"data-slot":"toggle",className:Q(Dp({variant:t,size:n,className:e})),...s})}function $p(e){const[t,n]=w.useState(()=>e.getPublishPermissions());return w.useEffect(()=>{const s=()=>{n(e.getPublishPermissions())},r=()=>{s()};return e.on("connection.connected",r),e.on("connection.disconnected",r),()=>{e.off("connection.connected",r),e.off("connection.disconnected",r)}},[e]),t}function od(e){const[t,n]=w.useState(()=>e.getLocalParticipant()),[s,r]=w.useState(()=>e.getMicrophoneTrack());return w.useEffect(()=>{const i=()=>{const a=e.getLocalParticipant(),c=e.getMicrophoneTrack();console.log("🎤 useVoxketLocalParticipant: Updating state:",{hasParticipant:!!a,hasMicTrack:!!c,isMicEnabled:e.isMicrophoneEnabled,trackPublications:a?a.trackPublications.size:0}),n(a),r(c)};i(),e.on("connection.connected",i),e.on("connection.disconnected",i),e.on("track.muted",i),e.on("track.unmuted",i);const o=e.getRoom();if(o){const a=()=>{console.log("🎤 Track published, updating participant state"),i()},c=()=>{console.log("🎤 Track unpublished, updating participant state"),i()};return o.on("localTrackPublished",a),o.on("localTrackUnpublished",c),()=>{e.off("connection.connected",i),e.off("connection.disconnected",i),e.off("track.muted",i),e.off("track.unmuted",i),o.off("localTrackPublished",a),o.off("localTrackUnpublished",c)}}else return()=>{e.off("connection.connected",i),e.off("connection.disconnected",i),e.off("track.muted",i),e.off("track.unmuted",i)}},[e]),{localParticipant:t,microphoneTrack:s}}function Mn(e,t,n){const[s,r]=w.useState(!1),[i,o]=w.useState(!1);return w.useEffect(()=>{const c=()=>{let d=!1;switch(t){case"microphone":d=e.isMicrophoneEnabled;break;case"camera":d=e.isCameraEnabled;break;case"screenShare":d=e.isScreenShareEnabled;break}console.log(`useVoxketTrackToggle: ${t} enabled state updated to:`,d),r(d)};return c(),e.on("track.muted",c),e.on("track.unmuted",c),e.on("connection.connected",c),()=>{e.off("track.muted",c),e.off("track.unmuted",c),e.off("connection.connected",c)}},[e,t]),{enabled:s,pending:i,toggle:async c=>{var d;try{o(!0);const u=c!==void 0?c:!s;switch(t){case"microphone":await e.toggleMicrophone(u);break;case"camera":await e.toggleCamera(u);break;case"screenShare":u?await e.startScreenShare():await e.stopScreenShare();break}}catch(u){(d=n==null?void 0:n.onDeviceError)==null||d.call(n,u)}finally{o(!1)}}}}function id(e){const[t,n]=w.useState(()=>e.getRoom()),[s,r]=w.useState(()=>e.getConnectionState());return w.useEffect(()=>{const i=()=>{n(e.getRoom()),r(e.getConnectionState())};return e.on("connection.connected",i),e.on("connection.disconnected",i),e.on("connection.connecting",i),()=>{e.off("connection.connected",i),e.off("connection.disconnected",i),e.off("connection.connecting",i)}},[e]),t}function Fp(e,t){const[n,s]=w.useState([]),[r,i]=w.useState("");return w.useEffect(()=>{var d;const a=async()=>{try{const u=t==="audioinput"?await e.getAudioInputDevices():await e.getVideoInputDevices();s(u)}catch(u){console.error("Failed to load devices:",u)}};a();const c=()=>{a()};return(d=navigator.mediaDevices)==null||d.addEventListener("devicechange",c),()=>{var u;(u=navigator.mediaDevices)==null||u.removeEventListener("devicechange",c)}},[e,t]),{devices:n,activeDeviceId:r,setActiveMediaDevice:async a=>{try{t==="audioinput"?await e.setAudioInputDevice(a):await e.setVideoInputDevice(a),i(a)}catch(c){console.error("Failed to set device:",c)}}}}function Op(e){const{preventSave:t=!1}=e||{};return{saveAudioInputEnabled:o=>{t||localStorage.setItem("voxket-audio-input-enabled",o.toString())},saveAudioInputDeviceId:o=>{t||localStorage.setItem("voxket-audio-input-device-id",o)},saveVideoInputEnabled:o=>{t||localStorage.setItem("voxket-video-input-enabled",o.toString())},saveVideoInputDeviceId:o=>{t||localStorage.setItem("voxket-video-input-device-id",o)}}}function ad(e){const[t,n]=w.useState(()=>e.getIsAgentConnected()),[s,r]=w.useState(()=>e.getCurrentSession()),[i,o]=w.useState(()=>e.getCurrentAgentInfo()),[a,c]=w.useState(()=>e.getAgentState()),[d,u]=w.useState(()=>e.getAgentAudioTrack()),[f,h]=w.useState(()=>e.getAgentVideoTrack());return w.useEffect(()=>{const p=()=>{const T=e.getIsAgentConnected(),k=e.getCurrentSession(),v=e.getCurrentAgentInfo(),j=e.getAgentState(),V=e.getAgentAudioTrack(),E=e.getAgentVideoTrack();console.log("🤖 useVoxketVoiceAssistant: Updating state:",{isAgentConnected:T,hasSession:!!k,sessionId:k==null?void 0:k.id,hasAgentInfo:!!v,agentState:j,hasAudioTrack:!!V,hasVideoTrack:!!E}),n(T),r(k),o(v),c(j),u(V),h(E)};p();const x=()=>{console.log("🤖 useVoxketVoiceAssistant: Agent connected event"),p()},m=()=>{console.log("🤖 useVoxketVoiceAssistant: Agent disconnected event"),p()},b=()=>{console.log("🤖 useVoxketVoiceAssistant: Session changed event"),p()},S=()=>{console.log("🤖 useVoxketVoiceAssistant: Connection changed event"),p()},C=()=>{console.log("🤖 useVoxketVoiceAssistant: Agent state changed event"),p()};return e.on("agent.connected",x),e.on("agent.speaking",x),e.on("agent.thinking",x),e.on("agent.state.changed",C),e.on("connection.disconnected",m),e.on("session.created",b),e.on("session.ended",b),e.on("session.state.changed",b),e.on("connection.connected",S),()=>{e.off("agent.connected",x),e.off("agent.speaking",x),e.off("agent.thinking",x),e.off("agent.state.changed",C),e.off("connection.disconnected",m),e.off("session.created",b),e.off("session.ended",b),e.off("session.state.changed",b),e.off("connection.connected",S)}},[e]),{agent:{isActive:t,info:i},session:s,state:a,audioTrack:d,videoTrack:f}}function Lp(e){const[t,n]=w.useState(()=>e.getVideoTrackRefs()),[s,r]=w.useState(()=>e.getCameraTrackRefs()),[i,o]=w.useState(()=>e.getScreenShareTrackRefs());return w.useEffect(()=>{const a=()=>{const d=e.getVideoTrackRefs(),u=e.getCameraTrackRefs(),f=e.getScreenShareTrackRefs();console.log("📹 useVoxketVideoTracks: Updating tracks:",{videoCount:d.length,cameraCount:u.length,screenShareCount:f.length}),n(d),r(u),o(f)};a(),e.on("connection.connected",a),e.on("connection.disconnected",a),e.on("track.muted",a),e.on("track.unmuted",a),e.on("participant.joined",a),e.on("participant.left",a);const c=e.getRoom();if(c){const d=()=>{console.log("📹 Track event, updating video tracks"),a()};return c.on("localTrackPublished",d),c.on("localTrackUnpublished",d),c.on("trackPublished",d),c.on("trackUnpublished",d),c.on("trackSubscribed",d),c.on("trackUnsubscribed",d),()=>{e.off("connection.connected",a),e.off("connection.disconnected",a),e.off("track.muted",a),e.off("track.unmuted",a),e.off("participant.joined",a),e.off("participant.left",a),c.off("localTrackPublished",d),c.off("localTrackUnpublished",d),c.off("trackPublished",d),c.off("trackUnpublished",d),c.off("trackSubscribed",d),c.off("trackUnsubscribed",d)}}else return()=>{e.off("connection.connected",a),e.off("connection.disconnected",a),e.off("track.muted",a),e.off("track.unmuted",a),e.off("participant.joined",a),e.off("participant.left",a)}},[e]),{videoTrackRefs:t,cameraTrackRefs:s,screenShareTrackRefs:i}}function xa({...e}){return l.jsx(tt.Root,{"data-slot":"select",...e})}function ba({...e}){return l.jsx(tt.Value,{"data-slot":"select-value",...e})}function va({className:e,size:t="default",children:n,...s}){return l.jsxs(tt.Trigger,{"data-slot":"select-trigger","data-size":t,className:Q(["flex w-fit cursor-pointer items-center justify-between gap-2","rounded-full px-3 py-2 text-sm whitespace-nowrap","bg-button transition-[color,border,background-color]","disabled:cursor-not-allowed disabled:opacity-50","hover:bg-muted hover:text-muted-foreground","!focus:ring-0 !focus-visible:ring-0 !focus:border-none !focus-visible:border-none !ring-0 !border-none !outline-none","aria-invalid:ring-0 dark:aria-invalid:ring-0","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","[&:not([class*='text-'])_svg:not([class*='text-'])]:text-muted-foreground","[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"],e),...s,children:[n,l.jsx(tt.Icon,{asChild:!0,children:l.jsx(Io,{weight:"bold",className:"size-4 transition-colors"})})]})}function wa({className:e,children:t,position:n="popper",...s}){return l.jsx(tt.Portal,{children:l.jsxs(tt.Content,{"data-slot":"select-content",className:Q(["bg-[#18182a]/90 backdrop-blur-md text-white border border-[#23233a] shadow-2xl","relative z-50 overflow-x-hidden overflow-y-auto rounded-xl","max-h-(--radix-select-content-available-height) min-w-[8rem]","origin-(--radix-select-content-transform-origin)","data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95","data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95","data-[side=top]:slide-in-from-bottom-2","data-[side=right]:slide-in-from-left-2","data-[side=bottom]:slide-in-from-top-2","data-[side=left]:slide-in-from-right-2"],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,...s,children:[l.jsx(_p,{}),l.jsx(tt.Viewport,{className:Q("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),l.jsx(Bp,{})]})})}function Sa({className:e,children:t,...n}){return l.jsxs(tt.Item,{"data-slot":"select-item",className:Q(["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","cursor-pointer disabled:cursor-not-allowed","focus:bg-accent focus:text-accent-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50","*:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2","[&_svg:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"],e),...n,children:[l.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:l.jsx(tt.ItemIndicator,{children:l.jsx(Hc,{className:"size-4",weight:"bold"})})}),l.jsx(tt.ItemText,{children:t})]})}function _p({className:e,...t}){return l.jsx(tt.ScrollUpButton,{"data-slot":"select-scroll-up-button",className:Q("flex cursor-default items-center justify-center py-1",e),...t,children:l.jsx(_c,{className:"size-4",weight:"bold"})})}function Bp({className:e,...t}){return l.jsx(tt.ScrollDownButton,{"data-slot":"select-scroll-down-button",className:Q("flex cursor-default items-center justify-center py-1",e),...t,children:l.jsx(Io,{className:"size-4",weight:"bold"})})}const Ca=qr.cva(["w-full rounded-full px-3 py-2 text-sm cursor-pointer","disabled:not-allowed hover:bg-button-hover focus:bg-button-hover"],{variants:{size:{default:"w-[180px]",sm:"w-auto"}},defaultVariants:{size:"default"}});function ka({kind:e,track:t,requestPermissions:n,onError:s,client:r,...i}){const o=i.size||"default";if(!r)return l.jsxs(xa,{disabled:!0,children:[l.jsx(va,{className:Q(Ca({size:o}),i.className),children:l.jsx(ba,{placeholder:`Select a ${e}`})}),l.jsx(wa,{children:l.jsx(Sa,{value:"none",children:"No devices available"})})]});const{devices:a,activeDeviceId:c,setActiveMediaDevice:d}=Fp(r,e==="audioinput"?"audioinput":"videoinput");return l.jsxs(xa,{value:c,onValueChange:d,children:[l.jsx(va,{className:Q(Ca({size:o}),i.className,"hover:bg"),children:o!=="sm"&&l.jsx(ba,{className:"font-mono text-sm",placeholder:`Select a ${e}`})}),l.jsx(wa,{children:a.map(u=>l.jsx(Sa,{value:u.deviceId,className:"font-mono text-xs",children:u.label},u.deviceId))})]})}function Hp(e,t,n=!1){if(n)return Do;switch(e){case K.Track.Source.Microphone:return t?Uc:zc;case K.Track.Source.Camera:return t?Zc:Gc;case K.Track.Source.ScreenShare:return Wc;default:return g.Fragment}}function ir({source:e,pressed:t,pending:n,className:s,...r}){const i=Hp(e,t??!1,n),o=e===K.Track.Source.Microphone&&!(t??!1)&&!n,a=e===K.Track.Source.Camera&&!(t??!1)&&!n;return g.useEffect(()=>{console.log(`TrackToggle for ${e} changed: pressed=${t}, pending=${n}, actualState=${t?"enabled":"disabled"}`)},[e,t,n]),l.jsxs(rd,{pressed:t,"aria-label":`Toggle ${e}`,className:Q(s),...r,children:[l.jsx(i,{weight:"bold",className:Q(n&&"animate-spin",o||a?"text-red-500":void 0)}),r.children]})}function Up(e){return e?$p(e):{camera:!0,microphone:!0,screenShare:!0,data:!0}}function zp(e={}){const{controls:t,saveUserChoices:n=!0,client:s}=e,r={leave:!0,...t};if(!s)return{micTrackRef:{participant:void 0,source:K.Track.Source.Microphone,publication:void 0},visibleControls:r,microphoneToggle:{enabled:!1,pending:!1,toggle:async()=>{}},cameraToggle:{enabled:!1,pending:!1,toggle:async()=>{}},screenShareToggle:{enabled:!1,pending:!1,toggle:async()=>{}},handleDisconnect:()=>{},handleAudioDeviceChange:()=>{},handleVideoDeviceChange:()=>{}};const{microphoneTrack:i,localParticipant:o}=od(s),a=Up(s);id(s);const c=Mn(s,"microphone",{onDeviceError:j=>{var V;return(V=e.onDeviceError)==null?void 0:V.call(e,{source:K.Track.Source.Microphone,error:j})}}),d=Mn(s,"camera",{onDeviceError:j=>{var V;return(V=e.onDeviceError)==null?void 0:V.call(e,{source:K.Track.Source.Camera,error:j})}}),u=Mn(s,"screenShare",{onDeviceError:j=>{var V;return(V=e.onDeviceError)==null?void 0:V.call(e,{source:K.Track.Source.ScreenShare,error:j})}}),f=g.useMemo(()=>{let j;if(o){for(const[,V]of o.trackPublications)if(V.source===K.Track.Source.Microphone){j=V;break}}return console.log("🎤 Creating micTrackRef:",{hasParticipant:!!o,hasPublication:!!j,isTrackSubscribed:j==null?void 0:j.isSubscribed,isMuted:j==null?void 0:j.isMuted,trackSid:j==null?void 0:j.trackSid}),{participant:o??void 0,source:K.Track.Source.Microphone,publication:j}},[o,i]);r.microphone??(r.microphone=a.microphone),r.screenShare??(r.screenShare=a.screenShare),r.camera??(r.camera=a.camera),r.chat??(r.chat=a.data);const{saveAudioInputEnabled:h,saveAudioInputDeviceId:p,saveVideoInputEnabled:x,saveVideoInputDeviceId:m}=Op({preventSave:!n}),b=g.useCallback(()=>{s&&s.disconnect()},[s]),S=g.useCallback(j=>{p(j??"default"),s&&s.setAudioInputDevice(j)},[p,s]),C=g.useCallback(j=>{m(j??"default"),s&&s.setVideoInputDevice(j)},[m,s]),T=g.useCallback(async j=>{u.enabled&&await u.toggle(!1),await d.toggle(j),x(!d.enabled)},[d,x,u]),k=g.useCallback(async j=>{await c.toggle(j),h(!c.enabled)},[c,h]),v=g.useCallback(async j=>{d.enabled&&await d.toggle(!1),await u.toggle(j)},[d,u]);return{micTrackRef:f,visibleControls:r,cameraToggle:{...d,toggle:T},microphoneToggle:{...c,toggle:k},screenShareToggle:{...u,toggle:v},handleDisconnect:b,handleAudioDeviceChange:S,handleVideoDeviceChange:C}}const Wp={card:" bg-gradient-to-br from-black to-gray-900 border border-gray-900 w-full h-full flex flex-col justify-between overflow-hidden relative rounded-2xl shadow-lg",cardTopGradient:"pointer-events-none absolute top-0 left-0 w-full h-10 z-10 bg-gradient-to-b from-black/90 to-transparent",cardRadial:"absolute inset-0 bg-[radial-gradient(ellipse_at_center,_var(--tw-gradient-stops))] from-gray-800/20 via-transparent to-transparent",cardPurpleBlur:"absolute top-0 right-0 w-32 h-32 bg-gradient-to-br from-gray-600/10 to-transparent rounded-full blur-2xl",cardPinkBlur:"absolute bottom-0 left-0 w-24 h-24 bg-gradient-to-tr from-gray-500/8 to-transparent rounded-full blur-xl",cardPulse1:"absolute -top-2 -left-2 w-6 h-6 bg-gradient-to-br from-gray-400 to-gray-500 rounded-full blur-sm opacity-20 animate-pulse",cardPulse2:"absolute -bottom-2 -right-2 w-4 h-4 bg-gradient-to-br from-gray-500 to-gray-600 rounded-full blur-sm opacity-15 animate-pulse",main:"w-full flex flex-col items-center justify-center max-w-md mx-auto bg-gradient-to-br from-black to-gray-900 rounded-2xl shadow-xl p-0 overflow-hidden h-full",text:{primary:"text-white",secondary:"text-gray-300",muted:"text-gray-400",accent:"bg-clip-text text-transparent bg-gradient-to-r from-white via-gray-200 to-gray-300"},micButton:"absolute w-20 h-20 bg-gradient-to-br from-[#3B82F6] to-[#8B5CF6] rounded-full flex items-center justify-center hover:scale-105 transition-all duration-300 mic-glow shadow-2xl group",chatButton:"absolute w-20 h-20 bg-gradient-to-br from-[#10B981] to-[#059669] rounded-full flex items-center justify-center hover:scale-105 transition-all duration-300 shadow-2xl group",videoButton:"absolute w-20 h-20 bg-gradient-to-br from-[#8B5CF6] to-[#EC4899] rounded-full flex items-center justify-center hover:scale-105 transition-all duration-300 shadow-2xl group",popupTrigger:"bg-gradient-to-br from-[#3B82F6] to-[#8B5CF6] text-white font-medium hover:from-[#2563EB] hover:to-[#7C3AED] focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 focus:ring-offset-gray-900",promptSlider:"absolute w-full py-3 px-2 bg-gray-900 rounded-xl text-center text-white text-sm transition-opacity duration-700 ease-in-out border border-gray-600",statusIndicator:"w-2 h-2 bg-gray-400 rounded-full animate-pulse",pulseRings:{ring1:"w-32 h-32 rounded-full border-2 border-gray-600/30 pulse-ring",ring2:"absolute w-28 h-28 rounded-full border-2 border-gray-500/20 pulse-ring",ring3:"absolute w-24 h-24 rounded-full border-2 border-gray-400/15 pulse-ring"},controlBar:"border border-gray-600 rounded-3xl py-4 flex flex-col justify-end h-full bg-gray-900/50 backdrop-blur-sm",chatInput:{container:"bg-gray-900 w-full border-gray-600",textarea:"bg-gray-800 border-none text-white placeholder-gray-400",sendButton:"bg-blue-600 hover:bg-blue-700 disabled:bg-gray-600 disabled:opacity-50 text-white",attachButton:"text-gray-400 hover:text-gray-300 hover:bg-gray-700",endButton:"bg-red-900/20 hover:bg-red-800/30 text-red-400 border-red-800"},chatMessage:{own:"bg-gray-600 text-white",other:"bg-gray-700 text-white"},chatHeader:{container:"bg-gray-900 border-gray-600",backButton:"text-gray-400 hover:text-white hover:bg-gray-700"},spinner:"w-10 h-10 animate-spin text-gray-400 mb-2",suggestedResponse:{container:"bg-gray-800 text-blue-300 border-gray-700 hover:bg-gray-700 hover:text-white"},video:{container:"bg-gradient-to-br from-black to-gray-900 text-white",header:"border-gray-700 bg-gray-900/50",headerButton:"bg-gray-800 hover:bg-gray-700 text-gray-300",statusDot:"bg-green-500 animate-pulse",controlsBackground:"bg-gray-900/80 backdrop-blur-sm border-t border-gray-700",controlEnabled:"bg-blue-600 hover:bg-blue-700 text-white",controlDisabled:"bg-gray-700 hover:bg-gray-600 text-gray-300",endCall:"bg-red-600 hover:bg-red-700 text-white",tile:"bg-gray-800 border border-gray-700 shadow-lg",placeholder:"bg-gray-800 text-gray-300",avatar:"bg-gray-700 text-gray-300",nameOverlay:"bg-black/70 text-white",mutedIndicator:"bg-red-600/80 text-white"}},Zp={card:" bg-gradient-to-br from-white to-gray-50 border border-gray-200 w-full h-full flex flex-col justify-between overflow-hidden relative shadow-lg",cardTopGradient:"pointer-events-none absolute top-0 left-0 w-full h-10 z-10 bg-gradient-to-b from-white/90 to-transparent",cardRadial:"absolute inset-0 bg-[radial-gradient(ellipse_at_center,_var(--tw-gradient-stops))] from-blue-500/5 via-transparent to-transparent",cardPurpleBlur:"absolute top-0 right-0 w-32 h-32 bg-gradient-to-br from-purple-500/10 to-transparent rounded-full blur-2xl",cardPinkBlur:"absolute bottom-0 left-0 w-24 h-24 bg-gradient-to-tr from-pink-500/8 to-transparent rounded-full blur-xl",cardPulse1:"absolute -top-2 -left-2 w-6 h-6 bg-gradient-to-br from-blue-500 to-purple-500 rounded-full blur-sm opacity-30 animate-pulse",cardPulse2:"absolute -bottom-2 -right-2 w-4 h-4 bg-gradient-to-br from-pink-500 to-purple-500 rounded-full blur-sm opacity-20 animate-pulse",main:"w-full flex flex-col items-center justify-center max-w-md mx-auto bg-gradient-to-br from-white to-gray-50 rounded-2xl shadow-xl p-0 overflow-hidden h-full",text:{primary:"text-gray-900",secondary:"text-gray-700",muted:"text-gray-500",accent:"bg-clip-text text-transparent bg-gradient-to-r from-blue-600 via-purple-600 to-pink-600"},micButton:"absolute text-white w-20 h-20 bg-gradient-to-br from-[#3B82F6] to-[#8B5CF6] rounded-full flex items-center justify-center hover:scale-105 transition-all duration-300 mic-glow shadow-2xl group",chatButton:"absolute text-white w-20 h-20 bg-gradient-to-br from-[#10B981] to-[#059669] rounded-full flex items-center justify-center hover:scale-105 transition-all duration-300 shadow-2xl group",videoButton:"absolute text-white w-20 h-20 bg-gradient-to-br from-[#8B5CF6] to-[#EC4899] rounded-full flex items-center justify-center hover:scale-105 transition-all duration-300 shadow-2xl group",popupTrigger:"bg-gradient-to-br from-[#3B82F6] to-[#8B5CF6] text-white font-medium hover:from-[#2563EB] hover:to-[#7C3AED] focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 focus:ring-offset-white",promptSlider:"absolute w-full py-3 px-2 bg-gray-100 rounded-xl text-center text-gray-700 text-sm transition-opacity duration-700 ease-in-out border border-gray-200",statusIndicator:"w-2 h-2 bg-green-500 rounded-full animate-pulse",pulseRings:{ring1:"w-32 h-32 rounded-full border-2 border-blue-500/20 pulse-ring",ring2:"absolute w-28 h-28 rounded-full border-2 border-purple-500/15 pulse-ring",ring3:"absolute w-24 h-24 rounded-full border-2 border-pink-500/10 pulse-ring"},controlBar:"border border-gray-200 rounded-3xl py-4 flex flex-col justify-end h-full bg-white/80 backdrop-blur-sm",chatInput:{container:"bg-white/90 border-gray-200 shadow-sm",textarea:"bg-white border-none text-gray-900 placeholder-gray-500 ",sendButton:"bg-blue-600 hover:bg-blue-700 disabled:bg-gray-300 disabled:opacity-50 text-white",attachButton:"text-gray-500 hover:text-gray-700 hover:bg-gray-100 bg-blue-50",endButton:"bg-red-50 hover:bg-red-100 text-red-600 border-red-200"},chatMessage:{own:"bg-blue-50 text-gray-900 border border-blue-100",other:"bg-gray-50 text-gray-900 border border-gray-200"},chatHeader:{container:"bg-white border-gray-200",backButton:"text-gray-500 hover:text-gray-700 hover:bg-gray-100"},spinner:"w-10 h-10 animate-spin text-blue-500 mb-2",suggestedResponse:{container:"bg-white text-blue-700 border-blue-200 hover:bg-blue-50 hover:text-blue-900"},video:{container:"bg-gradient-to-br from-white to-gray-50 text-gray-900",header:"border-gray-200 bg-white/80",headerButton:"bg-gray-100 hover:bg-gray-200 text-gray-600",statusDot:"bg-green-500 animate-pulse",controlsBackground:"bg-white/90 backdrop-blur-sm border-t border-gray-200",controlEnabled:"bg-blue-600 hover:bg-blue-700 text-white",controlDisabled:"bg-gray-200 hover:bg-gray-300 text-gray-600",endCall:"bg-red-600 hover:bg-red-700 text-white",tile:"bg-white border border-gray-200 shadow-sm",placeholder:"bg-gray-50 text-gray-600",avatar:"bg-gray-200 text-gray-600",nameOverlay:"bg-black/70 text-white",mutedIndicator:"bg-red-600/80 text-white"}},Gp={card:" text-white bg-gradient-to-br from-[#171727] to-[#12121F] border border-gray-800 w-full h-full flex flex-col justify-between overflow-hidden relative",cardTopGradient:"pointer-events-none absolute top-0 left-0 w-full h-10 z-10 bg-gradient-to-b from-[#171727]/90 to-transparent",cardRadial:"absolute inset-0 bg-[radial-gradient(ellipse_at_center,_var(--tw-gradient-stops))] from-[#3B82F6]/15 via-transparent to-transparent",cardPurpleBlur:"absolute top-0 right-0 w-32 h-32 bg-gradient-to-br from-[#8B5CF6]/25 to-transparent rounded-full blur-2xl",cardPinkBlur:"absolute bottom-0 left-0 w-24 h-24 bg-gradient-to-tr from-[#EC4899]/20 to-transparent rounded-full blur-xl",cardPulse1:"absolute -top-2 -left-2 w-6 h-6 bg-gradient-to-br from-[#3B82F6] to-[#8B5CF6] rounded-full blur-sm opacity-50 animate-pulse",cardPulse2:"absolute -bottom-2 -right-2 w-4 h-4 bg-gradient-to-br from-[#EC4899] to-[#8B5CF6] rounded-full blur-sm opacity-40 animate-pulse",main:"w-full flex flex-col items-center justify-center max-w-md mx-auto bg-gradient-to-br from-[#171727] to-[#12121F] rounded-2xl shadow-xl p-0 overflow-hidden h-full",text:{primary:"text-white",secondary:"text-gray-300",muted:"text-gray-400",accent:"bg-clip-text text-transparent bg-gradient-to-r from-[#3B82F6] via-[#8B5CF6] to-[#EC4899]"},micButton:"absolute w-20 h-20 bg-gradient-to-br from-[#3B82F6] to-[#8B5CF6] rounded-full flex items-center justify-center hover:scale-105 transition-all duration-300 mic-glow shadow-2xl group",chatButton:"absolute w-20 h-20 bg-gradient-to-br from-[#10B981] to-[#059669] rounded-full flex items-center justify-center hover:scale-105 transition-all duration-300 shadow-2xl group",videoButton:"absolute w-20 h-20 bg-gradient-to-br from-[#8B5CF6] to-[#EC4899] rounded-full flex items-center justify-center hover:scale-105 transition-all duration-300 shadow-2xl group",popupTrigger:"bg-gradient-to-br from-[#3B82F6] to-[#8B5CF6] text-white font-medium hover:from-[#2563EB] hover:to-[#7C3AED] focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 focus:ring-offset-gray-900 shadow-xl",promptSlider:"absolute w-full py-3 px-2 bg-[#1E1E2E] rounded-xl text-center text-gray-200 text-sm transition-opacity duration-700 ease-in-out border border-gray-700",statusIndicator:"w-2 h-2 bg-[#10B981] rounded-full animate-pulse",pulseRings:{ring1:"w-32 h-32 rounded-full border-2 border-[#3B82F6]/40 pulse-ring",ring2:"absolute w-28 h-28 rounded-full border-2 border-[#8B5CF6]/30 pulse-ring",ring3:"absolute w-24 h-24 rounded-full border-2 border-[#EC4899]/20 pulse-ring"},controlBar:"border border-border rounded-3xl py-4 flex flex-col justify-end h-full",chatInput:{container:"bg-[#1E1E2E] border-gray-700",textarea:"bg-[#1E1E2E] border-none text-white placeholder-gray-400",sendButton:"bg-[#3B82F6] hover:bg-[#2563EB] disabled:bg-gray-600 disabled:opacity-50 text-white",attachButton:"text-gray-400 hover:text-gray-300 hover:bg-gray-700",endButton:"bg-red-900/20 hover:bg-red-800/30 text-red-400 border-red-800"},chatMessage:{own:"bg-[#1E1E2E]/80 text-white",other:"bg-[#1E1E2E] text-white border border-gray-700"},chatHeader:{container:"bg-[#1E1E2E] border-gray-700",backButton:"text-gray-400 hover:text-white hover:bg-gray-700"},spinner:"w-10 h-10 animate-spin text-blue-400 mb-2",suggestedResponse:{container:"bg-[#221f3f] text-white border-none"},video:{container:"bg-gradient-to-br from-[#171727] to-[#12121F] text-white",header:"border-gray-700 bg-[#1E1E2E]/80",headerButton:"bg-[#1E1E2E] hover:bg-gray-700 text-gray-300",statusDot:"bg-[#10B981] animate-pulse",controlsBackground:"bg-[#1E1E2E]/90 backdrop-blur-sm border-t border-gray-700",controlEnabled:"bg-[#3B82F6] hover:bg-[#2563EB] text-white",controlDisabled:"bg-gray-700 hover:bg-gray-600 text-gray-300",endCall:"bg-red-600 hover:bg-red-700 text-white",tile:"bg-[#1E1E2E] border border-gray-700 shadow-xl",placeholder:"bg-[#1E1E2E] text-gray-300",avatar:"bg-gray-700 text-gray-300",nameOverlay:"bg-black/70 text-white",mutedIndicator:"bg-red-600/80 text-white"}},Ta={dark:Wp,light:Zp,vox:Gp};function _e(e){return Ta[e]||Ta.vox}function Kp({onSend:e,disabled:t=!1,className:n,placeholder:s="Type a message..."}){const[r,i]=g.useState(""),[o,a]=g.useState(!1),c=async u=>{if(u.preventDefault(),r.trim()&&!t&&!o){a(!0);try{await e(r.trim()),i("")}catch(f){console.error("Failed to send message:",f)}finally{a(!1)}}},d=u=>{u.key==="Enter"&&!u.shiftKey&&(u.preventDefault(),c(u))};return l.jsxs("form",{onSubmit:c,className:Q("flex w-full",n),children:[l.jsx("input",{type:"text",value:r,onChange:u=>i(u.target.value),onKeyDown:d,disabled:t||o,placeholder:s,className:"flex-1 px-2 py-1 text-sm bg-transparent border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-1 focus:ring-blue-500 disabled:opacity-50"}),l.jsx(Ip,{type:"submit",size:"sm",disabled:!r.trim()||t||o,className:"ml-2 px-2 py-1 text-xs",children:o?"...":"Send"})]})}function Yp({controls:e,saveUserChoices:t=!0,capabilities:n,className:s,onSendMessage:r,onChatOpenChange:i,onDisconnect:o,onDeviceError:a,theme:c="vox",client:d,...u}){const[f,h]=g.useState(!1),[p,x]=g.useState(!1),m=_e(c),{micTrackRef:b,visibleControls:S,cameraToggle:C,microphoneToggle:T,screenShareToggle:k,handleAudioDeviceChange:v,handleVideoDeviceChange:j,handleDisconnect:V}=zp({controls:e,saveUserChoices:t,client:d}),E=async _=>{x(!0);try{await(r==null?void 0:r(_))}finally{x(!1)}};return g.useEffect(()=>{i==null||i(f)},[f,i]),g.useEffect(()=>{var _,y,D,W;console.log("🎤 AgentControlBar: micTrackRef changed:",{hasParticipant:!!b.participant,hasPublication:!!b.publication,source:b.source,isSubscribed:(_=b.publication)==null?void 0:_.isSubscribed,isMuted:(y=b.publication)==null?void 0:y.isMuted,trackSid:(D=b.publication)==null?void 0:D.trackSid,hasTrack:!!((W=b.publication)!=null&&W.track)})},[b]),l.jsxs("div",{"aria-label":"Voice assistant controls",className:Q(m.controlBar,s),...u,children:[n.suportsChatInput&&l.jsxs("div",{"data-inert":f?void 0:"true",className:Q("overflow-hidden transition-[height] relative duration-300 ease-in-out",f?"h-[56px] mb-2":"h-0"),children:[l.jsx("div",{className:"flex h-8 px-3 w-full",children:l.jsx(Kp,{onSend:E,disabled:p,className:Q("w-full",m.chatInput),placeholder:"Type a message..."})}),l.jsx("hr",{className:"border-border my-1 mx-3"})]}),l.jsxs("div",{className:Q("flex flex-row items-center gap-2 rounded-2xl mx-auto border-none backdrop-blur-lg px-2 py-1",c==="light"?"bg-white/80":"bg-[#18182a]/80"),children:[l.jsxs("div",{className:"flex gap-y-2 justify-start",children:[S.microphone&&l.jsxs("div",{className:"flex gap-y-2 items-center rounded-full overflow-hidden border-none ",children:[l.jsx(ir,{variant:"primary",source:K.Track.Source.Microphone,pressed:T.enabled,disabled:T.pending,onPressedChange:T.toggle,className:"w-auto py-1 rounded-none border-none bg-transparent text-inherit focus:bg-primary/80 hover:bg-primary/80 transition-colors"}),l.jsx(Ke.BarVisualizer,{barCount:3,trackRef:b,options:{minHeight:5},className:"flex h-full w-auto items-center justify-center gap-x-0.5",children:l.jsx("span",{className:Q(["h-full w-0.5 origin-center rounded-2xl","bg-white","group-data-[state=on]/track:bg-white group-data-[state=off]/track:bg-white","data-lk-muted:bg-muted"])})}),l.jsx(ka,{size:"sm",kind:"audioinput",client:d,onError:a?_=>_ instanceof Error?a({source:K.Track.Source.Microphone,error:_}):void 0:void 0,onActiveDeviceChange:v,className:Q(["h-full py-1 rounded-none border-none bg-transparent text-inherit focus:bg-primary/80 hover:bg-primary/30 transition-colors","min-w-[2.5rem]"])})]}),n.suportsVideoInput&&S.camera&&l.jsxs("div",{className:"flex items-center rounded-full overflow-hidden border-none ",children:[l.jsx(ir,{variant:"primary",source:K.Track.Source.Camera,pressed:C.enabled,pending:C.pending,disabled:C.pending,onPressedChange:C.toggle,className:"w-auto py-1 rounded-none border-none bg-transparent text-inherit focus:bg-primary/80 hover:bg-primary/80 transition-colors"}),l.jsx(ka,{size:"sm",kind:"videoinput",client:d,onError:a?_=>_ instanceof Error?a({source:K.Track.Source.Camera,error:_}):void 0:void 0,onActiveDeviceChange:j,className:Q(["h-full py-1 rounded-none border-none bg-transparent text-inherit focus:bg-primary/80 hover:bg-primary/80 transition-colors","min-w-[2.5rem]"])})]}),n.suportsScreenShare&&S.screenShare&&l.jsx("div",{className:"flex items-center rounded-full overflow-hidden border-none ",children:l.jsx(ir,{variant:"secondary",source:K.Track.Source.ScreenShare,pressed:k.enabled,disabled:k.pending,onPressedChange:k.toggle,className:"w-auto py-1 disabled:opacity-70 rounded-none border-none bg-transparent text-inherit focus:bg-primary/80 hover:bg-primary/80 transition-colors"})})]}),S.chat&&l.jsx("div",{className:"flex items-center rounded-full overflow-hidden bg-secondary text-secondary-foreground border-none ",children:l.jsx(rd,{variant:"secondary","aria-label":"Toggle chat",pressed:f,onPressedChange:_=>{h(_)},className:"aspect-square h-full py-1 rounded-none border-none bg-transparent text-inherit focus:bg-secondary/80 hover:bg-secondary/80 transition-colors flex items-center",children:l.jsx(Bc,{weight:"bold",className:"h-4 w-4"})})})]})]})}const ld=w.forwardRef(({state:e,audioTrack:t,className:n},s)=>l.jsx("div",{ref:s,className:Q("",n),children:t?l.jsx(Ke.BarVisualizer,{barCount:5,state:e,options:{minHeight:5},trackRef:t,className:Q("flex aspect-video w-40 items-center justify-center gap-1"),children:l.jsx("span",{className:Q(["bg-[#6721a4] min-h-2 w-2 rounded-full","origin-center transition-colors duration-250 ease-linear","data-[lk-highlighted=true]:bg-[#5c64f6]","data-[lk-muted=true]:bg-[#222222]"])})}):l.jsx("div",{className:Q("flex aspect-video w-40 items-center justify-center"),children:l.jsx("div",{className:"flex flex-col items-center justify-center",children:l.jsx("div",{className:"flex gap-1",children:Array.from({length:5}).map((r,i)=>l.jsx("span",{className:Q(["bg-[#6721a4] min-h-2 w-2 rounded-full","origin-center transition-colors duration-250 ease-linear",e==="speaking"&&"animate-pulse bg-[#5c64f6]",e==="thinking"&&"animate-pulse bg-yellow-500"])},i))})})})}));ld.displayName="AgentTile";const qp=({videoTrack:e,className:t,ref:n})=>{var s,r;return!e||!e.publication||!e.participant?l.jsx("div",{ref:n,className:Q(t),children:l.jsx("div",{className:"w-full h-full bg-gray-200 rounded-md flex items-center justify-center",children:l.jsx("span",{className:"text-gray-500",children:"No video available"})})}):l.jsx("div",{ref:n,className:Q(t),children:l.jsx(Ke.VideoTrack,{trackRef:e,width:((s=e.publication.dimensions)==null?void 0:s.width)??0,height:((r=e.publication.dimensions)==null?void 0:r.height)??0,className:"rounded-md"})})},Xp=le.create(Ke.VideoTrack),Jp=({trackRef:e,className:t,ref:n})=>{var s,r;return l.jsx("div",{className:Q("bg-muted overflow-hidden rounded-md",t),children:l.jsx(Xp,{ref:n,trackRef:e,width:((s=e==null?void 0:e.publication.dimensions)==null?void 0:s.width)??0,height:((r=e==null?void 0:e.publication.dimensions)==null?void 0:r.height)??0,className:Q("h-full w-auto")})})},Ea=le.create(Jp),Qp=le.create(ld),e0=le.create(qp),mt={initial:{opacity:0,scale:0},animate:{opacity:1,scale:1},exit:{opacity:0,scale:0},transition:{type:"spring",stiffness:675,damping:75,mass:1}},Kt={grid:["h-full w-full","grid gap-x-2 place-content-center","grid-cols-[1fr_1fr] grid-rows-[90px_1fr_90px]"],agentChatOpenWithSecondTile:["col-start-1 row-start-1","self-center justify-self-end"],agentChatOpenWithoutSecondTile:["col-start-1 row-start-1","col-span-2","place-content-center"],agentChatClosed:["col-start-1 row-start-1","col-span-2 row-span-3","place-content-center"],secondTileChatOpen:["col-start-2 row-start-1","self-center justify-self-start"],secondTileChatClosed:["col-start-2 row-start-3","place-content-end"]};function t0(e,t){const{localParticipant:n}=od(t),s=n==null?void 0:n.getTrackPublication(e);return w.useMemo(()=>s&&n?{source:e,participant:n,publication:s}:void 0,[e,s,n])}function n0({chatOpen:e,client:t}){const{agent:{isActive:n=!1}={},session:s,state:r="idle",audioTrack:i,videoTrack:o}=t?ad(t):{agent:{isActive:!1},session:null,state:"idle",audioTrack:null,videoTrack:null},[a]=Ke.useTracks([K.Track.Source.ScreenShare]),c=t0(K.Track.Source.Camera,t),d=c&&!c.publication.isMuted,u=a&&!a.publication.isMuted,f=d||u,h=n||s&&s.state==="active",p={...mt.transition,delay:e?0:.15},x={...mt.animate,scale:e?1:3,transition:p},m={...mt.animate,transition:p},b=p,S=p,C=o&&o.publication&&o.participant;return l.jsx("div",{className:"relative w-full h-full z-10 flex items-center justify-center",children:l.jsx("div",{className:"relative w-full h-full max-w-2xl px-4 md:px-0",children:l.jsxs("div",{className:Q(Kt.grid),children:[h&&l.jsx("div",{className:Q(["grid",!e&&Kt.agentChatClosed,e&&f&&Kt.agentChatOpenWithSecondTile,e&&!f&&Kt.agentChatOpenWithoutSecondTile]),children:l.jsxs("div",{className:"h-full flex items-center justify-center",children:[!C&&l.jsx(Qp,{layoutId:"agent",...mt,animate:x,transition:b,state:r,audioTrack:i||void 0,className:Q(e?"h-[90px]":"h-auto w-full")},"agent"),C&&o&&l.jsx(e0,{layoutId:"avatar",...mt,animate:m,transition:S,videoTrack:o,className:Q(e?"h-[90px] [&>video]:h-[90px] [&>video]:w-auto":"h-auto w-full")},"avatar")]})}),l.jsx("div",{className:Q(["grid",e&&Kt.secondTileChatOpen,!e&&Kt.secondTileChatClosed]),children:l.jsxs("div",{className:"w-full px-10 flex items-center shadow-2xl justify-between",children:[c&&d&&l.jsx(Ea,{layout:"position",layoutId:"camera",...mt,trackRef:c,transition:{...mt.transition,delay:e?0:.15},className:"h-[60px] order-1"},"camera"),u&&l.jsx(Ea,{layout:"position",layoutId:"screen",...mt,trackRef:a,transition:{...mt.transition,delay:e?0:.15},className:"h-[70px] order-2"},"screen")]})})]})})})}function Aa({timeout:e}){const[t,n]=w.useState(100),s=w.useRef(null),r=w.useRef(null);return w.useEffect(()=>{if(!e||e<=0)return;n(100),r.current=Date.now();const i=()=>{if(!e||r.current===null)return;const o=Date.now()-r.current,a=Math.max(0,100-o/e*100);n(a),a>0&&(s.current=requestAnimationFrame(i))};return s.current=requestAnimationFrame(i),()=>{s.current&&cancelAnimationFrame(s.current)}},[e]),!e||e<=0?null:l.jsx("div",{className:"w-full h-1 relative top-1 rounded-t-4xl bg-gray-700 overflow-hidden",children:l.jsx(le.div,{className:"h-1 rounded-t-4xl dark:bg-white bg-blue-200 ",initial:{width:"100%"},animate:{width:`${Math.max(t,2)}%`},transition:{duration:.1,ease:"linear"},style:{minWidth:"2%"}})})}function un({interaction:e,theme:t,onDismiss:n,client:s,addLocalMessage:r}){var a;if(!e||!e.isVisible||!e.component)return null;const[i]=g.useState(()=>Date.now()),o=()=>e.component?g.createElement(e.component,{handler:e.handler||void 0,timeout:e.timeout,loadData:async d=>{console.log("InteractiveComponent: Loading data:",d)},presentationMode:e.presentationMode,data:e.data,client:s,addLocalMessage:r}):l.jsx("div",{className:"p-4 text-red-500",children:"Component not found"});switch(e.presentationMode){case"fullscreen":return l.jsx(Et,{children:l.jsxs(le.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-[9999] bg-black",children:[l.jsxs("div",{className:"flex flex-col",children:[l.jsx(Aa,{timeout:e.timeout}),l.jsxs("div",{className:"flex items-center justify-between p-4 bg-black/80 text-white border-b border-gray-700",children:[l.jsx("h3",{className:"text-lg font-semibold",children:e.methodName.replace(/_/g," ").replace(/\b\w/g,c=>c.toUpperCase())}),l.jsx("button",{onClick:n||((a=e.handler)==null?void 0:a.dismissView),className:"p-2 rounded-full bg-white/20 hover:bg-white/30 text-white transition-colors",children:l.jsx($e.X,{className:"w-5 h-5"})})]})]}),l.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:o()})]})});case"embedded":default:return l.jsx(Et,{children:l.jsx(le.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},className:"w-fit rounded-lg ",children:l.jsxs("div",{children:[l.jsx(Aa,{timeout:e.timeout}),o()]})})})}}const s0=({logLevel:e}={})=>{const t=Ke.useRoomContext();g.useEffect(()=>(K.setLogLevel(e??"debug"),window.__lk_room=t,()=>{window.__lk_room=void 0}),[t,e])},ja=e=>e,r0=()=>{let e=ja;return{configure(t){e=t},generate(t){return e(t)},reset(){e=ja}}},o0=r0();function Nt(e,...t){const n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(s=>n.searchParams.append("args[]",s)),`Minified MUI error #${e}; visit ${n} for the full message.`}function zt(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":Nt(7));return e.charAt(0).toUpperCase()+e.slice(1)}function i0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ns={exports:{}},ss={exports:{}},pe={};/** @license React v16.13.1
30
30
  * react-is.production.min.js
31
31
  *
32
32
  * Copyright (c) Facebook, Inc. and its affiliates.
33
33
  *
34
34
  * This source code is licensed under the MIT license found in the
35
35
  * LICENSE file in the root directory of this source tree.
36
- */var ja;function a0(){if(ja)return ge;ja=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,s=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,m=e?Symbol.for("react.suspense_list"):60120,g=e?Symbol.for("react.memo"):60115,x=e?Symbol.for("react.lazy"):60116,f=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,k=e?Symbol.for("react.responder"):60118,S=e?Symbol.for("react.scope"):60119;function T(w){if(typeof w=="object"&&w!==null){var A=w.$$typeof;switch(A){case t:switch(w=w.type,w){case l:case d:case s:case i:case r:case h:return w;default:switch(w=w&&w.$$typeof,w){case a:case u:case x:case g:case o:return w;default:return A}}case n:return A}}}function C(w){return T(w)===d}return ge.AsyncMode=l,ge.ConcurrentMode=d,ge.ContextConsumer=a,ge.ContextProvider=o,ge.Element=t,ge.ForwardRef=u,ge.Fragment=s,ge.Lazy=x,ge.Memo=g,ge.Portal=n,ge.Profiler=i,ge.StrictMode=r,ge.Suspense=h,ge.isAsyncMode=function(w){return C(w)||T(w)===l},ge.isConcurrentMode=C,ge.isContextConsumer=function(w){return T(w)===a},ge.isContextProvider=function(w){return T(w)===o},ge.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===t},ge.isForwardRef=function(w){return T(w)===u},ge.isFragment=function(w){return T(w)===s},ge.isLazy=function(w){return T(w)===x},ge.isMemo=function(w){return T(w)===g},ge.isPortal=function(w){return T(w)===n},ge.isProfiler=function(w){return T(w)===i},ge.isStrictMode=function(w){return T(w)===r},ge.isSuspense=function(w){return T(w)===h},ge.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===s||w===d||w===i||w===r||w===h||w===m||typeof w=="object"&&w!==null&&(w.$$typeof===x||w.$$typeof===g||w.$$typeof===o||w.$$typeof===a||w.$$typeof===u||w.$$typeof===b||w.$$typeof===k||w.$$typeof===S||w.$$typeof===f)},ge.typeOf=T,ge}var ye={};/** @license React v16.13.1
36
+ */var Na;function a0(){if(Na)return pe;Na=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,s=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,x=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,S=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function T(v){if(typeof v=="object"&&v!==null){var j=v.$$typeof;switch(j){case t:switch(v=v.type,v){case c:case d:case s:case i:case r:case f:return v;default:switch(v=v&&v.$$typeof,v){case a:case u:case x:case p:case o:return v;default:return j}}case n:return j}}}function k(v){return T(v)===d}return pe.AsyncMode=c,pe.ConcurrentMode=d,pe.ContextConsumer=a,pe.ContextProvider=o,pe.Element=t,pe.ForwardRef=u,pe.Fragment=s,pe.Lazy=x,pe.Memo=p,pe.Portal=n,pe.Profiler=i,pe.StrictMode=r,pe.Suspense=f,pe.isAsyncMode=function(v){return k(v)||T(v)===c},pe.isConcurrentMode=k,pe.isContextConsumer=function(v){return T(v)===a},pe.isContextProvider=function(v){return T(v)===o},pe.isElement=function(v){return typeof v=="object"&&v!==null&&v.$$typeof===t},pe.isForwardRef=function(v){return T(v)===u},pe.isFragment=function(v){return T(v)===s},pe.isLazy=function(v){return T(v)===x},pe.isMemo=function(v){return T(v)===p},pe.isPortal=function(v){return T(v)===n},pe.isProfiler=function(v){return T(v)===i},pe.isStrictMode=function(v){return T(v)===r},pe.isSuspense=function(v){return T(v)===f},pe.isValidElementType=function(v){return typeof v=="string"||typeof v=="function"||v===s||v===d||v===i||v===r||v===f||v===h||typeof v=="object"&&v!==null&&(v.$$typeof===x||v.$$typeof===p||v.$$typeof===o||v.$$typeof===a||v.$$typeof===u||v.$$typeof===b||v.$$typeof===S||v.$$typeof===C||v.$$typeof===m)},pe.typeOf=T,pe}var ye={};/** @license React v16.13.1
37
37
  * react-is.development.js
38
38
  *
39
39
  * Copyright (c) Facebook, Inc. and its affiliates.
40
40
  *
41
41
  * This source code is licensed under the MIT license found in the
42
42
  * LICENSE file in the root directory of this source tree.
43
- */var Ma;function c0(){return Ma||(Ma=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,s=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,m=e?Symbol.for("react.suspense_list"):60120,g=e?Symbol.for("react.memo"):60115,x=e?Symbol.for("react.lazy"):60116,f=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,k=e?Symbol.for("react.responder"):60118,S=e?Symbol.for("react.scope"):60119;function T(P){return typeof P=="string"||typeof P=="function"||P===s||P===d||P===i||P===r||P===h||P===m||typeof P=="object"&&P!==null&&(P.$$typeof===x||P.$$typeof===g||P.$$typeof===o||P.$$typeof===a||P.$$typeof===u||P.$$typeof===b||P.$$typeof===k||P.$$typeof===S||P.$$typeof===f)}function C(P){if(typeof P=="object"&&P!==null){var z=P.$$typeof;switch(z){case t:var te=P.type;switch(te){case l:case d:case s:case i:case r:case h:return te;default:var le=te&&te.$$typeof;switch(le){case a:case u:case x:case g:case o:return le;default:return z}}case n:return z}}}var w=l,A=d,V=a,E=o,F=t,y=u,R=s,H=x,se=g,ne=n,oe=i,ce=r,ee=h,I=!1;function W(P){return I||(I=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),j(P)||C(P)===l}function j(P){return C(P)===d}function B(P){return C(P)===a}function L(P){return C(P)===o}function Z(P){return typeof P=="object"&&P!==null&&P.$$typeof===t}function O(P){return C(P)===u}function Q(P){return C(P)===s}function G(P){return C(P)===x}function K(P){return C(P)===g}function q(P){return C(P)===n}function N(P){return C(P)===i}function $(P){return C(P)===r}function de(P){return C(P)===h}ye.AsyncMode=w,ye.ConcurrentMode=A,ye.ContextConsumer=V,ye.ContextProvider=E,ye.Element=F,ye.ForwardRef=y,ye.Fragment=R,ye.Lazy=H,ye.Memo=se,ye.Portal=ne,ye.Profiler=oe,ye.StrictMode=ce,ye.Suspense=ee,ye.isAsyncMode=W,ye.isConcurrentMode=j,ye.isContextConsumer=B,ye.isContextProvider=L,ye.isElement=Z,ye.isForwardRef=O,ye.isFragment=Q,ye.isLazy=G,ye.isMemo=K,ye.isPortal=q,ye.isProfiler=N,ye.isStrictMode=$,ye.isSuspense=de,ye.isValidElementType=T,ye.typeOf=C}()),ye}var Va;function cd(){return Va||(Va=1,process.env.NODE_ENV==="production"?ss.exports=a0():ss.exports=c0()),ss.exports}/*
43
+ */var Ma;function l0(){return Ma||(Ma=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,s=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,x=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,S=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function T(A){return typeof A=="string"||typeof A=="function"||A===s||A===d||A===i||A===r||A===f||A===h||typeof A=="object"&&A!==null&&(A.$$typeof===x||A.$$typeof===p||A.$$typeof===o||A.$$typeof===a||A.$$typeof===u||A.$$typeof===b||A.$$typeof===S||A.$$typeof===C||A.$$typeof===m)}function k(A){if(typeof A=="object"&&A!==null){var Z=A.$$typeof;switch(Z){case t:var G=A.type;switch(G){case c:case d:case s:case i:case r:case f:return G;default:var de=G&&G.$$typeof;switch(de){case a:case u:case x:case p:case o:return de;default:return Z}}case n:return Z}}}var v=c,j=d,V=a,E=o,_=t,y=u,D=s,W=x,te=p,ue=n,ie=i,fe=r,ne=f,R=!1;function B(A){return R||(R=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),M(A)||k(A)===c}function M(A){return k(A)===d}function O(A){return k(A)===a}function q(A){return k(A)===o}function Y(A){return typeof A=="object"&&A!==null&&A.$$typeof===t}function H(A){return k(A)===u}function re(A){return k(A)===s}function $(A){return k(A)===x}function I(A){return k(A)===p}function L(A){return k(A)===n}function N(A){return k(A)===i}function F(A){return k(A)===r}function se(A){return k(A)===f}ye.AsyncMode=v,ye.ConcurrentMode=j,ye.ContextConsumer=V,ye.ContextProvider=E,ye.Element=_,ye.ForwardRef=y,ye.Fragment=D,ye.Lazy=W,ye.Memo=te,ye.Portal=ue,ye.Profiler=ie,ye.StrictMode=fe,ye.Suspense=ne,ye.isAsyncMode=B,ye.isConcurrentMode=M,ye.isContextConsumer=O,ye.isContextProvider=q,ye.isElement=Y,ye.isForwardRef=H,ye.isFragment=re,ye.isLazy=$,ye.isMemo=I,ye.isPortal=L,ye.isProfiler=N,ye.isStrictMode=F,ye.isSuspense=se,ye.isValidElementType=T,ye.typeOf=k}()),ye}var Va;function cd(){return Va||(Va=1,process.env.NODE_ENV==="production"?ss.exports=a0():ss.exports=l0()),ss.exports}/*
44
44
  object-assign
45
45
  (c) Sindre Sorhus
46
46
  @license MIT
47
- */var ar,Na;function l0(){if(Na)return ar;Na=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function s(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function r(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var o={},a=0;a<10;a++)o["_"+String.fromCharCode(a)]=a;var l=Object.getOwnPropertyNames(o).map(function(u){return o[u]});if(l.join("")!=="0123456789")return!1;var d={};return"abcdefghijklmnopqrst".split("").forEach(function(u){d[u]=u}),Object.keys(Object.assign({},d)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return ar=r()?Object.assign:function(i,o){for(var a,l=s(i),d,u=1;u<arguments.length;u++){a=Object(arguments[u]);for(var h in a)t.call(a,h)&&(l[h]=a[h]);if(e){d=e(a);for(var m=0;m<d.length;m++)n.call(a,d[m])&&(l[d[m]]=a[d[m]])}}return l},ar}var cr,Pa;function Fo(){if(Pa)return cr;Pa=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return cr=e,cr}var lr,Ra;function ld(){return Ra||(Ra=1,lr=Function.call.bind(Object.prototype.hasOwnProperty)),lr}var dr,Ia;function d0(){if(Ia)return dr;Ia=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Fo(),n={},s=ld();e=function(i){var o="Warning: "+i;typeof console<"u"&&console.error(o);try{throw new Error(o)}catch{}}}function r(i,o,a,l,d){if(process.env.NODE_ENV!=="production"){for(var u in i)if(s(i,u)){var h;try{if(typeof i[u]!="function"){var m=Error((l||"React class")+": "+a+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw m.name="Invariant Violation",m}h=i[u](o,u,l,a,null,t)}catch(x){h=x}if(h&&!(h instanceof Error)&&e((l||"React class")+": type specification of "+a+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof h+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),h instanceof Error&&!(h.message in n)){n[h.message]=!0;var g=d?d():"";e("Failed "+a+" type: "+h.message+(g??""))}}}}return r.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},dr=r,dr}var ur,Da;function u0(){if(Da)return ur;Da=1;var e=cd(),t=l0(),n=Fo(),s=ld(),r=d0(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(a){var l="Warning: "+a;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function o(){return null}return ur=function(a,l){var d=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function h(j){var B=j&&(d&&j[d]||j[u]);if(typeof B=="function")return B}var m="<<anonymous>>",g={array:k("array"),bigint:k("bigint"),bool:k("boolean"),func:k("function"),number:k("number"),object:k("object"),string:k("string"),symbol:k("symbol"),any:S(),arrayOf:T,element:C(),elementType:w(),instanceOf:A,node:y(),objectOf:E,oneOf:V,oneOfType:F,shape:H,exact:se};function x(j,B){return j===B?j!==0||1/j===1/B:j!==j&&B!==B}function f(j,B){this.message=j,this.data=B&&typeof B=="object"?B:{},this.stack=""}f.prototype=Error.prototype;function b(j){if(process.env.NODE_ENV!=="production")var B={},L=0;function Z(Q,G,K,q,N,$,de){if(q=q||m,$=$||K,de!==n){if(l){var P=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw P.name="Invariant Violation",P}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var z=q+":"+K;!B[z]&&L<3&&(i("You are manually calling a React.PropTypes validation function for the `"+$+"` prop on `"+q+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),B[z]=!0,L++)}}return G[K]==null?Q?G[K]===null?new f("The "+N+" `"+$+"` is marked as required "+("in `"+q+"`, but its value is `null`.")):new f("The "+N+" `"+$+"` is marked as required in "+("`"+q+"`, but its value is `undefined`.")):null:j(G,K,q,N,$)}var O=Z.bind(null,!1);return O.isRequired=Z.bind(null,!0),O}function k(j){function B(L,Z,O,Q,G,K){var q=L[Z],N=ce(q);if(N!==j){var $=ee(q);return new f("Invalid "+Q+" `"+G+"` of type "+("`"+$+"` supplied to `"+O+"`, expected ")+("`"+j+"`."),{expectedType:j})}return null}return b(B)}function S(){return b(o)}function T(j){function B(L,Z,O,Q,G){if(typeof j!="function")return new f("Property `"+G+"` of component `"+O+"` has invalid PropType notation inside arrayOf.");var K=L[Z];if(!Array.isArray(K)){var q=ce(K);return new f("Invalid "+Q+" `"+G+"` of type "+("`"+q+"` supplied to `"+O+"`, expected an array."))}for(var N=0;N<K.length;N++){var $=j(K,N,O,Q,G+"["+N+"]",n);if($ instanceof Error)return $}return null}return b(B)}function C(){function j(B,L,Z,O,Q){var G=B[L];if(!a(G)){var K=ce(G);return new f("Invalid "+O+" `"+Q+"` of type "+("`"+K+"` supplied to `"+Z+"`, expected a single ReactElement."))}return null}return b(j)}function w(){function j(B,L,Z,O,Q){var G=B[L];if(!e.isValidElementType(G)){var K=ce(G);return new f("Invalid "+O+" `"+Q+"` of type "+("`"+K+"` supplied to `"+Z+"`, expected a single ReactElement type."))}return null}return b(j)}function A(j){function B(L,Z,O,Q,G){if(!(L[Z]instanceof j)){var K=j.name||m,q=W(L[Z]);return new f("Invalid "+Q+" `"+G+"` of type "+("`"+q+"` supplied to `"+O+"`, expected ")+("instance of `"+K+"`."))}return null}return b(B)}function V(j){if(!Array.isArray(j))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),o;function B(L,Z,O,Q,G){for(var K=L[Z],q=0;q<j.length;q++)if(x(K,j[q]))return null;var N=JSON.stringify(j,function(de,P){var z=ee(P);return z==="symbol"?String(P):P});return new f("Invalid "+Q+" `"+G+"` of value `"+String(K)+"` "+("supplied to `"+O+"`, expected one of "+N+"."))}return b(B)}function E(j){function B(L,Z,O,Q,G){if(typeof j!="function")return new f("Property `"+G+"` of component `"+O+"` has invalid PropType notation inside objectOf.");var K=L[Z],q=ce(K);if(q!=="object")return new f("Invalid "+Q+" `"+G+"` of type "+("`"+q+"` supplied to `"+O+"`, expected an object."));for(var N in K)if(s(K,N)){var $=j(K,N,O,Q,G+"."+N,n);if($ instanceof Error)return $}return null}return b(B)}function F(j){if(!Array.isArray(j))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var B=0;B<j.length;B++){var L=j[B];if(typeof L!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+I(L)+" at index "+B+"."),o}function Z(O,Q,G,K,q){for(var N=[],$=0;$<j.length;$++){var de=j[$],P=de(O,Q,G,K,q,n);if(P==null)return null;P.data&&s(P.data,"expectedType")&&N.push(P.data.expectedType)}var z=N.length>0?", expected one of type ["+N.join(", ")+"]":"";return new f("Invalid "+K+" `"+q+"` supplied to "+("`"+G+"`"+z+"."))}return b(Z)}function y(){function j(B,L,Z,O,Q){return ne(B[L])?null:new f("Invalid "+O+" `"+Q+"` supplied to "+("`"+Z+"`, expected a ReactNode."))}return b(j)}function R(j,B,L,Z,O){return new f((j||"React class")+": "+B+" type `"+L+"."+Z+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+O+"`.")}function H(j){function B(L,Z,O,Q,G){var K=L[Z],q=ce(K);if(q!=="object")return new f("Invalid "+Q+" `"+G+"` of type `"+q+"` "+("supplied to `"+O+"`, expected `object`."));for(var N in j){var $=j[N];if(typeof $!="function")return R(O,Q,G,N,ee($));var de=$(K,N,O,Q,G+"."+N,n);if(de)return de}return null}return b(B)}function se(j){function B(L,Z,O,Q,G){var K=L[Z],q=ce(K);if(q!=="object")return new f("Invalid "+Q+" `"+G+"` of type `"+q+"` "+("supplied to `"+O+"`, expected `object`."));var N=t({},L[Z],j);for(var $ in N){var de=j[$];if(s(j,$)&&typeof de!="function")return R(O,Q,G,$,ee(de));if(!de)return new f("Invalid "+Q+" `"+G+"` key `"+$+"` supplied to `"+O+"`.\nBad object: "+JSON.stringify(L[Z],null," ")+`
48
- Valid keys: `+JSON.stringify(Object.keys(j),null," "));var P=de(K,$,O,Q,G+"."+$,n);if(P)return P}return null}return b(B)}function ne(j){switch(typeof j){case"number":case"string":case"undefined":return!0;case"boolean":return!j;case"object":if(Array.isArray(j))return j.every(ne);if(j===null||a(j))return!0;var B=h(j);if(B){var L=B.call(j),Z;if(B!==j.entries){for(;!(Z=L.next()).done;)if(!ne(Z.value))return!1}else for(;!(Z=L.next()).done;){var O=Z.value;if(O&&!ne(O[1]))return!1}}else return!1;return!0;default:return!1}}function oe(j,B){return j==="symbol"?!0:B?B["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&B instanceof Symbol:!1}function ce(j){var B=typeof j;return Array.isArray(j)?"array":j instanceof RegExp?"object":oe(B,j)?"symbol":B}function ee(j){if(typeof j>"u"||j===null)return""+j;var B=ce(j);if(B==="object"){if(j instanceof Date)return"date";if(j instanceof RegExp)return"regexp"}return B}function I(j){var B=ee(j);switch(B){case"array":case"object":return"an "+B;case"boolean":case"date":case"regexp":return"a "+B;default:return B}}function W(j){return!j.constructor||!j.constructor.name?m:j.constructor.name}return g.checkPropTypes=r,g.resetWarningCache=r.resetWarningCache,g.PropTypes=g,g},ur}var fr,$a;function f0(){if($a)return fr;$a=1;var e=Fo();function t(){}function n(){}return n.resetWarningCache=t,fr=function(){function s(o,a,l,d,u,h){if(h!==e){var m=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw m.name="Invariant Violation",m}}s.isRequired=s;function r(){return s}var i={array:s,bigint:s,bool:s,func:s,number:s,object:s,string:s,symbol:s,any:s,arrayOf:r,element:s,elementType:s,instanceOf:r,node:s,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},fr}var Fa;function h0(){if(Fa)return ns.exports;if(Fa=1,process.env.NODE_ENV!=="production"){var e=cd(),t=!0;ns.exports=u0()(e.isElement,t)}else ns.exports=f0()();return ns.exports}var m0=h0();const pe=i0(m0);function p0(e,t,n=void 0){const s={};for(const r in e){const i=e[r];let o="",a=!0;for(let l=0;l<i.length;l+=1){const d=i[l];d&&(o+=(a===!0?"":" ")+t(d),a=!1,n&&n[d]&&(o+=" "+n[d]))}s[r]=o}return s}var rs={exports:{}},xe={};/**
47
+ */var ar,Pa;function c0(){if(Pa)return ar;Pa=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function s(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function r(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var o={},a=0;a<10;a++)o["_"+String.fromCharCode(a)]=a;var c=Object.getOwnPropertyNames(o).map(function(u){return o[u]});if(c.join("")!=="0123456789")return!1;var d={};return"abcdefghijklmnopqrst".split("").forEach(function(u){d[u]=u}),Object.keys(Object.assign({},d)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return ar=r()?Object.assign:function(i,o){for(var a,c=s(i),d,u=1;u<arguments.length;u++){a=Object(arguments[u]);for(var f in a)t.call(a,f)&&(c[f]=a[f]);if(e){d=e(a);for(var h=0;h<d.length;h++)n.call(a,d[h])&&(c[d[h]]=a[d[h]])}}return c},ar}var lr,Ra;function Fo(){if(Ra)return lr;Ra=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return lr=e,lr}var cr,Ia;function dd(){return Ia||(Ia=1,cr=Function.call.bind(Object.prototype.hasOwnProperty)),cr}var dr,Da;function d0(){if(Da)return dr;Da=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Fo(),n={},s=dd();e=function(i){var o="Warning: "+i;typeof console<"u"&&console.error(o);try{throw new Error(o)}catch{}}}function r(i,o,a,c,d){if(process.env.NODE_ENV!=="production"){for(var u in i)if(s(i,u)){var f;try{if(typeof i[u]!="function"){var h=Error((c||"React class")+": "+a+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw h.name="Invariant Violation",h}f=i[u](o,u,c,a,null,t)}catch(x){f=x}if(f&&!(f instanceof Error)&&e((c||"React class")+": type specification of "+a+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in n)){n[f.message]=!0;var p=d?d():"";e("Failed "+a+" type: "+f.message+(p??""))}}}}return r.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},dr=r,dr}var ur,$a;function u0(){if($a)return ur;$a=1;var e=cd(),t=c0(),n=Fo(),s=dd(),r=d0(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(a){var c="Warning: "+a;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function o(){return null}return ur=function(a,c){var d=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function f(M){var O=M&&(d&&M[d]||M[u]);if(typeof O=="function")return O}var h="<<anonymous>>",p={array:S("array"),bigint:S("bigint"),bool:S("boolean"),func:S("function"),number:S("number"),object:S("object"),string:S("string"),symbol:S("symbol"),any:C(),arrayOf:T,element:k(),elementType:v(),instanceOf:j,node:y(),objectOf:E,oneOf:V,oneOfType:_,shape:W,exact:te};function x(M,O){return M===O?M!==0||1/M===1/O:M!==M&&O!==O}function m(M,O){this.message=M,this.data=O&&typeof O=="object"?O:{},this.stack=""}m.prototype=Error.prototype;function b(M){if(process.env.NODE_ENV!=="production")var O={},q=0;function Y(re,$,I,L,N,F,se){if(L=L||h,F=F||I,se!==n){if(c){var A=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw A.name="Invariant Violation",A}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Z=L+":"+I;!O[Z]&&q<3&&(i("You are manually calling a React.PropTypes validation function for the `"+F+"` prop on `"+L+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),O[Z]=!0,q++)}}return $[I]==null?re?$[I]===null?new m("The "+N+" `"+F+"` is marked as required "+("in `"+L+"`, but its value is `null`.")):new m("The "+N+" `"+F+"` is marked as required in "+("`"+L+"`, but its value is `undefined`.")):null:M($,I,L,N,F)}var H=Y.bind(null,!1);return H.isRequired=Y.bind(null,!0),H}function S(M){function O(q,Y,H,re,$,I){var L=q[Y],N=fe(L);if(N!==M){var F=ne(L);return new m("Invalid "+re+" `"+$+"` of type "+("`"+F+"` supplied to `"+H+"`, expected ")+("`"+M+"`."),{expectedType:M})}return null}return b(O)}function C(){return b(o)}function T(M){function O(q,Y,H,re,$){if(typeof M!="function")return new m("Property `"+$+"` of component `"+H+"` has invalid PropType notation inside arrayOf.");var I=q[Y];if(!Array.isArray(I)){var L=fe(I);return new m("Invalid "+re+" `"+$+"` of type "+("`"+L+"` supplied to `"+H+"`, expected an array."))}for(var N=0;N<I.length;N++){var F=M(I,N,H,re,$+"["+N+"]",n);if(F instanceof Error)return F}return null}return b(O)}function k(){function M(O,q,Y,H,re){var $=O[q];if(!a($)){var I=fe($);return new m("Invalid "+H+" `"+re+"` of type "+("`"+I+"` supplied to `"+Y+"`, expected a single ReactElement."))}return null}return b(M)}function v(){function M(O,q,Y,H,re){var $=O[q];if(!e.isValidElementType($)){var I=fe($);return new m("Invalid "+H+" `"+re+"` of type "+("`"+I+"` supplied to `"+Y+"`, expected a single ReactElement type."))}return null}return b(M)}function j(M){function O(q,Y,H,re,$){if(!(q[Y]instanceof M)){var I=M.name||h,L=B(q[Y]);return new m("Invalid "+re+" `"+$+"` of type "+("`"+L+"` supplied to `"+H+"`, expected ")+("instance of `"+I+"`."))}return null}return b(O)}function V(M){if(!Array.isArray(M))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),o;function O(q,Y,H,re,$){for(var I=q[Y],L=0;L<M.length;L++)if(x(I,M[L]))return null;var N=JSON.stringify(M,function(se,A){var Z=ne(A);return Z==="symbol"?String(A):A});return new m("Invalid "+re+" `"+$+"` of value `"+String(I)+"` "+("supplied to `"+H+"`, expected one of "+N+"."))}return b(O)}function E(M){function O(q,Y,H,re,$){if(typeof M!="function")return new m("Property `"+$+"` of component `"+H+"` has invalid PropType notation inside objectOf.");var I=q[Y],L=fe(I);if(L!=="object")return new m("Invalid "+re+" `"+$+"` of type "+("`"+L+"` supplied to `"+H+"`, expected an object."));for(var N in I)if(s(I,N)){var F=M(I,N,H,re,$+"."+N,n);if(F instanceof Error)return F}return null}return b(O)}function _(M){if(!Array.isArray(M))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var O=0;O<M.length;O++){var q=M[O];if(typeof q!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+R(q)+" at index "+O+"."),o}function Y(H,re,$,I,L){for(var N=[],F=0;F<M.length;F++){var se=M[F],A=se(H,re,$,I,L,n);if(A==null)return null;A.data&&s(A.data,"expectedType")&&N.push(A.data.expectedType)}var Z=N.length>0?", expected one of type ["+N.join(", ")+"]":"";return new m("Invalid "+I+" `"+L+"` supplied to "+("`"+$+"`"+Z+"."))}return b(Y)}function y(){function M(O,q,Y,H,re){return ue(O[q])?null:new m("Invalid "+H+" `"+re+"` supplied to "+("`"+Y+"`, expected a ReactNode."))}return b(M)}function D(M,O,q,Y,H){return new m((M||"React class")+": "+O+" type `"+q+"."+Y+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+H+"`.")}function W(M){function O(q,Y,H,re,$){var I=q[Y],L=fe(I);if(L!=="object")return new m("Invalid "+re+" `"+$+"` of type `"+L+"` "+("supplied to `"+H+"`, expected `object`."));for(var N in M){var F=M[N];if(typeof F!="function")return D(H,re,$,N,ne(F));var se=F(I,N,H,re,$+"."+N,n);if(se)return se}return null}return b(O)}function te(M){function O(q,Y,H,re,$){var I=q[Y],L=fe(I);if(L!=="object")return new m("Invalid "+re+" `"+$+"` of type `"+L+"` "+("supplied to `"+H+"`, expected `object`."));var N=t({},q[Y],M);for(var F in N){var se=M[F];if(s(M,F)&&typeof se!="function")return D(H,re,$,F,ne(se));if(!se)return new m("Invalid "+re+" `"+$+"` key `"+F+"` supplied to `"+H+"`.\nBad object: "+JSON.stringify(q[Y],null," ")+`
48
+ Valid keys: `+JSON.stringify(Object.keys(M),null," "));var A=se(I,F,H,re,$+"."+F,n);if(A)return A}return null}return b(O)}function ue(M){switch(typeof M){case"number":case"string":case"undefined":return!0;case"boolean":return!M;case"object":if(Array.isArray(M))return M.every(ue);if(M===null||a(M))return!0;var O=f(M);if(O){var q=O.call(M),Y;if(O!==M.entries){for(;!(Y=q.next()).done;)if(!ue(Y.value))return!1}else for(;!(Y=q.next()).done;){var H=Y.value;if(H&&!ue(H[1]))return!1}}else return!1;return!0;default:return!1}}function ie(M,O){return M==="symbol"?!0:O?O["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&O instanceof Symbol:!1}function fe(M){var O=typeof M;return Array.isArray(M)?"array":M instanceof RegExp?"object":ie(O,M)?"symbol":O}function ne(M){if(typeof M>"u"||M===null)return""+M;var O=fe(M);if(O==="object"){if(M instanceof Date)return"date";if(M instanceof RegExp)return"regexp"}return O}function R(M){var O=ne(M);switch(O){case"array":case"object":return"an "+O;case"boolean":case"date":case"regexp":return"a "+O;default:return O}}function B(M){return!M.constructor||!M.constructor.name?h:M.constructor.name}return p.checkPropTypes=r,p.resetWarningCache=r.resetWarningCache,p.PropTypes=p,p},ur}var fr,Fa;function f0(){if(Fa)return fr;Fa=1;var e=Fo();function t(){}function n(){}return n.resetWarningCache=t,fr=function(){function s(o,a,c,d,u,f){if(f!==e){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}}s.isRequired=s;function r(){return s}var i={array:s,bigint:s,bool:s,func:s,number:s,object:s,string:s,symbol:s,any:s,arrayOf:r,element:s,elementType:s,instanceOf:r,node:s,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},fr}var Oa;function h0(){if(Oa)return ns.exports;if(Oa=1,process.env.NODE_ENV!=="production"){var e=cd(),t=!0;ns.exports=u0()(e.isElement,t)}else ns.exports=f0()();return ns.exports}var m0=h0();const ge=i0(m0);function g0(e,t,n=void 0){const s={};for(const r in e){const i=e[r];let o="",a=!0;for(let c=0;c<i.length;c+=1){const d=i[c];d&&(o+=(a===!0?"":" ")+t(d),a=!1,n&&n[d]&&(o+=" "+n[d]))}s[r]=o}return s}var rs={exports:{}},be={};/**
49
49
  * @license React
50
50
  * react-is.production.js
51
51
  *
@@ -53,7 +53,7 @@ Valid keys: `+JSON.stringify(Object.keys(j),null," "));var P=de(K,$,O,Q,G+"."+$
53
53
  *
54
54
  * This source code is licensed under the MIT license found in the
55
55
  * LICENSE file in the root directory of this source tree.
56
- */var Oa;function g0(){if(Oa)return xe;Oa=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),o=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),u=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),m=Symbol.for("react.view_transition"),g=Symbol.for("react.client.reference");function x(f){if(typeof f=="object"&&f!==null){var b=f.$$typeof;switch(b){case e:switch(f=f.type,f){case n:case r:case s:case l:case d:case m:return f;default:switch(f=f&&f.$$typeof,f){case o:case a:case h:case u:return f;case i:return f;default:return b}}case t:return b}}}return xe.ContextConsumer=i,xe.ContextProvider=o,xe.Element=e,xe.ForwardRef=a,xe.Fragment=n,xe.Lazy=h,xe.Memo=u,xe.Portal=t,xe.Profiler=r,xe.StrictMode=s,xe.Suspense=l,xe.SuspenseList=d,xe.isContextConsumer=function(f){return x(f)===i},xe.isContextProvider=function(f){return x(f)===o},xe.isElement=function(f){return typeof f=="object"&&f!==null&&f.$$typeof===e},xe.isForwardRef=function(f){return x(f)===a},xe.isFragment=function(f){return x(f)===n},xe.isLazy=function(f){return x(f)===h},xe.isMemo=function(f){return x(f)===u},xe.isPortal=function(f){return x(f)===t},xe.isProfiler=function(f){return x(f)===r},xe.isStrictMode=function(f){return x(f)===s},xe.isSuspense=function(f){return x(f)===l},xe.isSuspenseList=function(f){return x(f)===d},xe.isValidElementType=function(f){return typeof f=="string"||typeof f=="function"||f===n||f===r||f===s||f===l||f===d||typeof f=="object"&&f!==null&&(f.$$typeof===h||f.$$typeof===u||f.$$typeof===o||f.$$typeof===i||f.$$typeof===a||f.$$typeof===g||f.getModuleId!==void 0)},xe.typeOf=x,xe}var be={};/**
56
+ */var La;function p0(){if(La)return be;La=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),o=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),u=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),h=Symbol.for("react.view_transition"),p=Symbol.for("react.client.reference");function x(m){if(typeof m=="object"&&m!==null){var b=m.$$typeof;switch(b){case e:switch(m=m.type,m){case n:case r:case s:case c:case d:case h:return m;default:switch(m=m&&m.$$typeof,m){case o:case a:case f:case u:return m;case i:return m;default:return b}}case t:return b}}}return be.ContextConsumer=i,be.ContextProvider=o,be.Element=e,be.ForwardRef=a,be.Fragment=n,be.Lazy=f,be.Memo=u,be.Portal=t,be.Profiler=r,be.StrictMode=s,be.Suspense=c,be.SuspenseList=d,be.isContextConsumer=function(m){return x(m)===i},be.isContextProvider=function(m){return x(m)===o},be.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===e},be.isForwardRef=function(m){return x(m)===a},be.isFragment=function(m){return x(m)===n},be.isLazy=function(m){return x(m)===f},be.isMemo=function(m){return x(m)===u},be.isPortal=function(m){return x(m)===t},be.isProfiler=function(m){return x(m)===r},be.isStrictMode=function(m){return x(m)===s},be.isSuspense=function(m){return x(m)===c},be.isSuspenseList=function(m){return x(m)===d},be.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===n||m===r||m===s||m===c||m===d||typeof m=="object"&&m!==null&&(m.$$typeof===f||m.$$typeof===u||m.$$typeof===o||m.$$typeof===i||m.$$typeof===a||m.$$typeof===p||m.getModuleId!==void 0)},be.typeOf=x,be}var ve={};/**
57
57
  * @license React
58
58
  * react-is.development.js
59
59
  *
@@ -61,23 +61,23 @@ Valid keys: `+JSON.stringify(Object.keys(j),null," "));var P=de(K,$,O,Q,G+"."+$
61
61
  *
62
62
  * This source code is licensed under the MIT license found in the
63
63
  * LICENSE file in the root directory of this source tree.
64
- */var La;function y0(){return La||(La=1,process.env.NODE_ENV!=="production"&&function(){function e(f){if(typeof f=="object"&&f!==null){var b=f.$$typeof;switch(b){case t:switch(f=f.type,f){case s:case i:case r:case d:case u:case g:return f;default:switch(f=f&&f.$$typeof,f){case a:case l:case m:case h:return f;case o:return f;default:return b}}case n:return b}}}var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),a=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),g=Symbol.for("react.view_transition"),x=Symbol.for("react.client.reference");be.ContextConsumer=o,be.ContextProvider=a,be.Element=t,be.ForwardRef=l,be.Fragment=s,be.Lazy=m,be.Memo=h,be.Portal=n,be.Profiler=i,be.StrictMode=r,be.Suspense=d,be.SuspenseList=u,be.isContextConsumer=function(f){return e(f)===o},be.isContextProvider=function(f){return e(f)===a},be.isElement=function(f){return typeof f=="object"&&f!==null&&f.$$typeof===t},be.isForwardRef=function(f){return e(f)===l},be.isFragment=function(f){return e(f)===s},be.isLazy=function(f){return e(f)===m},be.isMemo=function(f){return e(f)===h},be.isPortal=function(f){return e(f)===n},be.isProfiler=function(f){return e(f)===i},be.isStrictMode=function(f){return e(f)===r},be.isSuspense=function(f){return e(f)===d},be.isSuspenseList=function(f){return e(f)===u},be.isValidElementType=function(f){return typeof f=="string"||typeof f=="function"||f===s||f===i||f===r||f===d||f===u||typeof f=="object"&&f!==null&&(f.$$typeof===m||f.$$typeof===h||f.$$typeof===a||f.$$typeof===o||f.$$typeof===l||f.$$typeof===x||f.getModuleId!==void 0)},be.typeOf=e}()),be}var _a;function x0(){return _a||(_a=1,process.env.NODE_ENV==="production"?rs.exports=g0():rs.exports=y0()),rs.exports}var Ss=x0();function mt(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function dd(e){if(p.isValidElement(e)||Ss.isValidElementType(e)||!mt(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=dd(e[n])}),t}function Ke(e,t,n={clone:!0}){const s=n.clone?{...e}:e;return mt(e)&&mt(t)&&Object.keys(t).forEach(r=>{p.isValidElement(t[r])||Ss.isValidElementType(t[r])?s[r]=t[r]:mt(t[r])&&Object.prototype.hasOwnProperty.call(e,r)&&mt(e[r])?s[r]=Ke(e[r],t[r],n):n.clone?s[r]=mt(t[r])?dd(t[r]):t[r]:s[r]=t[r]}),s}function Rn(e,t){return t?Ke(e,t,{clone:!1}):e}const Mt=process.env.NODE_ENV!=="production"?pe.oneOfType([pe.number,pe.string,pe.object,pe.array]):{};function Ba(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter(s=>s.startsWith("@container")).sort((s,r)=>{var o,a;const i=/min-width:\s*([0-9.]+)/;return+(((o=s.match(i))==null?void 0:o[1])||0)-+(((a=r.match(i))==null?void 0:a[1])||0)});return n.length?n.reduce((s,r)=>{const i=t[r];return delete s[r],s[r]=i,s},{...t}):t}function b0(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function v0(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n){if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The provided shorthand ${`(${t})`} is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.
65
- For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:Et(18,`(${t})`));return null}const[,s,r]=n,i=Number.isNaN(+s)?s||0:+s;return e.containerQueries(r).up(i)}function w0(e){const t=(i,o)=>i.replace("@media",o?`@container ${o}`:"@container");function n(i,o){i.up=(...a)=>t(e.breakpoints.up(...a),o),i.down=(...a)=>t(e.breakpoints.down(...a),o),i.between=(...a)=>t(e.breakpoints.between(...a),o),i.only=(...a)=>t(e.breakpoints.only(...a),o),i.not=(...a)=>{const l=t(e.breakpoints.not(...a),o);return l.includes("not all and")?l.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):l}}const s={},r=i=>(n(s,i),s);return n(r),{...e,containerQueries:r}}const Vs={xs:0,sm:600,md:900,lg:1200,xl:1536},Ha={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Vs[e]}px)`},S0={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:Vs[t]||t;return typeof n=="number"&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function xt(e,t,n){const s=e.theme||{};if(Array.isArray(t)){const i=s.breakpoints||Ha;return t.reduce((o,a,l)=>(o[i.up(i.keys[l])]=n(t[l]),o),{})}if(typeof t=="object"){const i=s.breakpoints||Ha;return Object.keys(t).reduce((o,a)=>{if(b0(i.keys,a)){const l=v0(s.containerQueries?s:S0,a);l&&(o[l]=n(t[a],a))}else if(Object.keys(i.values||Vs).includes(a)){const l=i.up(a);o[l]=n(t[a],a)}else{const l=a;o[l]=t[l]}return o},{})}return n(t)}function C0(e={}){var n;return((n=e.keys)==null?void 0:n.reduce((s,r)=>{const i=e.up(r);return s[i]={},s},{}))||{}}function Ua(e,t){return e.reduce((n,s)=>{const r=n[s];return(!r||Object.keys(r).length===0)&&delete n[s],n},t)}function Ns(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const s=`vars.${t}`.split(".").reduce((r,i)=>r&&r[i]?r[i]:null,e);if(s!=null)return s}return t.split(".").reduce((s,r)=>s&&s[r]!=null?s[r]:null,e)}function Cs(e,t,n,s=n){let r;return typeof e=="function"?r=e(n):Array.isArray(e)?r=e[n]||s:r=Ns(e,n)||s,t&&(r=t(r,s,e)),r}function Ie(e){const{prop:t,cssProperty:n=e.prop,themeKey:s,transform:r}=e,i=o=>{if(o[t]==null)return null;const a=o[t],l=o.theme,d=Ns(l,s)||{};return xt(o,a,h=>{let m=Cs(d,r,h);return h===m&&typeof h=="string"&&(m=Cs(d,r,`${t}${h==="default"?"":Ht(h)}`,h)),n===!1?m:{[n]:m}})};return i.propTypes=process.env.NODE_ENV!=="production"?{[t]:Mt}:{},i.filterProps=[t],i}function k0(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const T0={m:"margin",p:"padding"},E0={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},za={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},A0=k0(e=>{if(e.length>2)if(za[e])e=za[e];else return[e];const[t,n]=e.split(""),s=T0[t],r=E0[n]||"";return Array.isArray(r)?r.map(i=>s+i):[s+r]}),Ps=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Rs=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],j0=[...Ps,...Rs];function Wn(e,t,n,s){const r=Ns(e,t,!0)??n;return typeof r=="number"||typeof r=="string"?i=>typeof i=="string"?i:(process.env.NODE_ENV!=="production"&&typeof i!="number"&&console.error(`MUI: Expected ${s} argument to be a number or a string, got ${i}.`),typeof r=="string"?r.startsWith("var(")&&i===0?0:r.startsWith("var(")&&i===1?r:`calc(${i} * ${r})`:r*i):Array.isArray(r)?i=>{if(typeof i=="string")return i;const o=Math.abs(i);process.env.NODE_ENV!=="production"&&(Number.isInteger(o)?o>r.length-1&&console.error([`MUI: The value provided (${o}) overflows.`,`The supported values are: ${JSON.stringify(r)}.`,`${o} > ${r.length-1}, you need to add the missing values.`].join(`
64
+ */var _a;function y0(){return _a||(_a=1,process.env.NODE_ENV!=="production"&&function(){function e(m){if(typeof m=="object"&&m!==null){var b=m.$$typeof;switch(b){case t:switch(m=m.type,m){case s:case i:case r:case d:case u:case p:return m;default:switch(m=m&&m.$$typeof,m){case a:case c:case h:case f:return m;case o:return m;default:return b}}case n:return b}}}var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.for("react.view_transition"),x=Symbol.for("react.client.reference");ve.ContextConsumer=o,ve.ContextProvider=a,ve.Element=t,ve.ForwardRef=c,ve.Fragment=s,ve.Lazy=h,ve.Memo=f,ve.Portal=n,ve.Profiler=i,ve.StrictMode=r,ve.Suspense=d,ve.SuspenseList=u,ve.isContextConsumer=function(m){return e(m)===o},ve.isContextProvider=function(m){return e(m)===a},ve.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===t},ve.isForwardRef=function(m){return e(m)===c},ve.isFragment=function(m){return e(m)===s},ve.isLazy=function(m){return e(m)===h},ve.isMemo=function(m){return e(m)===f},ve.isPortal=function(m){return e(m)===n},ve.isProfiler=function(m){return e(m)===i},ve.isStrictMode=function(m){return e(m)===r},ve.isSuspense=function(m){return e(m)===d},ve.isSuspenseList=function(m){return e(m)===u},ve.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===s||m===i||m===r||m===d||m===u||typeof m=="object"&&m!==null&&(m.$$typeof===h||m.$$typeof===f||m.$$typeof===a||m.$$typeof===o||m.$$typeof===c||m.$$typeof===x||m.getModuleId!==void 0)},ve.typeOf=e}()),ve}var Ba;function x0(){return Ba||(Ba=1,process.env.NODE_ENV==="production"?rs.exports=p0():rs.exports=y0()),rs.exports}var Ss=x0();function pt(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function ud(e){if(g.isValidElement(e)||Ss.isValidElementType(e)||!pt(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=ud(e[n])}),t}function qe(e,t,n={clone:!0}){const s=n.clone?{...e}:e;return pt(e)&&pt(t)&&Object.keys(t).forEach(r=>{g.isValidElement(t[r])||Ss.isValidElementType(t[r])?s[r]=t[r]:pt(t[r])&&Object.prototype.hasOwnProperty.call(e,r)&&pt(e[r])?s[r]=qe(e[r],t[r],n):n.clone?s[r]=pt(t[r])?ud(t[r]):t[r]:s[r]=t[r]}),s}function Vn(e,t){return t?qe(e,t,{clone:!1}):e}const Pt=process.env.NODE_ENV!=="production"?ge.oneOfType([ge.number,ge.string,ge.object,ge.array]):{};function Ha(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter(s=>s.startsWith("@container")).sort((s,r)=>{var o,a;const i=/min-width:\s*([0-9.]+)/;return+(((o=s.match(i))==null?void 0:o[1])||0)-+(((a=r.match(i))==null?void 0:a[1])||0)});return n.length?n.reduce((s,r)=>{const i=t[r];return delete s[r],s[r]=i,s},{...t}):t}function b0(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function v0(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n){if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The provided shorthand ${`(${t})`} is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.
65
+ For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:Nt(18,`(${t})`));return null}const[,s,r]=n,i=Number.isNaN(+s)?s||0:+s;return e.containerQueries(r).up(i)}function w0(e){const t=(i,o)=>i.replace("@media",o?`@container ${o}`:"@container");function n(i,o){i.up=(...a)=>t(e.breakpoints.up(...a),o),i.down=(...a)=>t(e.breakpoints.down(...a),o),i.between=(...a)=>t(e.breakpoints.between(...a),o),i.only=(...a)=>t(e.breakpoints.only(...a),o),i.not=(...a)=>{const c=t(e.breakpoints.not(...a),o);return c.includes("not all and")?c.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):c}}const s={},r=i=>(n(s,i),s);return n(r),{...e,containerQueries:r}}const Ms={xs:0,sm:600,md:900,lg:1200,xl:1536},Ua={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Ms[e]}px)`},S0={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:Ms[t]||t;return typeof n=="number"&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function vt(e,t,n){const s=e.theme||{};if(Array.isArray(t)){const i=s.breakpoints||Ua;return t.reduce((o,a,c)=>(o[i.up(i.keys[c])]=n(t[c]),o),{})}if(typeof t=="object"){const i=s.breakpoints||Ua;return Object.keys(t).reduce((o,a)=>{if(b0(i.keys,a)){const c=v0(s.containerQueries?s:S0,a);c&&(o[c]=n(t[a],a))}else if(Object.keys(i.values||Ms).includes(a)){const c=i.up(a);o[c]=n(t[a],a)}else{const c=a;o[c]=t[c]}return o},{})}return n(t)}function C0(e={}){var n;return((n=e.keys)==null?void 0:n.reduce((s,r)=>{const i=e.up(r);return s[i]={},s},{}))||{}}function za(e,t){return e.reduce((n,s)=>{const r=n[s];return(!r||Object.keys(r).length===0)&&delete n[s],n},t)}function Vs(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const s=`vars.${t}`.split(".").reduce((r,i)=>r&&r[i]?r[i]:null,e);if(s!=null)return s}return t.split(".").reduce((s,r)=>s&&s[r]!=null?s[r]:null,e)}function Cs(e,t,n,s=n){let r;return typeof e=="function"?r=e(n):Array.isArray(e)?r=e[n]||s:r=Vs(e,n)||s,t&&(r=t(r,s,e)),r}function Fe(e){const{prop:t,cssProperty:n=e.prop,themeKey:s,transform:r}=e,i=o=>{if(o[t]==null)return null;const a=o[t],c=o.theme,d=Vs(c,s)||{};return vt(o,a,f=>{let h=Cs(d,r,f);return f===h&&typeof f=="string"&&(h=Cs(d,r,`${t}${f==="default"?"":zt(f)}`,f)),n===!1?h:{[n]:h}})};return i.propTypes=process.env.NODE_ENV!=="production"?{[t]:Pt}:{},i.filterProps=[t],i}function k0(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const T0={m:"margin",p:"padding"},E0={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Wa={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},A0=k0(e=>{if(e.length>2)if(Wa[e])e=Wa[e];else return[e];const[t,n]=e.split(""),s=T0[t],r=E0[n]||"";return Array.isArray(r)?r.map(i=>s+i):[s+r]}),Ps=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Rs=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],j0=[...Ps,...Rs];function Un(e,t,n,s){const r=Vs(e,t,!0)??n;return typeof r=="number"||typeof r=="string"?i=>typeof i=="string"?i:(process.env.NODE_ENV!=="production"&&typeof i!="number"&&console.error(`MUI: Expected ${s} argument to be a number or a string, got ${i}.`),typeof r=="string"?r.startsWith("var(")&&i===0?0:r.startsWith("var(")&&i===1?r:`calc(${i} * ${r})`:r*i):Array.isArray(r)?i=>{if(typeof i=="string")return i;const o=Math.abs(i);process.env.NODE_ENV!=="production"&&(Number.isInteger(o)?o>r.length-1&&console.error([`MUI: The value provided (${o}) overflows.`,`The supported values are: ${JSON.stringify(r)}.`,`${o} > ${r.length-1}, you need to add the missing values.`].join(`
66
66
  `)):console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join(`
67
67
  `)));const a=r[o];return i>=0?a:typeof a=="number"?-a:typeof a=="string"&&a.startsWith("var(")?`calc(-1 * ${a})`:`-${a}`}:typeof r=="function"?r:(process.env.NODE_ENV!=="production"&&console.error([`MUI: The \`theme.${t}\` value (${r}) is invalid.`,"It should be a number, an array or a function."].join(`
68
- `)),()=>{})}function Oo(e){return Wn(e,"spacing",8,"spacing")}function Zn(e,t){return typeof t=="string"||t==null?t:e(t)}function M0(e,t){return n=>e.reduce((s,r)=>(s[r]=Zn(t,n),s),{})}function V0(e,t,n,s){if(!t.includes(n))return null;const r=A0(n),i=M0(r,s),o=e[n];return xt(e,o,i)}function ud(e,t){const n=Oo(e.theme);return Object.keys(e).map(s=>V0(e,t,s,n)).reduce(Rn,{})}function Me(e){return ud(e,Ps)}Me.propTypes=process.env.NODE_ENV!=="production"?Ps.reduce((e,t)=>(e[t]=Mt,e),{}):{};Me.filterProps=Ps;function Ve(e){return ud(e,Rs)}Ve.propTypes=process.env.NODE_ENV!=="production"?Rs.reduce((e,t)=>(e[t]=Mt,e),{}):{};Ve.filterProps=Rs;process.env.NODE_ENV!=="production"&&j0.reduce((e,t)=>(e[t]=Mt,e),{});function Is(...e){const t=e.reduce((s,r)=>(r.filterProps.forEach(i=>{s[i]=r}),s),{}),n=s=>Object.keys(s).reduce((r,i)=>t[i]?Rn(r,t[i](s)):r,{});return n.propTypes=process.env.NODE_ENV!=="production"?e.reduce((s,r)=>Object.assign(s,r.propTypes),{}):{},n.filterProps=e.reduce((s,r)=>s.concat(r.filterProps),[]),n}function Je(e){return typeof e!="number"?e:`${e}px solid`}function tt(e,t){return Ie({prop:e,themeKey:"borders",transform:t})}const N0=tt("border",Je),P0=tt("borderTop",Je),R0=tt("borderRight",Je),I0=tt("borderBottom",Je),D0=tt("borderLeft",Je),$0=tt("borderColor"),F0=tt("borderTopColor"),O0=tt("borderRightColor"),L0=tt("borderBottomColor"),_0=tt("borderLeftColor"),B0=tt("outline",Je),H0=tt("outlineColor"),Ds=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=Wn(e.theme,"shape.borderRadius",4,"borderRadius"),n=s=>({borderRadius:Zn(t,s)});return xt(e,e.borderRadius,n)}return null};Ds.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:Mt}:{};Ds.filterProps=["borderRadius"];Is(N0,P0,R0,I0,D0,$0,F0,O0,L0,_0,Ds,B0,H0);const $s=e=>{if(e.gap!==void 0&&e.gap!==null){const t=Wn(e.theme,"spacing",8,"gap"),n=s=>({gap:Zn(t,s)});return xt(e,e.gap,n)}return null};$s.propTypes=process.env.NODE_ENV!=="production"?{gap:Mt}:{};$s.filterProps=["gap"];const Fs=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=Wn(e.theme,"spacing",8,"columnGap"),n=s=>({columnGap:Zn(t,s)});return xt(e,e.columnGap,n)}return null};Fs.propTypes=process.env.NODE_ENV!=="production"?{columnGap:Mt}:{};Fs.filterProps=["columnGap"];const Os=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=Wn(e.theme,"spacing",8,"rowGap"),n=s=>({rowGap:Zn(t,s)});return xt(e,e.rowGap,n)}return null};Os.propTypes=process.env.NODE_ENV!=="production"?{rowGap:Mt}:{};Os.filterProps=["rowGap"];const U0=Ie({prop:"gridColumn"}),z0=Ie({prop:"gridRow"}),W0=Ie({prop:"gridAutoFlow"}),Z0=Ie({prop:"gridAutoColumns"}),G0=Ie({prop:"gridAutoRows"}),K0=Ie({prop:"gridTemplateColumns"}),Y0=Ie({prop:"gridTemplateRows"}),q0=Ie({prop:"gridTemplateAreas"}),X0=Ie({prop:"gridArea"});Is($s,Fs,Os,U0,z0,W0,Z0,G0,K0,Y0,q0,X0);function ln(e,t){return t==="grey"?t:e}const J0=Ie({prop:"color",themeKey:"palette",transform:ln}),Q0=Ie({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:ln}),ey=Ie({prop:"backgroundColor",themeKey:"palette",transform:ln});Is(J0,Q0,ey);function Ge(e){return e<=1&&e!==0?`${e*100}%`:e}const ty=Ie({prop:"width",transform:Ge}),Lo=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var r,i,o,a,l;const s=((o=(i=(r=e.theme)==null?void 0:r.breakpoints)==null?void 0:i.values)==null?void 0:o[n])||Vs[n];return s?((l=(a=e.theme)==null?void 0:a.breakpoints)==null?void 0:l.unit)!=="px"?{maxWidth:`${s}${e.theme.breakpoints.unit}`}:{maxWidth:s}:{maxWidth:Ge(n)}};return xt(e,e.maxWidth,t)}return null};Lo.filterProps=["maxWidth"];const ny=Ie({prop:"minWidth",transform:Ge}),sy=Ie({prop:"height",transform:Ge}),ry=Ie({prop:"maxHeight",transform:Ge}),oy=Ie({prop:"minHeight",transform:Ge});Ie({prop:"size",cssProperty:"width",transform:Ge});Ie({prop:"size",cssProperty:"height",transform:Ge});const iy=Ie({prop:"boxSizing"});Is(ty,Lo,ny,sy,ry,oy,iy);const Ls={border:{themeKey:"borders",transform:Je},borderTop:{themeKey:"borders",transform:Je},borderRight:{themeKey:"borders",transform:Je},borderBottom:{themeKey:"borders",transform:Je},borderLeft:{themeKey:"borders",transform:Je},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Je},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Ds},color:{themeKey:"palette",transform:ln},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:ln},backgroundColor:{themeKey:"palette",transform:ln},p:{style:Ve},pt:{style:Ve},pr:{style:Ve},pb:{style:Ve},pl:{style:Ve},px:{style:Ve},py:{style:Ve},padding:{style:Ve},paddingTop:{style:Ve},paddingRight:{style:Ve},paddingBottom:{style:Ve},paddingLeft:{style:Ve},paddingX:{style:Ve},paddingY:{style:Ve},paddingInline:{style:Ve},paddingInlineStart:{style:Ve},paddingInlineEnd:{style:Ve},paddingBlock:{style:Ve},paddingBlockStart:{style:Ve},paddingBlockEnd:{style:Ve},m:{style:Me},mt:{style:Me},mr:{style:Me},mb:{style:Me},ml:{style:Me},mx:{style:Me},my:{style:Me},margin:{style:Me},marginTop:{style:Me},marginRight:{style:Me},marginBottom:{style:Me},marginLeft:{style:Me},marginX:{style:Me},marginY:{style:Me},marginInline:{style:Me},marginInlineStart:{style:Me},marginInlineEnd:{style:Me},marginBlock:{style:Me},marginBlockStart:{style:Me},marginBlockEnd:{style:Me},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:$s},rowGap:{style:Os},columnGap:{style:Fs},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Ge},maxWidth:{style:Lo},minWidth:{transform:Ge},height:{transform:Ge},maxHeight:{transform:Ge},minHeight:{transform:Ge},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function ay(...e){const t=e.reduce((s,r)=>s.concat(Object.keys(r)),[]),n=new Set(t);return e.every(s=>n.size===Object.keys(s).length)}function cy(e,t){return typeof e=="function"?e(t):e}function ly(){function e(n,s,r,i){const o={[n]:s,theme:r},a=i[n];if(!a)return{[n]:s};const{cssProperty:l=n,themeKey:d,transform:u,style:h}=a;if(s==null)return null;if(d==="typography"&&s==="inherit")return{[n]:s};const m=Ns(r,d)||{};return h?h(o):xt(o,s,x=>{let f=Cs(m,u,x);return x===f&&typeof x=="string"&&(f=Cs(m,u,`${n}${x==="default"?"":Ht(x)}`,x)),l===!1?f:{[l]:f}})}function t(n){const{sx:s,theme:r={},nested:i}=n||{};if(!s)return null;const o=r.unstable_sxConfig??Ls;function a(l){let d=l;if(typeof l=="function")d=l(r);else if(typeof l!="object")return l;if(!d)return null;const u=C0(r.breakpoints),h=Object.keys(u);let m=u;return Object.keys(d).forEach(g=>{const x=cy(d[g],r);if(x!=null)if(typeof x=="object")if(o[g])m=Rn(m,e(g,x,r,o));else{const f=xt({theme:r},x,b=>({[g]:b}));ay(f,x)?m[g]=t({sx:x,theme:r,nested:!0}):m=Rn(m,f)}else m=Rn(m,e(g,x,r,o))}),!i&&r.modularCssLayers?{"@layer sx":Ba(r,Ua(h,m))}:Ba(r,Ua(h,m))}return Array.isArray(s)?s.map(a):a(s)}return t}const hn=ly();hn.filterProps=["sx"];function dy(e){for(var t=0,n,s=0,r=e.length;r>=4;++s,r-=4)n=e.charCodeAt(s)&255|(e.charCodeAt(++s)&255)<<8|(e.charCodeAt(++s)&255)<<16|(e.charCodeAt(++s)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(r){case 3:t^=(e.charCodeAt(s+2)&255)<<16;case 2:t^=(e.charCodeAt(s+1)&255)<<8;case 1:t^=e.charCodeAt(s)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var uy={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function fy(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var hy=/[A-Z]|^ms/g,my=/_EMO_([^_]+?)_([^]*?)_EMO_/g,fd=function(t){return t.charCodeAt(1)===45},Wa=function(t){return t!=null&&typeof t!="boolean"},hr=fy(function(e){return fd(e)?e:e.replace(hy,"-$&").toLowerCase()}),Za=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(my,function(s,r,i){return Ct={name:r,styles:i,next:Ct},r})}return uy[t]!==1&&!fd(t)&&typeof n=="number"&&n!==0?n+"px":n};function ks(e,t,n){if(n==null)return"";var s=n;if(s.__emotion_styles!==void 0)return s;switch(typeof n){case"boolean":return"";case"object":{var r=n;if(r.anim===1)return Ct={name:r.name,styles:r.styles,next:Ct},r.name;var i=n;if(i.styles!==void 0){var o=i.next;if(o!==void 0)for(;o!==void 0;)Ct={name:o.name,styles:o.styles,next:Ct},o=o.next;var a=i.styles+";";return a}return py(e,t,n)}}var l=n;return l}function py(e,t,n){var s="";if(Array.isArray(n))for(var r=0;r<n.length;r++)s+=ks(e,t,n[r])+";";else for(var i in n){var o=n[i];if(typeof o!="object"){var a=o;Wa(a)&&(s+=hr(i)+":"+Za(i,a)+";")}else if(Array.isArray(o)&&typeof o[0]=="string"&&t==null)for(var l=0;l<o.length;l++)Wa(o[l])&&(s+=hr(i)+":"+Za(i,o[l])+";");else{var d=ks(e,t,o);switch(i){case"animation":case"animationName":{s+=hr(i)+":"+d+";";break}default:s+=i+"{"+d+"}"}}}return s}var Ga=/label:\s*([^\s;{]+)\s*(;|$)/g,Ct;function gy(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var s=!0,r="";Ct=void 0;var i=e[0];if(i==null||i.raw===void 0)s=!1,r+=ks(n,t,i);else{var o=i;r+=o[0]}for(var a=1;a<e.length;a++)if(r+=ks(n,t,e[a]),s){var l=i;r+=l[a]}Ga.lastIndex=0;for(var d="",u;(u=Ga.exec(r))!==null;)d+="-"+u[1];var h=dy(r)+d;return{name:h,styles:r,next:Ct}}/**
68
+ `)),()=>{})}function Oo(e){return Un(e,"spacing",8,"spacing")}function zn(e,t){return typeof t=="string"||t==null?t:e(t)}function N0(e,t){return n=>e.reduce((s,r)=>(s[r]=zn(t,n),s),{})}function M0(e,t,n,s){if(!t.includes(n))return null;const r=A0(n),i=N0(r,s),o=e[n];return vt(e,o,i)}function fd(e,t){const n=Oo(e.theme);return Object.keys(e).map(s=>M0(e,t,s,n)).reduce(Vn,{})}function Re(e){return fd(e,Ps)}Re.propTypes=process.env.NODE_ENV!=="production"?Ps.reduce((e,t)=>(e[t]=Pt,e),{}):{};Re.filterProps=Ps;function Ie(e){return fd(e,Rs)}Ie.propTypes=process.env.NODE_ENV!=="production"?Rs.reduce((e,t)=>(e[t]=Pt,e),{}):{};Ie.filterProps=Rs;process.env.NODE_ENV!=="production"&&j0.reduce((e,t)=>(e[t]=Pt,e),{});function Is(...e){const t=e.reduce((s,r)=>(r.filterProps.forEach(i=>{s[i]=r}),s),{}),n=s=>Object.keys(s).reduce((r,i)=>t[i]?Vn(r,t[i](s)):r,{});return n.propTypes=process.env.NODE_ENV!=="production"?e.reduce((s,r)=>Object.assign(s,r.propTypes),{}):{},n.filterProps=e.reduce((s,r)=>s.concat(r.filterProps),[]),n}function et(e){return typeof e!="number"?e:`${e}px solid`}function st(e,t){return Fe({prop:e,themeKey:"borders",transform:t})}const V0=st("border",et),P0=st("borderTop",et),R0=st("borderRight",et),I0=st("borderBottom",et),D0=st("borderLeft",et),$0=st("borderColor"),F0=st("borderTopColor"),O0=st("borderRightColor"),L0=st("borderBottomColor"),_0=st("borderLeftColor"),B0=st("outline",et),H0=st("outlineColor"),Ds=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=Un(e.theme,"shape.borderRadius",4,"borderRadius"),n=s=>({borderRadius:zn(t,s)});return vt(e,e.borderRadius,n)}return null};Ds.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:Pt}:{};Ds.filterProps=["borderRadius"];Is(V0,P0,R0,I0,D0,$0,F0,O0,L0,_0,Ds,B0,H0);const $s=e=>{if(e.gap!==void 0&&e.gap!==null){const t=Un(e.theme,"spacing",8,"gap"),n=s=>({gap:zn(t,s)});return vt(e,e.gap,n)}return null};$s.propTypes=process.env.NODE_ENV!=="production"?{gap:Pt}:{};$s.filterProps=["gap"];const Fs=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=Un(e.theme,"spacing",8,"columnGap"),n=s=>({columnGap:zn(t,s)});return vt(e,e.columnGap,n)}return null};Fs.propTypes=process.env.NODE_ENV!=="production"?{columnGap:Pt}:{};Fs.filterProps=["columnGap"];const Os=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=Un(e.theme,"spacing",8,"rowGap"),n=s=>({rowGap:zn(t,s)});return vt(e,e.rowGap,n)}return null};Os.propTypes=process.env.NODE_ENV!=="production"?{rowGap:Pt}:{};Os.filterProps=["rowGap"];const U0=Fe({prop:"gridColumn"}),z0=Fe({prop:"gridRow"}),W0=Fe({prop:"gridAutoFlow"}),Z0=Fe({prop:"gridAutoColumns"}),G0=Fe({prop:"gridAutoRows"}),K0=Fe({prop:"gridTemplateColumns"}),Y0=Fe({prop:"gridTemplateRows"}),q0=Fe({prop:"gridTemplateAreas"}),X0=Fe({prop:"gridArea"});Is($s,Fs,Os,U0,z0,W0,Z0,G0,K0,Y0,q0,X0);function ln(e,t){return t==="grey"?t:e}const J0=Fe({prop:"color",themeKey:"palette",transform:ln}),Q0=Fe({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:ln}),ey=Fe({prop:"backgroundColor",themeKey:"palette",transform:ln});Is(J0,Q0,ey);function Ye(e){return e<=1&&e!==0?`${e*100}%`:e}const ty=Fe({prop:"width",transform:Ye}),Lo=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var r,i,o,a,c;const s=((o=(i=(r=e.theme)==null?void 0:r.breakpoints)==null?void 0:i.values)==null?void 0:o[n])||Ms[n];return s?((c=(a=e.theme)==null?void 0:a.breakpoints)==null?void 0:c.unit)!=="px"?{maxWidth:`${s}${e.theme.breakpoints.unit}`}:{maxWidth:s}:{maxWidth:Ye(n)}};return vt(e,e.maxWidth,t)}return null};Lo.filterProps=["maxWidth"];const ny=Fe({prop:"minWidth",transform:Ye}),sy=Fe({prop:"height",transform:Ye}),ry=Fe({prop:"maxHeight",transform:Ye}),oy=Fe({prop:"minHeight",transform:Ye});Fe({prop:"size",cssProperty:"width",transform:Ye});Fe({prop:"size",cssProperty:"height",transform:Ye});const iy=Fe({prop:"boxSizing"});Is(ty,Lo,ny,sy,ry,oy,iy);const Ls={border:{themeKey:"borders",transform:et},borderTop:{themeKey:"borders",transform:et},borderRight:{themeKey:"borders",transform:et},borderBottom:{themeKey:"borders",transform:et},borderLeft:{themeKey:"borders",transform:et},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:et},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Ds},color:{themeKey:"palette",transform:ln},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:ln},backgroundColor:{themeKey:"palette",transform:ln},p:{style:Ie},pt:{style:Ie},pr:{style:Ie},pb:{style:Ie},pl:{style:Ie},px:{style:Ie},py:{style:Ie},padding:{style:Ie},paddingTop:{style:Ie},paddingRight:{style:Ie},paddingBottom:{style:Ie},paddingLeft:{style:Ie},paddingX:{style:Ie},paddingY:{style:Ie},paddingInline:{style:Ie},paddingInlineStart:{style:Ie},paddingInlineEnd:{style:Ie},paddingBlock:{style:Ie},paddingBlockStart:{style:Ie},paddingBlockEnd:{style:Ie},m:{style:Re},mt:{style:Re},mr:{style:Re},mb:{style:Re},ml:{style:Re},mx:{style:Re},my:{style:Re},margin:{style:Re},marginTop:{style:Re},marginRight:{style:Re},marginBottom:{style:Re},marginLeft:{style:Re},marginX:{style:Re},marginY:{style:Re},marginInline:{style:Re},marginInlineStart:{style:Re},marginInlineEnd:{style:Re},marginBlock:{style:Re},marginBlockStart:{style:Re},marginBlockEnd:{style:Re},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:$s},rowGap:{style:Os},columnGap:{style:Fs},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Ye},maxWidth:{style:Lo},minWidth:{transform:Ye},height:{transform:Ye},maxHeight:{transform:Ye},minHeight:{transform:Ye},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function ay(...e){const t=e.reduce((s,r)=>s.concat(Object.keys(r)),[]),n=new Set(t);return e.every(s=>n.size===Object.keys(s).length)}function ly(e,t){return typeof e=="function"?e(t):e}function cy(){function e(n,s,r,i){const o={[n]:s,theme:r},a=i[n];if(!a)return{[n]:s};const{cssProperty:c=n,themeKey:d,transform:u,style:f}=a;if(s==null)return null;if(d==="typography"&&s==="inherit")return{[n]:s};const h=Vs(r,d)||{};return f?f(o):vt(o,s,x=>{let m=Cs(h,u,x);return x===m&&typeof x=="string"&&(m=Cs(h,u,`${n}${x==="default"?"":zt(x)}`,x)),c===!1?m:{[c]:m}})}function t(n){const{sx:s,theme:r={},nested:i}=n||{};if(!s)return null;const o=r.unstable_sxConfig??Ls;function a(c){let d=c;if(typeof c=="function")d=c(r);else if(typeof c!="object")return c;if(!d)return null;const u=C0(r.breakpoints),f=Object.keys(u);let h=u;return Object.keys(d).forEach(p=>{const x=ly(d[p],r);if(x!=null)if(typeof x=="object")if(o[p])h=Vn(h,e(p,x,r,o));else{const m=vt({theme:r},x,b=>({[p]:b}));ay(m,x)?h[p]=t({sx:x,theme:r,nested:!0}):h=Vn(h,m)}else h=Vn(h,e(p,x,r,o))}),!i&&r.modularCssLayers?{"@layer sx":Ha(r,za(f,h))}:Ha(r,za(f,h))}return Array.isArray(s)?s.map(a):a(s)}return t}const fn=cy();fn.filterProps=["sx"];function dy(e){for(var t=0,n,s=0,r=e.length;r>=4;++s,r-=4)n=e.charCodeAt(s)&255|(e.charCodeAt(++s)&255)<<8|(e.charCodeAt(++s)&255)<<16|(e.charCodeAt(++s)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(r){case 3:t^=(e.charCodeAt(s+2)&255)<<16;case 2:t^=(e.charCodeAt(s+1)&255)<<8;case 1:t^=e.charCodeAt(s)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var uy={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function fy(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var hy=/[A-Z]|^ms/g,my=/_EMO_([^_]+?)_([^]*?)_EMO_/g,hd=function(t){return t.charCodeAt(1)===45},Za=function(t){return t!=null&&typeof t!="boolean"},hr=fy(function(e){return hd(e)?e:e.replace(hy,"-$&").toLowerCase()}),Ga=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(my,function(s,r,i){return Tt={name:r,styles:i,next:Tt},r})}return uy[t]!==1&&!hd(t)&&typeof n=="number"&&n!==0?n+"px":n};function ks(e,t,n){if(n==null)return"";var s=n;if(s.__emotion_styles!==void 0)return s;switch(typeof n){case"boolean":return"";case"object":{var r=n;if(r.anim===1)return Tt={name:r.name,styles:r.styles,next:Tt},r.name;var i=n;if(i.styles!==void 0){var o=i.next;if(o!==void 0)for(;o!==void 0;)Tt={name:o.name,styles:o.styles,next:Tt},o=o.next;var a=i.styles+";";return a}return gy(e,t,n)}}var c=n;return c}function gy(e,t,n){var s="";if(Array.isArray(n))for(var r=0;r<n.length;r++)s+=ks(e,t,n[r])+";";else for(var i in n){var o=n[i];if(typeof o!="object"){var a=o;Za(a)&&(s+=hr(i)+":"+Ga(i,a)+";")}else if(Array.isArray(o)&&typeof o[0]=="string"&&t==null)for(var c=0;c<o.length;c++)Za(o[c])&&(s+=hr(i)+":"+Ga(i,o[c])+";");else{var d=ks(e,t,o);switch(i){case"animation":case"animationName":{s+=hr(i)+":"+d+";";break}default:s+=i+"{"+d+"}"}}}return s}var Ka=/label:\s*([^\s;{]+)\s*(;|$)/g,Tt;function py(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var s=!0,r="";Tt=void 0;var i=e[0];if(i==null||i.raw===void 0)s=!1,r+=ks(n,t,i);else{var o=i;r+=o[0]}for(var a=1;a<e.length;a++)if(r+=ks(n,t,e[a]),s){var c=i;r+=c[a]}Ka.lastIndex=0;for(var d="",u;(u=Ka.exec(r))!==null;)d+="-"+u[1];var f=dy(r)+d;return{name:f,styles:r,next:Tt}}/**
69
69
  * @mui/styled-engine v7.2.0
70
70
  *
71
71
  * @license MIT
72
72
  * This source code is licensed under the MIT license found in the
73
73
  * LICENSE file in the root directory of this source tree.
74
74
  */function yy(e,t){const n=Qd(e,t);return process.env.NODE_ENV!=="production"?(...s)=>{const r=typeof e=="string"?`"${e}"`:"component";return s.length===0?console.error([`MUI: Seems like you called \`styled(${r})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
75
- `)):s.some(i=>i===void 0)&&console.error(`MUI: the styled(${r})(...args) API requires all its args to be defined.`),n(...s)}:n}function xy(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const Ka=[];function _t(e){return Ka[0]=e,gy(Ka)}const by=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,s)=>n.val-s.val),t.reduce((n,s)=>({...n,[s.key]:s.val}),{})};function vy(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:s=5,...r}=e,i=by(t),o=Object.keys(i);function a(m){return`@media (min-width:${typeof t[m]=="number"?t[m]:m}${n})`}function l(m){return`@media (max-width:${(typeof t[m]=="number"?t[m]:m)-s/100}${n})`}function d(m,g){const x=o.indexOf(g);return`@media (min-width:${typeof t[m]=="number"?t[m]:m}${n}) and (max-width:${(x!==-1&&typeof t[o[x]]=="number"?t[o[x]]:g)-s/100}${n})`}function u(m){return o.indexOf(m)+1<o.length?d(m,o[o.indexOf(m)+1]):a(m)}function h(m){const g=o.indexOf(m);return g===0?a(o[1]):g===o.length-1?l(o[g]):d(m,o[o.indexOf(m)+1]).replace("@media","@media not all and")}return{keys:o,values:i,up:a,down:l,between:d,only:u,not:h,unit:n,...r}}const wy={borderRadius:4};function hd(e=8,t=Oo({spacing:e})){if(e.mui)return e;const n=(...s)=>(process.env.NODE_ENV!=="production"&&(s.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${s.length}`)),(s.length===0?[1]:s).map(i=>{const o=t(i);return typeof o=="number"?`${o}px`:o}).join(" "));return n.mui=!0,n}function Sy(e,t){var s;const n=this;if(n.vars){if(!((s=n.colorSchemes)!=null&&s[e])||typeof n.getColorSchemeSelector!="function")return{};let r=n.getColorSchemeSelector(e);return r==="&"?t:((r.includes("data-")||r.includes("."))&&(r=`*:where(${r.replace(/\s*&$/,"")}) &`),{[r]:t})}return n.palette.mode===e?t:{}}function md(e={},...t){const{breakpoints:n={},palette:s={},spacing:r,shape:i={},...o}=e,a=vy(n),l=hd(r);let d=Ke({breakpoints:a,direction:"ltr",components:{},palette:{mode:"light",...s},spacing:l,shape:{...wy,...i}},o);return d=w0(d),d.applyStyles=Sy,d=t.reduce((u,h)=>Ke(u,h),d),d.unstable_sxConfig={...Ls,...o==null?void 0:o.unstable_sxConfig},d.unstable_sx=function(h){return hn({sx:h,theme:this})},d}const Cy={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function _o(e,t,n="Mui"){const s=Cy[t];return s?`${n}-${s}`:`${o0.generate(e)}-${t}`}function ky(e,t,n="Mui"){const s={};return t.forEach(r=>{s[r]=_o(e,r,n)}),s}function pd(e,t=""){return e.displayName||e.name||t}function Ya(e,t,n){const s=pd(t);return e.displayName||(s!==""?`${n}(${s})`:n)}function Ty(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return pd(e,"Component");if(typeof e=="object")switch(e.$$typeof){case Ss.ForwardRef:return Ya(e,e.render,"ForwardRef");case Ss.Memo:return Ya(e,e.type,"memo");default:return}}}function gd(e){const{variants:t,...n}=e,s={variants:t,style:_t(n),isProcessed:!0};return s.style===n||t&&t.forEach(r=>{typeof r.style!="function"&&(r.style=_t(r.style))}),s}const Ey=md();function mr(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function Ft(e,t){return t&&e&&typeof e=="object"&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function Ay(e){return e?(t,n)=>n[e]:null}function jy(e,t,n){e.theme=Py(e.theme)?n:e.theme[t]||e.theme}function fs(e,t,n){const s=typeof t=="function"?t(e):t;if(Array.isArray(s))return s.flatMap(r=>fs(e,r,n));if(Array.isArray(s==null?void 0:s.variants)){let r;if(s.isProcessed)r=n?Ft(s.style,n):s.style;else{const{variants:i,...o}=s;r=n?Ft(_t(o),n):o}return yd(e,s.variants,[r],n)}return s!=null&&s.isProcessed?n?Ft(_t(s.style),n):s.style:n?Ft(_t(s),n):s}function yd(e,t,n=[],s=void 0){var i;let r;e:for(let o=0;o<t.length;o+=1){const a=t[o];if(typeof a.props=="function"){if(r??(r={...e,...e.ownerState,ownerState:e.ownerState}),!a.props(r))continue}else for(const l in a.props)if(e[l]!==a.props[l]&&((i=e.ownerState)==null?void 0:i[l])!==a.props[l])continue e;typeof a.style=="function"?(r??(r={...e,...e.ownerState,ownerState:e.ownerState}),n.push(s?Ft(_t(a.style(r)),s):a.style(r))):n.push(s?Ft(_t(a.style),s):a.style)}return n}function My(e={}){const{themeId:t,defaultTheme:n=Ey,rootShouldForwardProp:s=mr,slotShouldForwardProp:r=mr}=e;function i(a){jy(a,t,n)}return(a,l={})=>{xy(a,A=>A.filter(V=>V!==hn));const{name:d,slot:u,skipVariantsResolver:h,skipSx:m,overridesResolver:g=Ay(xd(u)),...x}=l,f=d&&d.startsWith("Mui")||u?"components":"custom",b=h!==void 0?h:u&&u!=="Root"&&u!=="root"||!1,k=m||!1;let S=mr;u==="Root"||u==="root"?S=s:u?S=r:Ry(a)&&(S=void 0);const T=yy(a,{shouldForwardProp:S,label:Ny(d,u),...x}),C=A=>{if(A.__emotion_real===A)return A;if(typeof A=="function")return function(E){return fs(E,A,E.theme.modularCssLayers?f:void 0)};if(mt(A)){const V=gd(A);return function(F){return V.variants?fs(F,V,F.theme.modularCssLayers?f:void 0):F.theme.modularCssLayers?Ft(V.style,f):V.style}}return A},w=(...A)=>{const V=[],E=A.map(C),F=[];if(V.push(i),d&&g&&F.push(function(se){var ee,I;const oe=(I=(ee=se.theme.components)==null?void 0:ee[d])==null?void 0:I.styleOverrides;if(!oe)return null;const ce={};for(const W in oe)ce[W]=fs(se,oe[W],se.theme.modularCssLayers?"theme":void 0);return g(se,ce)}),d&&!b&&F.push(function(se){var ce,ee;const ne=se.theme,oe=(ee=(ce=ne==null?void 0:ne.components)==null?void 0:ce[d])==null?void 0:ee.variants;return oe?yd(se,oe,[],se.theme.modularCssLayers?"theme":void 0):null}),k||F.push(hn),Array.isArray(E[0])){const H=E.shift(),se=new Array(V.length).fill(""),ne=new Array(F.length).fill("");let oe;oe=[...se,...H,...ne],oe.raw=[...se,...H.raw,...ne],V.unshift(oe)}const y=[...V,...E,...F],R=T(...y);return a.muiName&&(R.muiName=a.muiName),process.env.NODE_ENV!=="production"&&(R.displayName=Vy(d,u,a)),R};return T.withConfig&&(w.withConfig=T.withConfig),w}}function Vy(e,t,n){return e?`${e}${Ht(t||"")}`:`Styled(${Ty(n)})`}function Ny(e,t){let n;return process.env.NODE_ENV!=="production"&&e&&(n=`${e}-${xd(t||"Root")}`),n}function Py(e){for(const t in e)return!1;return!0}function Ry(e){return typeof e=="string"&&e.charCodeAt(0)>96}function xd(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function Wr(e,t,n=!1){const s={...t};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const i=r;if(i==="components"||i==="slots")s[i]={...e[i],...s[i]};else if(i==="componentsProps"||i==="slotProps"){const o=e[i],a=t[i];if(!a)s[i]=o||{};else if(!o)s[i]=a;else{s[i]={...a};for(const l in o)if(Object.prototype.hasOwnProperty.call(o,l)){const d=l;s[i][d]=Wr(o[d],a[d],n)}}}else i==="className"&&n&&t.className?s.className=Xr(e==null?void 0:e.className,t==null?void 0:t.className):i==="style"&&n&&t.style?s.style={...e==null?void 0:e.style,...t==null?void 0:t.style}:s[i]===void 0&&(s[i]=e[i])}return s}function Iy(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function Bo(e,t=0,n=1){return process.env.NODE_ENV!=="production"&&(e<t||e>n)&&console.error(`MUI: The value provided ${e} is out of range [${t}, ${n}].`),Iy(e,t,n)}function Dy(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(s=>s+s)),process.env.NODE_ENV!=="production"&&e.length!==e.trim().length&&console.error(`MUI: The color: "${e}" is invalid. Make sure the color input doesn't contain leading/trailing space.`),n?`rgb${n.length===4?"a":""}(${n.map((s,r)=>r<3?parseInt(s,16):Math.round(parseInt(s,16)/255*1e3)/1e3).join(", ")})`:""}function At(e){if(e.type)return e;if(e.charAt(0)==="#")return At(Dy(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(process.env.NODE_ENV!=="production"?`MUI: Unsupported \`${e}\` color.
76
- The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:Et(9,e));let s=e.substring(t+1,e.length-1),r;if(n==="color"){if(s=s.split(" "),r=s.shift(),s.length===4&&s[3].charAt(0)==="/"&&(s[3]=s[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(r))throw new Error(process.env.NODE_ENV!=="production"?`MUI: unsupported \`${r}\` color space.
77
- The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:Et(10,r))}else s=s.split(",");return s=s.map(i=>parseFloat(i)),{type:n,values:s,colorSpace:r}}const $y=e=>{const t=At(e);return t.values.slice(0,3).map((n,s)=>t.type.includes("hsl")&&s!==0?`${n}%`:n).join(" ")},En=(e,t)=>{try{return $y(e)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}};function _s(e){const{type:t,colorSpace:n}=e;let{values:s}=e;return t.includes("rgb")?s=s.map((r,i)=>i<3?parseInt(r,10):r):t.includes("hsl")&&(s[1]=`${s[1]}%`,s[2]=`${s[2]}%`),t.includes("color")?s=`${n} ${s.join(" ")}`:s=`${s.join(", ")}`,`${t}(${s})`}function bd(e){e=At(e);const{values:t}=e,n=t[0],s=t[1]/100,r=t[2]/100,i=s*Math.min(r,1-r),o=(d,u=(d+n/30)%12)=>r-i*Math.max(Math.min(u-3,9-u,1),-1);let a="rgb";const l=[Math.round(o(0)*255),Math.round(o(8)*255),Math.round(o(4)*255)];return e.type==="hsla"&&(a+="a",l.push(t[3])),_s({type:a,values:l})}function Zr(e){e=At(e);let t=e.type==="hsl"||e.type==="hsla"?At(bd(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function qa(e,t){const n=Zr(e),s=Zr(t);return(Math.max(n,s)+.05)/(Math.min(n,s)+.05)}function Fy(e,t){return e=At(e),t=Bo(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,_s(e)}function os(e,t,n){try{return Fy(e,t)}catch{return e}}function Ho(e,t){if(e=At(e),t=Bo(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return _s(e)}function we(e,t,n){try{return Ho(e,t)}catch{return e}}function Uo(e,t){if(e=At(e),t=Bo(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return _s(e)}function Se(e,t,n){try{return Uo(e,t)}catch{return e}}function Oy(e,t=.15){return Zr(e)>.5?Ho(e,t):Uo(e,t)}function is(e,t,n){try{return Oy(e,t)}catch{return e}}const Ly=p.createContext(void 0);process.env.NODE_ENV!=="production"&&(pe.node,pe.object);function _y(e){const{theme:t,name:n,props:s}=e;if(!t||!t.components||!t.components[n])return s;const r=t.components[n];return r.defaultProps?Wr(r.defaultProps,s,t.components.mergeClassNameAndStyle):!r.styleOverrides&&!r.variants?Wr(r,s,t.components.mergeClassNameAndStyle):s}function By({props:e,name:t}){const n=p.useContext(Ly);return _y({props:e,name:t,theme:{components:n}})}const Xa={theme:void 0};function Hy(e){let t,n;return function(r){let i=t;return(i===void 0||r.theme!==n)&&(Xa.theme=r.theme,i=gd(e(Xa)),t=i,n=r.theme),i}}function Uy(e=""){function t(...s){if(!s.length)return"";const r=s[0];return typeof r=="string"&&!r.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:""}${r}${t(...s.slice(1))})`:`, ${r}`}return(s,...r)=>`var(--${e?`${e}-`:""}${s}${t(...r)})`}const Ja=(e,t,n,s=[])=>{let r=e;t.forEach((i,o)=>{o===t.length-1?Array.isArray(r)?r[Number(i)]=n:r&&typeof r=="object"&&(r[i]=n):r&&typeof r=="object"&&(r[i]||(r[i]=s.includes(i)?[]:{}),r=r[i])})},zy=(e,t,n)=>{function s(r,i=[],o=[]){Object.entries(r).forEach(([a,l])=>{(!n||n&&!n([...i,a]))&&l!=null&&(typeof l=="object"&&Object.keys(l).length>0?s(l,[...i,a],Array.isArray(l)?[...o,a]:o):t([...i,a],l,o))})}s(e)},Wy=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(s=>e.includes(s))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function pr(e,t){const{prefix:n,shouldSkipGeneratingVar:s}=t||{},r={},i={},o={};return zy(e,(a,l,d)=>{if((typeof l=="string"||typeof l=="number")&&(!s||!s(a,l))){const u=`--${n?`${n}-`:""}${a.join("-")}`,h=Wy(a,l);Object.assign(r,{[u]:h}),Ja(i,a,`var(${u})`,d),Ja(o,a,`var(${u}, ${h})`,d)}},a=>a[0]==="vars"),{css:r,vars:i,varsWithDefaults:o}}function Zy(e,t={}){const{getSelector:n=b,disableCssColorScheme:s,colorSchemeSelector:r}=t,{colorSchemes:i={},components:o,defaultColorScheme:a="light",...l}=e,{vars:d,css:u,varsWithDefaults:h}=pr(l,t);let m=h;const g={},{[a]:x,...f}=i;if(Object.entries(f||{}).forEach(([T,C])=>{const{vars:w,css:A,varsWithDefaults:V}=pr(C,t);m=Ke(m,V),g[T]={css:A,vars:w}}),x){const{css:T,vars:C,varsWithDefaults:w}=pr(x,t);m=Ke(m,w),g[a]={css:T,vars:C}}function b(T,C){var A,V;let w=r;if(r==="class"&&(w=".%s"),r==="data"&&(w="[data-%s]"),r!=null&&r.startsWith("data-")&&!r.includes("%s")&&(w=`[${r}="%s"]`),T){if(w==="media")return e.defaultColorScheme===T?":root":{[`@media (prefers-color-scheme: ${((V=(A=i[T])==null?void 0:A.palette)==null?void 0:V.mode)||T})`]:{":root":C}};if(w)return e.defaultColorScheme===T?`:root, ${w.replace("%s",String(T))}`:w.replace("%s",String(T))}return":root"}return{vars:m,generateThemeVars:()=>{let T={...d};return Object.entries(g).forEach(([,{vars:C}])=>{T=Ke(T,C)}),T},generateStyleSheets:()=>{var E,F;const T=[],C=e.defaultColorScheme||"light";function w(y,R){Object.keys(R).length&&T.push(typeof y=="string"?{[y]:{...R}}:y)}w(n(void 0,{...u}),u);const{[C]:A,...V}=g;if(A){const{css:y}=A,R=(F=(E=i[C])==null?void 0:E.palette)==null?void 0:F.mode,H=!s&&R?{colorScheme:R,...y}:{...y};w(n(C,{...H}),H)}return Object.entries(V).forEach(([y,{css:R}])=>{var ne,oe;const H=(oe=(ne=i[y])==null?void 0:ne.palette)==null?void 0:oe.mode,se=!s&&H?{colorScheme:H,...R}:{...R};w(n(y,{...se}),se)}),T}}}function Gy(e){return function(n){return e==="media"?(process.env.NODE_ENV!=="production"&&n!=="light"&&n!=="dark"&&console.error(`MUI: @media (prefers-color-scheme) supports only 'light' or 'dark', but receive '${n}'.`),`@media (prefers-color-scheme: ${n})`):e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${n}"] &`:e==="class"?`.${n} &`:e==="data"?`[data-${n}] &`:`${e.replace("%s",n)} &`:"&"}}const _n={black:"#000",white:"#fff"},Ky={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},Yt={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},qt={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},kn={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},Xt={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},Jt={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},Qt={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function vd(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:_n.white,default:_n.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const Yy=vd();function wd(){return{text:{primary:_n.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:_n.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const Qa=wd();function ec(e,t,n,s){const r=s.light||s,i=s.dark||s*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=Uo(e.main,r):t==="dark"&&(e.dark=Ho(e.main,i)))}function qy(e="light"){return e==="dark"?{main:Xt[200],light:Xt[50],dark:Xt[400]}:{main:Xt[700],light:Xt[400],dark:Xt[800]}}function Xy(e="light"){return e==="dark"?{main:Yt[200],light:Yt[50],dark:Yt[400]}:{main:Yt[500],light:Yt[300],dark:Yt[700]}}function Jy(e="light"){return e==="dark"?{main:qt[500],light:qt[300],dark:qt[700]}:{main:qt[700],light:qt[400],dark:qt[800]}}function Qy(e="light"){return e==="dark"?{main:Jt[400],light:Jt[300],dark:Jt[700]}:{main:Jt[700],light:Jt[500],dark:Jt[900]}}function e1(e="light"){return e==="dark"?{main:Qt[400],light:Qt[300],dark:Qt[700]}:{main:Qt[800],light:Qt[500],dark:Qt[900]}}function t1(e="light"){return e==="dark"?{main:kn[400],light:kn[300],dark:kn[700]}:{main:"#ed6c02",light:kn[500],dark:kn[900]}}function zo(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:s=.2,...r}=e,i=e.primary||qy(t),o=e.secondary||Xy(t),a=e.error||Jy(t),l=e.info||Qy(t),d=e.success||e1(t),u=e.warning||t1(t);function h(f){const b=qa(f,Qa.text.primary)>=n?Qa.text.primary:Yy.text.primary;if(process.env.NODE_ENV!=="production"){const k=qa(f,b);k<3&&console.error([`MUI: The contrast ratio of ${k}:1 for ${b} on ${f}`,"falls below the WCAG recommended absolute minimum contrast ratio of 3:1.","https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast"].join(`
78
- `))}return b}const m=({color:f,name:b,mainShade:k=500,lightShade:S=300,darkShade:T=700})=>{if(f={...f},!f.main&&f[k]&&(f.main=f[k]),!f.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${b?` (${b})`:""} provided to augmentColor(color) is invalid.
79
- The color object needs to have a \`main\` property or a \`${k}\` property.`:Et(11,b?` (${b})`:"",k));if(typeof f.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${b?` (${b})`:""} provided to augmentColor(color) is invalid.
80
- \`color.main\` should be a string, but \`${JSON.stringify(f.main)}\` was provided instead.
75
+ `)):s.some(i=>i===void 0)&&console.error(`MUI: the styled(${r})(...args) API requires all its args to be defined.`),n(...s)}:n}function xy(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const Ya=[];function Ht(e){return Ya[0]=e,py(Ya)}const by=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,s)=>n.val-s.val),t.reduce((n,s)=>({...n,[s.key]:s.val}),{})};function vy(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:s=5,...r}=e,i=by(t),o=Object.keys(i);function a(h){return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${n})`}function c(h){return`@media (max-width:${(typeof t[h]=="number"?t[h]:h)-s/100}${n})`}function d(h,p){const x=o.indexOf(p);return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${n}) and (max-width:${(x!==-1&&typeof t[o[x]]=="number"?t[o[x]]:p)-s/100}${n})`}function u(h){return o.indexOf(h)+1<o.length?d(h,o[o.indexOf(h)+1]):a(h)}function f(h){const p=o.indexOf(h);return p===0?a(o[1]):p===o.length-1?c(o[p]):d(h,o[o.indexOf(h)+1]).replace("@media","@media not all and")}return{keys:o,values:i,up:a,down:c,between:d,only:u,not:f,unit:n,...r}}const wy={borderRadius:4};function md(e=8,t=Oo({spacing:e})){if(e.mui)return e;const n=(...s)=>(process.env.NODE_ENV!=="production"&&(s.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${s.length}`)),(s.length===0?[1]:s).map(i=>{const o=t(i);return typeof o=="number"?`${o}px`:o}).join(" "));return n.mui=!0,n}function Sy(e,t){var s;const n=this;if(n.vars){if(!((s=n.colorSchemes)!=null&&s[e])||typeof n.getColorSchemeSelector!="function")return{};let r=n.getColorSchemeSelector(e);return r==="&"?t:((r.includes("data-")||r.includes("."))&&(r=`*:where(${r.replace(/\s*&$/,"")}) &`),{[r]:t})}return n.palette.mode===e?t:{}}function gd(e={},...t){const{breakpoints:n={},palette:s={},spacing:r,shape:i={},...o}=e,a=vy(n),c=md(r);let d=qe({breakpoints:a,direction:"ltr",components:{},palette:{mode:"light",...s},spacing:c,shape:{...wy,...i}},o);return d=w0(d),d.applyStyles=Sy,d=t.reduce((u,f)=>qe(u,f),d),d.unstable_sxConfig={...Ls,...o==null?void 0:o.unstable_sxConfig},d.unstable_sx=function(f){return fn({sx:f,theme:this})},d}const Cy={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function _o(e,t,n="Mui"){const s=Cy[t];return s?`${n}-${s}`:`${o0.generate(e)}-${t}`}function ky(e,t,n="Mui"){const s={};return t.forEach(r=>{s[r]=_o(e,r,n)}),s}function pd(e,t=""){return e.displayName||e.name||t}function qa(e,t,n){const s=pd(t);return e.displayName||(s!==""?`${n}(${s})`:n)}function Ty(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return pd(e,"Component");if(typeof e=="object")switch(e.$$typeof){case Ss.ForwardRef:return qa(e,e.render,"ForwardRef");case Ss.Memo:return qa(e,e.type,"memo");default:return}}}function yd(e){const{variants:t,...n}=e,s={variants:t,style:Ht(n),isProcessed:!0};return s.style===n||t&&t.forEach(r=>{typeof r.style!="function"&&(r.style=Ht(r.style))}),s}const Ey=gd();function mr(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function Lt(e,t){return t&&e&&typeof e=="object"&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function Ay(e){return e?(t,n)=>n[e]:null}function jy(e,t,n){e.theme=Py(e.theme)?n:e.theme[t]||e.theme}function fs(e,t,n){const s=typeof t=="function"?t(e):t;if(Array.isArray(s))return s.flatMap(r=>fs(e,r,n));if(Array.isArray(s==null?void 0:s.variants)){let r;if(s.isProcessed)r=n?Lt(s.style,n):s.style;else{const{variants:i,...o}=s;r=n?Lt(Ht(o),n):o}return xd(e,s.variants,[r],n)}return s!=null&&s.isProcessed?n?Lt(Ht(s.style),n):s.style:n?Lt(Ht(s),n):s}function xd(e,t,n=[],s=void 0){var i;let r;e:for(let o=0;o<t.length;o+=1){const a=t[o];if(typeof a.props=="function"){if(r??(r={...e,...e.ownerState,ownerState:e.ownerState}),!a.props(r))continue}else for(const c in a.props)if(e[c]!==a.props[c]&&((i=e.ownerState)==null?void 0:i[c])!==a.props[c])continue e;typeof a.style=="function"?(r??(r={...e,...e.ownerState,ownerState:e.ownerState}),n.push(s?Lt(Ht(a.style(r)),s):a.style(r))):n.push(s?Lt(Ht(a.style),s):a.style)}return n}function Ny(e={}){const{themeId:t,defaultTheme:n=Ey,rootShouldForwardProp:s=mr,slotShouldForwardProp:r=mr}=e;function i(a){jy(a,t,n)}return(a,c={})=>{xy(a,j=>j.filter(V=>V!==fn));const{name:d,slot:u,skipVariantsResolver:f,skipSx:h,overridesResolver:p=Ay(bd(u)),...x}=c,m=d&&d.startsWith("Mui")||u?"components":"custom",b=f!==void 0?f:u&&u!=="Root"&&u!=="root"||!1,S=h||!1;let C=mr;u==="Root"||u==="root"?C=s:u?C=r:Ry(a)&&(C=void 0);const T=yy(a,{shouldForwardProp:C,label:Vy(d,u),...x}),k=j=>{if(j.__emotion_real===j)return j;if(typeof j=="function")return function(E){return fs(E,j,E.theme.modularCssLayers?m:void 0)};if(pt(j)){const V=yd(j);return function(_){return V.variants?fs(_,V,_.theme.modularCssLayers?m:void 0):_.theme.modularCssLayers?Lt(V.style,m):V.style}}return j},v=(...j)=>{const V=[],E=j.map(k),_=[];if(V.push(i),d&&p&&_.push(function(te){var ne,R;const ie=(R=(ne=te.theme.components)==null?void 0:ne[d])==null?void 0:R.styleOverrides;if(!ie)return null;const fe={};for(const B in ie)fe[B]=fs(te,ie[B],te.theme.modularCssLayers?"theme":void 0);return p(te,fe)}),d&&!b&&_.push(function(te){var fe,ne;const ue=te.theme,ie=(ne=(fe=ue==null?void 0:ue.components)==null?void 0:fe[d])==null?void 0:ne.variants;return ie?xd(te,ie,[],te.theme.modularCssLayers?"theme":void 0):null}),S||_.push(fn),Array.isArray(E[0])){const W=E.shift(),te=new Array(V.length).fill(""),ue=new Array(_.length).fill("");let ie;ie=[...te,...W,...ue],ie.raw=[...te,...W.raw,...ue],V.unshift(ie)}const y=[...V,...E,..._],D=T(...y);return a.muiName&&(D.muiName=a.muiName),process.env.NODE_ENV!=="production"&&(D.displayName=My(d,u,a)),D};return T.withConfig&&(v.withConfig=T.withConfig),v}}function My(e,t,n){return e?`${e}${zt(t||"")}`:`Styled(${Ty(n)})`}function Vy(e,t){let n;return process.env.NODE_ENV!=="production"&&e&&(n=`${e}-${bd(t||"Root")}`),n}function Py(e){for(const t in e)return!1;return!0}function Ry(e){return typeof e=="string"&&e.charCodeAt(0)>96}function bd(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function Wr(e,t,n=!1){const s={...t};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const i=r;if(i==="components"||i==="slots")s[i]={...e[i],...s[i]};else if(i==="componentsProps"||i==="slotProps"){const o=e[i],a=t[i];if(!a)s[i]=o||{};else if(!o)s[i]=a;else{s[i]={...a};for(const c in o)if(Object.prototype.hasOwnProperty.call(o,c)){const d=c;s[i][d]=Wr(o[d],a[d],n)}}}else i==="className"&&n&&t.className?s.className=Xr(e==null?void 0:e.className,t==null?void 0:t.className):i==="style"&&n&&t.style?s.style={...e==null?void 0:e.style,...t==null?void 0:t.style}:s[i]===void 0&&(s[i]=e[i])}return s}function Iy(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function Bo(e,t=0,n=1){return process.env.NODE_ENV!=="production"&&(e<t||e>n)&&console.error(`MUI: The value provided ${e} is out of range [${t}, ${n}].`),Iy(e,t,n)}function Dy(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(s=>s+s)),process.env.NODE_ENV!=="production"&&e.length!==e.trim().length&&console.error(`MUI: The color: "${e}" is invalid. Make sure the color input doesn't contain leading/trailing space.`),n?`rgb${n.length===4?"a":""}(${n.map((s,r)=>r<3?parseInt(s,16):Math.round(parseInt(s,16)/255*1e3)/1e3).join(", ")})`:""}function Mt(e){if(e.type)return e;if(e.charAt(0)==="#")return Mt(Dy(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(process.env.NODE_ENV!=="production"?`MUI: Unsupported \`${e}\` color.
76
+ The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:Nt(9,e));let s=e.substring(t+1,e.length-1),r;if(n==="color"){if(s=s.split(" "),r=s.shift(),s.length===4&&s[3].charAt(0)==="/"&&(s[3]=s[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(r))throw new Error(process.env.NODE_ENV!=="production"?`MUI: unsupported \`${r}\` color space.
77
+ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:Nt(10,r))}else s=s.split(",");return s=s.map(i=>parseFloat(i)),{type:n,values:s,colorSpace:r}}const $y=e=>{const t=Mt(e);return t.values.slice(0,3).map((n,s)=>t.type.includes("hsl")&&s!==0?`${n}%`:n).join(" ")},kn=(e,t)=>{try{return $y(e)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}};function _s(e){const{type:t,colorSpace:n}=e;let{values:s}=e;return t.includes("rgb")?s=s.map((r,i)=>i<3?parseInt(r,10):r):t.includes("hsl")&&(s[1]=`${s[1]}%`,s[2]=`${s[2]}%`),t.includes("color")?s=`${n} ${s.join(" ")}`:s=`${s.join(", ")}`,`${t}(${s})`}function vd(e){e=Mt(e);const{values:t}=e,n=t[0],s=t[1]/100,r=t[2]/100,i=s*Math.min(r,1-r),o=(d,u=(d+n/30)%12)=>r-i*Math.max(Math.min(u-3,9-u,1),-1);let a="rgb";const c=[Math.round(o(0)*255),Math.round(o(8)*255),Math.round(o(4)*255)];return e.type==="hsla"&&(a+="a",c.push(t[3])),_s({type:a,values:c})}function Zr(e){e=Mt(e);let t=e.type==="hsl"||e.type==="hsla"?Mt(vd(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function Xa(e,t){const n=Zr(e),s=Zr(t);return(Math.max(n,s)+.05)/(Math.min(n,s)+.05)}function Fy(e,t){return e=Mt(e),t=Bo(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,_s(e)}function os(e,t,n){try{return Fy(e,t)}catch{return e}}function Ho(e,t){if(e=Mt(e),t=Bo(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return _s(e)}function Se(e,t,n){try{return Ho(e,t)}catch{return e}}function Uo(e,t){if(e=Mt(e),t=Bo(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return _s(e)}function Ce(e,t,n){try{return Uo(e,t)}catch{return e}}function Oy(e,t=.15){return Zr(e)>.5?Ho(e,t):Uo(e,t)}function is(e,t,n){try{return Oy(e,t)}catch{return e}}const Ly=g.createContext(void 0);process.env.NODE_ENV!=="production"&&(ge.node,ge.object);function _y(e){const{theme:t,name:n,props:s}=e;if(!t||!t.components||!t.components[n])return s;const r=t.components[n];return r.defaultProps?Wr(r.defaultProps,s,t.components.mergeClassNameAndStyle):!r.styleOverrides&&!r.variants?Wr(r,s,t.components.mergeClassNameAndStyle):s}function By({props:e,name:t}){const n=g.useContext(Ly);return _y({props:e,name:t,theme:{components:n}})}const Ja={theme:void 0};function Hy(e){let t,n;return function(r){let i=t;return(i===void 0||r.theme!==n)&&(Ja.theme=r.theme,i=yd(e(Ja)),t=i,n=r.theme),i}}function Uy(e=""){function t(...s){if(!s.length)return"";const r=s[0];return typeof r=="string"&&!r.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:""}${r}${t(...s.slice(1))})`:`, ${r}`}return(s,...r)=>`var(--${e?`${e}-`:""}${s}${t(...r)})`}const Qa=(e,t,n,s=[])=>{let r=e;t.forEach((i,o)=>{o===t.length-1?Array.isArray(r)?r[Number(i)]=n:r&&typeof r=="object"&&(r[i]=n):r&&typeof r=="object"&&(r[i]||(r[i]=s.includes(i)?[]:{}),r=r[i])})},zy=(e,t,n)=>{function s(r,i=[],o=[]){Object.entries(r).forEach(([a,c])=>{(!n||n&&!n([...i,a]))&&c!=null&&(typeof c=="object"&&Object.keys(c).length>0?s(c,[...i,a],Array.isArray(c)?[...o,a]:o):t([...i,a],c,o))})}s(e)},Wy=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(s=>e.includes(s))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function gr(e,t){const{prefix:n,shouldSkipGeneratingVar:s}=t||{},r={},i={},o={};return zy(e,(a,c,d)=>{if((typeof c=="string"||typeof c=="number")&&(!s||!s(a,c))){const u=`--${n?`${n}-`:""}${a.join("-")}`,f=Wy(a,c);Object.assign(r,{[u]:f}),Qa(i,a,`var(${u})`,d),Qa(o,a,`var(${u}, ${f})`,d)}},a=>a[0]==="vars"),{css:r,vars:i,varsWithDefaults:o}}function Zy(e,t={}){const{getSelector:n=b,disableCssColorScheme:s,colorSchemeSelector:r}=t,{colorSchemes:i={},components:o,defaultColorScheme:a="light",...c}=e,{vars:d,css:u,varsWithDefaults:f}=gr(c,t);let h=f;const p={},{[a]:x,...m}=i;if(Object.entries(m||{}).forEach(([T,k])=>{const{vars:v,css:j,varsWithDefaults:V}=gr(k,t);h=qe(h,V),p[T]={css:j,vars:v}}),x){const{css:T,vars:k,varsWithDefaults:v}=gr(x,t);h=qe(h,v),p[a]={css:T,vars:k}}function b(T,k){var j,V;let v=r;if(r==="class"&&(v=".%s"),r==="data"&&(v="[data-%s]"),r!=null&&r.startsWith("data-")&&!r.includes("%s")&&(v=`[${r}="%s"]`),T){if(v==="media")return e.defaultColorScheme===T?":root":{[`@media (prefers-color-scheme: ${((V=(j=i[T])==null?void 0:j.palette)==null?void 0:V.mode)||T})`]:{":root":k}};if(v)return e.defaultColorScheme===T?`:root, ${v.replace("%s",String(T))}`:v.replace("%s",String(T))}return":root"}return{vars:h,generateThemeVars:()=>{let T={...d};return Object.entries(p).forEach(([,{vars:k}])=>{T=qe(T,k)}),T},generateStyleSheets:()=>{var E,_;const T=[],k=e.defaultColorScheme||"light";function v(y,D){Object.keys(D).length&&T.push(typeof y=="string"?{[y]:{...D}}:y)}v(n(void 0,{...u}),u);const{[k]:j,...V}=p;if(j){const{css:y}=j,D=(_=(E=i[k])==null?void 0:E.palette)==null?void 0:_.mode,W=!s&&D?{colorScheme:D,...y}:{...y};v(n(k,{...W}),W)}return Object.entries(V).forEach(([y,{css:D}])=>{var ue,ie;const W=(ie=(ue=i[y])==null?void 0:ue.palette)==null?void 0:ie.mode,te=!s&&W?{colorScheme:W,...D}:{...D};v(n(y,{...te}),te)}),T}}}function Gy(e){return function(n){return e==="media"?(process.env.NODE_ENV!=="production"&&n!=="light"&&n!=="dark"&&console.error(`MUI: @media (prefers-color-scheme) supports only 'light' or 'dark', but receive '${n}'.`),`@media (prefers-color-scheme: ${n})`):e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${n}"] &`:e==="class"?`.${n} &`:e==="data"?`[data-${n}] &`:`${e.replace("%s",n)} &`:"&"}}const On={black:"#000",white:"#fff"},Ky={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},Yt={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},qt={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},Sn={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},Xt={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},Jt={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},Qt={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function wd(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:On.white,default:On.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const Yy=wd();function Sd(){return{text:{primary:On.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:On.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const el=Sd();function tl(e,t,n,s){const r=s.light||s,i=s.dark||s*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=Uo(e.main,r):t==="dark"&&(e.dark=Ho(e.main,i)))}function qy(e="light"){return e==="dark"?{main:Xt[200],light:Xt[50],dark:Xt[400]}:{main:Xt[700],light:Xt[400],dark:Xt[800]}}function Xy(e="light"){return e==="dark"?{main:Yt[200],light:Yt[50],dark:Yt[400]}:{main:Yt[500],light:Yt[300],dark:Yt[700]}}function Jy(e="light"){return e==="dark"?{main:qt[500],light:qt[300],dark:qt[700]}:{main:qt[700],light:qt[400],dark:qt[800]}}function Qy(e="light"){return e==="dark"?{main:Jt[400],light:Jt[300],dark:Jt[700]}:{main:Jt[700],light:Jt[500],dark:Jt[900]}}function ex(e="light"){return e==="dark"?{main:Qt[400],light:Qt[300],dark:Qt[700]}:{main:Qt[800],light:Qt[500],dark:Qt[900]}}function tx(e="light"){return e==="dark"?{main:Sn[400],light:Sn[300],dark:Sn[700]}:{main:"#ed6c02",light:Sn[500],dark:Sn[900]}}function zo(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:s=.2,...r}=e,i=e.primary||qy(t),o=e.secondary||Xy(t),a=e.error||Jy(t),c=e.info||Qy(t),d=e.success||ex(t),u=e.warning||tx(t);function f(m){const b=Xa(m,el.text.primary)>=n?el.text.primary:Yy.text.primary;if(process.env.NODE_ENV!=="production"){const S=Xa(m,b);S<3&&console.error([`MUI: The contrast ratio of ${S}:1 for ${b} on ${m}`,"falls below the WCAG recommended absolute minimum contrast ratio of 3:1.","https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast"].join(`
78
+ `))}return b}const h=({color:m,name:b,mainShade:S=500,lightShade:C=300,darkShade:T=700})=>{if(m={...m},!m.main&&m[S]&&(m.main=m[S]),!m.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${b?` (${b})`:""} provided to augmentColor(color) is invalid.
79
+ The color object needs to have a \`main\` property or a \`${S}\` property.`:Nt(11,b?` (${b})`:"",S));if(typeof m.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${b?` (${b})`:""} provided to augmentColor(color) is invalid.
80
+ \`color.main\` should be a string, but \`${JSON.stringify(m.main)}\` was provided instead.
81
81
 
82
82
  Did you intend to use one of the following approaches?
83
83
 
@@ -89,45 +89,50 @@ const theme1 = createTheme({ palette: {
89
89
 
90
90
  const theme2 = createTheme({ palette: {
91
91
  primary: { main: green[500] },
92
- } });`:Et(12,b?` (${b})`:"",JSON.stringify(f.main)));return ec(f,"light",S,s),ec(f,"dark",T,s),f.contrastText||(f.contrastText=h(f.main)),f};let g;return t==="light"?g=vd():t==="dark"&&(g=wd()),process.env.NODE_ENV!=="production"&&(g||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),Ke({common:{..._n},mode:t,primary:m({color:i,name:"primary"}),secondary:m({color:o,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:m({color:a,name:"error"}),warning:m({color:u,name:"warning"}),info:m({color:l,name:"info"}),success:m({color:d,name:"success"}),grey:Ky,contrastThreshold:n,getContrastText:h,augmentColor:m,tonalOffset:s,...g},r)}function n1(e){const t={};return Object.entries(e).forEach(s=>{const[r,i]=s;typeof i=="object"&&(t[r]=`${i.fontStyle?`${i.fontStyle} `:""}${i.fontVariant?`${i.fontVariant} `:""}${i.fontWeight?`${i.fontWeight} `:""}${i.fontStretch?`${i.fontStretch} `:""}${i.fontSize||""}${i.lineHeight?`/${i.lineHeight} `:""}${i.fontFamily||""}`)}),t}function s1(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function r1(e){return Math.round(e*1e5)/1e5}const tc={textTransform:"uppercase"},nc='"Roboto", "Helvetica", "Arial", sans-serif';function o1(e,t){const{fontFamily:n=nc,fontSize:s=14,fontWeightLight:r=300,fontWeightRegular:i=400,fontWeightMedium:o=500,fontWeightBold:a=700,htmlFontSize:l=16,allVariants:d,pxToRem:u,...h}=typeof t=="function"?t(e):t;process.env.NODE_ENV!=="production"&&(typeof s!="number"&&console.error("MUI: `fontSize` is required to be a number."),typeof l!="number"&&console.error("MUI: `htmlFontSize` is required to be a number."));const m=s/14,g=u||(b=>`${b/l*m}rem`),x=(b,k,S,T,C)=>({fontFamily:n,fontWeight:b,fontSize:g(k),lineHeight:S,...n===nc?{letterSpacing:`${r1(T/k)}em`}:{},...C,...d}),f={h1:x(r,96,1.167,-1.5),h2:x(r,60,1.2,-.5),h3:x(i,48,1.167,0),h4:x(i,34,1.235,.25),h5:x(i,24,1.334,0),h6:x(o,20,1.6,.15),subtitle1:x(i,16,1.75,.15),subtitle2:x(o,14,1.57,.1),body1:x(i,16,1.5,.15),body2:x(i,14,1.43,.15),button:x(o,14,1.75,.4,tc),caption:x(i,12,1.66,.4),overline:x(i,12,2.66,1,tc),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Ke({htmlFontSize:l,pxToRem:g,fontFamily:n,fontSize:s,fontWeightLight:r,fontWeightRegular:i,fontWeightMedium:o,fontWeightBold:a,...f},h,{clone:!1})}const i1=.2,a1=.14,c1=.12;function ke(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${i1})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${a1})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${c1})`].join(",")}const l1=["none",ke(0,2,1,-1,0,1,1,0,0,1,3,0),ke(0,3,1,-2,0,2,2,0,0,1,5,0),ke(0,3,3,-2,0,3,4,0,0,1,8,0),ke(0,2,4,-1,0,4,5,0,0,1,10,0),ke(0,3,5,-1,0,5,8,0,0,1,14,0),ke(0,3,5,-1,0,6,10,0,0,1,18,0),ke(0,4,5,-2,0,7,10,1,0,2,16,1),ke(0,5,5,-3,0,8,10,1,0,3,14,2),ke(0,5,6,-3,0,9,12,1,0,3,16,2),ke(0,6,6,-3,0,10,14,1,0,4,18,3),ke(0,6,7,-4,0,11,15,1,0,4,20,3),ke(0,7,8,-4,0,12,17,2,0,5,22,4),ke(0,7,8,-4,0,13,19,2,0,5,24,4),ke(0,7,9,-4,0,14,21,2,0,5,26,4),ke(0,8,9,-5,0,15,22,2,0,6,28,5),ke(0,8,10,-5,0,16,24,2,0,6,30,5),ke(0,8,11,-5,0,17,26,2,0,6,32,5),ke(0,9,11,-5,0,18,28,2,0,7,34,6),ke(0,9,12,-6,0,19,29,2,0,7,36,6),ke(0,10,13,-6,0,20,31,3,0,8,38,7),ke(0,10,13,-6,0,21,33,3,0,8,40,7),ke(0,10,14,-6,0,22,35,3,0,8,42,7),ke(0,11,14,-7,0,23,36,3,0,9,44,8),ke(0,11,15,-7,0,24,38,3,0,9,46,8)],d1={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},u1={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function sc(e){return`${Math.round(e)}ms`}function f1(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function h1(e){const t={...d1,...e.easing},n={...u1,...e.duration};return{getAutoHeightDuration:f1,create:(r=["all"],i={})=>{const{duration:o=n.standard,easing:a=t.easeInOut,delay:l=0,...d}=i;if(process.env.NODE_ENV!=="production"){const u=m=>typeof m=="string",h=m=>!Number.isNaN(parseFloat(m));!u(r)&&!Array.isArray(r)&&console.error('MUI: Argument "props" must be a string or Array.'),!h(o)&&!u(o)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${o}.`),u(a)||console.error('MUI: Argument "easing" must be a string.'),!h(l)&&!u(l)&&console.error('MUI: Argument "delay" must be a number or a string.'),typeof i!="object"&&console.error(["MUI: Secong argument of transition.create must be an object.","Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`"].join(`
93
- `)),Object.keys(d).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(d).join(",")}].`)}return(Array.isArray(r)?r:[r]).map(u=>`${u} ${typeof o=="string"?o:sc(o)} ${a} ${typeof l=="string"?l:sc(l)}`).join(",")},...e,easing:t,duration:n}}const m1={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function p1(e){return mt(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function Sd(e={}){const t={...e};function n(s){const r=Object.entries(s);for(let i=0;i<r.length;i++){const[o,a]=r[i];!p1(a)||o.startsWith("unstable_")?delete s[o]:mt(a)&&(s[o]={...a},n(s[o]))}}return n(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
92
+ } });`:Nt(12,b?` (${b})`:"",JSON.stringify(m.main)));return tl(m,"light",C,s),tl(m,"dark",T,s),m.contrastText||(m.contrastText=f(m.main)),m};let p;return t==="light"?p=wd():t==="dark"&&(p=Sd()),process.env.NODE_ENV!=="production"&&(p||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),qe({common:{...On},mode:t,primary:h({color:i,name:"primary"}),secondary:h({color:o,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:h({color:a,name:"error"}),warning:h({color:u,name:"warning"}),info:h({color:c,name:"info"}),success:h({color:d,name:"success"}),grey:Ky,contrastThreshold:n,getContrastText:f,augmentColor:h,tonalOffset:s,...p},r)}function nx(e){const t={};return Object.entries(e).forEach(s=>{const[r,i]=s;typeof i=="object"&&(t[r]=`${i.fontStyle?`${i.fontStyle} `:""}${i.fontVariant?`${i.fontVariant} `:""}${i.fontWeight?`${i.fontWeight} `:""}${i.fontStretch?`${i.fontStretch} `:""}${i.fontSize||""}${i.lineHeight?`/${i.lineHeight} `:""}${i.fontFamily||""}`)}),t}function sx(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function rx(e){return Math.round(e*1e5)/1e5}const nl={textTransform:"uppercase"},sl='"Roboto", "Helvetica", "Arial", sans-serif';function ox(e,t){const{fontFamily:n=sl,fontSize:s=14,fontWeightLight:r=300,fontWeightRegular:i=400,fontWeightMedium:o=500,fontWeightBold:a=700,htmlFontSize:c=16,allVariants:d,pxToRem:u,...f}=typeof t=="function"?t(e):t;process.env.NODE_ENV!=="production"&&(typeof s!="number"&&console.error("MUI: `fontSize` is required to be a number."),typeof c!="number"&&console.error("MUI: `htmlFontSize` is required to be a number."));const h=s/14,p=u||(b=>`${b/c*h}rem`),x=(b,S,C,T,k)=>({fontFamily:n,fontWeight:b,fontSize:p(S),lineHeight:C,...n===sl?{letterSpacing:`${rx(T/S)}em`}:{},...k,...d}),m={h1:x(r,96,1.167,-1.5),h2:x(r,60,1.2,-.5),h3:x(i,48,1.167,0),h4:x(i,34,1.235,.25),h5:x(i,24,1.334,0),h6:x(o,20,1.6,.15),subtitle1:x(i,16,1.75,.15),subtitle2:x(o,14,1.57,.1),body1:x(i,16,1.5,.15),body2:x(i,14,1.43,.15),button:x(o,14,1.75,.4,nl),caption:x(i,12,1.66,.4),overline:x(i,12,2.66,1,nl),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return qe({htmlFontSize:c,pxToRem:p,fontFamily:n,fontSize:s,fontWeightLight:r,fontWeightRegular:i,fontWeightMedium:o,fontWeightBold:a,...m},f,{clone:!1})}const ix=.2,ax=.14,lx=.12;function Ae(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${ix})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${ax})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${lx})`].join(",")}const cx=["none",Ae(0,2,1,-1,0,1,1,0,0,1,3,0),Ae(0,3,1,-2,0,2,2,0,0,1,5,0),Ae(0,3,3,-2,0,3,4,0,0,1,8,0),Ae(0,2,4,-1,0,4,5,0,0,1,10,0),Ae(0,3,5,-1,0,5,8,0,0,1,14,0),Ae(0,3,5,-1,0,6,10,0,0,1,18,0),Ae(0,4,5,-2,0,7,10,1,0,2,16,1),Ae(0,5,5,-3,0,8,10,1,0,3,14,2),Ae(0,5,6,-3,0,9,12,1,0,3,16,2),Ae(0,6,6,-3,0,10,14,1,0,4,18,3),Ae(0,6,7,-4,0,11,15,1,0,4,20,3),Ae(0,7,8,-4,0,12,17,2,0,5,22,4),Ae(0,7,8,-4,0,13,19,2,0,5,24,4),Ae(0,7,9,-4,0,14,21,2,0,5,26,4),Ae(0,8,9,-5,0,15,22,2,0,6,28,5),Ae(0,8,10,-5,0,16,24,2,0,6,30,5),Ae(0,8,11,-5,0,17,26,2,0,6,32,5),Ae(0,9,11,-5,0,18,28,2,0,7,34,6),Ae(0,9,12,-6,0,19,29,2,0,7,36,6),Ae(0,10,13,-6,0,20,31,3,0,8,38,7),Ae(0,10,13,-6,0,21,33,3,0,8,40,7),Ae(0,10,14,-6,0,22,35,3,0,8,42,7),Ae(0,11,14,-7,0,23,36,3,0,9,44,8),Ae(0,11,15,-7,0,24,38,3,0,9,46,8)],dx={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},ux={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function rl(e){return`${Math.round(e)}ms`}function fx(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function hx(e){const t={...dx,...e.easing},n={...ux,...e.duration};return{getAutoHeightDuration:fx,create:(r=["all"],i={})=>{const{duration:o=n.standard,easing:a=t.easeInOut,delay:c=0,...d}=i;if(process.env.NODE_ENV!=="production"){const u=h=>typeof h=="string",f=h=>!Number.isNaN(parseFloat(h));!u(r)&&!Array.isArray(r)&&console.error('MUI: Argument "props" must be a string or Array.'),!f(o)&&!u(o)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${o}.`),u(a)||console.error('MUI: Argument "easing" must be a string.'),!f(c)&&!u(c)&&console.error('MUI: Argument "delay" must be a number or a string.'),typeof i!="object"&&console.error(["MUI: Secong argument of transition.create must be an object.","Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`"].join(`
93
+ `)),Object.keys(d).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(d).join(",")}].`)}return(Array.isArray(r)?r:[r]).map(u=>`${u} ${typeof o=="string"?o:rl(o)} ${a} ${typeof c=="string"?c:rl(c)}`).join(",")},...e,easing:t,duration:n}}const mx={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function gx(e){return pt(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function Cd(e={}){const t={...e};function n(s){const r=Object.entries(s);for(let i=0;i<r.length;i++){const[o,a]=r[i];!gx(a)||o.startsWith("unstable_")?delete s[o]:pt(a)&&(s[o]={...a},n(s[o]))}}return n(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
94
94
 
95
95
  const theme = ${JSON.stringify(t,null,2)};
96
96
 
97
97
  theme.breakpoints = createBreakpoints(theme.breakpoints || {});
98
98
  theme.transitions = createTransitions(theme.transitions || {});
99
99
 
100
- export default theme;`}function Gr(e={},...t){const{breakpoints:n,mixins:s={},spacing:r,palette:i={},transitions:o={},typography:a={},shape:l,...d}=e;if(e.vars&&e.generateThemeVars===void 0)throw new Error(process.env.NODE_ENV!=="production"?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name or follow the [docs](https://mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature.":Et(20));const u=zo(i),h=md(e);let m=Ke(h,{mixins:s1(h.breakpoints,s),palette:u,shadows:l1.slice(),typography:o1(u,a),transitions:h1(o),zIndex:{...m1}});if(m=Ke(m,d),m=t.reduce((g,x)=>Ke(g,x),m),process.env.NODE_ENV!=="production"){const g=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],x=(f,b)=>{let k;for(k in f){const S=f[k];if(g.includes(k)&&Object.keys(S).length>0){if(process.env.NODE_ENV!=="production"){const T=_o("",k);console.error([`MUI: The \`${b}\` component increases the CSS specificity of the \`${k}\` internal state.`,"You can not override it like this: ",JSON.stringify(f,null,2),"",`Instead, you need to use the '&.${T}' syntax:`,JSON.stringify({root:{[`&.${T}`]:S}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
101
- `))}f[k]={}}}};Object.keys(m.components).forEach(f=>{const b=m.components[f].styleOverrides;b&&f.startsWith("Mui")&&x(b,f)})}return m.unstable_sxConfig={...Ls,...d==null?void 0:d.unstable_sxConfig},m.unstable_sx=function(x){return hn({sx:x,theme:this})},m.toRuntimeSource=Sd,m}function g1(e){let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}const y1=[...Array(25)].map((e,t)=>{if(t===0)return"none";const n=g1(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function Cd(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function kd(e){return e==="dark"?y1:[]}function x1(e){const{palette:t={mode:"light"},opacity:n,overlays:s,...r}=e,i=zo(t);return{palette:i,opacity:{...Cd(i.mode),...n},overlays:s||kd(i.mode),...r}}function b1(e){var t;return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!((t=e[1])!=null&&t.match(/(mode|contrastThreshold|tonalOffset)/))}const v1=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:""}overlays-${n}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],w1=e=>(t,n)=>{const s=e.rootSelector||":root",r=e.colorSchemeSelector;let i=r;if(r==="class"&&(i=".%s"),r==="data"&&(i="[data-%s]"),r!=null&&r.startsWith("data-")&&!r.includes("%s")&&(i=`[${r}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const o={};return v1(e.cssVarPrefix).forEach(a=>{o[a]=n[a],delete n[a]}),i==="media"?{[s]:n,"@media (prefers-color-scheme: dark)":{[s]:o}}:i?{[i.replace("%s",t)]:o,[`${s}, ${i.replace("%s",t)}`]:n}:{[s]:{...n,...o}}}if(i&&i!=="media")return`${s}, ${i.replace("%s",String(t))}`}else if(t){if(i==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[s]:n}};if(i)return i.replace("%s",String(t))}return s};function S1(e,t){t.forEach(n=>{e[n]||(e[n]={})})}function M(e,t,n){!e[t]&&n&&(e[t]=n)}function An(e){return typeof e!="string"||!e.startsWith("hsl")?e:bd(e)}function ht(e,t){`${t}Channel`in e||(e[`${t}Channel`]=En(An(e[t]),`MUI: Can't create \`palette.${t}Channel\` because \`palette.${t}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().
102
- To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function C1(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const it=e=>{try{return e()}catch{}},k1=(e="mui")=>Uy(e);function gr(e,t,n,s){if(!t)return;t=t===!0?{}:t;const r=s==="dark"?"dark":"light";if(!n){e[s]=x1({...t,palette:{mode:r,...t==null?void 0:t.palette}});return}const{palette:i,...o}=Gr({...n,palette:{mode:r,...t==null?void 0:t.palette}});return e[s]={...t,palette:i,opacity:{...Cd(r),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||kd(r)},o}function T1(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:s,disableCssColorScheme:r=!1,cssVarPrefix:i="mui",shouldSkipGeneratingVar:o=b1,colorSchemeSelector:a=n.light&&n.dark?"media":void 0,rootSelector:l=":root",...d}=e,u=Object.keys(n)[0],h=s||(n.light&&u!=="light"?"light":u),m=k1(i),{[h]:g,light:x,dark:f,...b}=n,k={...b};let S=g;if((h==="dark"&&!("dark"in n)||h==="light"&&!("light"in n))&&(S=!0),!S)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${h}\` option is either missing or invalid.`:Et(21,h));const T=gr(k,S,d,h);x&&!k.light&&gr(k,x,void 0,"light"),f&&!k.dark&&gr(k,f,void 0,"dark");let C={defaultColorScheme:h,...T,cssVarPrefix:i,colorSchemeSelector:a,rootSelector:l,getCssVar:m,colorSchemes:k,font:{...n1(T.typography),...T.font},spacing:C1(d.spacing)};Object.keys(C.colorSchemes).forEach(F=>{const y=C.colorSchemes[F].palette,R=H=>{const se=H.split("-"),ne=se[1],oe=se[2];return m(H,y[ne][oe])};if(y.mode==="light"&&(M(y.common,"background","#fff"),M(y.common,"onBackground","#000")),y.mode==="dark"&&(M(y.common,"background","#000"),M(y.common,"onBackground","#fff")),S1(y,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),y.mode==="light"){M(y.Alert,"errorColor",we(y.error.light,.6)),M(y.Alert,"infoColor",we(y.info.light,.6)),M(y.Alert,"successColor",we(y.success.light,.6)),M(y.Alert,"warningColor",we(y.warning.light,.6)),M(y.Alert,"errorFilledBg",R("palette-error-main")),M(y.Alert,"infoFilledBg",R("palette-info-main")),M(y.Alert,"successFilledBg",R("palette-success-main")),M(y.Alert,"warningFilledBg",R("palette-warning-main")),M(y.Alert,"errorFilledColor",it(()=>y.getContrastText(y.error.main))),M(y.Alert,"infoFilledColor",it(()=>y.getContrastText(y.info.main))),M(y.Alert,"successFilledColor",it(()=>y.getContrastText(y.success.main))),M(y.Alert,"warningFilledColor",it(()=>y.getContrastText(y.warning.main))),M(y.Alert,"errorStandardBg",Se(y.error.light,.9)),M(y.Alert,"infoStandardBg",Se(y.info.light,.9)),M(y.Alert,"successStandardBg",Se(y.success.light,.9)),M(y.Alert,"warningStandardBg",Se(y.warning.light,.9)),M(y.Alert,"errorIconColor",R("palette-error-main")),M(y.Alert,"infoIconColor",R("palette-info-main")),M(y.Alert,"successIconColor",R("palette-success-main")),M(y.Alert,"warningIconColor",R("palette-warning-main")),M(y.AppBar,"defaultBg",R("palette-grey-100")),M(y.Avatar,"defaultBg",R("palette-grey-400")),M(y.Button,"inheritContainedBg",R("palette-grey-300")),M(y.Button,"inheritContainedHoverBg",R("palette-grey-A100")),M(y.Chip,"defaultBorder",R("palette-grey-400")),M(y.Chip,"defaultAvatarColor",R("palette-grey-700")),M(y.Chip,"defaultIconColor",R("palette-grey-700")),M(y.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),M(y.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),M(y.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),M(y.LinearProgress,"primaryBg",Se(y.primary.main,.62)),M(y.LinearProgress,"secondaryBg",Se(y.secondary.main,.62)),M(y.LinearProgress,"errorBg",Se(y.error.main,.62)),M(y.LinearProgress,"infoBg",Se(y.info.main,.62)),M(y.LinearProgress,"successBg",Se(y.success.main,.62)),M(y.LinearProgress,"warningBg",Se(y.warning.main,.62)),M(y.Skeleton,"bg",`rgba(${R("palette-text-primaryChannel")} / 0.11)`),M(y.Slider,"primaryTrack",Se(y.primary.main,.62)),M(y.Slider,"secondaryTrack",Se(y.secondary.main,.62)),M(y.Slider,"errorTrack",Se(y.error.main,.62)),M(y.Slider,"infoTrack",Se(y.info.main,.62)),M(y.Slider,"successTrack",Se(y.success.main,.62)),M(y.Slider,"warningTrack",Se(y.warning.main,.62));const H=is(y.background.default,.8);M(y.SnackbarContent,"bg",H),M(y.SnackbarContent,"color",it(()=>y.getContrastText(H))),M(y.SpeedDialAction,"fabHoverBg",is(y.background.paper,.15)),M(y.StepConnector,"border",R("palette-grey-400")),M(y.StepContent,"border",R("palette-grey-400")),M(y.Switch,"defaultColor",R("palette-common-white")),M(y.Switch,"defaultDisabledColor",R("palette-grey-100")),M(y.Switch,"primaryDisabledColor",Se(y.primary.main,.62)),M(y.Switch,"secondaryDisabledColor",Se(y.secondary.main,.62)),M(y.Switch,"errorDisabledColor",Se(y.error.main,.62)),M(y.Switch,"infoDisabledColor",Se(y.info.main,.62)),M(y.Switch,"successDisabledColor",Se(y.success.main,.62)),M(y.Switch,"warningDisabledColor",Se(y.warning.main,.62)),M(y.TableCell,"border",Se(os(y.divider,1),.88)),M(y.Tooltip,"bg",os(y.grey[700],.92))}if(y.mode==="dark"){M(y.Alert,"errorColor",Se(y.error.light,.6)),M(y.Alert,"infoColor",Se(y.info.light,.6)),M(y.Alert,"successColor",Se(y.success.light,.6)),M(y.Alert,"warningColor",Se(y.warning.light,.6)),M(y.Alert,"errorFilledBg",R("palette-error-dark")),M(y.Alert,"infoFilledBg",R("palette-info-dark")),M(y.Alert,"successFilledBg",R("palette-success-dark")),M(y.Alert,"warningFilledBg",R("palette-warning-dark")),M(y.Alert,"errorFilledColor",it(()=>y.getContrastText(y.error.dark))),M(y.Alert,"infoFilledColor",it(()=>y.getContrastText(y.info.dark))),M(y.Alert,"successFilledColor",it(()=>y.getContrastText(y.success.dark))),M(y.Alert,"warningFilledColor",it(()=>y.getContrastText(y.warning.dark))),M(y.Alert,"errorStandardBg",we(y.error.light,.9)),M(y.Alert,"infoStandardBg",we(y.info.light,.9)),M(y.Alert,"successStandardBg",we(y.success.light,.9)),M(y.Alert,"warningStandardBg",we(y.warning.light,.9)),M(y.Alert,"errorIconColor",R("palette-error-main")),M(y.Alert,"infoIconColor",R("palette-info-main")),M(y.Alert,"successIconColor",R("palette-success-main")),M(y.Alert,"warningIconColor",R("palette-warning-main")),M(y.AppBar,"defaultBg",R("palette-grey-900")),M(y.AppBar,"darkBg",R("palette-background-paper")),M(y.AppBar,"darkColor",R("palette-text-primary")),M(y.Avatar,"defaultBg",R("palette-grey-600")),M(y.Button,"inheritContainedBg",R("palette-grey-800")),M(y.Button,"inheritContainedHoverBg",R("palette-grey-700")),M(y.Chip,"defaultBorder",R("palette-grey-700")),M(y.Chip,"defaultAvatarColor",R("palette-grey-300")),M(y.Chip,"defaultIconColor",R("palette-grey-300")),M(y.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),M(y.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),M(y.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),M(y.LinearProgress,"primaryBg",we(y.primary.main,.5)),M(y.LinearProgress,"secondaryBg",we(y.secondary.main,.5)),M(y.LinearProgress,"errorBg",we(y.error.main,.5)),M(y.LinearProgress,"infoBg",we(y.info.main,.5)),M(y.LinearProgress,"successBg",we(y.success.main,.5)),M(y.LinearProgress,"warningBg",we(y.warning.main,.5)),M(y.Skeleton,"bg",`rgba(${R("palette-text-primaryChannel")} / 0.13)`),M(y.Slider,"primaryTrack",we(y.primary.main,.5)),M(y.Slider,"secondaryTrack",we(y.secondary.main,.5)),M(y.Slider,"errorTrack",we(y.error.main,.5)),M(y.Slider,"infoTrack",we(y.info.main,.5)),M(y.Slider,"successTrack",we(y.success.main,.5)),M(y.Slider,"warningTrack",we(y.warning.main,.5));const H=is(y.background.default,.98);M(y.SnackbarContent,"bg",H),M(y.SnackbarContent,"color",it(()=>y.getContrastText(H))),M(y.SpeedDialAction,"fabHoverBg",is(y.background.paper,.15)),M(y.StepConnector,"border",R("palette-grey-600")),M(y.StepContent,"border",R("palette-grey-600")),M(y.Switch,"defaultColor",R("palette-grey-300")),M(y.Switch,"defaultDisabledColor",R("palette-grey-600")),M(y.Switch,"primaryDisabledColor",we(y.primary.main,.55)),M(y.Switch,"secondaryDisabledColor",we(y.secondary.main,.55)),M(y.Switch,"errorDisabledColor",we(y.error.main,.55)),M(y.Switch,"infoDisabledColor",we(y.info.main,.55)),M(y.Switch,"successDisabledColor",we(y.success.main,.55)),M(y.Switch,"warningDisabledColor",we(y.warning.main,.55)),M(y.TableCell,"border",we(os(y.divider,1),.68)),M(y.Tooltip,"bg",os(y.grey[700],.92))}ht(y.background,"default"),ht(y.background,"paper"),ht(y.common,"background"),ht(y.common,"onBackground"),ht(y,"divider"),Object.keys(y).forEach(H=>{const se=y[H];H!=="tonalOffset"&&se&&typeof se=="object"&&(se.main&&M(y[H],"mainChannel",En(An(se.main))),se.light&&M(y[H],"lightChannel",En(An(se.light))),se.dark&&M(y[H],"darkChannel",En(An(se.dark))),se.contrastText&&M(y[H],"contrastTextChannel",En(An(se.contrastText))),H==="text"&&(ht(y[H],"primary"),ht(y[H],"secondary")),H==="action"&&(se.active&&ht(y[H],"active"),se.selected&&ht(y[H],"selected")))})}),C=t.reduce((F,y)=>Ke(F,y),C);const w={prefix:i,disableCssColorScheme:r,shouldSkipGeneratingVar:o,getSelector:w1(C)},{vars:A,generateThemeVars:V,generateStyleSheets:E}=Zy(C,w);return C.vars=A,Object.entries(C.colorSchemes[C.defaultColorScheme]).forEach(([F,y])=>{C[F]=y}),C.generateThemeVars=V,C.generateStyleSheets=E,C.generateSpacing=function(){return hd(d.spacing,Oo(this))},C.getColorSchemeSelector=Gy(a),C.spacing=C.generateSpacing(),C.shouldSkipGeneratingVar=o,C.unstable_sxConfig={...Ls,...d==null?void 0:d.unstable_sxConfig},C.unstable_sx=function(y){return hn({sx:y,theme:this})},C.toRuntimeSource=Sd,C}function rc(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:zo({...n===!0?{}:n.palette,mode:t})})}function E1(e={},...t){const{palette:n,cssVariables:s=!1,colorSchemes:r=n?void 0:{light:!0},defaultColorScheme:i=n==null?void 0:n.mode,...o}=e,a=i||"light",l=r==null?void 0:r[a],d={...r,...n?{[a]:{...typeof l!="boolean"&&l,palette:n}}:void 0};if(s===!1){if(!("colorSchemes"in e))return Gr(e,...t);let u=n;"palette"in e||d[a]&&(d[a]!==!0?u=d[a].palette:a==="dark"&&(u={mode:"dark"}));const h=Gr({...e,palette:u},...t);return h.defaultColorScheme=a,h.colorSchemes=d,h.palette.mode==="light"&&(h.colorSchemes.light={...d.light!==!0&&d.light,palette:h.palette},rc(h,"dark",d.dark)),h.palette.mode==="dark"&&(h.colorSchemes.dark={...d.dark!==!0&&d.dark,palette:h.palette},rc(h,"light",d.light)),h}return!n&&!("light"in d)&&a==="light"&&(d.light=!0),T1({...o,colorSchemes:d,defaultColorScheme:a,...typeof s!="boolean"&&s},...t)}const A1=E1(),j1="$$material";function M1(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const V1=e=>M1(e)&&e!=="classes",N1=My({themeId:j1,defaultTheme:A1,rootShouldForwardProp:V1}),P1=Hy;process.env.NODE_ENV!=="production"&&(pe.node,pe.object.isRequired);function R1(e){return By(e)}function I1(e){return _o("MuiSvgIcon",e)}ky("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const D1=e=>{const{color:t,fontSize:n,classes:s}=e,r={root:["root",t!=="inherit"&&`color${Ht(t)}`,`fontSize${Ht(n)}`]};return p0(r,I1,s)},$1=N1("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${Ht(n.color)}`],t[`fontSize${Ht(n.fontSize)}`]]}})(P1(({theme:e})=>{var t,n,s,r,i,o,a,l,d,u,h,m,g,x;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(r=(t=e.transitions)==null?void 0:t.create)==null?void 0:r.call(t,"fill",{duration:(s=(n=(e.vars??e).transitions)==null?void 0:n.duration)==null?void 0:s.shorter}),variants:[{props:f=>!f.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((o=(i=e.typography)==null?void 0:i.pxToRem)==null?void 0:o.call(i,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((l=(a=e.typography)==null?void 0:a.pxToRem)==null?void 0:l.call(a,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((u=(d=e.typography)==null?void 0:d.pxToRem)==null?void 0:u.call(d,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,f])=>f&&f.main).map(([f])=>{var b,k;return{props:{color:f},style:{color:(k=(b=(e.vars??e).palette)==null?void 0:b[f])==null?void 0:k.main}}}),{props:{color:"action"},style:{color:(m=(h=(e.vars??e).palette)==null?void 0:h.action)==null?void 0:m.active}},{props:{color:"disabled"},style:{color:(x=(g=(e.vars??e).palette)==null?void 0:g.action)==null?void 0:x.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),Ts=p.forwardRef(function(t,n){const s=R1({props:t,name:"MuiSvgIcon"}),{children:r,className:i,color:o="inherit",component:a="svg",fontSize:l="medium",htmlColor:d,inheritViewBox:u=!1,titleAccess:h,viewBox:m="0 0 24 24",...g}=s,x=p.isValidElement(r)&&r.type==="svg",f={...s,color:o,component:a,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:u,viewBox:m,hasSvgAsChild:x},b={};u||(b.viewBox=m);const k=D1(f);return c.jsxs($1,{as:a,className:Xr(k.root,i),focusable:"false",color:d,"aria-hidden":h?void 0:!0,role:h?"img":void 0,ref:n,...b,...g,...x&&r.props,ownerState:f,children:[x?r.props.children:r,h?c.jsx("title",{children:h}):null]})});process.env.NODE_ENV!=="production"&&(Ts.propTypes={children:pe.node,classes:pe.object,className:pe.string,color:pe.oneOfType([pe.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),pe.string]),component:pe.elementType,fontSize:pe.oneOfType([pe.oneOf(["inherit","large","medium","small"]),pe.string]),htmlColor:pe.string,inheritViewBox:pe.bool,shapeRendering:pe.string,sx:pe.oneOfType([pe.arrayOf(pe.oneOfType([pe.func,pe.object,pe.bool])),pe.func,pe.object]),titleAccess:pe.string,viewBox:pe.string});Ts.muiName="SvgIcon";function vn(e,t){function n(s,r){return c.jsx(Ts,{"data-testid":process.env.NODE_ENV!=="production"?`${t}Icon`:void 0,ref:r,...s,children:e})}return process.env.NODE_ENV!=="production"&&(n.displayName=`${t}Icon`),n.muiName=Ts.muiName,p.memo(p.forwardRef(n))}const F1=vn(c.jsx("path",{d:"M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5c0-1.38 1.12-2.5 2.5-2.5s2.5 1.12 2.5 2.5v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5c0 1.38 1.12 2.5 2.5 2.5s2.5-1.12 2.5-2.5V5c0-2.21-1.79-4-4-4S7 2.79 7 5v12.5c0 3.04 2.46 5.5 5.5 5.5s5.5-2.46 5.5-5.5V6z"}),"AttachFile"),O1=vn(c.jsx("path",{d:"M12 9c-1.6 0-3.15.25-4.6.72v3.1c0 .39-.23.74-.56.9-.98.49-1.87 1.12-2.66 1.85-.18.18-.43.28-.7.28-.28 0-.53-.11-.71-.29L.29 13.08c-.18-.17-.29-.42-.29-.7s.11-.53.29-.71C3.34 8.78 7.46 7 12 7s8.66 1.78 11.71 4.67c.18.18.29.43.29.71s-.11.53-.29.71l-2.48 2.48c-.18.18-.43.29-.71.29-.27 0-.52-.11-.7-.28-.79-.74-1.69-1.36-2.67-1.85-.33-.16-.56-.5-.56-.9v-3.1C15.15 9.25 13.6 9 12 9"}),"CallEnd"),L1=vn([c.jsx("circle",{cx:"12",cy:"12",r:"3.2"},"0"),c.jsx("path",{d:"M9 2 7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2zm3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5"},"1")],"CameraAlt"),Td=vn(c.jsx("path",{d:"M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2M6 9h12v2H6zm8 5H6v-2h8zm4-6H6V6h12z"}),"Chat"),Ed=vn(c.jsx("path",{d:"M12 14c1.66 0 2.99-1.34 2.99-3L15 5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3m5.3-3c0 3-2.54 5.1-5.3 5.1S6.7 14 6.7 11H5c0 3.41 2.72 6.23 6 6.72V21h2v-3.28c3.28-.48 6-3.3 6-6.72z"}),"Mic"),Ad=vn(c.jsx("path",{d:"M17 10.5V7c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h12c.55 0 1-.45 1-1v-3.5l4 4v-11z"}),"Videocam");function _1({text:e,isComplete:t,isRealTimeStream:n=!1,speed:s=50}){const[r,i]=v.useState(""),[o,a]=v.useState(0);return v.useEffect(()=>{if(n){i(e);return}if(t){i(e);return}if(o<e.length){const l=setTimeout(()=>{i(e.slice(0,o+1)),a(o+1)},s);return()=>clearTimeout(l)}},[e,o,t,s,n]),v.useEffect(()=>{n||(a(0),i(""))},[e,n]),c.jsxs("span",{className:"relative",children:[c.jsx("span",{className:"inline-block",children:r}),!t&&c.jsx("span",{className:"inline-flex items-center ml-1",children:[0,1,2].map(l=>c.jsx(ue.span,{className:"w-1.5 h-1.5 bg-current rounded-full mx-0.5",animate:{y:[0,-4,0],opacity:[.4,1,.4],scale:[.8,1,.8]},transition:{duration:.8,repeat:1/0,repeatType:"mirror",delay:l*.2,ease:"easeInOut"}},l))})]})}function B1({message:e,theme:t,isOwn:n,isStreaming:s=!1}){var o,a,l;const r=Le(t),i=e.sender.name?e.sender.name.split(" ").map(d=>d[0]).join("").toUpperCase().slice(0,2):"U";return c.jsx("div",{className:`flex w-full ${n?"justify-end":"justify-start"} mb-4 px-1`,children:c.jsxs("div",{className:`relative group ${n?"flex-row-reverse":"flex-row"} flex items-end gap-3 max-w-[85%]`,children:[c.jsx("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-white text-xs font-semibold flex-shrink-0 shadow-lg ${t==="light"?"bg-gradient-to-br from-blue-500 to-purple-600":"bg-gradient-to-br from-gray-600 to-gray-700"}`,children:i}),c.jsxs("div",{className:`
100
+ export default theme;`}function Gr(e={},...t){const{breakpoints:n,mixins:s={},spacing:r,palette:i={},transitions:o={},typography:a={},shape:c,...d}=e;if(e.vars&&e.generateThemeVars===void 0)throw new Error(process.env.NODE_ENV!=="production"?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name or follow the [docs](https://mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature.":Nt(20));const u=zo(i),f=gd(e);let h=qe(f,{mixins:sx(f.breakpoints,s),palette:u,shadows:cx.slice(),typography:ox(u,a),transitions:hx(o),zIndex:{...mx}});if(h=qe(h,d),h=t.reduce((p,x)=>qe(p,x),h),process.env.NODE_ENV!=="production"){const p=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],x=(m,b)=>{let S;for(S in m){const C=m[S];if(p.includes(S)&&Object.keys(C).length>0){if(process.env.NODE_ENV!=="production"){const T=_o("",S);console.error([`MUI: The \`${b}\` component increases the CSS specificity of the \`${S}\` internal state.`,"You can not override it like this: ",JSON.stringify(m,null,2),"",`Instead, you need to use the '&.${T}' syntax:`,JSON.stringify({root:{[`&.${T}`]:C}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
101
+ `))}m[S]={}}}};Object.keys(h.components).forEach(m=>{const b=h.components[m].styleOverrides;b&&m.startsWith("Mui")&&x(b,m)})}return h.unstable_sxConfig={...Ls,...d==null?void 0:d.unstable_sxConfig},h.unstable_sx=function(x){return fn({sx:x,theme:this})},h.toRuntimeSource=Cd,h}function px(e){let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}const yx=[...Array(25)].map((e,t)=>{if(t===0)return"none";const n=px(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function kd(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function Td(e){return e==="dark"?yx:[]}function xx(e){const{palette:t={mode:"light"},opacity:n,overlays:s,...r}=e,i=zo(t);return{palette:i,opacity:{...kd(i.mode),...n},overlays:s||Td(i.mode),...r}}function bx(e){var t;return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!((t=e[1])!=null&&t.match(/(mode|contrastThreshold|tonalOffset)/))}const vx=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:""}overlays-${n}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],wx=e=>(t,n)=>{const s=e.rootSelector||":root",r=e.colorSchemeSelector;let i=r;if(r==="class"&&(i=".%s"),r==="data"&&(i="[data-%s]"),r!=null&&r.startsWith("data-")&&!r.includes("%s")&&(i=`[${r}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const o={};return vx(e.cssVarPrefix).forEach(a=>{o[a]=n[a],delete n[a]}),i==="media"?{[s]:n,"@media (prefers-color-scheme: dark)":{[s]:o}}:i?{[i.replace("%s",t)]:o,[`${s}, ${i.replace("%s",t)}`]:n}:{[s]:{...n,...o}}}if(i&&i!=="media")return`${s}, ${i.replace("%s",String(t))}`}else if(t){if(i==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[s]:n}};if(i)return i.replace("%s",String(t))}return s};function Sx(e,t){t.forEach(n=>{e[n]||(e[n]={})})}function P(e,t,n){!e[t]&&n&&(e[t]=n)}function Tn(e){return typeof e!="string"||!e.startsWith("hsl")?e:vd(e)}function gt(e,t){`${t}Channel`in e||(e[`${t}Channel`]=kn(Tn(e[t]),`MUI: Can't create \`palette.${t}Channel\` because \`palette.${t}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().
102
+ To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function Cx(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const ct=e=>{try{return e()}catch{}},kx=(e="mui")=>Uy(e);function pr(e,t,n,s){if(!t)return;t=t===!0?{}:t;const r=s==="dark"?"dark":"light";if(!n){e[s]=xx({...t,palette:{mode:r,...t==null?void 0:t.palette}});return}const{palette:i,...o}=Gr({...n,palette:{mode:r,...t==null?void 0:t.palette}});return e[s]={...t,palette:i,opacity:{...kd(r),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||Td(r)},o}function Tx(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:s,disableCssColorScheme:r=!1,cssVarPrefix:i="mui",shouldSkipGeneratingVar:o=bx,colorSchemeSelector:a=n.light&&n.dark?"media":void 0,rootSelector:c=":root",...d}=e,u=Object.keys(n)[0],f=s||(n.light&&u!=="light"?"light":u),h=kx(i),{[f]:p,light:x,dark:m,...b}=n,S={...b};let C=p;if((f==="dark"&&!("dark"in n)||f==="light"&&!("light"in n))&&(C=!0),!C)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${f}\` option is either missing or invalid.`:Nt(21,f));const T=pr(S,C,d,f);x&&!S.light&&pr(S,x,void 0,"light"),m&&!S.dark&&pr(S,m,void 0,"dark");let k={defaultColorScheme:f,...T,cssVarPrefix:i,colorSchemeSelector:a,rootSelector:c,getCssVar:h,colorSchemes:S,font:{...nx(T.typography),...T.font},spacing:Cx(d.spacing)};Object.keys(k.colorSchemes).forEach(_=>{const y=k.colorSchemes[_].palette,D=W=>{const te=W.split("-"),ue=te[1],ie=te[2];return h(W,y[ue][ie])};if(y.mode==="light"&&(P(y.common,"background","#fff"),P(y.common,"onBackground","#000")),y.mode==="dark"&&(P(y.common,"background","#000"),P(y.common,"onBackground","#fff")),Sx(y,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),y.mode==="light"){P(y.Alert,"errorColor",Se(y.error.light,.6)),P(y.Alert,"infoColor",Se(y.info.light,.6)),P(y.Alert,"successColor",Se(y.success.light,.6)),P(y.Alert,"warningColor",Se(y.warning.light,.6)),P(y.Alert,"errorFilledBg",D("palette-error-main")),P(y.Alert,"infoFilledBg",D("palette-info-main")),P(y.Alert,"successFilledBg",D("palette-success-main")),P(y.Alert,"warningFilledBg",D("palette-warning-main")),P(y.Alert,"errorFilledColor",ct(()=>y.getContrastText(y.error.main))),P(y.Alert,"infoFilledColor",ct(()=>y.getContrastText(y.info.main))),P(y.Alert,"successFilledColor",ct(()=>y.getContrastText(y.success.main))),P(y.Alert,"warningFilledColor",ct(()=>y.getContrastText(y.warning.main))),P(y.Alert,"errorStandardBg",Ce(y.error.light,.9)),P(y.Alert,"infoStandardBg",Ce(y.info.light,.9)),P(y.Alert,"successStandardBg",Ce(y.success.light,.9)),P(y.Alert,"warningStandardBg",Ce(y.warning.light,.9)),P(y.Alert,"errorIconColor",D("palette-error-main")),P(y.Alert,"infoIconColor",D("palette-info-main")),P(y.Alert,"successIconColor",D("palette-success-main")),P(y.Alert,"warningIconColor",D("palette-warning-main")),P(y.AppBar,"defaultBg",D("palette-grey-100")),P(y.Avatar,"defaultBg",D("palette-grey-400")),P(y.Button,"inheritContainedBg",D("palette-grey-300")),P(y.Button,"inheritContainedHoverBg",D("palette-grey-A100")),P(y.Chip,"defaultBorder",D("palette-grey-400")),P(y.Chip,"defaultAvatarColor",D("palette-grey-700")),P(y.Chip,"defaultIconColor",D("palette-grey-700")),P(y.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),P(y.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),P(y.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),P(y.LinearProgress,"primaryBg",Ce(y.primary.main,.62)),P(y.LinearProgress,"secondaryBg",Ce(y.secondary.main,.62)),P(y.LinearProgress,"errorBg",Ce(y.error.main,.62)),P(y.LinearProgress,"infoBg",Ce(y.info.main,.62)),P(y.LinearProgress,"successBg",Ce(y.success.main,.62)),P(y.LinearProgress,"warningBg",Ce(y.warning.main,.62)),P(y.Skeleton,"bg",`rgba(${D("palette-text-primaryChannel")} / 0.11)`),P(y.Slider,"primaryTrack",Ce(y.primary.main,.62)),P(y.Slider,"secondaryTrack",Ce(y.secondary.main,.62)),P(y.Slider,"errorTrack",Ce(y.error.main,.62)),P(y.Slider,"infoTrack",Ce(y.info.main,.62)),P(y.Slider,"successTrack",Ce(y.success.main,.62)),P(y.Slider,"warningTrack",Ce(y.warning.main,.62));const W=is(y.background.default,.8);P(y.SnackbarContent,"bg",W),P(y.SnackbarContent,"color",ct(()=>y.getContrastText(W))),P(y.SpeedDialAction,"fabHoverBg",is(y.background.paper,.15)),P(y.StepConnector,"border",D("palette-grey-400")),P(y.StepContent,"border",D("palette-grey-400")),P(y.Switch,"defaultColor",D("palette-common-white")),P(y.Switch,"defaultDisabledColor",D("palette-grey-100")),P(y.Switch,"primaryDisabledColor",Ce(y.primary.main,.62)),P(y.Switch,"secondaryDisabledColor",Ce(y.secondary.main,.62)),P(y.Switch,"errorDisabledColor",Ce(y.error.main,.62)),P(y.Switch,"infoDisabledColor",Ce(y.info.main,.62)),P(y.Switch,"successDisabledColor",Ce(y.success.main,.62)),P(y.Switch,"warningDisabledColor",Ce(y.warning.main,.62)),P(y.TableCell,"border",Ce(os(y.divider,1),.88)),P(y.Tooltip,"bg",os(y.grey[700],.92))}if(y.mode==="dark"){P(y.Alert,"errorColor",Ce(y.error.light,.6)),P(y.Alert,"infoColor",Ce(y.info.light,.6)),P(y.Alert,"successColor",Ce(y.success.light,.6)),P(y.Alert,"warningColor",Ce(y.warning.light,.6)),P(y.Alert,"errorFilledBg",D("palette-error-dark")),P(y.Alert,"infoFilledBg",D("palette-info-dark")),P(y.Alert,"successFilledBg",D("palette-success-dark")),P(y.Alert,"warningFilledBg",D("palette-warning-dark")),P(y.Alert,"errorFilledColor",ct(()=>y.getContrastText(y.error.dark))),P(y.Alert,"infoFilledColor",ct(()=>y.getContrastText(y.info.dark))),P(y.Alert,"successFilledColor",ct(()=>y.getContrastText(y.success.dark))),P(y.Alert,"warningFilledColor",ct(()=>y.getContrastText(y.warning.dark))),P(y.Alert,"errorStandardBg",Se(y.error.light,.9)),P(y.Alert,"infoStandardBg",Se(y.info.light,.9)),P(y.Alert,"successStandardBg",Se(y.success.light,.9)),P(y.Alert,"warningStandardBg",Se(y.warning.light,.9)),P(y.Alert,"errorIconColor",D("palette-error-main")),P(y.Alert,"infoIconColor",D("palette-info-main")),P(y.Alert,"successIconColor",D("palette-success-main")),P(y.Alert,"warningIconColor",D("palette-warning-main")),P(y.AppBar,"defaultBg",D("palette-grey-900")),P(y.AppBar,"darkBg",D("palette-background-paper")),P(y.AppBar,"darkColor",D("palette-text-primary")),P(y.Avatar,"defaultBg",D("palette-grey-600")),P(y.Button,"inheritContainedBg",D("palette-grey-800")),P(y.Button,"inheritContainedHoverBg",D("palette-grey-700")),P(y.Chip,"defaultBorder",D("palette-grey-700")),P(y.Chip,"defaultAvatarColor",D("palette-grey-300")),P(y.Chip,"defaultIconColor",D("palette-grey-300")),P(y.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),P(y.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),P(y.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),P(y.LinearProgress,"primaryBg",Se(y.primary.main,.5)),P(y.LinearProgress,"secondaryBg",Se(y.secondary.main,.5)),P(y.LinearProgress,"errorBg",Se(y.error.main,.5)),P(y.LinearProgress,"infoBg",Se(y.info.main,.5)),P(y.LinearProgress,"successBg",Se(y.success.main,.5)),P(y.LinearProgress,"warningBg",Se(y.warning.main,.5)),P(y.Skeleton,"bg",`rgba(${D("palette-text-primaryChannel")} / 0.13)`),P(y.Slider,"primaryTrack",Se(y.primary.main,.5)),P(y.Slider,"secondaryTrack",Se(y.secondary.main,.5)),P(y.Slider,"errorTrack",Se(y.error.main,.5)),P(y.Slider,"infoTrack",Se(y.info.main,.5)),P(y.Slider,"successTrack",Se(y.success.main,.5)),P(y.Slider,"warningTrack",Se(y.warning.main,.5));const W=is(y.background.default,.98);P(y.SnackbarContent,"bg",W),P(y.SnackbarContent,"color",ct(()=>y.getContrastText(W))),P(y.SpeedDialAction,"fabHoverBg",is(y.background.paper,.15)),P(y.StepConnector,"border",D("palette-grey-600")),P(y.StepContent,"border",D("palette-grey-600")),P(y.Switch,"defaultColor",D("palette-grey-300")),P(y.Switch,"defaultDisabledColor",D("palette-grey-600")),P(y.Switch,"primaryDisabledColor",Se(y.primary.main,.55)),P(y.Switch,"secondaryDisabledColor",Se(y.secondary.main,.55)),P(y.Switch,"errorDisabledColor",Se(y.error.main,.55)),P(y.Switch,"infoDisabledColor",Se(y.info.main,.55)),P(y.Switch,"successDisabledColor",Se(y.success.main,.55)),P(y.Switch,"warningDisabledColor",Se(y.warning.main,.55)),P(y.TableCell,"border",Se(os(y.divider,1),.68)),P(y.Tooltip,"bg",os(y.grey[700],.92))}gt(y.background,"default"),gt(y.background,"paper"),gt(y.common,"background"),gt(y.common,"onBackground"),gt(y,"divider"),Object.keys(y).forEach(W=>{const te=y[W];W!=="tonalOffset"&&te&&typeof te=="object"&&(te.main&&P(y[W],"mainChannel",kn(Tn(te.main))),te.light&&P(y[W],"lightChannel",kn(Tn(te.light))),te.dark&&P(y[W],"darkChannel",kn(Tn(te.dark))),te.contrastText&&P(y[W],"contrastTextChannel",kn(Tn(te.contrastText))),W==="text"&&(gt(y[W],"primary"),gt(y[W],"secondary")),W==="action"&&(te.active&&gt(y[W],"active"),te.selected&&gt(y[W],"selected")))})}),k=t.reduce((_,y)=>qe(_,y),k);const v={prefix:i,disableCssColorScheme:r,shouldSkipGeneratingVar:o,getSelector:wx(k)},{vars:j,generateThemeVars:V,generateStyleSheets:E}=Zy(k,v);return k.vars=j,Object.entries(k.colorSchemes[k.defaultColorScheme]).forEach(([_,y])=>{k[_]=y}),k.generateThemeVars=V,k.generateStyleSheets=E,k.generateSpacing=function(){return md(d.spacing,Oo(this))},k.getColorSchemeSelector=Gy(a),k.spacing=k.generateSpacing(),k.shouldSkipGeneratingVar=o,k.unstable_sxConfig={...Ls,...d==null?void 0:d.unstable_sxConfig},k.unstable_sx=function(y){return fn({sx:y,theme:this})},k.toRuntimeSource=Cd,k}function ol(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:zo({...n===!0?{}:n.palette,mode:t})})}function Ex(e={},...t){const{palette:n,cssVariables:s=!1,colorSchemes:r=n?void 0:{light:!0},defaultColorScheme:i=n==null?void 0:n.mode,...o}=e,a=i||"light",c=r==null?void 0:r[a],d={...r,...n?{[a]:{...typeof c!="boolean"&&c,palette:n}}:void 0};if(s===!1){if(!("colorSchemes"in e))return Gr(e,...t);let u=n;"palette"in e||d[a]&&(d[a]!==!0?u=d[a].palette:a==="dark"&&(u={mode:"dark"}));const f=Gr({...e,palette:u},...t);return f.defaultColorScheme=a,f.colorSchemes=d,f.palette.mode==="light"&&(f.colorSchemes.light={...d.light!==!0&&d.light,palette:f.palette},ol(f,"dark",d.dark)),f.palette.mode==="dark"&&(f.colorSchemes.dark={...d.dark!==!0&&d.dark,palette:f.palette},ol(f,"light",d.light)),f}return!n&&!("light"in d)&&a==="light"&&(d.light=!0),Tx({...o,colorSchemes:d,defaultColorScheme:a,...typeof s!="boolean"&&s},...t)}const Ax=Ex(),jx="$$material";function Nx(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const Mx=e=>Nx(e)&&e!=="classes",Vx=Ny({themeId:jx,defaultTheme:Ax,rootShouldForwardProp:Mx}),Px=Hy;process.env.NODE_ENV!=="production"&&(ge.node,ge.object.isRequired);function Rx(e){return By(e)}function Ix(e){return _o("MuiSvgIcon",e)}ky("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Dx=e=>{const{color:t,fontSize:n,classes:s}=e,r={root:["root",t!=="inherit"&&`color${zt(t)}`,`fontSize${zt(n)}`]};return g0(r,Ix,s)},$x=Vx("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${zt(n.color)}`],t[`fontSize${zt(n.fontSize)}`]]}})(Px(({theme:e})=>{var t,n,s,r,i,o,a,c,d,u,f,h,p,x;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(r=(t=e.transitions)==null?void 0:t.create)==null?void 0:r.call(t,"fill",{duration:(s=(n=(e.vars??e).transitions)==null?void 0:n.duration)==null?void 0:s.shorter}),variants:[{props:m=>!m.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((o=(i=e.typography)==null?void 0:i.pxToRem)==null?void 0:o.call(i,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((c=(a=e.typography)==null?void 0:a.pxToRem)==null?void 0:c.call(a,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((u=(d=e.typography)==null?void 0:d.pxToRem)==null?void 0:u.call(d,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,m])=>m&&m.main).map(([m])=>{var b,S;return{props:{color:m},style:{color:(S=(b=(e.vars??e).palette)==null?void 0:b[m])==null?void 0:S.main}}}),{props:{color:"action"},style:{color:(h=(f=(e.vars??e).palette)==null?void 0:f.action)==null?void 0:h.active}},{props:{color:"disabled"},style:{color:(x=(p=(e.vars??e).palette)==null?void 0:p.action)==null?void 0:x.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),Ts=g.forwardRef(function(t,n){const s=Rx({props:t,name:"MuiSvgIcon"}),{children:r,className:i,color:o="inherit",component:a="svg",fontSize:c="medium",htmlColor:d,inheritViewBox:u=!1,titleAccess:f,viewBox:h="0 0 24 24",...p}=s,x=g.isValidElement(r)&&r.type==="svg",m={...s,color:o,component:a,fontSize:c,instanceFontSize:t.fontSize,inheritViewBox:u,viewBox:h,hasSvgAsChild:x},b={};u||(b.viewBox=h);const S=Dx(m);return l.jsxs($x,{as:a,className:Xr(S.root,i),focusable:"false",color:d,"aria-hidden":f?void 0:!0,role:f?"img":void 0,ref:n,...b,...p,...x&&r.props,ownerState:m,children:[x?r.props.children:r,f?l.jsx("title",{children:f}):null]})});process.env.NODE_ENV!=="production"&&(Ts.propTypes={children:ge.node,classes:ge.object,className:ge.string,color:ge.oneOfType([ge.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),ge.string]),component:ge.elementType,fontSize:ge.oneOfType([ge.oneOf(["inherit","large","medium","small"]),ge.string]),htmlColor:ge.string,inheritViewBox:ge.bool,shapeRendering:ge.string,sx:ge.oneOfType([ge.arrayOf(ge.oneOfType([ge.func,ge.object,ge.bool])),ge.func,ge.object]),titleAccess:ge.string,viewBox:ge.string});Ts.muiName="SvgIcon";function bn(e,t){function n(s,r){return l.jsx(Ts,{"data-testid":process.env.NODE_ENV!=="production"?`${t}Icon`:void 0,ref:r,...s,children:e})}return process.env.NODE_ENV!=="production"&&(n.displayName=`${t}Icon`),n.muiName=Ts.muiName,g.memo(g.forwardRef(n))}const Fx=bn(l.jsx("path",{d:"M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5c0-1.38 1.12-2.5 2.5-2.5s2.5 1.12 2.5 2.5v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5c0 1.38 1.12 2.5 2.5 2.5s2.5-1.12 2.5-2.5V5c0-2.21-1.79-4-4-4S7 2.79 7 5v12.5c0 3.04 2.46 5.5 5.5 5.5s5.5-2.46 5.5-5.5V6z"}),"AttachFile"),Ox=bn(l.jsx("path",{d:"M12 9c-1.6 0-3.15.25-4.6.72v3.1c0 .39-.23.74-.56.9-.98.49-1.87 1.12-2.66 1.85-.18.18-.43.28-.7.28-.28 0-.53-.11-.71-.29L.29 13.08c-.18-.17-.29-.42-.29-.7s.11-.53.29-.71C3.34 8.78 7.46 7 12 7s8.66 1.78 11.71 4.67c.18.18.29.43.29.71s-.11.53-.29.71l-2.48 2.48c-.18.18-.43.29-.71.29-.27 0-.52-.11-.7-.28-.79-.74-1.69-1.36-2.67-1.85-.33-.16-.56-.5-.56-.9v-3.1C15.15 9.25 13.6 9 12 9"}),"CallEnd"),Lx=bn([l.jsx("circle",{cx:"12",cy:"12",r:"3.2"},"0"),l.jsx("path",{d:"M9 2 7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2zm3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5"},"1")],"CameraAlt"),Ed=bn(l.jsx("path",{d:"M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2M6 9h12v2H6zm8 5H6v-2h8zm4-6H6V6h12z"}),"Chat"),Ad=bn(l.jsx("path",{d:"M12 14c1.66 0 2.99-1.34 2.99-3L15 5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3m5.3-3c0 3-2.54 5.1-5.3 5.1S6.7 14 6.7 11H5c0 3.41 2.72 6.23 6 6.72V21h2v-3.28c3.28-.48 6-3.3 6-6.72z"}),"Mic"),jd=bn(l.jsx("path",{d:"M17 10.5V7c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h12c.55 0 1-.45 1-1v-3.5l4 4v-11z"}),"Videocam");function _x({text:e,isComplete:t,isRealTimeStream:n=!1,speed:s=50}){const[r,i]=w.useState(""),[o,a]=w.useState(0);return w.useEffect(()=>{if(n){i(e);return}if(t){i(e);return}if(o<e.length){const c=setTimeout(()=>{i(e.slice(0,o+1)),a(o+1)},s);return()=>clearTimeout(c)}},[e,o,t,s,n]),w.useEffect(()=>{n||(a(0),i(""))},[e,n]),l.jsxs("span",{className:"relative",children:[l.jsx("span",{className:"inline-block",children:r}),!t&&l.jsx("span",{className:"inline-flex items-center ml-1",children:[0,1,2].map(c=>l.jsx(le.span,{className:"w-1.5 h-1.5 bg-current rounded-full mx-0.5",animate:{y:[0,-4,0],opacity:[.4,1,.4],scale:[.8,1,.8]},transition:{duration:.8,repeat:1/0,repeatType:"mirror",delay:c*.2,ease:"easeInOut"}},c))})]})}function Bx({message:e,theme:t,isOwn:n,isStreaming:s=!1}){var o,a,c;const r=_e(t),i=e.sender.name?e.sender.name.split(" ").map(d=>d[0]).join("").toUpperCase().slice(0,2):"U";return l.jsx("div",{className:`flex w-full ${n?"justify-end":"justify-start"} mb-4 px-1`,children:l.jsxs("div",{className:`relative group ${n?"flex-row-reverse":"flex-row"} flex items-end gap-3 max-w-[85%]`,children:[l.jsx("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-white text-xs font-semibold flex-shrink-0 shadow-lg ${t==="light"?"bg-gradient-to-br from-blue-500 to-purple-600":"bg-gradient-to-br from-gray-600 to-gray-700"}`,children:i}),l.jsxs("div",{className:`
103
103
  relative px-3 py-2 rounded-2xl break-words shadow-lg backdrop-blur-sm message-bubble message-hover
104
104
  ${n?`${((o=r.chatMessage)==null?void 0:o.own)||"bg-blue-500 text-white"} rounded-br-md`:`${((a=r.chatMessage)==null?void 0:a.other)||"bg-gray-100 text-gray-900 dark:bg-gray-800 dark:text-white"} rounded-bl-md`}
105
105
  ${s?"shimmer":""}
106
106
  transition-all duration-200 group-hover:scale-[1.02]
107
- `,style:{wordWrap:"break-word",overflowWrap:"break-word"},children:[c.jsx("div",{className:"whitespace-pre-wrap break-words leading-relaxed text-sm",children:s&&!n?c.jsx(_1,{text:e.content,isComplete:!s,isRealTimeStream:((l=e.metadata)==null?void 0:l.streaming)===!0,speed:35}):e.content}),c.jsx("div",{className:"text-xs mt-1",children:e.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]})]})})}const jd=v.forwardRef(({disabled:e,capabilities:t,sessionStarted:n,participantName:s="User",loadingText:r="Waiting for agent to connect...",theme:i="vox",client:o,displayType:a="widget",onBack:l},d)=>{var ae,Fe,Ne,Ce,Be,Ye,dt,zt,Wt,Zt,Vt;const[u,h]=v.useState(!1),[m,g]=v.useState(!1),[x,f]=v.useState(!1),[b,k]=v.useState(()=>{var D;return((D=o==null?void 0:o.getCurrentInteraction)==null?void 0:D.call(o))||null}),[S,T]=v.useState(()=>o&&typeof o.getChatMessages=="function"?o.getChatMessages():[]),[C,w]=v.useState(()=>{const _=n;return console.log("🚀 SessionView: Initial loading state calculation:",{sessionStarted:n,shouldShowLoading:_}),_}),[A,V]=v.useState(!0),[E,F]=v.useState(new Set),[y,R]=v.useState([]),H=v.useRef(null),se=v.useRef(null),[ne,oe]=v.useState(!0),ce=v.useRef(null),ee=v.useRef(null),I=v.useMemo(()=>Math.random().toString(36).substr(2,9),[]);console.log(`🚀 SessionView-${I}: Component initialized with:`,{initialMessagesCount:S.length,clientExists:!!o,sessionStarted:n,agentConnected:x,isLoading:C,displayType:a,disabled:e});const W=(ae=o==null?void 0:o.getCurrentAgentInfo)==null?void 0:ae.call(o),j=(W==null?void 0:W.name)||"AI Assistant",B=j.split(" ").map(_=>_[0]).join("").toUpperCase().slice(0,2),L=v.useCallback(()=>{if(se.current){const{scrollTop:_,scrollHeight:D,clientHeight:me}=se.current;return D-_-me<100}return!0},[]),Z=v.useCallback(()=>{const _=L();oe(_)},[L]),O=v.useCallback((_=!1)=>{if(ne&&se.current){const D=se.current;_?D.scrollTop=D.scrollHeight:D.scrollTo({top:D.scrollHeight,behavior:"smooth"})}},[ne]);v.useEffect(()=>{if(!o)return;const _=Y=>{var fe,Pe,ze,ot,wn;if(console.log(`SessionView-${I}: Received message:`,Y),console.log(`SessionView-${I}: Message sender details:`,{senderId:(fe=Y.sender)==null?void 0:fe.id,senderName:(Pe=Y.sender)==null?void 0:Pe.name,senderType:(ze=Y.sender)==null?void 0:ze.type,content:Y.content,messageId:Y.id,topic:(ot=Y.metadata)==null?void 0:ot.topic,isTranscription:((wn=Y.metadata)==null?void 0:wn.topic)==="lk.transcription"}),w(!1),b&&Y.sender.type==="agent"){console.log("SessionView: Queuing agent message due to active interaction:",b.methodName),R(bt=>[...bt,Y]);return}Y.sender.type==="agent"&&V(!1),T(bt=>{var Hs;if(bt.some(Nt=>Nt.id===Y.id))return console.log("SessionView: Message already exists, skipping:",Y.id),bt;if(console.log(`SessionView-${I}: Adding new message:`,Y.id),Y.sender.type==="agent"&&(F(Nt=>new Set(Nt).add(Y.id)),!((Hs=Y.metadata)!=null&&Hs.streaming))){const Nt=Y.content.length*35+1e3;setTimeout(()=>{F(Kd=>{const Xo=new Set(Kd);return Xo.delete(Y.id),Xo})},Nt)}return[...bt,Y]}),setTimeout(()=>{ne&&O(!0)},0)},D=Y=>{var fe;if(console.log("SessionView: Updated message:",Y),b&&Y.sender.type==="agent"){console.log("SessionView: Queuing agent message update due to active interaction:",b.methodName),R(Pe=>{const ze=Pe.findIndex(ot=>ot.id===Y.id);if(ze>=0){const ot=[...Pe];return ot[ze]=Y,ot}else return[...Pe,Y]});return}T(Pe=>Pe.map(ze=>ze.id===Y.id?{...Y}:ze)),setTimeout(()=>{ne&&O(!0)},0),(fe=Y.metadata)!=null&&fe.streaming||F(Pe=>{const ze=new Set(Pe);return ze.delete(Y.id),ze})},me=Y=>{var fe,Pe,ze,ot,wn,bt;if(console.log(`SessionView-${I}: Sent message:`,Y),console.log(`SessionView-${I}: Sent message details:`,{senderId:(fe=Y.sender)==null?void 0:fe.id,senderName:(Pe=Y.sender)==null?void 0:Pe.name,senderType:(ze=Y.sender)==null?void 0:ze.type,content:Y.content,messageId:Y.id,topic:(ot=Y.metadata)==null?void 0:ot.topic,isTranscription:((wn=Y.metadata)==null?void 0:wn.topic)==="lk.transcription"}),w(!1),((bt=Y.metadata)==null?void 0:bt.topic)==="lk.transcription"){console.log(`SessionView-${I}: Skipping sent transcription message (will come through received):`,Y.id);return}T(Yn=>Yn.some(Nt=>Nt.id===Y.id)?(console.log("SessionView: Sent message already exists, skipping:",Y.id),Yn):(console.log("SessionView: Adding sent message:",Y.id),[...Yn,Y])),setTimeout(()=>{ne&&O(!0)},0)};return o.on("chat.message.received",_),o.on("chat.message.updated",D),o.on("chat.message.sent",me),()=>{o.off("chat.message.received",_),o.off("chat.message.updated",D),o.off("chat.message.sent",me)}},[o,b,ne,O]),v.useEffect(()=>{if(!o)return;const _=()=>{if(console.log("SessionView: Agent is thinking"),b){console.log("SessionView: Suppressing thinking indicator due to active interaction:",b.methodName);return}V(!0)},D=()=>{console.log("SessionView: Agent is speaking"),V(!1)};return o.on("agent.thinking",_),o.on("agent.speaking",D),()=>{o.off("agent.thinking",_),o.off("agent.speaking",D)}},[o,b]),v.useEffect(()=>{console.log("🎬 SessionView: Messages state updated:",{messageCount:S.length,messages:S.map(_=>{var D,me;return{id:_.id,text:((D=_.content)==null?void 0:D.substring(0,50))+"...",from:(me=_.sender)==null?void 0:me.id}})})},[S]),v.useEffect(()=>{const _=S.filter(D=>D.content&&D.content.trim()!==""&&D.content.trim()!=="...");S.length===0?console.log("📝 SessionView: Showing empty state - no messages available"):_.length===0?console.log("📝 SessionView: Showing empty state - no messages with content available",{totalMessages:S.length,messagesWithContent:_.length}):console.log("📝 SessionView: Showing messages",{totalMessages:S.length,messagesWithContent:_.length})},[S]);const{agent:{isActive:Q=!1}={}}=o?id(o):{agent:{isActive:!1}},G=Le(i),K=v.useMemo(()=>o&&typeof o.getCurrentSession=="function"?!!o.getCurrentSession():!1,[o]),q=v.useMemo(()=>o&&typeof o.getIsAgentConnected=="function"&&o.getIsAgentConnected()||x,[o,x]),N=Q||q;v.useEffect(()=>{var _,D;console.log("🤖 SessionView agent state:",{isAgentActive:Q,hasActiveSession:K,isAgentActuallyConnected:q,effectiveAgentActive:N,sessionStarted:n,clientSession:(D=(_=o==null?void 0:o.getCurrentSession)==null?void 0:_.call(o))==null?void 0:D.id,isLoading:C}),N&&C&&(console.log("✅ SessionView: Agent became active, stopping loading state"),w(!1))},[Q,K,q,N,n,o,C]),v.useEffect(()=>{Q&&console.log("🤖 Agent became active")},[Q]),v.useEffect(()=>{console.log("📋 Session state changed:",{sessionStarted:n,disabled:e,participantName:s,effectiveAgentActive:N,chatOpen:u,currentInteraction:(b==null?void 0:b.methodName)||"none"})},[n,e,s,N,u,b]),v.useEffect(()=>{if(n&&!N){console.log("⏰ Starting agent timeout detection...");const _=setTimeout(()=>{K&&!N&&(console.log("⚡ Fallback: Assuming agent is connected after 5 seconds with active session"),f(!0),g(!1))},5e3),D=setTimeout(()=>{N||(console.log("⚠️ Agent timeout: Agent did not become active within 30 seconds"),g(!0))},3e4);return()=>{clearTimeout(_),clearTimeout(D)}}else N&&(console.log("✅ Agent is active, clearing timeout"),g(!1))},[n,N,K]),v.useEffect(()=>{if(!o)return;const _=()=>{console.log("🔄 Client connection state changed:",o.connected)},D=me=>{console.log("🔴 Client disconnected:",me),k(null),h(!1),g(!1)};return o.on("connection.connected",_),o.on("connection.disconnected",D),()=>{o.off("connection.connected",_),o.off("connection.disconnected",D)}},[o]),v.useEffect(()=>{if(!o)return;const _=fe=>{console.log("🤖 SessionView: Agent connected!",fe),f(!0),g(!1),w(!1)},D=fe=>{console.log("🗣️ SessionView: Agent speaking detected!",fe),x||(f(!0),g(!1),w(!1))},me=fe=>{console.log("🤔 SessionView: Agent thinking detected!",fe),x||(f(!0),g(!1),w(!1))},Y=()=>{console.log("🤖 SessionView: Agent disconnected"),f(!1),w(!0)};return o.on("agent.connected",_),o.on("agent.speaking",D),o.on("agent.thinking",me),o.on("connection.disconnected",Y),()=>{o.off("agent.connected",_),o.off("agent.speaking",D),o.off("agent.thinking",me),o.off("connection.disconnected",Y)}},[o,x]),v.useEffect(()=>{if(!o)return;const _=fe=>{console.log("🎯 SessionView: RPC Interaction started:",fe);const Pe=o.getCurrentInteraction();Pe&&(console.log("📱 SessionView: Setting current interaction:",Pe.methodName,"mode:",Pe.presentationMode),k(Pe))},D=fe=>{console.log("✅ SessionView: RPC Interaction completed:",fe),k(null)},me=async fe=>{console.log("⏰ SessionView: RPC Interaction timeout:",fe),k(null)},Y=async fe=>{console.log("❌ SessionView: RPC Interaction dismissed:",fe),k(null)};return o.on("rpc.interaction.started",_),o.on("rpc.interaction.completed",D),o.on("rpc.interaction.timeout",me),o.on("rpc.interaction.dismissed",Y),()=>{o.off("rpc.interaction.started",_),o.off("rpc.interaction.completed",D),o.off("rpc.interaction.timeout",me),o.off("rpc.interaction.dismissed",Y)}},[o]),v.useEffect(()=>{if(!o)return;const _=o.getCurrentInteraction();_?(console.log("🔄 SessionView: Syncing with existing interaction:",_.methodName),k(_)):k(null)},[o]),v.useEffect(()=>{b!=null&&b.methodName&&console.log("🎭 SessionView: Interactive UI started:",b.methodName)},[b==null?void 0:b.methodName]),v.useEffect(()=>{a==="fullscreen"&&console.log("📱 SessionView: Switched to fullscreen mode")},[a]),v.useEffect(()=>{b&&u&&(console.log("🎭 SessionView: Interactive UI appeared, closing chat"),h(!1))},[b,u]),s0(),v.useEffect(()=>{ce.current&&u&&S.length>0&&(console.log("📜 SessionView: Auto-scrolling to latest message, count:",S.length),setTimeout(()=>{ne&&O(!0)},100))},[S.length,u,ne,O]),v.useEffect(()=>{S.length>0&&S.length%5===0&&console.log("📝 SessionView: Messages count:",S.length)},[S.length]);async function $(_){var D,me;try{b&&(console.log("SessionView: Dismissing active interaction due to user message send"),(D=o==null?void 0:o.dismissCurrentInteraction)==null||D.call(o),k(null)),await((me=o==null?void 0:o.sendChatMessage)==null?void 0:me.call(o,_))}catch(Y){console.error("Failed to send message:",Y)}}const de=v.useCallback(_=>{console.log("📝 SessionView: Adding local message for voice session context:",_)},[]),P=v.useCallback(async _=>{try{o&&typeof o.sendAttachments=="function"&&(await o.sendAttachments(_),console.log("📎 SessionView: Attachments sent successfully:",_.map(D=>D.name)))}catch(D){console.error("❌ SessionView: Failed to send attachments:",D)}},[o]),z=v.useCallback(()=>{try{console.log("📞 SessionView: Ending call..."),console.log("📞 SessionView: Current state before ending:",{sessionStarted:n,effectiveAgentActive:N,chatOpen:u,currentInteraction:b==null?void 0:b.methodName,hasOnBack:!!l}),b&&(console.log("🎭 SessionView: Dismissing current interaction:",b.methodName),k(null),o&&typeof o.dismissCurrentInteraction=="function"&&o.dismissCurrentInteraction()),h(!1),g(!1),console.log("✅ SessionView: Local state reset"),o&&typeof o.endSession=="function"&&(o.endSession(),console.log("✅ SessionView: Session ended via client.endSession()")),o&&typeof o.disconnect=="function"&&(o.disconnect(),console.log("✅ SessionView: Client disconnected")),l?(console.log("🔄 SessionView: Calling onBack to return to welcome..."),l(),console.log("✅ SessionView: onBack called")):console.warn("⚠️ SessionView: No onBack function provided - cannot return to welcome"),console.log("🏁 SessionView: Call ended and cleanup completed")}catch(_){console.error("❌ SessionView: Failed to end call:",_),k(null),h(!1),g(!1),l&&(console.log("🔄 SessionView: Error occurred, still calling onBack..."),l())}},[o,l,b,n,N,u]);v.useEffect(()=>(n||console.log("🔄 SessionView: Session ended, component will unmount"),()=>{n||console.log("🧹 SessionView: Component unmounted")}),[n]),v.useEffect(()=>{var D,me;const _=((me=(D=o==null?void 0:o.getCurrentSession)==null?void 0:D.call(o))==null?void 0:me.id)||null;ee.current&&!_&&console.warn("⚠️ SessionView: Session was lost unexpectedly!",{previousSession:ee.current,currentSession:_,displayType:a,sessionStarted:n,effectiveAgentActive:N}),ee.current=_},[o,a,n,N]);const te=re("w-full flex flex-col items-center justify-center",a==="fullscreen"?"w-full max-w-none mx-0 h-full":"w-full mx-auto",G.main,a==="fullscreen"?"max-w-none":"","overflow-hidden","h-full"),le=l&&(a==="popup"||a==="fullscreen");if(C){const _=a==="fullscreen"?"flex flex-col items-center justify-center h-full w-full":"flex w-full flex-col items-center justify-center h-full p-8";return c.jsxs("main",{ref:d,className:re(te,"relative",e&&"pointer-events-none opacity-50"),children:[le&&c.jsx("div",{className:`flex items-center justify-between w-full p-4 border-b ${((Fe=G.chatHeader)==null?void 0:Fe.container)||"border-gray-200"}`,children:c.jsx("div",{className:"flex items-center",children:c.jsxs("div",{children:[c.jsx("h3",{className:`font-semibold ${G.text.primary}`,children:"Voice Session"}),c.jsx("p",{className:`text-sm ${G.text.muted}`,children:s})]})})}),c.jsxs("div",{className:_,children:[c.jsx("div",{className:`${G.spinner} w-12 h-12 mb-6`}),c.jsxs("p",{className:`text-sm text-center ${G.text.muted}`,children:["Connecting to ",j,"..."]})]})]})}return c.jsxs("main",{ref:d,className:re(te,"relative",e&&"pointer-events-none opacity-50"),style:{minHeight:0},children:[le&&c.jsx("div",{className:`flex items-center justify-between w-full p-4 border-b ${((Ne=G.chatHeader)==null?void 0:Ne.container)||"border-gray-200"}`,children:c.jsx("div",{className:"flex items-center",children:c.jsxs("div",{children:[c.jsx("h3",{className:`font-semibold ${G.text.primary}`,children:"Voice Session"}),c.jsx("p",{className:`text-sm ${G.text.muted}`,children:s})]})})}),c.jsxs("div",{className:"w-full flex-1 flex flex-col items-center px-0 min-h-0 overflow-hidden",children:[!N&&c.jsxs("div",{className:"flex flex-col items-center justify-center w-full h-full min-h-[180px]",children:[c.jsx(ue.div,{animate:{rotate:360,scale:[1,1.1,1]},transition:{rotate:{duration:2,repeat:1/0,ease:"linear"},scale:{duration:1,repeat:1/0,ease:"easeInOut"}},className:"w-12 h-12 mb-4",children:c.jsx(Do,{className:G.spinner,weight:"bold"})}),c.jsx(ue.span,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:`text-sm opacity-80 ${G.text.muted} text-center max-w-xs`,children:m?"Agent is taking longer than expected...":r}),c.jsx(ue.p,{initial:{opacity:0},animate:{opacity:1},transition:{delay:2},className:`text-xs ${G.text.muted} mt-2 text-center opacity-60`,children:m?"Please check your connection or try again.":"Agent is connecting... This may take a moment."}),m&&l&&c.jsx(ue.button,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{delay:.5},onClick:l,className:`mt-4 px-4 py-2 rounded-lg ${((Ce=G.chatHeader)==null?void 0:Ce.backButton)||"bg-gray-100 hover:bg-gray-200"} transition-colors`,children:"Go Back"})]}),N&&c.jsxs(c.Fragment,{children:[u&&c.jsxs("div",{className:re("absolute inset-0 w-full h-full flex flex-col transition-[opacity,translate] duration-300 ease-out z-10",i==="light"?"bg-white":"bg-gray-900/95 backdrop-blur-sm",u?"translate-y-0 opacity-100 delay-200":"translate-y-10 opacity-0"),children:[c.jsxs("div",{className:re("flex-shrink-0 px-4 py-3 border-b",a==="fullscreen"?"px-8":"px-5",((Be=G.chatHeader)==null?void 0:Be.container)||"border-gray-200 dark:border-gray-700"),children:[c.jsx("h3",{className:re("font-semibold text-lg",((Ye=G.text)==null?void 0:Ye.primary)||"text-gray-900 dark:text-white"),children:"Transcription & Chat"}),c.jsxs("p",{className:re("text-sm",((dt=G.text)==null?void 0:dt.muted)||"text-gray-600 dark:text-gray-400"),children:[S.length," messages"]})]}),c.jsx("div",{className:re("flex-1 flex flex-col min-h-0",a==="fullscreen"?"px-8":"px-5"),children:c.jsxs("div",{ref:se,className:`flex-1 flex flex-col h-full ${re("overflow-y-auto scrollbar-hide py-4")}`,style:{scrollbarWidth:"none",scrollBehavior:"smooth",paddingBottom:"120px"},onScroll:Z,children:[S.filter(_=>_.content&&_.content.trim()!==""&&_.content.trim()!=="...").length===0&&c.jsx("div",{className:"flex-1 flex items-center justify-center",children:c.jsxs("div",{className:"text-center",children:[c.jsx(ue.div,{transition:{duration:2,repeat:1/0,ease:"easeInOut"},className:"w-16 h-16 rounded-full bg-gradient-to-br from-blue-500 to-purple-600 flex items-center justify-center text-white font-bold text-xl mb-6 shadow-xl mx-auto",children:B}),c.jsx("p",{className:re("text-lg font-medium mb-2",((zt=G.text)==null?void 0:zt.primary)||"text-gray-900 dark:text-white"),children:"Start Speaking"}),c.jsx("p",{className:re("text-sm",((Wt=G.text)==null?void 0:Wt.muted)||"text-gray-600 dark:text-gray-400"),children:"Your conversation will appear here"})]})}),S.length>0&&c.jsx("div",{className:"w-full max-w-5xl mx-auto space-y-3 py-4 flex-1 flex flex-col justify-end",children:c.jsxs("div",{className:"space-y-3",children:[c.jsx(an,{mode:"popLayout",children:S.filter(_=>_.content&&_.content.trim()!==""&&_.content.trim()!=="...").map((_,D)=>c.jsx(ue.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},transition:{duration:.3,ease:"easeOut",delay:D*.02},layout:!0,children:c.jsx(B1,{message:_,theme:i,isOwn:_.sender.type==="participant",isStreaming:E.has(_.id)})},_.id||`message-${D}`))}),A&&!b&&c.jsx(ue.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:S.length*.1},className:"flex w-full justify-start mb-4 px-1",children:c.jsxs("div",{className:"relative group flex-row flex items-end gap-3 max-w-[85%]",children:[c.jsx("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-white text-xs font-semibold flex-shrink-0 shadow-lg ${i==="light"?"bg-gradient-to-br from-blue-500 to-purple-600":"bg-gradient-to-br from-gray-600 to-gray-700"}`,children:B}),c.jsx("div",{className:"relative px-3 py-2 rounded-2xl break-words shadow-lg backdrop-blur-sm message-bubble message-hover bg-gray-100 text-gray-900 dark:bg-gray-800 dark:text-white rounded-bl-md transition-all duration-200 group-hover:scale-[1.02]",style:{wordWrap:"break-word",overflowWrap:"break-word",minWidth:48},children:c.jsx("span",{className:"inline-flex items-center",children:[0,1,2].map(_=>c.jsx(ue.span,{className:"w-1.5 h-1.5 bg-current rounded-full mx-0.5",animate:{y:[0,-4,0],opacity:[.4,1,.4],scale:[.8,1,.8]},transition:{duration:.8,repeat:1/0,repeatType:"mirror",delay:_*.2,ease:"easeInOut"}},_))})})]})}),c.jsx("div",{ref:H})]})})]})}),!ne&&c.jsx(ue.button,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},onClick:()=>{oe(!0),O(!1)},className:`absolute right-6 bottom-20 z-10 p-3 rounded-full shadow-lg backdrop-blur-sm border transition-all duration-200 hover:scale-105 ${i==="light"?"bg-white/90 text-gray-600 border-gray-200 hover:bg-white hover:text-gray-800":"bg-gray-800/90 text-gray-300 border-gray-700 hover:bg-gray-700 hover:text-white"}`,"aria-label":"Scroll to bottom",children:c.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 14l-7 7m0 0l-7-7m7 7V3"})})})]}),!u&&c.jsxs("div",{className:re("flex-1 flex flex-col items-center w-full h-full min-h-0",(b==null?void 0:b.presentationMode)==="embedded"?"justify-end":"justify-center"),children:[c.jsx(ue.div,{className:"w-full flex justify-center",animate:{y:(b==null?void 0:b.presentationMode)==="embedded"?-8:0},transition:{duration:.3,ease:"easeOut"},children:c.jsx(n0,{chatOpen:u,client:o},`media-tiles-${((Vt=(Zt=o==null?void 0:o.getCurrentSession)==null?void 0:Zt.call(o))==null?void 0:Vt.id)||"no-session"}`)}),c.jsx(an,{mode:"wait",children:b&&b.presentationMode==="embedded"&&c.jsx(ue.div,{initial:{opacity:0,y:20,height:0},animate:{opacity:1,y:0,height:"auto"},exit:{opacity:0,y:20,height:0},transition:{duration:.3,ease:"easeOut"},className:re("w-full relative mt-4 flex justify-center",a==="fullscreen"?"max-w-4xl":"max-w-md"),children:c.jsx("div",{className:"bg-white/10 backdrop-blur-sm rounded-xl border border-white/20 shadow-lg overflow-hidden",children:c.jsx(fn,{interaction:b,theme:i,onDismiss:()=>{var _;return(_=o==null?void 0:o.dismissCurrentInteraction)==null?void 0:_.call(o)},client:o,addLocalMessage:de})})},`embedded-${b.methodName}`)})]})]})]}),c.jsx(an,{mode:"wait",children:b&&b.presentationMode!=="embedded"&&!u&&c.jsx("div",{className:re("absolute inset-0 z-50 flex items-center justify-center backdrop-blur-sm",a==="fullscreen"?"bg-black/70":"bg-black/50"),children:c.jsx(ue.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.9},transition:{duration:.2,ease:"easeOut"},className:re("relative w-full overflow-hidden",a==="fullscreen"?"max-w-2xl mx-8 max-h-[85vh]":"max-w-lg mx-4 max-h-[80vh]","bg-white dark:bg-gray-900 rounded-2xl shadow-2xl","border border-gray-200 dark:border-gray-700"),children:c.jsx(fn,{interaction:b,theme:i,onDismiss:()=>{var _;return(_=o==null?void 0:o.dismissCurrentInteraction)==null?void 0:_.call(o)},client:o,addLocalMessage:de})},`modal-${b.methodName}`)})}),c.jsx(ue.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.2},className:"absolute bottom-0 left-0 right-0 flex-shrink-0 w-full z-20",children:c.jsx(H1,{capabilities:t,onSendMessage:$,onSendAttachments:P,onEndCall:z,onChatOpenChange:h,disabled:e,theme:i,client:o,sessionStarted:n})})]})});jd.displayName="SessionView";function H1({capabilities:e,onSendMessage:t,onSendAttachments:n,onEndCall:s,onChatOpenChange:r,disabled:i=!1,theme:o,client:a,sessionStarted:l=!1}){const[d,u]=v.useState(!1),h=v.useRef(null),m=v.useRef(null);v.useEffect(()=>{const S=()=>{const T=navigator.userAgent.toLowerCase(),w=["android","iphone","ipad","mobile","tablet"].some(E=>T.includes(E)),A="ontouchstart"in window||navigator.maxTouchPoints>0,V=window.innerWidth<=768;u(w||A&&V)};return S(),window.addEventListener("resize",S),()=>window.removeEventListener("resize",S)},[]);const g=S=>{const T=S.target.files;if(T&&T.length>0){const w=Array.from(T).filter(A=>A.type.startsWith("image/"));if(w.length===0){console.warn("No valid image files selected");return}n&&n(w),h.current&&(h.current.value="")}},x=S=>{const T=S.target.files;if(T&&T.length>0){const C=T[0];C.type.startsWith("image/")&&n&&n([C]),m.current&&(m.current.value="")}},f=()=>{!i&&h.current&&h.current.click()},b=()=>{!i&&d&&m.current&&m.current.click()},k=()=>{console.log("🔴 VoiceControlPanel: End call button clicked"),console.log("🔴 VoiceControlPanel: Current state:",{disabled:i,sessionStarted:l,hasOnEndCall:!!s}),s?s():console.warn("⚠️ VoiceControlPanel: No onEndCall function provided")};return c.jsx("div",{className:re("px-3 py-2 !w-full backdrop-blur-xl border-0 shadow-lg",o==="light"?"bg-white/95 border-t border-gray-200":"bg-gray-900/95 border-t border-gray-700"),children:c.jsxs("div",{className:"flex items-center justify-between !w-full mx-auto max-w-4xl",children:[c.jsx("input",{ref:h,type:"file",multiple:!0,onChange:g,className:"hidden",accept:"image/*"}),c.jsx("input",{ref:m,type:"file",onChange:x,className:"hidden",accept:"image/*",capture:"environment"}),c.jsxs("div",{className:"flex items-center gap-1",children:[c.jsx("button",{onClick:f,disabled:i,className:re("p-2 rounded-full transition-all duration-200 hover:scale-105 active:scale-95",i?"opacity-50 cursor-not-allowed":"hover:shadow-md",o==="light"?"bg-gray-100 hover:bg-gray-200 text-gray-600":"bg-gray-700/50 hover:bg-gray-600/50 text-gray-300"),title:"Attach files",children:c.jsx(F1,{className:"w-4 h-4"})}),d&&c.jsx("button",{onClick:b,disabled:i,className:re("p-2 rounded-full transition-all duration-200 hover:scale-105 active:scale-95",i?"opacity-50 cursor-not-allowed":"hover:shadow-md",o==="light"?"bg-gray-100 hover:bg-gray-200 text-gray-600":"bg-gray-700/50 hover:bg-gray-600/50 text-gray-300"),title:"Take photo",children:c.jsx(L1,{className:"w-4 h-4"})})]}),c.jsx("div",{className:"flex-1 flex justify-center px-2",children:c.jsx(Yg,{capabilities:e,onChatOpenChange:r,onSendMessage:t,theme:o,client:a,className:"border-none py-0 rounded-xl max-w-md w-full"})}),c.jsx("div",{className:"flex items-center",children:c.jsx("button",{onClick:k,disabled:i||!l,className:re("p-2 rounded-full transition-all duration-200 hover:scale-105 active:scale-95",i||!l?"opacity-50 cursor-not-allowed":"hover:shadow-md","bg-red-500 hover:bg-red-600 text-white"),title:"End call",children:c.jsx(O1,{className:"w-4 h-4"})})})]})})}function U1({onSendMessage:e,onSendAttachments:t,disabled:n,theme:s,onEndChat:r}){const[i,o]=p.useState(""),[a,l]=p.useState(!1),d=p.useRef(null),u=p.useRef(null),[h,m]=p.useState(!1),g=Le(s);p.useEffect(()=>{const C=()=>{const w=navigator.userAgent.toLowerCase(),V=["android","iphone","ipad","mobile","tablet"].some(y=>w.includes(y)),E="ontouchstart"in window||navigator.maxTouchPoints>0,F=window.innerWidth<=768;m(V||E&&F)};return C(),window.addEventListener("resize",C),()=>window.removeEventListener("resize",C)},[]);const x=C=>{C.preventDefault(),i.trim()&&!n&&(e(i.trim()),o(""))},f=C=>{C.key==="Enter"&&!C.shiftKey&&(C.preventDefault(),x(C))},b=C=>{const w=C.target.files;if(w&&w.length>0){const A=Array.from(w),V=A.filter(E=>E.type.startsWith("image/"));if(V.length===0){console.warn("No valid image files selected");return}V.length!==A.length&&console.warn("Some non-image files were filtered out"),t(V),d.current&&(d.current.value="")}},k=()=>{!n&&d.current&&d.current.click()},S=()=>{!n&&h&&u.current&&u.current.click()},T=C=>{const w=C.target.files;if(w&&w.length>0){const A=w[0];A.type.startsWith("image/")?t([A]):console.warn("Selected file is not an image"),u.current&&(u.current.value="")}};return c.jsx("div",{className:"px-4 py-3 !w-full backdrop-blur-xl border-0 shadow-lg ",children:c.jsx("form",{onSubmit:x,className:"flex items-center !w-full mx-auto max-w-4xl",children:c.jsxs("div",{className:`flex items-center gap-2 !w-full backdrop-blur-md rounded-full px-3 py-2 shadow-sm hover:shadow-md focus-within:shadow-lg focus-within:ring-2 focus-within:ring-blue-500/30 focus-within:border-blue-500/50 transition-all duration-200 border ${s==="light"?"bg-white/90 border-gray-200":g.chatInput.container}`,children:[c.jsx(ue.button,{type:"button",onClick:k,whileHover:{scale:1.05},whileTap:{scale:.95},className:`p-1 rounded-full transition-all duration-200 border-0 ${g.chatInput.attachButton}`,disabled:n,"aria-label":"Attach file",children:c.jsx($e.Paperclip,{className:"w-4 h-4"})}),h&&c.jsx(ue.button,{type:"button",onClick:S,whileHover:{scale:1.05},whileTap:{scale:.95},className:`p-1 rounded-full transition-all duration-200 border-0 ${g.chatInput.attachButton}`,disabled:n,"aria-label":"Take photo",children:c.jsx($e.Camera,{className:"w-4 h-4"})}),c.jsx("input",{ref:d,type:"file",multiple:!0,onChange:b,className:"hidden",accept:"image/*"}),c.jsx("input",{ref:u,type:"file",onChange:T,className:"hidden",accept:"image/*",capture:"environment"}),c.jsx("textarea",{value:i,onChange:C=>o(C.target.value),onKeyDown:f,onFocus:()=>l(!0),onBlur:()=>l(!1),placeholder:"Type your message...",disabled:n,className:`flex-1 px-2 py-1 bg-transparent resize-none min-h-[32px] max-h-20 focus:outline-none text-sm border-0 ${g.chatInput.textarea}`,rows:1,style:{height:"auto",minHeight:"32px"},onInput:C=>{const w=C.target;w.style.height="auto",w.style.height=`${Math.min(w.scrollHeight,80)}px`}}),c.jsx(ue.button,{type:"submit",disabled:n||!i.trim(),whileHover:{scale:1.05},whileTap:{scale:.95},className:`p-1 rounded-full transition-all duration-200 border-0 flex-shrink-0 ${i.trim()&&!n?g.chatInput.sendButton:s==="light"?"bg-gray-200 text-gray-400 cursor-not-allowed opacity-70":"bg-gray-600/50 text-gray-500 cursor-not-allowed opacity-50"}`,"aria-label":"Send message",children:c.jsx($e.SendHorizontal,{className:"w-4 h-4"})}),r&&c.jsx(ue.button,{type:"button",onClick:r,whileHover:{scale:1.05},whileTap:{scale:.95},className:`p-1 rounded-full transition-all duration-200 border-0 flex-shrink-0 ${g.chatInput.endButton}`,"aria-label":"End chat",children:c.jsx($e.PhoneOff,{className:"w-4 h-4"})})]})})})}function z1({text:e,isComplete:t,isRealTimeStream:n=!1,speed:s=50}){const[r,i]=p.useState(""),[o,a]=p.useState(0);return p.useEffect(()=>{if(n){i(e);return}if(t){i(e);return}if(o<e.length){const l=setTimeout(()=>{i(e.slice(0,o+1)),a(o+1)},s);return()=>clearTimeout(l)}},[e,o,t,s,n]),p.useEffect(()=>{n||(a(0),i(""))},[e,n]),c.jsxs("span",{className:"relative",children:[c.jsx("span",{className:"inline-block",children:r}),!t&&c.jsx("span",{className:"inline-flex items-center ml-1",children:[0,1,2].map(l=>c.jsx(ue.span,{className:"w-1.5 h-1.5 bg-current rounded-full mx-0.5",animate:{y:[0,-4,0],opacity:[.4,1,.4],scale:[.8,1,.8]},transition:{duration:.8,repeat:1/0,repeatType:"mirror",delay:l*.2,ease:"easeInOut"}},l))})]})}function W1({message:e,theme:t,isOwn:n,isStreaming:s=!1}){var o,a;const r=Le(t),i=e.sender.name?e.sender.name.split(" ").map(l=>l[0]).join("").toUpperCase().slice(0,2):"U";return c.jsx("div",{className:`flex w-full ${n?"justify-end":"justify-start"} mb-4 px-1`,children:c.jsxs("div",{className:`relative group ${n?"flex-row-reverse":"flex-row"} flex items-end gap-3 max-w-[85%]`,children:[c.jsx("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-white text-xs font-semibold flex-shrink-0 shadow-lg ${n?t==="light"?"bg-gradient-to-br from-blue-500 to-purple-600":"bg-gradient-to-br from-gray-600 to-gray-700":t==="light"?"bg-gradient-to-br from-blue-500 to-purple-600":"bg-gradient-to-br from-gray-600 to_gray-700"}`,children:i}),c.jsxs("div",{className:`
107
+ `,style:{wordWrap:"break-word",overflowWrap:"break-word"},children:[l.jsx("div",{className:"whitespace-pre-wrap break-words leading-relaxed text-sm",children:s&&!n?l.jsx(_x,{text:e.content,isComplete:!s,isRealTimeStream:((c=e.metadata)==null?void 0:c.streaming)===!0,speed:35}):e.content}),l.jsx("div",{className:"text-xs mt-1",children:e.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]})]})})}const Nd=w.forwardRef(({disabled:e,capabilities:t,sessionStarted:n,participantName:s="User",loadingText:r="Waiting for agent to connect...",theme:i="vox",client:o,displayType:a="widget",onBack:c},d)=>{var ae,Oe,Be,Pe,ze,Xe,rt,wt,Gn,Kn,Zt;const[u,f]=w.useState(!1),[h,p]=w.useState(!1),[x,m]=w.useState(!1),[b,S]=w.useState(()=>{var oe;return((oe=o==null?void 0:o.getCurrentInteraction)==null?void 0:oe.call(o))||null}),[C,T]=w.useState(()=>o&&typeof o.getChatMessages=="function"?o.getChatMessages():[]),[k,v]=w.useState(()=>{const z=n;return console.log("🚀 SessionView: Initial loading state calculation:",{sessionStarted:n,shouldShowLoading:z}),z}),[j,V]=w.useState(!0),[E,_]=w.useState(new Set),[y,D]=w.useState([]),W=w.useRef(null),te=w.useRef(null),[ue,ie]=w.useState(!0),fe=w.useRef(null),ne=w.useRef(null),R=w.useMemo(()=>Math.random().toString(36).substr(2,9),[]);console.log(`🚀 SessionView-${R}: Component initialized with:`,{initialMessagesCount:C.length,clientExists:!!o,sessionStarted:n,agentConnected:x,isLoading:k,displayType:a,disabled:e});const B=(ae=o==null?void 0:o.getCurrentAgentInfo)==null?void 0:ae.call(o),O=((B==null?void 0:B.name)||"AI Assistant").split(" ").map(z=>z[0]).join("").toUpperCase().slice(0,2),q=w.useCallback(()=>{if(te.current){const{scrollTop:z,scrollHeight:oe,clientHeight:ke}=te.current;return oe-z-ke<100}return!0},[]),Y=w.useCallback(()=>{const z=q();ie(z)},[q]),H=w.useCallback((z=!1)=>{if(ue&&te.current){const oe=te.current;z?oe.scrollTop=oe.scrollHeight:oe.scrollTo({top:oe.scrollHeight,behavior:"smooth"})}},[ue]);w.useEffect(()=>{if(!o)return;const z=ee=>{var Te,U,me,xe,Ee;if(console.log(`SessionView-${R}: Received message:`,ee),console.log(`SessionView-${R}: Message sender details:`,{senderId:(Te=ee.sender)==null?void 0:Te.id,senderName:(U=ee.sender)==null?void 0:U.name,senderType:(me=ee.sender)==null?void 0:me.type,content:ee.content,messageId:ee.id,topic:(xe=ee.metadata)==null?void 0:xe.topic,isTranscription:((Ee=ee.metadata)==null?void 0:Ee.topic)==="lk.transcription"}),v(!1),b&&ee.sender.type==="agent"){console.log("SessionView: Queuing agent message due to active interaction:",b.methodName),D(ot=>[...ot,ee]);return}ee.sender.type==="agent"&&V(!1),T(ot=>{var Hs;if(ot.some(Rt=>Rt.id===ee.id))return console.log("SessionView: Message already exists, skipping:",ee.id),ot;if(console.log(`SessionView-${R}: Adding new message:`,ee.id),ee.sender.type==="agent"&&(_(Rt=>new Set(Rt).add(ee.id)),!((Hs=ee.metadata)!=null&&Hs.streaming))){const Rt=ee.content.length*35+1e3;setTimeout(()=>{_(Kd=>{const Jo=new Set(Kd);return Jo.delete(ee.id),Jo})},Rt)}return[...ot,ee]}),setTimeout(()=>{ue&&H(!0)},0)},oe=ee=>{var Te;if(console.log("SessionView: Updated message:",ee),b&&ee.sender.type==="agent"){console.log("SessionView: Queuing agent message update due to active interaction:",b.methodName),D(U=>{const me=U.findIndex(xe=>xe.id===ee.id);if(me>=0){const xe=[...U];return xe[me]=ee,xe}else return[...U,ee]});return}T(U=>U.map(me=>me.id===ee.id?{...ee}:me)),setTimeout(()=>{ue&&H(!0)},0),(Te=ee.metadata)!=null&&Te.streaming||_(U=>{const me=new Set(U);return me.delete(ee.id),me})},ke=ee=>{var Te,U,me,xe,Ee,ot;if(console.log(`SessionView-${R}: Sent message:`,ee),console.log(`SessionView-${R}: Sent message details:`,{senderId:(Te=ee.sender)==null?void 0:Te.id,senderName:(U=ee.sender)==null?void 0:U.name,senderType:(me=ee.sender)==null?void 0:me.type,content:ee.content,messageId:ee.id,topic:(xe=ee.metadata)==null?void 0:xe.topic,isTranscription:((Ee=ee.metadata)==null?void 0:Ee.topic)==="lk.transcription"}),v(!1),((ot=ee.metadata)==null?void 0:ot.topic)==="lk.transcription"){console.log(`SessionView-${R}: Skipping sent transcription message (will come through received):`,ee.id);return}T(Yn=>Yn.some(Rt=>Rt.id===ee.id)?(console.log("SessionView: Sent message already exists, skipping:",ee.id),Yn):(console.log("SessionView: Adding sent message:",ee.id),[...Yn,ee])),setTimeout(()=>{ue&&H(!0)},0)};return o.on("chat.message.received",z),o.on("chat.message.updated",oe),o.on("chat.message.sent",ke),()=>{o.off("chat.message.received",z),o.off("chat.message.updated",oe),o.off("chat.message.sent",ke)}},[o,b,ue,H]),w.useEffect(()=>{if(!o)return;const z=()=>{if(console.log("SessionView: Agent is thinking"),b){console.log("SessionView: Suppressing thinking indicator due to active interaction:",b.methodName);return}V(!0)},oe=()=>{console.log("SessionView: Agent is speaking"),V(!1)};return o.on("agent.thinking",z),o.on("agent.speaking",oe),()=>{o.off("agent.thinking",z),o.off("agent.speaking",oe)}},[o,b]),w.useEffect(()=>{console.log("🎬 SessionView: Messages state updated:",{messageCount:C.length,messages:C.map(z=>{var oe,ke;return{id:z.id,text:((oe=z.content)==null?void 0:oe.substring(0,50))+"...",from:(ke=z.sender)==null?void 0:ke.id}})})},[C]),w.useEffect(()=>{const z=C.filter(oe=>oe.content&&oe.content.trim()!==""&&oe.content.trim()!=="...");C.length===0?console.log("📝 SessionView: Showing empty state - no messages available"):z.length===0?console.log("📝 SessionView: Showing empty state - no messages with content available",{totalMessages:C.length,messagesWithContent:z.length}):console.log("📝 SessionView: Showing messages",{totalMessages:C.length,messagesWithContent:z.length})},[C]);const{agent:{isActive:re=!1}={}}=o?ad(o):{agent:{isActive:!1}},$=_e(i),I=w.useMemo(()=>o&&typeof o.getCurrentSession=="function"?!!o.getCurrentSession():!1,[o]),L=w.useMemo(()=>o&&typeof o.getIsAgentConnected=="function"&&o.getIsAgentConnected()||x,[o,x]),N=re||L;w.useEffect(()=>{var z,oe;console.log("🤖 SessionView agent state:",{isAgentActive:re,hasActiveSession:I,isAgentActuallyConnected:L,effectiveAgentActive:N,sessionStarted:n,clientSession:(oe=(z=o==null?void 0:o.getCurrentSession)==null?void 0:z.call(o))==null?void 0:oe.id,isLoading:k}),N&&k&&(console.log("✅ SessionView: Agent became active, stopping loading state"),v(!1))},[re,I,L,N,n,o,k]),w.useEffect(()=>{re&&console.log("🤖 Agent became active")},[re]),w.useEffect(()=>{console.log("📋 Session state changed:",{sessionStarted:n,disabled:e,participantName:s,effectiveAgentActive:N,chatOpen:u,currentInteraction:(b==null?void 0:b.methodName)||"none"})},[n,e,s,N,u,b]),w.useEffect(()=>{if(n&&!N){console.log("⏰ Starting agent timeout detection...");const z=setTimeout(()=>{I&&!N&&(console.log("⚡ Fallback: Assuming agent is connected after 5 seconds with active session"),m(!0),p(!1))},5e3),oe=setTimeout(()=>{N||(console.log("⚠️ Agent timeout: Agent did not become active within 30 seconds"),p(!0))},3e4);return()=>{clearTimeout(z),clearTimeout(oe)}}else N&&(console.log("✅ Agent is active, clearing timeout"),p(!1))},[n,N,I]),w.useEffect(()=>{if(!o)return;const z=()=>{console.log("🔄 Client connection state changed:",o.connected)},oe=ke=>{console.log("🔴 Client disconnected:",ke),S(null),f(!1),p(!1)};return o.on("connection.connected",z),o.on("connection.disconnected",oe),()=>{o.off("connection.connected",z),o.off("connection.disconnected",oe)}},[o]),w.useEffect(()=>{if(!o)return;const z=Te=>{console.log("🤖 SessionView: Agent connected!",Te),m(!0),p(!1),v(!1)},oe=Te=>{console.log("🗣️ SessionView: Agent speaking detected!",Te),x||(m(!0),p(!1),v(!1))},ke=Te=>{console.log("🤔 SessionView: Agent thinking detected!",Te),x||(m(!0),p(!1),v(!1))},ee=()=>{console.log("🤖 SessionView: Agent disconnected"),m(!1),v(!0)};return o.on("agent.connected",z),o.on("agent.speaking",oe),o.on("agent.thinking",ke),o.on("connection.disconnected",ee),()=>{o.off("agent.connected",z),o.off("agent.speaking",oe),o.off("agent.thinking",ke),o.off("connection.disconnected",ee)}},[o,x]),w.useEffect(()=>{if(!o)return;const z=Te=>{console.log("🎯 SessionView: RPC Interaction started:",Te);const U=o.getCurrentInteraction();U&&(console.log("📱 SessionView: Setting current interaction:",U.methodName,"mode:",U.presentationMode),S(U))},oe=Te=>{console.log("✅ SessionView: RPC Interaction completed:",Te),S(null)},ke=async Te=>{console.log("⏰ SessionView: RPC Interaction timeout:",Te),S(null)},ee=async Te=>{console.log("❌ SessionView: RPC Interaction dismissed:",Te),S(null)};return o.on("rpc.interaction.started",z),o.on("rpc.interaction.completed",oe),o.on("rpc.interaction.timeout",ke),o.on("rpc.interaction.dismissed",ee),()=>{o.off("rpc.interaction.started",z),o.off("rpc.interaction.completed",oe),o.off("rpc.interaction.timeout",ke),o.off("rpc.interaction.dismissed",ee)}},[o]),w.useEffect(()=>{if(!o)return;const z=o.getCurrentInteraction();z?(console.log("🔄 SessionView: Syncing with existing interaction:",z.methodName),S(z)):S(null)},[o]),w.useEffect(()=>{b!=null&&b.methodName&&console.log("🎭 SessionView: Interactive UI started:",b.methodName)},[b==null?void 0:b.methodName]),w.useEffect(()=>{a==="fullscreen"&&console.log("📱 SessionView: Switched to fullscreen mode")},[a]),w.useEffect(()=>{b&&u&&(console.log("🎭 SessionView: Interactive UI appeared, closing chat"),f(!1))},[b,u]),s0(),w.useEffect(()=>{fe.current&&u&&C.length>0&&(console.log("📜 SessionView: Auto-scrolling to latest message, count:",C.length),setTimeout(()=>{ue&&H(!0)},100))},[C.length,u,ue,H]),w.useEffect(()=>{C.length>0&&C.length%5===0&&console.log("📝 SessionView: Messages count:",C.length)},[C.length]);async function F(z){var oe,ke;try{b&&(console.log("SessionView: Dismissing active interaction due to user message send"),(oe=o==null?void 0:o.dismissCurrentInteraction)==null||oe.call(o),S(null)),await((ke=o==null?void 0:o.sendChatMessage)==null?void 0:ke.call(o,z))}catch(ee){console.error("Failed to send message:",ee)}}const se=w.useCallback(z=>{console.log("📝 SessionView: Adding local message for voice session context:",z)},[]),A=w.useCallback(async z=>{try{o&&typeof o.sendAttachments=="function"&&(await o.sendAttachments(z),console.log("📎 SessionView: Attachments sent successfully:",z.map(oe=>oe.name)))}catch(oe){console.error("❌ SessionView: Failed to send attachments:",oe)}},[o]),Z=w.useCallback(()=>{try{console.log("📞 SessionView: Ending call..."),console.log("📞 SessionView: Current state before ending:",{sessionStarted:n,effectiveAgentActive:N,chatOpen:u,currentInteraction:b==null?void 0:b.methodName,hasOnBack:!!c}),b&&(console.log("🎭 SessionView: Dismissing current interaction:",b.methodName),S(null),o&&typeof o.dismissCurrentInteraction=="function"&&o.dismissCurrentInteraction()),f(!1),p(!1),console.log("✅ SessionView: Local state reset"),o&&typeof o.endSession=="function"&&(o.endSession(),console.log("✅ SessionView: Session ended via client.endSession()")),o&&typeof o.disconnect=="function"&&(o.disconnect(),console.log("✅ SessionView: Client disconnected")),c?(console.log("🔄 SessionView: Calling onBack to return to welcome..."),c(),console.log("✅ SessionView: onBack called")):console.warn("⚠️ SessionView: No onBack function provided - cannot return to welcome"),console.log("🏁 SessionView: Call ended and cleanup completed")}catch(z){console.error("❌ SessionView: Failed to end call:",z),S(null),f(!1),p(!1),c&&(console.log("🔄 SessionView: Error occurred, still calling onBack..."),c())}},[o,c,b,n,N,u]);w.useEffect(()=>(n||console.log("🔄 SessionView: Session ended, component will unmount"),()=>{n||console.log("🧹 SessionView: Component unmounted")}),[n]),w.useEffect(()=>{var oe,ke;const z=((ke=(oe=o==null?void 0:o.getCurrentSession)==null?void 0:oe.call(o))==null?void 0:ke.id)||null;ne.current&&!z&&console.warn("⚠️ SessionView: Session was lost unexpectedly!",{previousSession:ne.current,currentSession:z,displayType:a,sessionStarted:n,effectiveAgentActive:N}),ne.current=z},[o,a,n,N]);const G=Q("w-full flex flex-col items-center justify-center",a==="fullscreen"?"w-full max-w-none mx-0 h-full":"w-full mx-auto",$.main,a==="fullscreen"?"max-w-none":"","overflow-hidden","h-full"),de=c&&(a==="popup"||a==="fullscreen");return k?l.jsx("main",{ref:d,className:Q(G,"relative",e&&"pointer-events-none opacity-50"),children:de&&l.jsx("div",{className:`flex items-center justify-between w-full p-4 border-b ${((Oe=$.chatHeader)==null?void 0:Oe.container)||"border-gray-200"}`,children:l.jsx("div",{className:"flex items-center",children:l.jsxs("div",{children:[l.jsx("h3",{className:`font-semibold ${$.text.primary}`,children:"Voice Session"}),l.jsx("p",{className:`text-sm ${$.text.muted}`,children:s})]})})})}):l.jsxs("main",{ref:d,className:Q(G,"relative",e&&"pointer-events-none opacity-50"),style:{minHeight:0},children:[de&&l.jsx("div",{className:`flex items-center justify-between w-full p-4 border-b ${((Be=$.chatHeader)==null?void 0:Be.container)||"border-gray-200"}`,children:l.jsx("div",{className:"flex items-center",children:l.jsxs("div",{children:[l.jsx("h3",{className:`font-semibold ${$.text.primary}`,children:"Voice Session"}),l.jsx("p",{className:`text-sm ${$.text.muted}`,children:s})]})})}),l.jsxs("div",{className:"w-full flex-1 flex flex-col items-center px-0 min-h-0 overflow-hidden",children:[!N&&l.jsxs("div",{className:"flex flex-col items-center justify-center w-full h-full min-h-[180px]",children:[l.jsx(le.div,{animate:{rotate:360,scale:[1,1.1,1]},transition:{rotate:{duration:2,repeat:1/0,ease:"linear"},scale:{duration:1,repeat:1/0,ease:"easeInOut"}},className:"w-12 h-12 mb-4",children:l.jsx(Do,{className:$.spinner,weight:"bold"})}),l.jsx(le.span,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:`text-sm opacity-80 ${$.text.muted} text-center max-w-xs`,children:h?"Agent is taking longer than expected...":r}),l.jsx(le.p,{initial:{opacity:0},animate:{opacity:1},transition:{delay:2},className:`text-xs ${$.text.muted} mt-2 text-center opacity-60`,children:h?"Please check your connection or try again.":"Agent is connecting... This may take a moment."}),h&&c&&l.jsx(le.button,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{delay:.5},onClick:c,className:`mt-4 px-4 py-2 rounded-lg ${((Pe=$.chatHeader)==null?void 0:Pe.backButton)||"bg-gray-100 hover:bg-gray-200"} transition-colors`,children:"Go Back"})]}),N&&l.jsxs(l.Fragment,{children:[u&&l.jsxs("div",{className:Q("absolute inset-0 w-full h-full flex flex-col transition-[opacity,translate] duration-300 ease-out z-10",i==="light"?"bg-white":"bg-gray-900/95 backdrop-blur-sm",u?"translate-y-0 opacity-100 delay-200":"translate-y-10 opacity-0"),children:[l.jsxs("div",{className:Q("flex-shrink-0 px-4 py-3 border-b",a==="fullscreen"?"px-8":"px-5",((ze=$.chatHeader)==null?void 0:ze.container)||"border-gray-200 dark:border-gray-700"),children:[l.jsx("h3",{className:Q("font-semibold text-lg",((Xe=$.text)==null?void 0:Xe.primary)||"text-gray-900 dark:text-white"),children:"Transcription & Chat"}),l.jsxs("p",{className:Q("text-sm",((rt=$.text)==null?void 0:rt.muted)||"text-gray-600 dark:text-gray-400"),children:[C.length," messages"]})]}),l.jsx("div",{className:Q("flex-1 flex flex-col min-h-0",a==="fullscreen"?"px-8":"px-5"),children:l.jsxs("div",{ref:te,className:`flex-1 flex flex-col h-full ${Q("overflow-y-auto scrollbar-hide py-4")}`,style:{scrollbarWidth:"none",scrollBehavior:"smooth",paddingBottom:"120px"},onScroll:Y,children:[C.filter(z=>z.content&&z.content.trim()!==""&&z.content.trim()!=="...").length===0&&l.jsx("div",{className:"flex-1 flex items-center justify-center",children:l.jsxs("div",{className:"text-center",children:[l.jsx(le.div,{transition:{duration:2,repeat:1/0,ease:"easeInOut"},className:"w-16 h-16 rounded-full bg-gradient-to-br from-blue-500 to-purple-600 flex items-center justify-center text-white font-bold text-xl mb-6 shadow-xl mx-auto",children:O}),l.jsx("p",{className:Q("text-lg font-medium mb-2",((wt=$.text)==null?void 0:wt.primary)||"text-gray-900 dark:text-white"),children:"Start Speaking"}),l.jsx("p",{className:Q("text-sm",((Gn=$.text)==null?void 0:Gn.muted)||"text-gray-600 dark:text-gray-400"),children:"Your conversation will appear here"})]})}),C.length>0&&l.jsx("div",{className:"w-full max-w-5xl mx-auto space-y-3 py-4 flex-1 flex flex-col justify-end",children:l.jsxs("div",{className:"space-y-3",children:[l.jsx(Et,{mode:"popLayout",children:C.filter(z=>z.content&&z.content.trim()!==""&&z.content.trim()!=="...").map((z,oe)=>l.jsx(le.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},transition:{duration:.3,ease:"easeOut",delay:oe*.02},layout:!0,children:l.jsx(Bx,{message:z,theme:i,isOwn:z.sender.type==="participant",isStreaming:E.has(z.id)})},z.id||`message-${oe}`))}),j&&!b&&l.jsx(le.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:C.length*.1},className:"flex w-full justify-start mb-4 px-1",children:l.jsxs("div",{className:"relative group flex-row flex items-end gap-3 max-w-[85%]",children:[l.jsx("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-white text-xs font-semibold flex-shrink-0 shadow-lg ${i==="light"?"bg-gradient-to-br from-blue-500 to-purple-600":"bg-gradient-to-br from-gray-600 to-gray-700"}`,children:O}),l.jsx("div",{className:"relative px-3 py-2 rounded-2xl break-words shadow-lg backdrop-blur-sm message-bubble message-hover bg-gray-100 text-gray-900 dark:bg-gray-800 dark:text-white rounded-bl-md transition-all duration-200 group-hover:scale-[1.02]",style:{wordWrap:"break-word",overflowWrap:"break-word",minWidth:48},children:l.jsx("span",{className:"inline-flex items-center",children:[0,1,2].map(z=>l.jsx(le.span,{className:"w-1.5 h-1.5 bg-current rounded-full mx-0.5",animate:{y:[0,-4,0],opacity:[.4,1,.4],scale:[.8,1,.8]},transition:{duration:.8,repeat:1/0,repeatType:"mirror",delay:z*.2,ease:"easeInOut"}},z))})})]})}),l.jsx("div",{ref:W})]})})]})}),!ue&&l.jsx(le.button,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},onClick:()=>{ie(!0),H(!1)},className:`absolute right-6 bottom-20 z-10 p-3 rounded-full shadow-lg backdrop-blur-sm border transition-all duration-200 hover:scale-105 ${i==="light"?"bg-white/90 text-gray-600 border-gray-200 hover:bg-white hover:text-gray-800":"bg-gray-800/90 text-gray-300 border-gray-700 hover:bg-gray-700 hover:text-white"}`,"aria-label":"Scroll to bottom",children:l.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 14l-7 7m0 0l-7-7m7 7V3"})})})]}),!u&&l.jsxs("div",{className:Q("flex-1 flex flex-col items-center w-full h-full min-h-0",(b==null?void 0:b.presentationMode)==="embedded"?"justify-end":"justify-center"),children:[l.jsx(le.div,{className:"w-full flex justify-center",animate:{y:(b==null?void 0:b.presentationMode)==="embedded"?-8:0},transition:{duration:.3,ease:"easeOut"},children:l.jsx(n0,{chatOpen:u,client:o},`media-tiles-${((Zt=(Kn=o==null?void 0:o.getCurrentSession)==null?void 0:Kn.call(o))==null?void 0:Zt.id)||"no-session"}`)}),l.jsx(Et,{mode:"wait",children:b&&b.presentationMode==="embedded"&&l.jsx(le.div,{initial:{opacity:0,y:20,height:0},animate:{opacity:1,y:0,height:"auto"},exit:{opacity:0,y:20,height:0},transition:{duration:.3,ease:"easeOut"},className:Q("w-full relative mt-4 flex justify-center",a==="fullscreen"?"max-w-4xl":"max-w-md"),children:l.jsx("div",{className:"bg-white/10 backdrop-blur-sm rounded-xl border border-white/20 shadow-lg overflow-hidden",children:l.jsx(un,{interaction:b,theme:i,onDismiss:()=>{var z;return(z=o==null?void 0:o.dismissCurrentInteraction)==null?void 0:z.call(o)},client:o,addLocalMessage:se})})},`embedded-${b.methodName}`)})]})]})]}),l.jsx(Et,{mode:"wait",children:b&&b.presentationMode!=="embedded"&&!u&&l.jsx("div",{className:Q("absolute inset-0 z-50 flex items-center justify-center backdrop-blur-sm",a==="fullscreen"?"bg-black/70":"bg-black/50"),children:l.jsx(le.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.9},transition:{duration:.2,ease:"easeOut"},className:Q("relative w-full overflow-hidden",a==="fullscreen"?"max-w-2xl mx-8 max-h-[85vh]":"max-w-lg mx-4 max-h-[80vh]","bg-white dark:bg-gray-900 rounded-2xl shadow-2xl","border border-gray-200 dark:border-gray-700"),children:l.jsx(un,{interaction:b,theme:i,onDismiss:()=>{var z;return(z=o==null?void 0:o.dismissCurrentInteraction)==null?void 0:z.call(o)},client:o,addLocalMessage:se})},`modal-${b.methodName}`)})}),l.jsx(le.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.2},className:"absolute bottom-0 left-0 right-0 flex-shrink-0 w-full z-20",children:l.jsx(Hx,{capabilities:t,onSendMessage:F,onSendAttachments:A,onEndCall:Z,onChatOpenChange:f,disabled:e,theme:i,client:o,sessionStarted:n})})]})});Nd.displayName="SessionView";function Hx({capabilities:e,onSendMessage:t,onSendAttachments:n,onEndCall:s,onChatOpenChange:r,disabled:i=!1,theme:o,client:a,sessionStarted:c=!1}){const[d,u]=w.useState(!1),f=w.useRef(null),h=w.useRef(null);w.useEffect(()=>{const C=()=>{const T=navigator.userAgent.toLowerCase(),v=["android","iphone","ipad","mobile","tablet"].some(E=>T.includes(E)),j="ontouchstart"in window||navigator.maxTouchPoints>0,V=window.innerWidth<=768;u(v||j&&V)};return C(),window.addEventListener("resize",C),()=>window.removeEventListener("resize",C)},[]);const p=C=>{const T=C.target.files;if(T&&T.length>0){const v=Array.from(T).filter(j=>j.type.startsWith("image/"));if(v.length===0){console.warn("No valid image files selected");return}n&&n(v),f.current&&(f.current.value="")}},x=C=>{const T=C.target.files;if(T&&T.length>0){const k=T[0];k.type.startsWith("image/")&&n&&n([k]),h.current&&(h.current.value="")}},m=()=>{!i&&f.current&&f.current.click()},b=()=>{!i&&d&&h.current&&h.current.click()},S=()=>{console.log("🔴 VoiceControlPanel: End call button clicked"),console.log("🔴 VoiceControlPanel: Current state:",{disabled:i,sessionStarted:c,hasOnEndCall:!!s}),s?s():console.warn("⚠️ VoiceControlPanel: No onEndCall function provided")};return l.jsx("div",{className:Q("px-3 py-2 !w-full backdrop-blur-xl border-0 shadow-lg",o==="light"?"bg-white/95 border-t border-gray-200":"bg-gray-900/95 border-t border-gray-700"),children:l.jsxs("div",{className:"flex items-center justify-between !w-full mx-auto max-w-4xl",children:[l.jsx("input",{ref:f,type:"file",multiple:!0,onChange:p,className:"hidden",accept:"image/*"}),l.jsx("input",{ref:h,type:"file",onChange:x,className:"hidden",accept:"image/*",capture:"environment"}),l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsx("button",{onClick:m,disabled:i,className:Q("p-2 rounded-full transition-all duration-200 hover:scale-105 active:scale-95",i?"opacity-50 cursor-not-allowed":"hover:shadow-md",o==="light"?"bg-gray-100 hover:bg-gray-200 text-gray-600":"bg-gray-700/50 hover:bg-gray-600/50 text-gray-300"),title:"Attach files",children:l.jsx(Fx,{className:"w-4 h-4"})}),d&&l.jsx("button",{onClick:b,disabled:i,className:Q("p-2 rounded-full transition-all duration-200 hover:scale-105 active:scale-95",i?"opacity-50 cursor-not-allowed":"hover:shadow-md",o==="light"?"bg-gray-100 hover:bg-gray-200 text-gray-600":"bg-gray-700/50 hover:bg-gray-600/50 text-gray-300"),title:"Take photo",children:l.jsx(Lx,{className:"w-4 h-4"})})]}),l.jsx("div",{className:"flex-1 flex justify-center px-2",children:l.jsx(Yp,{capabilities:e,onChatOpenChange:r,onSendMessage:t,theme:o,client:a,className:"border-none py-0 rounded-xl max-w-md w-full"})}),l.jsx("div",{className:"flex items-center",children:l.jsx("button",{onClick:S,disabled:i||!c,className:Q("p-2 rounded-full transition-all duration-200 hover:scale-105 active:scale-95",i||!c?"opacity-50 cursor-not-allowed":"hover:shadow-md","bg-red-500 hover:bg-red-600 text-white"),title:"End call",children:l.jsx(Ox,{className:"w-4 h-4"})})})]})})}function Ux({onSendMessage:e,onSendAttachments:t,disabled:n,theme:s,onEndChat:r}){const[i,o]=g.useState(""),[a,c]=g.useState(!1),d=g.useRef(null),u=g.useRef(null),[f,h]=g.useState(!1),p=_e(s);g.useEffect(()=>{const k=()=>{const v=navigator.userAgent.toLowerCase(),V=["android","iphone","ipad","mobile","tablet"].some(y=>v.includes(y)),E="ontouchstart"in window||navigator.maxTouchPoints>0,_=window.innerWidth<=768;h(V||E&&_)};return k(),window.addEventListener("resize",k),()=>window.removeEventListener("resize",k)},[]);const x=k=>{k.preventDefault(),i.trim()&&!n&&(e(i.trim()),o(""))},m=k=>{k.key==="Enter"&&!k.shiftKey&&(k.preventDefault(),x(k))},b=k=>{const v=k.target.files;if(v&&v.length>0){const j=Array.from(v),V=j.filter(E=>E.type.startsWith("image/"));if(V.length===0){console.warn("No valid image files selected");return}V.length!==j.length&&console.warn("Some non-image files were filtered out"),t(V),d.current&&(d.current.value="")}},S=()=>{!n&&d.current&&d.current.click()},C=()=>{!n&&f&&u.current&&u.current.click()},T=k=>{const v=k.target.files;if(v&&v.length>0){const j=v[0];j.type.startsWith("image/")?t([j]):console.warn("Selected file is not an image"),u.current&&(u.current.value="")}};return l.jsx("div",{className:"px-4 py-3 !w-full backdrop-blur-xl border-0 shadow-lg ",children:l.jsx("form",{onSubmit:x,className:"flex items-center !w-full mx-auto max-w-4xl",children:l.jsxs("div",{className:`flex items-center gap-2 !w-full backdrop-blur-md rounded-full px-3 py-2 shadow-sm hover:shadow-md focus-within:shadow-lg focus-within:ring-2 focus-within:ring-blue-500/30 focus-within:border-blue-500/50 transition-all duration-200 border ${s==="light"?"bg-white/90 border-gray-200":p.chatInput.container}`,children:[l.jsx(le.button,{type:"button",onClick:S,whileHover:{scale:1.05},whileTap:{scale:.95},className:`p-1 rounded-full transition-all duration-200 border-0 ${p.chatInput.attachButton}`,disabled:n,"aria-label":"Attach file",children:l.jsx($e.Paperclip,{className:"w-4 h-4"})}),f&&l.jsx(le.button,{type:"button",onClick:C,whileHover:{scale:1.05},whileTap:{scale:.95},className:`p-1 rounded-full transition-all duration-200 border-0 ${p.chatInput.attachButton}`,disabled:n,"aria-label":"Take photo",children:l.jsx($e.Camera,{className:"w-4 h-4"})}),l.jsx("input",{ref:d,type:"file",multiple:!0,onChange:b,className:"hidden",accept:"image/*"}),l.jsx("input",{ref:u,type:"file",onChange:T,className:"hidden",accept:"image/*",capture:"environment"}),l.jsx("textarea",{value:i,onChange:k=>o(k.target.value),onKeyDown:m,onFocus:()=>c(!0),onBlur:()=>c(!1),placeholder:"Type your message...",disabled:n,className:`flex-1 px-2 py-1 bg-transparent resize-none min-h-[32px] max-h-20 focus:outline-none text-sm border-0 ${p.chatInput.textarea}`,rows:1,style:{height:"auto",minHeight:"32px"},onInput:k=>{const v=k.target;v.style.height="auto",v.style.height=`${Math.min(v.scrollHeight,80)}px`}}),l.jsx(le.button,{type:"submit",disabled:n||!i.trim(),whileHover:{scale:1.05},whileTap:{scale:.95},className:`p-1 rounded-full transition-all duration-200 border-0 flex-shrink-0 ${i.trim()&&!n?p.chatInput.sendButton:s==="light"?"bg-gray-200 text-gray-400 cursor-not-allowed opacity-70":"bg-gray-600/50 text-gray-500 cursor-not-allowed opacity-50"}`,"aria-label":"Send message",children:l.jsx($e.SendHorizontal,{className:"w-4 h-4"})}),r&&l.jsx(le.button,{type:"button",onClick:r,whileHover:{scale:1.05},whileTap:{scale:.95},className:`p-1 rounded-full transition-all duration-200 border-0 flex-shrink-0 ${p.chatInput.endButton}`,"aria-label":"End chat",children:l.jsx($e.PhoneOff,{className:"w-4 h-4"})})]})})})}function zx({text:e,isComplete:t,isRealTimeStream:n=!1,speed:s=50}){const[r,i]=g.useState(""),[o,a]=g.useState(0);return g.useEffect(()=>{if(n){i(e);return}if(t){i(e);return}if(o<e.length){const c=setTimeout(()=>{i(e.slice(0,o+1)),a(o+1)},s);return()=>clearTimeout(c)}},[e,o,t,s,n]),g.useEffect(()=>{n||(a(0),i(""))},[e,n]),l.jsxs("span",{className:"relative",children:[l.jsx("span",{className:"inline-block",children:r}),!t&&l.jsx("span",{className:"inline-flex items-center ml-1",children:[0,1,2].map(c=>l.jsx(le.span,{className:"w-1.5 h-1.5 bg-current rounded-full mx-0.5",animate:{y:[0,-4,0],opacity:[.4,1,.4],scale:[.8,1,.8]},transition:{duration:.8,repeat:1/0,repeatType:"mirror",delay:c*.2,ease:"easeInOut"}},c))})]})}function Wx({message:e,theme:t,isOwn:n,isStreaming:s=!1}){var o,a;const r=_e(t),i=e.sender.name?e.sender.name.split(" ").map(c=>c[0]).join("").toUpperCase().slice(0,2):"U";return l.jsx("div",{className:`flex w-full ${n?"justify-end":"justify-start"} mb-4 px-1`,children:l.jsxs("div",{className:`relative group ${n?"flex-row-reverse":"flex-row"} flex items-end gap-3 max-w-[85%]`,children:[l.jsx("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-white text-xs font-semibold flex-shrink-0 shadow-lg ${n?t==="light"?"bg-gradient-to-br from-blue-500 to-purple-600":"bg-gradient-to-br from-gray-600 to-gray-700":t==="light"?"bg-gradient-to-br from-blue-500 to-purple-600":"bg-gradient-to-br from-gray-600 to_gray-700"}`,children:i}),l.jsxs("div",{className:`
108
108
  relative px-3 py-2 rounded-2xl break-words shadow-lg backdrop-blur-sm message-bubble message-hover
109
109
  ${n?`${r.chatMessage.own} rounded-br-md`:`${r.chatMessage.other} rounded-bl-md`}
110
110
  ${s?"shimmer":""}
111
111
  transition-all duration-200 group-hover:scale-[1.02]
112
- `,style:{wordWrap:"break-word",overflowWrap:"break-word"},children:[c.jsx("div",{className:"whitespace-pre-wrap break-words leading-relaxed text-sm",children:((o=e.metadata)==null?void 0:o.type)==="attachment"?c.jsx(K1,{message:e,theme:t,isOwn:n}):s&&!n?c.jsx(z1,{text:e.content,isComplete:!s,isRealTimeStream:((a=e.metadata)==null?void 0:a.streaming)===!0,speed:35}):e.content}),c.jsx("div",{className:"text-xs",children:e.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]})]})})}function Z1(e,t){return e.startsWith("image/")?$e.Image:e.startsWith("video/")?$e.Video:e.startsWith("audio/")?$e.Music:e.includes("zip")||e.includes("rar")||e.includes("archive")?$e.Archive:$e.FileText}function G1(e){if(e===0)return"0 Bytes";const t=1024,n=["Bytes","KB","MB","GB"],s=Math.floor(Math.log(e)/Math.log(t));return parseFloat((e/Math.pow(t,s)).toFixed(2))+" "+n[s]}function K1({message:e,theme:t,isOwn:n}){const s=Le(t),r=e.metadata,i=(r==null?void 0:r.fileName)||"Unknown file",o=(r==null?void 0:r.fileSize)||0,a=(r==null?void 0:r.mimeType)||"application/octet-stream",l=r==null?void 0:r.downloading,d=r==null?void 0:r.uploading,u=(r==null?void 0:r.downloadProgress)||0,h=(r==null?void 0:r.uploadProgress)||0,m=r==null?void 0:r.downloadUrl,g=r==null?void 0:r.file,x=Z1(a),f=l||d,b=l?u:h,k=l?"Downloading...":d?"Uploading...":"Complete",[S,T]=p.useState(null);p.useEffect(()=>{if(m)T(m);else if(g&&a.startsWith("image/")){const V=URL.createObjectURL(g);return T(V),()=>URL.revokeObjectURL(V)}else T(null)},[m,g,a]);const C=()=>{if(m){const V=document.createElement("a");V.href=m,V.download=i,V.click()}},A=a.startsWith("image/")&&S;return c.jsxs("div",{className:"flex flex-col gap-2 max-w-sm",children:[A&&c.jsxs("div",{className:"relative rounded-lg overflow-hidden",children:[c.jsx("img",{src:S,alt:i,className:"max-w-full h-auto max-h-48 object-cover rounded-lg cursor-pointer",onClick:C}),c.jsx("div",{className:"absolute inset-0 bg-black/0 hover:bg-black/10 transition-colors duration-200 cursor-pointer"})]}),c.jsxs("div",{className:`
112
+ `,style:{wordWrap:"break-word",overflowWrap:"break-word"},children:[l.jsx("div",{className:"whitespace-pre-wrap break-words leading-relaxed text-sm",children:((o=e.metadata)==null?void 0:o.type)==="attachment"?l.jsx(Kx,{message:e,theme:t,isOwn:n}):s&&!n?l.jsx(zx,{text:e.content,isComplete:!s,isRealTimeStream:((a=e.metadata)==null?void 0:a.streaming)===!0,speed:35}):e.content}),l.jsx("div",{className:"text-xs",children:e.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]})]})})}function Zx(e,t){return e.startsWith("image/")?$e.Image:e.startsWith("video/")?$e.Video:e.startsWith("audio/")?$e.Music:e.includes("zip")||e.includes("rar")||e.includes("archive")?$e.Archive:$e.FileText}function Gx(e){if(e===0)return"0 Bytes";const t=1024,n=["Bytes","KB","MB","GB"],s=Math.floor(Math.log(e)/Math.log(t));return parseFloat((e/Math.pow(t,s)).toFixed(2))+" "+n[s]}function Kx({message:e,theme:t,isOwn:n}){const s=_e(t),r=e.metadata,i=(r==null?void 0:r.fileName)||"Unknown file",o=(r==null?void 0:r.fileSize)||0,a=(r==null?void 0:r.mimeType)||"application/octet-stream",c=r==null?void 0:r.downloading,d=r==null?void 0:r.uploading,u=(r==null?void 0:r.downloadProgress)||0,f=(r==null?void 0:r.uploadProgress)||0,h=r==null?void 0:r.downloadUrl,p=r==null?void 0:r.file,x=Zx(a),m=c||d,b=c?u:f,S=c?"Downloading...":d?"Uploading...":"Complete",[C,T]=g.useState(null);g.useEffect(()=>{if(h)T(h);else if(p&&a.startsWith("image/")){const V=URL.createObjectURL(p);return T(V),()=>URL.revokeObjectURL(V)}else T(null)},[h,p,a]);const k=()=>{if(h){const V=document.createElement("a");V.href=h,V.download=i,V.click()}},j=a.startsWith("image/")&&C;return l.jsxs("div",{className:"flex flex-col gap-2 max-w-sm",children:[j&&l.jsxs("div",{className:"relative rounded-lg overflow-hidden",children:[l.jsx("img",{src:C,alt:i,className:"max-w-full h-auto max-h-48 object-cover rounded-lg cursor-pointer",onClick:k}),l.jsx("div",{className:"absolute inset-0 bg-black/0 hover:bg-black/10 transition-colors duration-200 cursor-pointer"})]}),l.jsxs("div",{className:`
113
113
  flex items-center gap-3 p-3 rounded-lg border transition-all duration-200
114
114
  ${t==="light"?"bg-gray-50 border-gray-200 hover:bg-gray-100":"bg-gray-800/50 border-gray-700 hover:bg-gray-700/50"}
115
- `,children:[c.jsx("div",{className:`
115
+ `,children:[l.jsx("div",{className:`
116
116
  p-2 rounded-lg flex-shrink-0
117
117
  ${t==="light"?"bg-blue-100 text-blue-600":"bg-blue-900/50 text-blue-400"}
118
- `,children:c.jsx(x,{className:"w-5 h-5"})}),c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsx("div",{className:`font-medium text-sm truncate ${s.text.primary}`,children:i}),c.jsxs("div",{className:`text-xs ${s.text.muted}`,children:[o>0&&G1(o),f&&c.jsxs(c.Fragment,{children:[o>0&&" • ",k," ",Math.round(b*100),"%"]})]}),f&&c.jsx("div",{className:`
118
+ `,children:l.jsx(x,{className:"w-5 h-5"})}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("div",{className:`font-medium text-sm truncate ${s.text.primary}`,children:i}),l.jsxs("div",{className:`text-xs ${s.text.muted}`,children:[o>0&&Gx(o),m&&l.jsxs(l.Fragment,{children:[o>0&&" • ",S," ",Math.round(b*100),"%"]})]}),m&&l.jsx("div",{className:`
119
119
  w-full h-1 rounded-full mt-1 overflow-hidden
120
120
  ${t==="light"?"bg-gray-200":"bg-gray-700"}
121
- `,children:c.jsx(ue.div,{className:`h-full ${t==="light"?"bg-blue-500":"bg-blue-400"}`,initial:{width:0},animate:{width:`${b*100}%`},transition:{duration:.3}})})]}),m&&!f&&c.jsx(ue.button,{onClick:C,whileHover:{scale:1.05},whileTap:{scale:.95},className:`
121
+ `,children:l.jsx(le.div,{className:`h-full ${t==="light"?"bg-blue-500":"bg-blue-400"}`,initial:{width:0},animate:{width:`${b*100}%`},transition:{duration:.3}})})]}),h&&!m&&l.jsx(le.button,{onClick:k,whileHover:{scale:1.05},whileTap:{scale:.95},className:`
122
122
  p-2 rounded-lg transition-colors duration-200
123
123
  ${t==="light"?"hover:bg-gray-200 text-gray-600 hover:text-gray-800":"hover:bg-gray-600 text-gray-400 hover:text-gray-200"}
124
- `,"aria-label":"Download file",children:c.jsx($e.Download,{className:"w-4 h-4"})})]})]})}function Y1(){return c.jsxs("div",{className:"max-w-xs mx-auto bg-green-50 border border-green-200 rounded-lg shadow p-3 flex flex-col items-center",children:[c.jsx("div",{className:"text-2xl mb-2",children:"✅"}),c.jsx("div",{className:"text-green-700 font-semibold text-sm mb-1",children:"Success!"}),c.jsx("div",{className:"text-xs text-gray-600 text-center mb-1",children:"Your action was completed successfully."})]})}function q1(){return c.jsxs("div",{className:"max-w-xs mx-auto bg-yellow-50 border border-yellow-200 rounded-lg shadow p-3 flex flex-col items-center",children:[c.jsx("div",{className:"text-2xl mb-2",children:"⏰"}),c.jsx("div",{className:"text-yellow-700 font-semibold text-sm mb-1",children:"Interaction timed out"}),c.jsx("div",{className:"text-xs text-gray-600 text-center mb-1",children:"No response was provided in time."})]})}function X1({client:e,theme:t="vox",onBack:n,disabled:s=!1,displayType:r="widget",onEndChat:i}){const[o,a]=p.useState(()=>e&&typeof e.getChatMessages=="function"?e.getChatMessages():[]),[l,d]=p.useState(!0),[u,h]=p.useState(()=>{const N=e&&typeof e.getCurrentSession=="function"&&!!e.getCurrentSession(),$=e&&typeof e.getChatMessages=="function"&&e.getChatMessages().length>0;return!N&&!$}),[m,g]=p.useState(new Set),[x,f]=p.useState([]),[b,k]=p.useState(!1),[S,T]=p.useState(!1),[C,w]=p.useState(()=>e.getCurrentInteraction()),A=p.useRef(null),V=p.useRef(null),[E,F]=p.useState(!0),y=Le(t);p.useEffect(()=>{const N=()=>{const $=navigator.userAgent.toLowerCase(),P=["android","iphone","ipad","mobile","tablet"].some(ae=>$.includes(ae)),z="ontouchstart"in window||navigator.maxTouchPoints>0,te=window.innerWidth<=768,le=P||z&&te;k(le),le&&r==="widget"&&T(!0)};return N(),window.addEventListener("resize",N),()=>window.removeEventListener("resize",N)},[r]),p.useEffect(()=>(S&&b&&(document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.width="100%",document.body.style.height="100%",document.documentElement.requestFullscreen&&document.documentElement.requestFullscreen().catch(console.log)),()=>{S&&b&&(document.body.style.overflow="unset",document.body.style.position="unset",document.body.style.width="unset",document.body.style.height="unset",document.fullscreenElement&&document.exitFullscreen().catch(console.log))}),[S,b]);const R=e.getCurrentAgentInfo(),H=(R==null?void 0:R.name)||"AI Assistant",se=H.split(" ").map(N=>N[0]).join("").toUpperCase().slice(0,2),ne=p.useCallback(N=>{const $={id:`local_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,content:N,timestamp:new Date,sender:{id:"participant",name:"You",type:"participant"},metadata:{isLocal:!0}};a(de=>[...de,$])},[]),oe=p.useCallback((N=!1)=>{if(V.current){const $=V.current;N?$.scrollTop=$.scrollHeight:$.scrollTo({top:$.scrollHeight,behavior:"smooth"})}},[]),ce=p.useCallback(()=>{if(V.current){const{scrollTop:N,scrollHeight:$,clientHeight:de}=V.current;return $-N-de<100}return!0},[]),ee=p.useCallback(()=>{const N=ce();F(N)},[ce]),I=p.useCallback((N=!1)=>{E&&oe(N)},[E,oe]);p.useEffect(()=>{if(E&&o.length>0){I(!0);const N=setTimeout(()=>{E&&I(!1)},10);return()=>clearTimeout(N)}},[o.length,I,E]),p.useEffect(()=>{if(C&&E){I(!0);const N=setTimeout(()=>{E&&I(!1)},50);return()=>clearTimeout(N)}},[C,I,E]),p.useEffect(()=>{const N=P=>{if(console.log("ChatView: Received message:",P),h(!1),C&&P.sender.type==="agent"){console.log("ChatView: Queuing agent message due to active interaction:",C.methodName),f(z=>[...z,P]);return}P.sender.type==="agent"&&d(!1),a(z=>{var le;if(z.some(ae=>ae.id===P.id))return console.log("ChatView: Message already exists, skipping:",P.id),z;if(console.log("ChatView: Adding new message:",P.id),P.sender.type==="agent"&&(g(ae=>new Set(ae).add(P.id)),!((le=P.metadata)!=null&&le.streaming))){const ae=P.content.length*35+1e3;setTimeout(()=>{g(Fe=>{const Ne=new Set(Fe);return Ne.delete(P.id),Ne})},ae)}return[...z,P]}),setTimeout(()=>{E&&I(!0)},0)},$=P=>{var z;if(console.log("ChatView: Updated message:",P),C&&P.sender.type==="agent"){console.log("ChatView: Queuing agent message update due to active interaction:",C.methodName),f(te=>{const le=te.findIndex(ae=>ae.id===P.id);if(le>=0){const ae=[...te];return ae[le]=P,ae}else return[...te,P]});return}a(te=>te.map(le=>le.id===P.id?{...P}:le)),setTimeout(()=>{E&&I(!0)},0),(z=P.metadata)!=null&&z.streaming||g(te=>{const le=new Set(te);return le.delete(P.id),le})},de=P=>{console.log("ChatView: Sent message:",P),h(!1),a(z=>z.some(le=>le.id===P.id)?(console.log("ChatView: Sent message already exists, skipping:",P.id),z):(console.log("ChatView: Adding sent message:",P.id),[...z,P])),setTimeout(()=>{E&&I(!0)},0)};return e.on("chat.message.received",N),e.on("chat.message.updated",$),e.on("chat.message.sent",de),()=>{e.off("chat.message.received",N),e.off("chat.message.updated",$),e.off("chat.message.sent",de)}},[e,C,E,I]),p.useEffect(()=>{const N=z=>{console.log("ChatView: RPC interaction started:",z);const te=e.getCurrentInteraction();console.log("ChatView: Got interaction from client:",te==null?void 0:te.methodName),w(te),d(!1),E&&(I(!0),setTimeout(()=>{E&&I(!1)},100))},$=z=>{if(console.log("ChatView: RPC interaction completed:",z),w(null),x.length>0&&(console.log("ChatView: Processing",x.length,"queued messages"),a(te=>{const le=[...te];return x.forEach(ae=>{var Ne;if(!le.some(Ce=>Ce.id===ae.id)&&(console.log("ChatView: Adding queued message:",ae.id),le.push(ae),ae.sender.type==="agent"&&(g(Ce=>new Set(Ce).add(ae.id)),!((Ne=ae.metadata)!=null&&Ne.streaming)))){const Ce=ae.content.length*35+1e3;setTimeout(()=>{g(Be=>{const Ye=new Set(Be);return Ye.delete(ae.id),Ye})},Ce)}}),le}),f([]),setTimeout(()=>{E&&I(!0)},0)),z&&z.response&&z.response.success){let te=null;z.response.successView?te=z.response.successView:z.successView&&(te=z.successView),a(le=>{const ae=[...le].reverse().findIndex(Be=>Be.sender.type==="participant");let Fe=le.length;ae!==-1&&(Fe=le.length-ae);const Ne={id:`success_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,content:"",timestamp:new Date,sender:{id:"participant",name:"You",type:"participant"},metadata:{type:"successView",view:te||c.jsx(Y1,{})}};e&&typeof e.addChatMessage=="function"&&e.addChatMessage(Ne);const Ce=[...le];return Ce.splice(Fe,0,Ne),Ce})}},de=async z=>{C&&(console.log("ChatView: Dismissing active interaction due to timeout"),e.dismissCurrentInteraction()),w(null),x.length>0&&(console.log("ChatView: Processing",x.length,"queued messages after timeout"),a(le=>{const ae=[...le];return x.forEach(Fe=>{var Ce;if(!ae.some(Be=>Be.id===Fe.id)&&(ae.push(Fe),Fe.sender.type==="agent"&&(g(Be=>new Set(Be).add(Fe.id)),!((Ce=Fe.metadata)!=null&&Ce.streaming)))){const Be=Fe.content.length*35+1e3;setTimeout(()=>{g(Ye=>{const dt=new Set(Ye);return dt.delete(Fe.id),dt})},Be)}}),ae}),f([]),setTimeout(()=>{E&&I(!0)},0));let te=null;z&&z.response&&z.response.timeoutView?te=z.response.timeoutView:z&&z.timeoutView&&(te=z.timeoutView),a(le=>{const ae={id:`timeout_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,content:"",timestamp:new Date,sender:{id:"agent",name:H,type:"agent"},metadata:{type:"timeoutView",view:te||c.jsx(q1,{})}};return e&&typeof e.addChatMessage=="function"&&e.addChatMessage(ae),[...le,ae]}),setTimeout(()=>{e.getCurrentInteraction()||w(null)},100)},P=async z=>{console.log("ChatView: RPC interaction dismissed:",z),console.log("ChatView: Current interaction before dismiss:",C==null?void 0:C.methodName),w(null),x.length>0&&(console.log("ChatView: Processing",x.length,"queued messages after dismissal"),a(te=>{const le=[...te];return x.forEach(ae=>{var Ne;if(!le.some(Ce=>Ce.id===ae.id)&&(le.push(ae),ae.sender.type==="agent"&&(g(Ce=>new Set(Ce).add(ae.id)),!((Ne=ae.metadata)!=null&&Ne.streaming)))){const Ce=ae.content.length*35+1e3;setTimeout(()=>{g(Be=>{const Ye=new Set(Be);return Ye.delete(ae.id),Ye})},Ce)}}),le}),f([]),setTimeout(()=>{E&&I(!0)},0)),setTimeout(()=>{const te=e.getCurrentInteraction();console.log("ChatView: Latest interaction from client after dismiss:",(te==null?void 0:te.methodName)||"null"),te===null&&w(null)},50),console.log("ChatView: Set currentInteraction to null after dismiss")};return e.on("rpc.interaction.started",N),e.on("rpc.interaction.completed",$),e.on("rpc.interaction.timeout",de),e.on("rpc.interaction.dismissed",P),()=>{e.off("rpc.interaction.started",N),e.off("rpc.interaction.completed",$),e.off("rpc.interaction.timeout",de),e.off("rpc.interaction.dismissed",P)}},[e,E,I,H,x]),p.useEffect(()=>{const N=()=>{if(console.log("ChatView: Agent is thinking"),C){console.log("ChatView: Suppressing thinking indicator due to active interaction:",C.methodName);return}d(!0)},$=()=>{console.log("ChatView: Agent is speaking"),d(!1)};return e.on("agent.thinking",N),e.on("agent.speaking",$),()=>{e.off("agent.thinking",N),e.off("agent.speaking",$)}},[e,C]),p.useEffect(()=>{const N=e.getCurrentInteraction();N?(console.log("ChatView: Restoring interaction state on mount/client change:",N.methodName),w(N)):w(null)},[e]),p.useEffect(()=>{console.log("ChatView: Display type changed to:",r,"Current interaction:",(C==null?void 0:C.methodName)||"none")},[r,C]);const W=async N=>{try{C&&(console.log("ChatView: Dismissing active interaction due to user message send"),e.dismissCurrentInteraction(),w(null)),await e.sendChatMessage(N)}catch($){console.error("Failed to send message:",$)}},j=async N=>{try{C&&(console.log("ChatView: Dismissing active interaction due to user attachment send"),e.dismissCurrentInteraction(),w(null)),await e.sendAttachments(N),console.log("Attachments sent successfully:",N.map($=>$.name))}catch($){console.error("Failed to send attachments:",$)}},[B,L]=p.useState([]);if(p.useEffect(()=>{const N=$=>{L(Array.isArray($)?$:["tes","hello how are you","algebra make me learn that ","what is the meaning of life"])};return e.on("suggested.response",N),()=>{e.off("suggested.response",N)}},[e]),u){const N=S&&b?"fixed inset-0 z-[9999] flex flex-col items-center justify-center h-screen w-screen bg-black":"flex w-full flex-col items-center justify-center h-full p-8";return c.jsxs("div",{className:N,children:[c.jsx("div",{className:`${y.spinner} w-12 h-12 mb-6`}),c.jsxs("p",{className:`text-sm text-center ${S&&b?"text-white":""}`,children:["Connecting to ",H,"..."]})]})}const Z=S&&b?"fullscreen":r,O=Z==="fullscreen"?S&&b?"fixed inset-0 z-[9999] flex flex-col h-screen w-screen bg-black":"flex flex-col h-full w-full max-w-none":"flex flex-col h-full w-full backdrop-blur-sm max-h-full overflow-hidden contain-layout",Q=Z==="fullscreen"?S&&b?"flex items-center w-full justify-between px-4 pt-3 pb-3 bg-black/80 text-white border-b border-gray-700":`flex items-center w-full justify-between px-6 pt-5 pb-4 border-b ${y.chatHeader.container}`:`flex items-center w-full justify-between px-4 pt-5 pb-4 border-b ${y.chatHeader.container}`,G=Z==="fullscreen"?S&&b?"flex-1 overflow-y-auto overflow-x-hidden scrollbar-hide p-4 w-full max-w-none chat-scrollable min-h-0":"flex-1 overflow-y-auto overflow-x-hidden scrollbar-hide p-6 w-full max-w-none chat-scrollable min-h-0":"flex-1 overflow-y-auto overflow-x-hidden scrollbar-hide w-full p-4 chat-scrollable min-h-0",K="flex-shrink-0 !w-full",q=()=>{T(!1),n&&n()};return c.jsxs("div",{className:`${O} relative`,children:[c.jsx("div",{className:Q,children:c.jsxs("div",{className:"flex items-center gap-2",children:[S&&b&&c.jsx(ue.button,{onClick:q,whileHover:{scale:1.05},whileTap:{scale:.95},className:"p-2 rounded-full bg-white/20 hover:bg-white/30 text-white transition-colors mr-2","aria-label":"Exit fullscreen",children:"✕"}),c.jsxs("div",{children:[c.jsx("h3",{className:`font-semibold text-base leading-tight ${S&&b?"text-white":y.text.primary}`,children:H}),c.jsxs("p",{className:`text-xs flex items-center gap-1.5 mt-0.5 ${S&&b?"text-gray-300":y.text.muted}`,children:[c.jsx("span",{className:"w-1.5 h-1.5 bg-green-500 rounded-full animate-pulse"}),"Online"]})]})]})}),c.jsxs("div",{ref:V,className:`${G} flex flex-col`,style:{scrollBehavior:"smooth",scrollbarWidth:"none",contain:"layout style paint",overscrollBehavior:"contain"},onScroll:ee,children:[" ",o.length===0?c.jsxs("div",{className:"flex flex-col items-center justify-center flex-1 text-center py-12",children:[c.jsx(ue.div,{transition:{duration:2,repeat:1/0,ease:"easeInOut"},className:"w-16 h-16 rounded-full bg-gradient-to-br from-blue-500 to-purple-600 flex items-center justify-center text-white font-bold text-xl mb-6 shadow-xl",children:se}),c.jsxs("p",{className:`text-base mb-2 ${S&&b?"text-white":y.text.secondary}`,children:[H," is joining..."]}),c.jsx("p",{className:`text-xs ${S&&b?"text-gray-300":y.text.muted}`,children:"Your conversation will begin shortly"})]}):c.jsx("div",{className:"w-full max-w-5xl mx-auto space-y-3 py-4 flex-1 flex flex-col justify-end",children:c.jsxs("div",{className:"space-y-3",children:[o.map((N,$)=>{var de,P;return c.jsx("div",{children:((de=N.metadata)==null?void 0:de.type)==="successView"?c.jsx("div",{className:"flex w-full justify-end mb-4 px-1",children:c.jsxs("div",{className:"relative group flex-row-reverse flex items-end gap-3 max-w-[85%]",children:[c.jsx(ue.div,{initial:{scale:0},animate:{scale:1},transition:{delay:.1},className:`w-6 h-6 rounded-full flex items-center justify-center text-white text-xs font-semibold flex-shrink-0 shadow-lg ${t==="light"?"bg-gradient-to-br from-blue-500 to-purple-600":"bg-gradient-to-br from-gray-600 to-gray-700"}`,children:"Y"}),c.jsxs("div",{className:`flex h-full flex-col justify-between border px-3 py-2 rounded-2xl shadow-lg backdrop-bl-sm message-bubble rounded-br-md message-hover border-gray-200 dark:border-gray-700 ${y.chatMessage.own}`,children:[N.metadata.view,c.jsx("div",{className:`text-xs ${y.text.muted} mt-1 opacity-0 group-hover:opacity-100 transition-opacity duration-200 `,children:N.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]})]})}):((P=N.metadata)==null?void 0:P.type)==="timeoutView"?c.jsx("div",{className:"flex w-full justify-start mb-4 px-1",children:c.jsxs("div",{className:"relative group flex-row flex items-end gap-3 max-w-[85%]",children:[c.jsx("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-white text-xs font-semibold flex-shrink-0 shadow-lg ${t==="light"?"bg-gradient-to-br from-blue-500 to-purple-600":"bg-gradient-to-br from-gray-600 to_gray-700"}`,children:se}),c.jsxs("div",{className:`flex h-full flex-col justify-between border px-3 py-2 rounded-2xl shadow-lg backdrop-bl-sm message-bubble rounded-bl-md message-hover border-gray-200 dark:border-gray-700 ${y.chatMessage.other}`,children:[N.metadata.view,c.jsx("div",{className:`text-xs ${y.text.muted} mt-1 opacity-0 group-hover:opacity-100 transition-opacity duration-200 `,children:N.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]})]})}):c.jsx(W1,{message:N,theme:t,isOwn:N.sender.type==="participant",isStreaming:m.has(N.id)})},N.id)}),l&&!C&&c.jsx(ue.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:o.length*.1},className:"flex w-full justify-start mb-4 px-1",children:c.jsxs("div",{className:"relative group flex-row flex items-end gap-3 max-w-[85%]",children:[c.jsx("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-white text-xs font-semibold flex-shrink-0 shadow-lg ${t==="light"?"bg-gradient-to-br from-blue-500 to-purple-600":"bg-gradient-to-br from-gray-600 to-gray-700"}`,children:se}),c.jsx("div",{className:`relative px-3 py-2 rounded-2xl break-words shadow-lg backdrop-blur-sm message-bubble message-hover ${y.chatMessage.other} rounded-bl-md transition-all duration-200 group-hover:scale-[1.02]`,style:{wordWrap:"break-word",overflowWrap:"break-word",minWidth:48},children:c.jsx("span",{className:"inline-flex items-center",children:[0,1,2].map(N=>c.jsx(ue.span,{className:"w-1.5 h-1.5 bg-current rounded-full mx-0.5",animate:{y:[0,-4,0],opacity:[.4,1,.4],scale:[.8,1,.8]},transition:{duration:.8,repeat:1/0,repeatType:"mirror",delay:N*.2,ease:"easeInOut"}},N))})})]})}),C&&C.presentationMode==="embedded"&&c.jsxs("div",{className:"relative group flex-row flex items-end gap-3 max-w-[85%]",children:[c.jsx(ue.div,{initial:{scale:0},animate:{scale:1},transition:{delay:.1},className:`w-6 h-6 rounded-full flex items-center justify-center text-white text-xs font-semibold flex-shrink-0 shadow-lg ${t==="light"?"bg-gradient-to-br from-blue-500 to-purple-600":"bg-gradient-to-br from-gray-600 to_gray-700"}`,children:se}),c.jsxs("div",{className:`flex h-full flex-col justify-between border px-3 py-2 rounded-2xl shadow-lg backdrop-bl-sm message-bubble rounded-bl-md message-hover border-gray-200 dark:border-gray-700 ${y.chatMessage.other}`,children:[c.jsx(fn,{interaction:C,theme:t,onDismiss:()=>e.dismissCurrentInteraction(),client:e,addLocalMessage:ne},C.methodName),c.jsx(ue.div,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.2},className:`text-xs ${y.text.muted} mt-1 opacity-0 group-hover:opacity-100 transition-opacity duration-200 `,children:new Date().toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]})]}),c.jsx("div",{ref:A})]})})]}),!E&&c.jsx(ue.button,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},onClick:()=>{F(!0),oe(!1)},className:`absolute right-6 bottom-20 z-10 p-3 rounded-full shadow-lg backdrop-blur-sm border transition-all duration-200 hover:scale-105 ${t==="light"?"bg-white/90 text-gray-600 border-gray-200 hover:bg-white hover:text-gray-800":"bg-gray-800/90 text-gray-300 border-gray-700 hover:bg-gray-700 hover:text-white"}`,"aria-label":"Scroll to bottom",children:c.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 14l-7 7m0 0l-7-7m7 7V3"})})}),B.length>0&&c.jsx("div",{className:"w-full flex overflow-x-auto gap-2 px-4 py-2 mb-1 scrollbar-hide",children:B.map((N,$)=>{var de;return c.jsx("button",{className:`whitespace-nowrap px-3 py-1 rounded-full border shadow-sm flex-shrink-0 transition-all duration-150 font-medium text-sm focus:outline-none focus:ring-2 focus:ring-blue-400/40
125
- ${t==="light"?"bg-white text-blue-700 border-blue-200 hover:bg-blue-50 hover:text-blue-900":t==="dark"?"bg-gray-800 text-blue-300 border-gray-700 hover:bg-gray-700 hover:text-white":((de=y.suggestedResponse)==null?void 0:de.container)||"bg-gradient-to-br from-blue-500 to-purple-600 text-white border-blue-400 hover:from-blue-600 hover:to-purple-700"}
126
- `,style:{boxShadow:t==="vox"?"0 2px 8px 0 rgba(80,60,200,0.10)":void 0,borderWidth:1},onClick:()=>{W(N),L([])},children:N},N+$)})}),C&&C.presentationMode!=="embedded"&&c.jsx(fn,{interaction:C,theme:t,onDismiss:()=>e.dismissCurrentInteraction(),client:e,addLocalMessage:ne},C.methodName),c.jsx(ue.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.2},className:K,children:c.jsx(U1,{onSendMessage:W,onSendAttachments:j,disabled:s,theme:t,onEndChat:i})})]})}function J1({onToggleCamera:e,onToggleScreenShare:t,onEndCall:n,onBack:s,theme:r,cameraEnabled:i,screenShareEnabled:o,isCameraLoading:a,isScreenShareLoading:l,disabled:d}){const u=Le(r);return c.jsxs("div",{className:`flex items-center justify-center gap-3 p-4 ${u.video.controlsBackground}`,children:[c.jsx("button",{onClick:e,disabled:d||a,className:`p-3 rounded-full transition-all duration-200 ${i?u.video.controlEnabled:u.video.controlDisabled} ${d?"opacity-50 cursor-not-allowed":"hover:scale-105"}`,title:i?"Turn off camera":"Turn on camera",children:a?c.jsx("div",{className:"w-5 h-5 animate-spin rounded-full border-2 border-current border-t-transparent"}):i?c.jsx($e.Camera,{className:"w-5 h-5"}):c.jsx($e.CameraOff,{className:"w-5 h-5"})}),c.jsx("button",{onClick:t,disabled:d||l,className:`p-3 rounded-full transition-all duration-200 ${o?u.video.controlEnabled:u.video.controlDisabled} ${d?"opacity-50 cursor-not-allowed":"hover:scale-105"}`,title:o?"Stop screen share":"Share screen",children:l?c.jsx("div",{className:"w-5 h-5 animate-spin rounded-full border-2 border-current border-t-transparent"}):o?c.jsx($e.MonitorOff,{className:"w-5 h-5"}):c.jsx($e.Monitor,{className:"w-5 h-5"})}),n&&c.jsx("button",{onClick:n,disabled:d,className:`p-3 rounded-full transition-all duration-200 ${u.video.endCall} ${d?"opacity-50 cursor-not-allowed":"hover:scale-105"}`,title:"End call",children:c.jsx($e.PhoneOff,{className:"w-5 h-5"})}),s&&c.jsx("button",{onClick:s,disabled:d,className:`p-3 rounded-full transition-all duration-200 ${u.video.controlDisabled} ${d?"opacity-50 cursor-not-allowed":"hover:scale-105"}`,title:"Back",children:c.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 19l-7-7m0 0l7-7m-7 7h18"})})})]})}function oc({trackRef:e,participant:t,isLocal:n=!1,className:s="",theme:r}){var l;const i=Le(r),o=(t==null?void 0:t.name)||(t==null?void 0:t.identity)||(n?"You":"Participant"),a=(e==null?void 0:e.publication)&&!e.publication.isMuted;return c.jsxs("div",{className:`relative rounded-lg overflow-hidden ${i.video.tile} ${s}`,children:[a?c.jsx(Ze.VideoTrack,{trackRef:e,className:"w-full h-full object-cover"}):c.jsx("div",{className:`w-full h-full flex items-center justify-center ${i.video.placeholder}`,children:c.jsxs("div",{className:"text-center",children:[c.jsx("div",{className:`w-16 h-16 mx-auto mb-2 rounded-full flex items-center justify-center ${i.video.avatar}`,children:c.jsx($e.User,{className:"w-8 h-8"})}),c.jsx("p",{className:"text-sm opacity-80",children:o}),c.jsx("p",{className:"text-xs opacity-60",children:"Camera off"})]})}),c.jsx("div",{className:`absolute bottom-2 left-2 px-2 py-1 rounded text-xs ${i.video.nameOverlay}`,children:o}),((l=e==null?void 0:e.publication)==null?void 0:l.isMuted)&&c.jsx("div",{className:`absolute top-2 right-2 p-1 rounded ${i.video.mutedIndicator}`,children:c.jsx($e.CameraOff,{className:"w-4 h-4"})})]})}function Q1({trackRefs:e,participants:t,theme:n,localParticipant:s}){const r=e.find(u=>u.source===U.Track.Source.Camera&&u.participant===s),i=e.filter(u=>u.participant!==s),o=e.length,a=o<=1?1:o<=4?2:3,l="grid gap-2 h-full",d={gridTemplateColumns:`repeat(${a}, 1fr)`,gridAutoRows:"minmax(0, 1fr)"};return c.jsxs("div",{className:l,style:d,children:[r&&s&&c.jsx(oc,{trackRef:r,participant:s,isLocal:!0,theme:n,className:"min-h-0"}),i.map((u,h)=>{var m;return c.jsx(oc,{trackRef:u,participant:u.participant,isLocal:!1,theme:n,className:"min-h-0"},((m=u.publication)==null?void 0:m.trackSid)||h)}),o===0&&c.jsx("div",{className:"flex items-center justify-center h-full",children:c.jsxs("div",{className:"text-center",children:[c.jsx($e.Users,{className:"w-12 h-12 mx-auto mb-4 opacity-50"}),c.jsx("p",{className:"text-lg opacity-70",children:"Starting your video call..."})]})})]})}function ex({client:e,theme:t="vox",onBack:n,disabled:s=!1,displayType:r,onEndCall:i}){const o=Le(t),a=od(e),{videoTrackRefs:l}=Lg(e),d=p.useMemo(()=>e.getRemoteParticipants(),[e,a]),u=Pn(e,"camera"),h=Pn(e,"screenShare"),[m,g]=p.useState(null),x=p.useCallback(async()=>{u.pending||await u.toggle()},[u]),f=p.useCallback(async()=>{h.pending||await h.toggle()},[h]),b=p.useCallback(()=>{i?i():n&&n()},[i,n]);return p.useEffect(()=>{if(!e)return;const k=S=>{console.log("📺 Video: Interactive UI state updated:",S),g(S)};return e.on("interactive.ui.update",k),e.on("interactive.ui.show",k),()=>{e.off("interactive.ui.update",k),e.off("interactive.ui.show",k)}},[e]),c.jsxs("div",{className:`flex flex-col h-full ${o.video.container}`,children:[c.jsxs("div",{className:`flex items-center justify-between p-4 border-b ${o.video.header}`,children:[c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("div",{className:`w-3 h-3 rounded-full ${o.video.statusDot}`}),c.jsx("span",{className:"font-medium",children:"Video Call"}),c.jsxs("span",{className:"text-sm opacity-70",children:[d.length+1," participant",d.length!==0?"s":""]})]}),c.jsx("div",{className:"flex items-center gap-2",children:c.jsx("button",{className:`p-2 rounded-lg transition-colors ${o.video.headerButton}`,title:"Layout options",children:c.jsx($e.LayoutGrid,{className:"w-4 h-4"})})})]}),c.jsx("div",{className:"flex-1 p-4 min-h-0",children:c.jsx(Q1,{trackRefs:l,participants:d,localParticipant:a==null?void 0:a.localParticipant,theme:t})}),m&&c.jsx(ue.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:20},className:"absolute inset-4 z-10",children:c.jsx(fn,{interaction:m,onDismiss:()=>g(null),theme:t})}),c.jsx(J1,{onToggleCamera:x,onToggleScreenShare:f,onEndCall:b,onBack:n,theme:t,cameraEnabled:u.enabled,screenShareEnabled:h.enabled,isCameraLoading:u.pending,isScreenShareLoading:h.pending,disabled:s})]})}function as({onClick:e,disabled:t,theme:n}){const s=Le(n);return c.jsx("button",{className:s.micButton,onClick:e,disabled:t,"aria-label":"Start Voice Session",type:"button",children:c.jsx(Ed,{})})}function yr({onClick:e,disabled:t,theme:n}){const s=Le(n);return c.jsx("button",{className:s.chatButton,onClick:e,disabled:t,"aria-label":"Start Chat Session",type:"button",children:c.jsx(Td,{})})}function xr({onClick:e,disabled:t,theme:n}){const s=Le(n);return c.jsx("button",{className:s.videoButton,onClick:e,disabled:t,"aria-label":"Start Video Session",type:"button",children:c.jsx(Ad,{})})}function tx({prompts:e,theme:t}){const n=Le(t),[s,r]=v.useState(0);return v.useEffect(()=>{const i=setInterval(()=>{r(o=>(o+1)%e.length)},3e3);return()=>clearInterval(i)},[e.length]),c.jsx("div",{className:"w-96 min-h-[3rem] h-12 relative overflow-hidden flex items-center justify-center",children:e.map((i,o)=>c.jsx("div",{className:`
124
+ `,"aria-label":"Download file",children:l.jsx($e.Download,{className:"w-4 h-4"})})]})]})}function Yx(){return l.jsxs("div",{className:"max-w-xs mx-auto bg-green-50 border border-green-200 rounded-lg shadow p-3 flex flex-col items-center",children:[l.jsx("div",{className:"text-2xl mb-2",children:"✅"}),l.jsx("div",{className:"text-green-700 font-semibold text-sm mb-1",children:"Success!"}),l.jsx("div",{className:"text-xs text-gray-600 text-center mb-1",children:"Your action was completed successfully."})]})}function qx(){return l.jsxs("div",{className:"max-w-xs mx-auto bg-yellow-50 border border-yellow-200 rounded-lg shadow p-3 flex flex-col items-center",children:[l.jsx("div",{className:"text-2xl mb-2",children:"⏰"}),l.jsx("div",{className:"text-yellow-700 font-semibold text-sm mb-1",children:"Interaction timed out"}),l.jsx("div",{className:"text-xs text-gray-600 text-center mb-1",children:"No response was provided in time."})]})}function Xx({client:e,theme:t="vox",onBack:n,disabled:s=!1,displayType:r="widget",onEndChat:i}){const[o,a]=g.useState(()=>e&&typeof e.getChatMessages=="function"?e.getChatMessages():[]),[c,d]=g.useState(!0),[u,f]=g.useState(()=>{const N=e&&typeof e.getCurrentSession=="function"&&!!e.getCurrentSession(),F=e&&typeof e.getChatMessages=="function"&&e.getChatMessages().length>0;return!N&&!F}),[h,p]=g.useState(new Set),[x,m]=g.useState([]),[b,S]=g.useState(!1),[C,T]=g.useState(!1),[k,v]=g.useState(()=>e.getCurrentInteraction()),j=g.useRef(null),V=g.useRef(null),[E,_]=g.useState(!0),y=_e(t);g.useEffect(()=>{const N=()=>{const F=navigator.userAgent.toLowerCase(),A=["android","iphone","ipad","mobile","tablet"].some(ae=>F.includes(ae)),Z="ontouchstart"in window||navigator.maxTouchPoints>0,G=window.innerWidth<=768,de=A||Z&&G;S(de),de&&r==="widget"&&T(!0)};return N(),window.addEventListener("resize",N),()=>window.removeEventListener("resize",N)},[r]),g.useEffect(()=>(C&&b&&(document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.width="100%",document.body.style.height="100%",document.documentElement.requestFullscreen&&document.documentElement.requestFullscreen().catch(console.log)),()=>{C&&b&&(document.body.style.overflow="unset",document.body.style.position="unset",document.body.style.width="unset",document.body.style.height="unset",document.fullscreenElement&&document.exitFullscreen().catch(console.log))}),[C,b]);const D=e.getCurrentAgentInfo(),W=(D==null?void 0:D.name)||"AI Assistant",te=W.split(" ").map(N=>N[0]).join("").toUpperCase().slice(0,2),ue=g.useCallback(N=>{const F={id:`local_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,content:N,timestamp:new Date,sender:{id:"participant",name:"You",type:"participant"},metadata:{isLocal:!0}};a(se=>[...se,F])},[]),ie=g.useCallback((N=!1)=>{if(V.current){const F=V.current;N?F.scrollTop=F.scrollHeight:F.scrollTo({top:F.scrollHeight,behavior:"smooth"})}},[]),fe=g.useCallback(()=>{if(V.current){const{scrollTop:N,scrollHeight:F,clientHeight:se}=V.current;return F-N-se<100}return!0},[]),ne=g.useCallback(()=>{const N=fe();_(N)},[fe]),R=g.useCallback((N=!1)=>{E&&ie(N)},[E,ie]);g.useEffect(()=>{if(E&&o.length>0){R(!0);const N=setTimeout(()=>{E&&R(!1)},10);return()=>clearTimeout(N)}},[o.length,R,E]),g.useEffect(()=>{if(k&&E){R(!0);const N=setTimeout(()=>{E&&R(!1)},50);return()=>clearTimeout(N)}},[k,R,E]),g.useEffect(()=>{const N=A=>{if(console.log("ChatView: Received message:",A),f(!1),k&&A.sender.type==="agent"){console.log("ChatView: Queuing agent message due to active interaction:",k.methodName),m(Z=>[...Z,A]);return}A.sender.type==="agent"&&d(!1),a(Z=>{var de;if(Z.some(ae=>ae.id===A.id))return console.log("ChatView: Message already exists, skipping:",A.id),Z;if(console.log("ChatView: Adding new message:",A.id),A.sender.type==="agent"&&(p(ae=>new Set(ae).add(A.id)),!((de=A.metadata)!=null&&de.streaming))){const ae=A.content.length*35+1e3;setTimeout(()=>{p(Oe=>{const Be=new Set(Oe);return Be.delete(A.id),Be})},ae)}return[...Z,A]}),setTimeout(()=>{E&&R(!0)},0)},F=A=>{var Z;if(console.log("ChatView: Updated message:",A),k&&A.sender.type==="agent"){console.log("ChatView: Queuing agent message update due to active interaction:",k.methodName),m(G=>{const de=G.findIndex(ae=>ae.id===A.id);if(de>=0){const ae=[...G];return ae[de]=A,ae}else return[...G,A]});return}a(G=>G.map(de=>de.id===A.id?{...A}:de)),setTimeout(()=>{E&&R(!0)},0),(Z=A.metadata)!=null&&Z.streaming||p(G=>{const de=new Set(G);return de.delete(A.id),de})},se=A=>{console.log("ChatView: Sent message:",A),f(!1),a(Z=>Z.some(de=>de.id===A.id)?(console.log("ChatView: Sent message already exists, skipping:",A.id),Z):(console.log("ChatView: Adding sent message:",A.id),[...Z,A])),setTimeout(()=>{E&&R(!0)},0)};return e.on("chat.message.received",N),e.on("chat.message.updated",F),e.on("chat.message.sent",se),()=>{e.off("chat.message.received",N),e.off("chat.message.updated",F),e.off("chat.message.sent",se)}},[e,k,E,R]),g.useEffect(()=>{const N=Z=>{console.log("ChatView: RPC interaction started:",Z);const G=e.getCurrentInteraction();console.log("ChatView: Got interaction from client:",G==null?void 0:G.methodName),v(G),d(!1),E&&(R(!0),setTimeout(()=>{E&&R(!1)},100))},F=Z=>{if(console.log("ChatView: RPC interaction completed:",Z),v(null),x.length>0&&(console.log("ChatView: Processing",x.length,"queued messages"),a(G=>{const de=[...G];return x.forEach(ae=>{var Be;if(!de.some(Pe=>Pe.id===ae.id)&&(console.log("ChatView: Adding queued message:",ae.id),de.push(ae),ae.sender.type==="agent"&&(p(Pe=>new Set(Pe).add(ae.id)),!((Be=ae.metadata)!=null&&Be.streaming)))){const Pe=ae.content.length*35+1e3;setTimeout(()=>{p(ze=>{const Xe=new Set(ze);return Xe.delete(ae.id),Xe})},Pe)}}),de}),m([]),setTimeout(()=>{E&&R(!0)},0)),Z&&Z.response&&Z.response.success){let G=null;Z.response.successView?G=Z.response.successView:Z.successView&&(G=Z.successView),a(de=>{const ae=[...de].reverse().findIndex(ze=>ze.sender.type==="participant");let Oe=de.length;ae!==-1&&(Oe=de.length-ae);const Be={id:`success_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,content:"",timestamp:new Date,sender:{id:"participant",name:"You",type:"participant"},metadata:{type:"successView",view:G||l.jsx(Yx,{})}};e&&typeof e.addChatMessage=="function"&&e.addChatMessage(Be);const Pe=[...de];return Pe.splice(Oe,0,Be),Pe})}},se=async Z=>{k&&(console.log("ChatView: Dismissing active interaction due to timeout"),e.dismissCurrentInteraction()),v(null),x.length>0&&(console.log("ChatView: Processing",x.length,"queued messages after timeout"),a(de=>{const ae=[...de];return x.forEach(Oe=>{var Pe;if(!ae.some(ze=>ze.id===Oe.id)&&(ae.push(Oe),Oe.sender.type==="agent"&&(p(ze=>new Set(ze).add(Oe.id)),!((Pe=Oe.metadata)!=null&&Pe.streaming)))){const ze=Oe.content.length*35+1e3;setTimeout(()=>{p(Xe=>{const rt=new Set(Xe);return rt.delete(Oe.id),rt})},ze)}}),ae}),m([]),setTimeout(()=>{E&&R(!0)},0));let G=null;Z&&Z.response&&Z.response.timeoutView?G=Z.response.timeoutView:Z&&Z.timeoutView&&(G=Z.timeoutView),a(de=>{const ae={id:`timeout_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,content:"",timestamp:new Date,sender:{id:"agent",name:W,type:"agent"},metadata:{type:"timeoutView",view:G||l.jsx(qx,{})}};return e&&typeof e.addChatMessage=="function"&&e.addChatMessage(ae),[...de,ae]}),setTimeout(()=>{e.getCurrentInteraction()||v(null)},100)},A=async Z=>{console.log("ChatView: RPC interaction dismissed:",Z),console.log("ChatView: Current interaction before dismiss:",k==null?void 0:k.methodName),v(null),x.length>0&&(console.log("ChatView: Processing",x.length,"queued messages after dismissal"),a(G=>{const de=[...G];return x.forEach(ae=>{var Be;if(!de.some(Pe=>Pe.id===ae.id)&&(de.push(ae),ae.sender.type==="agent"&&(p(Pe=>new Set(Pe).add(ae.id)),!((Be=ae.metadata)!=null&&Be.streaming)))){const Pe=ae.content.length*35+1e3;setTimeout(()=>{p(ze=>{const Xe=new Set(ze);return Xe.delete(ae.id),Xe})},Pe)}}),de}),m([]),setTimeout(()=>{E&&R(!0)},0)),setTimeout(()=>{const G=e.getCurrentInteraction();console.log("ChatView: Latest interaction from client after dismiss:",(G==null?void 0:G.methodName)||"null"),G===null&&v(null)},50),console.log("ChatView: Set currentInteraction to null after dismiss")};return e.on("rpc.interaction.started",N),e.on("rpc.interaction.completed",F),e.on("rpc.interaction.timeout",se),e.on("rpc.interaction.dismissed",A),()=>{e.off("rpc.interaction.started",N),e.off("rpc.interaction.completed",F),e.off("rpc.interaction.timeout",se),e.off("rpc.interaction.dismissed",A)}},[e,E,R,W,x]),g.useEffect(()=>{const N=()=>{if(console.log("ChatView: Agent is thinking"),k){console.log("ChatView: Suppressing thinking indicator due to active interaction:",k.methodName);return}d(!0)},F=()=>{console.log("ChatView: Agent is speaking"),d(!1)};return e.on("agent.thinking",N),e.on("agent.speaking",F),()=>{e.off("agent.thinking",N),e.off("agent.speaking",F)}},[e,k]),g.useEffect(()=>{const N=e.getCurrentInteraction();N?(console.log("ChatView: Restoring interaction state on mount/client change:",N.methodName),v(N)):v(null)},[e]),g.useEffect(()=>{console.log("ChatView: Display type changed to:",r,"Current interaction:",(k==null?void 0:k.methodName)||"none")},[r,k]);const B=async N=>{try{k&&(console.log("ChatView: Dismissing active interaction due to user message send"),e.dismissCurrentInteraction(),v(null)),await e.sendChatMessage(N)}catch(F){console.error("Failed to send message:",F)}},M=async N=>{try{k&&(console.log("ChatView: Dismissing active interaction due to user attachment send"),e.dismissCurrentInteraction(),v(null)),await e.sendAttachments(N),console.log("Attachments sent successfully:",N.map(F=>F.name))}catch(F){console.error("Failed to send attachments:",F)}},[O,q]=g.useState([]);g.useEffect(()=>{const N=F=>{q(Array.isArray(F)?F:["tes","hello how are you","algebra make me learn that ","what is the meaning of life"])};return e.on("suggested.response",N),()=>{e.off("suggested.response",N)}},[e]);const Y=C&&b?"fullscreen":r,H=Y==="fullscreen"?C&&b?"fixed inset-0 z-[9999] flex flex-col h-screen w-screen bg-black":"flex flex-col h-full w-full max-w-none":"flex flex-col h-full w-full backdrop-blur-sm max-h-full overflow-hidden contain-layout",re=Y==="fullscreen"?C&&b?"flex items-center w-full justify-between px-4 pt-3 pb-3 bg-black/80 text-white border-b border-gray-700":`flex items-center w-full justify-between px-6 pt-5 pb-4 border-b ${y.chatHeader.container}`:`flex items-center w-full justify-between px-4 pt-5 pb-4 border-b ${y.chatHeader.container}`,$=Y==="fullscreen"?C&&b?"flex-1 overflow-y-auto overflow-x-hidden scrollbar-hide p-4 w-full max-w-none chat-scrollable min-h-0":"flex-1 overflow-y-auto overflow-x-hidden scrollbar-hide p-6 w-full max-w-none chat-scrollable min-h-0":"flex-1 overflow-y-auto overflow-x-hidden scrollbar-hide w-full p-4 chat-scrollable min-h-0",I="flex-shrink-0 !w-full",L=()=>{T(!1),n&&n()};return l.jsxs("div",{className:`${H} relative`,children:[l.jsx("div",{className:re,children:l.jsxs("div",{className:"flex items-center gap-2",children:[C&&b&&l.jsx(le.button,{onClick:L,whileHover:{scale:1.05},whileTap:{scale:.95},className:"p-2 rounded-full bg-white/20 hover:bg-white/30 text-white transition-colors mr-2","aria-label":"Exit fullscreen",children:"✕"}),l.jsxs("div",{children:[l.jsx("h3",{className:`font-semibold text-base leading-tight ${C&&b?"text-white":y.text.primary}`,children:W}),l.jsxs("p",{className:`text-xs flex items-center gap-1.5 mt-0.5 ${C&&b?"text-gray-300":y.text.muted}`,children:[l.jsx("span",{className:"w-1.5 h-1.5 bg-green-500 rounded-full animate-pulse"}),"Online"]})]})]})}),l.jsxs("div",{ref:V,className:`${$} flex flex-col`,style:{scrollBehavior:"smooth",scrollbarWidth:"none",contain:"layout style paint",overscrollBehavior:"contain"},onScroll:ne,children:[" ",o.length===0?l.jsxs("div",{className:"flex flex-col items-center justify-center flex-1 text-center py-12",children:[l.jsx(le.div,{transition:{duration:2,repeat:1/0,ease:"easeInOut"},className:"w-16 h-16 rounded-full bg-gradient-to-br from-blue-500 to-purple-600 flex items-center justify-center text-white font-bold text-xl mb-6 shadow-xl",children:te}),l.jsxs("p",{className:`text-base mb-2 ${C&&b?"text-white":y.text.secondary}`,children:[W," is joining..."]}),l.jsx("p",{className:`text-xs ${C&&b?"text-gray-300":y.text.muted}`,children:"Your conversation will begin shortly"})]}):l.jsx("div",{className:"w-full max-w-5xl mx-auto space-y-3 py-4 flex-1 flex flex-col justify-end",children:l.jsxs("div",{className:"space-y-3",children:[o.map((N,F)=>{var se,A;return l.jsx("div",{children:((se=N.metadata)==null?void 0:se.type)==="successView"?l.jsx("div",{className:"flex w-full justify-end mb-4 px-1",children:l.jsxs("div",{className:"relative group flex-row-reverse flex items-end gap-3 max-w-[85%]",children:[l.jsx(le.div,{initial:{scale:0},animate:{scale:1},transition:{delay:.1},className:`w-6 h-6 rounded-full flex items-center justify-center text-white text-xs font-semibold flex-shrink-0 shadow-lg ${t==="light"?"bg-gradient-to-br from-blue-500 to-purple-600":"bg-gradient-to-br from-gray-600 to-gray-700"}`,children:"Y"}),l.jsxs("div",{className:`flex h-full flex-col justify-between border px-3 py-2 rounded-2xl shadow-lg backdrop-bl-sm message-bubble rounded-br-md message-hover border-gray-200 dark:border-gray-700 ${y.chatMessage.own}`,children:[N.metadata.view,l.jsx("div",{className:`text-xs ${y.text.muted} mt-1 opacity-0 group-hover:opacity-100 transition-opacity duration-200 `,children:N.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]})]})}):((A=N.metadata)==null?void 0:A.type)==="timeoutView"?l.jsx("div",{className:"flex w-full justify-start mb-4 px-1",children:l.jsxs("div",{className:"relative group flex-row flex items-end gap-3 max-w-[85%]",children:[l.jsx("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-white text-xs font-semibold flex-shrink-0 shadow-lg ${t==="light"?"bg-gradient-to-br from-blue-500 to-purple-600":"bg-gradient-to-br from-gray-600 to_gray-700"}`,children:te}),l.jsxs("div",{className:`flex h-full flex-col justify-between border px-3 py-2 rounded-2xl shadow-lg backdrop-bl-sm message-bubble rounded-bl-md message-hover border-gray-200 dark:border-gray-700 ${y.chatMessage.other}`,children:[N.metadata.view,l.jsx("div",{className:`text-xs ${y.text.muted} mt-1 opacity-0 group-hover:opacity-100 transition-opacity duration-200 `,children:N.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]})]})}):l.jsx(Wx,{message:N,theme:t,isOwn:N.sender.type==="participant",isStreaming:h.has(N.id)})},N.id)}),c&&!k&&l.jsx(le.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:o.length*.1},className:"flex w-full justify-start mb-4 px-1",children:l.jsxs("div",{className:"relative group flex-row flex items-end gap-3 max-w-[85%]",children:[l.jsx("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-white text-xs font-semibold flex-shrink-0 shadow-lg ${t==="light"?"bg-gradient-to-br from-blue-500 to-purple-600":"bg-gradient-to-br from-gray-600 to-gray-700"}`,children:te}),l.jsx("div",{className:`relative px-3 py-2 rounded-2xl break-words shadow-lg backdrop-blur-sm message-bubble message-hover ${y.chatMessage.other} rounded-bl-md transition-all duration-200 group-hover:scale-[1.02]`,style:{wordWrap:"break-word",overflowWrap:"break-word",minWidth:48},children:l.jsx("span",{className:"inline-flex items-center",children:[0,1,2].map(N=>l.jsx(le.span,{className:"w-1.5 h-1.5 bg-current rounded-full mx-0.5",animate:{y:[0,-4,0],opacity:[.4,1,.4],scale:[.8,1,.8]},transition:{duration:.8,repeat:1/0,repeatType:"mirror",delay:N*.2,ease:"easeInOut"}},N))})})]})}),k&&k.presentationMode==="embedded"&&l.jsxs("div",{className:"relative group flex-row flex items-end gap-3 max-w-[85%]",children:[l.jsx(le.div,{initial:{scale:0},animate:{scale:1},transition:{delay:.1},className:`w-6 h-6 rounded-full flex items-center justify-center text-white text-xs font-semibold flex-shrink-0 shadow-lg ${t==="light"?"bg-gradient-to-br from-blue-500 to-purple-600":"bg-gradient-to-br from-gray-600 to_gray-700"}`,children:te}),l.jsxs("div",{className:`flex h-full flex-col justify-between border px-3 py-2 rounded-2xl shadow-lg backdrop-bl-sm message-bubble rounded-bl-md message-hover border-gray-200 dark:border-gray-700 ${y.chatMessage.other}`,children:[l.jsx(un,{interaction:k,theme:t,onDismiss:()=>e.dismissCurrentInteraction(),client:e,addLocalMessage:ue},k.methodName),l.jsx(le.div,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.2},className:`text-xs ${y.text.muted} mt-1 opacity-0 group-hover:opacity-100 transition-opacity duration-200 `,children:new Date().toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]})]}),l.jsx("div",{ref:j})]})})]}),!E&&l.jsx(le.button,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},onClick:()=>{_(!0),ie(!1)},className:`absolute right-6 bottom-20 z-10 p-3 rounded-full shadow-lg backdrop-blur-sm border transition-all duration-200 hover:scale-105 ${t==="light"?"bg-white/90 text-gray-600 border-gray-200 hover:bg-white hover:text-gray-800":"bg-gray-800/90 text-gray-300 border-gray-700 hover:bg-gray-700 hover:text-white"}`,"aria-label":"Scroll to bottom",children:l.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 14l-7 7m0 0l-7-7m7 7V3"})})}),O.length>0&&l.jsx("div",{className:"w-full flex overflow-x-auto gap-2 px-4 py-2 mb-1 scrollbar-hide",children:O.map((N,F)=>{var se;return l.jsx("button",{className:`whitespace-nowrap px-3 py-1 rounded-full border shadow-sm flex-shrink-0 transition-all duration-150 font-medium text-sm focus:outline-none focus:ring-2 focus:ring-blue-400/40
125
+ ${t==="light"?"bg-white text-blue-700 border-blue-200 hover:bg-blue-50 hover:text-blue-900":t==="dark"?"bg-gray-800 text-blue-300 border-gray-700 hover:bg-gray-700 hover:text-white":((se=y.suggestedResponse)==null?void 0:se.container)||"bg-gradient-to-br from-blue-500 to-purple-600 text-white border-blue-400 hover:from-blue-600 hover:to-purple-700"}
126
+ `,style:{boxShadow:t==="vox"?"0 2px 8px 0 rgba(80,60,200,0.10)":void 0,borderWidth:1},onClick:()=>{B(N),q([])},children:N},N+F)})}),k&&k.presentationMode!=="embedded"&&l.jsx(un,{interaction:k,theme:t,onDismiss:()=>e.dismissCurrentInteraction(),client:e,addLocalMessage:ue},k.methodName),l.jsx(le.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.2},className:I,children:l.jsx(Ux,{onSendMessage:B,onSendAttachments:M,disabled:s,theme:t,onEndChat:i})})]})}function Jx({text:e,isComplete:t,isRealTimeStream:n=!1,speed:s=50}){const[r,i]=g.useState(""),[o,a]=g.useState(0);return g.useEffect(()=>{if(n){i(e);return}if(t){i(e);return}if(o<e.length){const c=setTimeout(()=>{i(e.slice(0,o+1)),a(o+1)},s);return()=>clearTimeout(c)}},[e,o,t,s,n]),g.useEffect(()=>{n||(a(0),i(""))},[e,n]),l.jsxs("span",{className:"relative",children:[l.jsx("span",{className:"inline-block",children:r}),!t&&l.jsx("span",{className:"inline-flex items-center ml-1",children:[0,1,2].map(c=>l.jsx(le.span,{className:"w-1.5 h-1.5 bg-current rounded-full mx-0.5",animate:{y:[0,-4,0],opacity:[.4,1,.4],scale:[.8,1,.8]},transition:{duration:.8,repeat:1/0,repeatType:"mirror",delay:c*.2,ease:"easeInOut"}},c))})]})}function Qx({message:e,theme:t,isOwn:n,isStreaming:s=!1}){var o,a,c;const r=_e(t),i=e.sender.name?e.sender.name.split(" ").map(d=>d[0]).join("").toUpperCase().slice(0,2):"U";return l.jsx("div",{className:`flex w-full ${n?"justify-end":"justify-start"} mb-4 px-1`,children:l.jsxs("div",{className:`relative group ${n?"flex-row-reverse":"flex-row"} flex items-end gap-3 max-w-[85%]`,children:[l.jsx("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-white text-xs font-semibold flex-shrink-0 shadow-lg ${t==="light"?"bg-gradient-to-br from-blue-500 to-purple-600":"bg-gradient-to-br from-gray-600 to-gray-700"}`,children:i}),l.jsxs("div",{className:`
127
+ relative px-3 py-2 rounded-2xl break-words shadow-lg backdrop-blur-sm message-bubble message-hover
128
+ ${n?`${((o=r.chatMessage)==null?void 0:o.own)||"bg-blue-500 text-white"} rounded-br-md`:`${((a=r.chatMessage)==null?void 0:a.other)||"bg-gray-100 text-gray-900 dark:bg-gray-800 dark:text-white"} rounded-bl-md`}
129
+ ${s?"shimmer":""}
130
+ transition-all duration-200 group-hover:scale-[1.02]
131
+ `,style:{wordWrap:"break-word",overflowWrap:"break-word"},children:[l.jsx("div",{className:"whitespace-pre-wrap break-words leading-relaxed text-sm",children:s&&!n?l.jsx(Jx,{text:e.content,isComplete:!s,isRealTimeStream:((c=e.metadata)==null?void 0:c.streaming)===!0,speed:35}):e.content}),l.jsx("div",{className:"text-xs mt-1",children:e.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]})]})})}function e1({onToggleCamera:e,onToggleScreenShare:t,onToggleChat:n,onEndCall:s,onBack:r,theme:i,cameraEnabled:o,screenShareEnabled:a,chatOpen:c,isCameraLoading:d,isScreenShareLoading:u,disabled:f}){const h=_e(i);return l.jsxs("div",{className:`flex items-center justify-center gap-3 p-4 ${h.video.controlsBackground}`,children:[l.jsx("button",{onClick:e,disabled:f||d,className:`p-3 rounded-full transition-all duration-200 ${o?h.video.controlEnabled:h.video.controlDisabled} ${f?"opacity-50 cursor-not-allowed":"hover:scale-105"}`,title:o?"Turn off camera":"Turn on camera",children:d?l.jsx("div",{className:"w-5 h-5 animate-spin rounded-full border-2 border-current border-t-transparent"}):o?l.jsx($e.Camera,{className:"w-5 h-5"}):l.jsx($e.CameraOff,{className:"w-5 h-5"})}),l.jsx("button",{onClick:t,disabled:f||u,className:`p-3 rounded-full transition-all duration-200 ${a?h.video.controlEnabled:h.video.controlDisabled} ${f?"opacity-50 cursor-not-allowed":"hover:scale-105"}`,title:a?"Stop screen share":"Share screen",children:u?l.jsx("div",{className:"w-5 h-5 animate-spin rounded-full border-2 border-current border-t-transparent"}):a?l.jsx($e.MonitorOff,{className:"w-5 h-5"}):l.jsx($e.Monitor,{className:"w-5 h-5"})}),l.jsx("button",{onClick:n,disabled:f,className:`relative p-3 rounded-full transition-all duration-200 ${c?h.video.controlEnabled:h.video.controlDisabled} ${f?"opacity-50 cursor-not-allowed":"hover:scale-105"}`,title:c?"Hide chat":"Show chat & transcription",children:l.jsx($e.MessageCircle,{className:"w-5 h-5"})}),s&&l.jsx("button",{onClick:s,disabled:f,className:`p-3 rounded-full transition-all duration-200 ${h.video.endCall} ${f?"opacity-50 cursor-not-allowed":"hover:scale-105"}`,title:"End call",children:l.jsx($e.PhoneOff,{className:"w-5 h-5"})}),r&&l.jsx("button",{onClick:r,disabled:f,className:`p-3 rounded-full transition-all duration-200 ${h.video.controlDisabled} ${f?"opacity-50 cursor-not-allowed":"hover:scale-105"}`,title:"Back",children:l.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 19l-7-7m0 0l7-7m-7 7h18"})})})]})}function il({trackRef:e,participant:t,isLocal:n=!1,className:s="",theme:r}){var c;const i=_e(r),o=(t==null?void 0:t.name)||(t==null?void 0:t.identity)||(n?"You":"Participant"),a=(e==null?void 0:e.publication)&&!e.publication.isMuted;return l.jsxs("div",{className:`relative rounded-lg overflow-hidden ${i.video.tile} ${s}`,children:[a?l.jsx(Ke.VideoTrack,{trackRef:e,className:"w-full h-full object-cover"}):l.jsx("div",{className:`w-full h-full flex items-center justify-center ${i.video.placeholder}`,children:l.jsxs("div",{className:"text-center",children:[l.jsx("div",{className:`w-16 h-16 mx-auto mb-2 rounded-full flex items-center justify-center ${i.video.avatar}`,children:l.jsx($e.User,{className:"w-8 h-8"})}),l.jsx("p",{className:"text-sm opacity-80",children:o}),l.jsx("p",{className:"text-xs opacity-60",children:"Camera off"})]})}),l.jsx("div",{className:`absolute bottom-2 left-2 px-2 py-1 rounded text-xs ${i.video.nameOverlay}`,children:o}),((c=e==null?void 0:e.publication)==null?void 0:c.isMuted)&&l.jsx("div",{className:`absolute top-2 right-2 p-1 rounded ${i.video.mutedIndicator}`,children:l.jsx($e.CameraOff,{className:"w-4 h-4"})})]})}function t1({trackRefs:e,participants:t,theme:n,localParticipant:s}){const r=e.find(u=>u.source===K.Track.Source.Camera&&u.participant===s),i=e.filter(u=>u.participant!==s),o=e.length,a=o<=1?1:o<=4?2:3,c="grid gap-2 h-full",d={gridTemplateColumns:`repeat(${a}, 1fr)`,gridAutoRows:"minmax(0, 1fr)"};return l.jsxs("div",{className:c,style:d,children:[r&&s&&l.jsx(il,{trackRef:r,participant:s,isLocal:!0,theme:n,className:"min-h-0"}),i.map((u,f)=>{var h;return l.jsx(il,{trackRef:u,participant:u.participant,isLocal:!1,theme:n,className:"min-h-0"},((h=u.publication)==null?void 0:h.trackSid)||f)}),o===0&&l.jsx("div",{className:"flex items-center justify-center h-full",children:l.jsxs("div",{className:"text-center",children:[l.jsx($e.Users,{className:"w-12 h-12 mx-auto mb-4 opacity-50"}),l.jsx("p",{className:"text-lg opacity-70",children:"Starting your video call..."})]})})]})}function n1({client:e,theme:t="vox",onBack:n,disabled:s=!1,displayType:r,onEndCall:i}){var O,q,Y,H,re,$;const o=_e(t),[a,c]=g.useState(!1),[d,u]=g.useState(()=>e&&typeof e.getChatMessages=="function"?e.getChatMessages():[]),[f,h]=g.useState(!1),[p,x]=g.useState(new Set),m=g.useRef(null),b=g.useRef(null),[S,C]=g.useState(!0),T=id(e),{videoTrackRefs:k}=Lp(e),v=g.useMemo(()=>e.getRemoteParticipants(),[e,T]),j=Mn(e,"camera"),V=Mn(e,"screenShare"),[E,_]=g.useState(null),y=(O=e==null?void 0:e.getCurrentAgentInfo)==null?void 0:O.call(e),W=((y==null?void 0:y.name)||"AI Assistant").split(" ").map(I=>I[0]).join("").toUpperCase().slice(0,2),te=g.useCallback(()=>{if(b.current){const{scrollTop:I,scrollHeight:L,clientHeight:N}=b.current;return L-I-N<100}return!0},[]),ue=g.useCallback(()=>{const I=te();C(I)},[te]),ie=g.useCallback((I=!1)=>{if(S&&b.current){const L=b.current;I?L.scrollTop=L.scrollHeight:L.scrollTo({top:L.scrollHeight,behavior:"smooth"})}},[S]);g.useEffect(()=>{if(!e)return;const I=F=>{console.log("VideoView: Received message:",F),F.sender.type==="agent"&&h(!1),u(se=>{var Z;if(se.some(G=>G.id===F.id))return se;if(F.sender.type==="agent"&&(x(G=>new Set(G).add(F.id)),!((Z=F.metadata)!=null&&Z.streaming))){const G=F.content.length*35+1e3;setTimeout(()=>{x(de=>{const ae=new Set(de);return ae.delete(F.id),ae})},G)}return[...se,F]}),setTimeout(()=>{S&&ie(!0)},0)},L=F=>{var se;console.log("VideoView: Updated message:",F),u(A=>A.map(Z=>Z.id===F.id?{...F}:Z)),setTimeout(()=>{S&&ie(!0)},0),(se=F.metadata)!=null&&se.streaming||x(A=>{const Z=new Set(A);return Z.delete(F.id),Z})},N=F=>{var se;console.log("VideoView: Sent message:",F),((se=F.metadata)==null?void 0:se.topic)!=="lk.transcription"&&(u(A=>A.some(G=>G.id===F.id)?A:[...A,F]),setTimeout(()=>{S&&ie(!0)},0))};return e.on("chat.message.received",I),e.on("chat.message.updated",L),e.on("chat.message.sent",N),()=>{e.off("chat.message.received",I),e.off("chat.message.updated",L),e.off("chat.message.sent",N)}},[e,S,ie]),g.useEffect(()=>{if(!e)return;const I=()=>{console.log("VideoView: Agent is thinking"),h(!0)},L=()=>{console.log("VideoView: Agent is speaking"),h(!1)};return e.on("agent.thinking",I),e.on("agent.speaking",L),()=>{e.off("agent.thinking",I),e.off("agent.speaking",L)}},[e]);const fe=g.useCallback(async()=>{j.pending||await j.toggle()},[j]),ne=g.useCallback(async()=>{V.pending||await V.toggle()},[V]),R=g.useCallback(()=>{c(I=>!I)},[]),B=g.useCallback(()=>{i?i():n&&n()},[i,n]);g.useCallback(async I=>{var L;try{await((L=e==null?void 0:e.sendChatMessage)==null?void 0:L.call(e,I))}catch(N){console.error("Failed to send message:",N)}},[e]),g.useEffect(()=>{a&&d.length>0&&setTimeout(()=>{S&&ie(!0)},100)},[d.length,a,S,ie]);const M=g.useMemo(()=>d.filter(I=>I.content&&I.content.trim()!==""&&I.content.trim()!=="..."),[d]);return g.useEffect(()=>{if(!e)return;const I=L=>{console.log("📺 Video: Interactive UI state updated:",L),_(L)};return e.on("interactive.ui.update",I),e.on("interactive.ui.show",I),()=>{e.off("interactive.ui.update",I),e.off("interactive.ui.show",I)}},[e]),l.jsxs("div",{className:`flex flex-col h-full ${o.video.container} relative`,children:[l.jsxs("div",{className:`flex items-center justify-between p-4 border-b ${o.video.header}`,children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:`w-3 h-3 rounded-full ${o.video.statusDot}`}),l.jsx("span",{className:"font-medium",children:"Video Call"}),l.jsxs("span",{className:"text-sm opacity-70",children:[v.length+1," participant",v.length!==0?"s":""]})]}),l.jsx("div",{className:"flex items-center gap-2",children:l.jsx("button",{className:`p-2 rounded-lg transition-colors ${o.video.headerButton}`,title:"Layout options",children:l.jsx($e.LayoutGrid,{className:"w-4 h-4"})})})]}),!a&&l.jsx("div",{className:"flex-1 p-4 min-h-0",children:l.jsx(t1,{trackRefs:k,participants:v,localParticipant:T==null?void 0:T.localParticipant,theme:t})}),l.jsx(Et,{mode:"wait",children:a&&l.jsxs(le.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:20},transition:{duration:.3,ease:"easeOut"},className:Q("absolute inset-0 w-full h-full flex flex-col z-20",t==="light"?"bg-white":"bg-gray-900/95 backdrop-blur-sm"),children:[l.jsx("div",{className:Q("flex-shrink-0 px-4 py-3 border-b",r==="fullscreen"?"px-8":"px-5",((q=o.chatHeader)==null?void 0:q.container)||"border-gray-200 dark:border-gray-700"),children:l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{children:[l.jsx("h3",{className:Q("font-semibold text-lg",((Y=o.text)==null?void 0:Y.primary)||"text-gray-900 dark:text-white"),children:"Chat & Transcription"}),l.jsxs("p",{className:Q("text-sm",((H=o.text)==null?void 0:H.muted)||"text-gray-600 dark:text-gray-400"),children:[M.length," messages"]})]}),l.jsx("button",{onClick:()=>c(!1),className:Q("p-2 rounded-lg transition-colors",o.video.headerButton||"hover:bg-gray-100 dark:hover:bg-gray-800"),title:"Close chat",children:l.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})}),l.jsxs("div",{className:Q("flex-1 flex flex-col min-h-0",r==="fullscreen"?"px-8":"px-5"),children:[l.jsxs("div",{ref:b,className:Q("flex-1 flex flex-col h-full overflow-y-auto scrollbar-hide py-4"),style:{scrollbarWidth:"none",scrollBehavior:"smooth",paddingBottom:"120px"},onScroll:ue,children:[M.length===0&&l.jsx("div",{className:"flex-1 flex items-center justify-center",children:l.jsxs("div",{className:"text-center",children:[l.jsx(le.div,{transition:{duration:2,repeat:1/0,ease:"easeInOut"},className:"w-16 h-16 rounded-full bg-gradient-to-br from-blue-500 to-purple-600 flex items-center justify-center text-white font-bold text-xl mb-6 shadow-xl mx-auto",children:W}),l.jsx("p",{className:Q("text-lg font-medium mb-2",((re=o.text)==null?void 0:re.primary)||"text-gray-900 dark:text-white"),children:"Start Speaking"}),l.jsx("p",{className:Q("text-sm",(($=o.text)==null?void 0:$.muted)||"text-gray-600 dark:text-gray-400"),children:"Your conversation will appear here"})]})}),M.length>0&&l.jsx("div",{className:"w-full max-w-5xl mx-auto space-y-3 py-4 flex-1 flex flex-col justify-end",children:l.jsxs("div",{className:"space-y-3",children:[l.jsx(Et,{mode:"popLayout",children:M.map((I,L)=>l.jsx(le.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},transition:{duration:.3,ease:"easeOut",delay:L*.02},layout:!0,children:l.jsx(Qx,{message:I,theme:t,isOwn:I.sender.type==="participant",isStreaming:p.has(I.id)})},I.id||`message-${L}`))}),f&&l.jsx(le.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:M.length*.1},className:"flex w-full justify-start mb-4 px-1",children:l.jsxs("div",{className:"relative group flex-row flex items-end gap-3 max-w-[85%]",children:[l.jsx("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-white text-xs font-semibold flex-shrink-0 shadow-lg ${t==="light"?"bg-gradient-to-br from-blue-500 to-purple-600":"bg-gradient-to-br from-gray-600 to-gray-700"}`,children:W}),l.jsx("div",{className:"relative px-3 py-2 rounded-2xl break-words shadow-lg backdrop-blur-sm message-bubble message-hover bg-gray-100 text-gray-900 dark:bg-gray-800 dark:text-white rounded-bl-md transition-all duration-200 group-hover:scale-[1.02]",style:{wordWrap:"break-word",overflowWrap:"break-word",minWidth:48},children:l.jsx("span",{className:"inline-flex items-center",children:[0,1,2].map(I=>l.jsx(le.span,{className:"w-1.5 h-1.5 bg-current rounded-full mx-0.5",animate:{y:[0,-4,0],opacity:[.4,1,.4],scale:[.8,1,.8]},transition:{duration:.8,repeat:1/0,repeatType:"mirror",delay:I*.2,ease:"easeInOut"}},I))})})]})}),l.jsx("div",{ref:m})]})})]}),!S&&M.length>0&&l.jsx(le.button,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},onClick:()=>{C(!0),ie(!1)},className:`absolute right-6 bottom-20 z-10 p-3 rounded-full shadow-lg backdrop-blur-sm border transition-all duration-200 hover:scale-105 ${t==="light"?"bg-white/90 text-gray-600 border-gray-200 hover:bg-white hover:text-gray-800":"bg-gray-800/90 text-gray-300 border-gray-700 hover:bg-gray-700 hover:text-white"}`,"aria-label":"Scroll to bottom",children:l.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 14l-7 7m0 0l-7-7m7 7V3"})})})]})]})}),E&&!a&&l.jsx(le.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:20},className:"absolute inset-4 z-10",children:l.jsx(un,{interaction:E,onDismiss:()=>_(null),theme:t})}),l.jsx(e1,{onToggleCamera:fe,onToggleScreenShare:ne,onToggleChat:R,onEndCall:B,onBack:n,theme:t,cameraEnabled:j.enabled,screenShareEnabled:V.enabled,chatOpen:a,isCameraLoading:j.pending,isScreenShareLoading:V.pending,disabled:s})]})}function as({onClick:e,disabled:t,theme:n}){const s=_e(n);return l.jsx("button",{className:s.micButton,onClick:e,disabled:t,"aria-label":"Start Voice Session",type:"button",children:l.jsx(Ad,{})})}function yr({onClick:e,disabled:t,theme:n}){const s=_e(n);return l.jsx("button",{className:s.chatButton,onClick:e,disabled:t,"aria-label":"Start Chat Session",type:"button",children:l.jsx(Ed,{})})}function xr({onClick:e,disabled:t,theme:n}){const s=_e(n);return l.jsx("button",{className:s.videoButton,onClick:e,disabled:t,"aria-label":"Start Video Session",type:"button",children:l.jsx(jd,{})})}function s1({prompts:e,theme:t}){const n=_e(t),[s,r]=w.useState(0);return w.useEffect(()=>{const i=setInterval(()=>{r(o=>(o+1)%e.length)},3e3);return()=>clearInterval(i)},[e.length]),l.jsx("div",{className:"w-96 min-h-[3rem] h-12 relative overflow-hidden flex items-center justify-center",children:e.map((i,o)=>l.jsx("div",{className:`
127
132
  ${n.promptSlider}
128
133
  ${o===s?"opacity-100":"opacity-0"}
129
134
  whitespace-pre-line break-words
130
- `,style:{minHeight:"2.5rem",display:o===s?"block":"none"},children:i},o))})}function nx({statusMessage:e,theme:t}){const n=Le(t);return c.jsxs("div",{className:"z-10 flex items-center space-x-2 mt-2 pb-2",children:[c.jsx("div",{className:n.statusIndicator}),c.jsx("span",{className:`text-xs ${n.text.muted}`,children:e})]})}const Md=v.forwardRef(({disabled:e,onStartCall:t,onStartChat:n,onStartVideo:s,prompts:r=['"Book a meeting with the marketing team"',`"What's the status of project Alpha?"`,`"Summarize yesterday's sales report"`,'"Find a good Italian restaurant nearby"','"Remind me to call John tomorrow at 10 AM"'],statusMessage:i="Agent is ready",title:o="Choose how to interact",subTitle:a="Ask me anything or give me a task to complete",theme:l="vox",modalities:d=["voice","chat","video"]},u)=>{const h=Le(l),m=d.includes("voice"),g=d.includes("chat"),x=d.includes("video"),f=[m,g,x].filter(Boolean).length;return c.jsxs("div",{className:"flex p-8 flex-col items-center h-full justify-center w-full relative","aria-disabled":e,style:{background:"transparent"},children:[c.jsxs("div",{className:"mt-1 relative flex items-center justify-center mb-8 w-full",style:{minHeight:"120px"},children:[c.jsxs("div",{className:"absolute inset-0 flex items-center justify-center",children:[c.jsx("div",{className:h.pulseRings.ring1}),c.jsx("div",{className:h.pulseRings.ring2,style:{animationDelay:"0.5s"}}),c.jsx("div",{className:h.pulseRings.ring3,style:{animationDelay:"1s"}})]}),c.jsx("div",{className:"relative z-10 flex items-center justify-center",children:m&&g&&x?c.jsxs("div",{className:"flex gap-4 items-center justify-center",children:[c.jsx(as,{onClick:t,disabled:e,theme:l}),c.jsx(yr,{onClick:n,disabled:e,theme:l}),c.jsx(xr,{onClick:s||t,disabled:e,theme:l})]}):f>1?c.jsxs("div",{className:"flex gap-6 items-center justify-center",children:[m&&c.jsx(as,{onClick:t,disabled:e,theme:l}),g&&c.jsx(yr,{onClick:n,disabled:e,theme:l}),x&&s&&c.jsx(xr,{onClick:s,disabled:e,theme:l})]}):c.jsx("div",{className:"flex items-center justify-center",children:m?c.jsx(as,{onClick:t,disabled:e,theme:l}):g?c.jsx(yr,{onClick:n,disabled:e,theme:l}):x&&s?c.jsx(xr,{onClick:s,disabled:e,theme:l}):c.jsx(as,{onClick:t,disabled:e,theme:l})})})]}),c.jsxs("div",{className:"text-center flex flex-col items-center gap-y-2 mb-6 w-full",children:[c.jsx("h3",{className:`text-xl font-semibold mb-2 ${h.text.accent}`,children:o}),c.jsx("p",{className:`text-sm leading-relaxed px-4 ${h.text.secondary}`,children:a}),f>1&&c.jsxs("div",{className:"flex gap-6 mt-4 text-xs justify-center",children:[m&&c.jsxs("div",{className:"flex flex-col items-center gap-1",children:[c.jsx(Ed,{className:"w-4 h-4"}),c.jsx("span",{className:h.text.muted,children:"Voice"})]}),g&&c.jsxs("div",{className:"flex flex-col items-center gap-1",children:[c.jsx(Td,{className:"w-4 h-4"}),c.jsx("span",{className:h.text.muted,children:"Chat"})]}),x&&c.jsxs("div",{className:"flex flex-col items-center gap-1",children:[c.jsx(Ad,{className:"w-4 h-4"}),c.jsx("span",{className:h.text.muted,children:"Video"})]})]})]}),c.jsx(tx,{prompts:r,theme:l}),c.jsx(nx,{statusMessage:i,theme:l})]})});Md.displayName="Welcome";function Vd({room:e,onSessionEnd:t,onSessionStart:n,enableConsoleLogging:s=!0,enableLocalStorage:r=!0,voxketSessionId:i}={}){const[o,a]=p.useState(null),[l,d]=p.useState([]),[u,h]=p.useState(null),[m,g]=p.useState([]),x=p.useCallback((S,T)=>{const C={timestamp:new Date,event:S,data:T,sessionId:o==null?void 0:o.sessionId,participantId:u==null?void 0:u.identity};if(d(w=>[...w,C]),r){const w=JSON.parse(localStorage.getItem("voxket-session-logs")||"[]");w.push(C),localStorage.setItem("voxket-session-logs",JSON.stringify(w))}return C},[o==null?void 0:o.sessionId,u==null?void 0:u.identity,s,r]);p.useEffect(()=>{if(!e)return;const S=()=>{const y=i||`session-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,R=new Date,H={sessionId:y,startTime:R,totalMessages:0,connectionIssues:0,participantCount:m.length,events:[]};a(H),x("SESSION_STARTED",{sessionId:y,startTime:R}),n==null||n(y)},T=()=>{if(o){const y=new Date,R=y.getTime()-o.startTime.getTime(),H={...o,endTime:y,duration:R,events:l};x("SESSION_ENDED",{sessionId:o.sessionId,duration:`${Math.round(R/1e3)}s`,totalMessages:o.totalMessages,connectionIssues:o.connectionIssues}),t==null||t(H),a(null),d([])}},C=y=>{x("CONNECTION_STATE_CHANGED",{state:y}),y===U.ConnectionState.Reconnecting&&o&&(a(R=>R?{...R,connectionIssues:R.connectionIssues+1}:null),x("CONNECTION_ISSUE",{type:"reconnecting"}))},w=y=>{x("TRACK_PUBLISHED",{trackKind:y.kind,trackSource:y.source})},A=y=>{x("TRACK_UNPUBLISHED",{trackKind:y.kind,trackSource:y.source})},V=(y,R)=>{o&&a(H=>H?{...H,totalMessages:H.totalMessages+1}:null),x("DATA_RECEIVED",{participantId:R==null?void 0:R.identity,dataSize:y.length})},E=y=>{x("PARTICIPANT_CONNECTED",{participantId:y.identity,participantName:y.name}),g(R=>[...R,y]),o&&a(R=>R?{...R,participantCount:R.participantCount+1}:null)},F=y=>{x("PARTICIPANT_DISCONNECTED",{participantId:y.identity,participantName:y.name}),g(R=>R.filter(H=>H.identity!==y.identity))};return e.localParticipant&&h(e.localParticipant),e.on(U.RoomEvent.Connected,S),e.on(U.RoomEvent.Disconnected,T),e.on(U.RoomEvent.ConnectionStateChanged,C),e.on(U.RoomEvent.TrackPublished,w),e.on(U.RoomEvent.TrackUnpublished,A),e.on(U.RoomEvent.DataReceived,V),e.on(U.RoomEvent.ParticipantConnected,E),e.on(U.RoomEvent.ParticipantDisconnected,F),()=>{e.off(U.RoomEvent.Connected,S),e.off(U.RoomEvent.Disconnected,T),e.off(U.RoomEvent.ConnectionStateChanged,C),e.off(U.RoomEvent.TrackPublished,w),e.off(U.RoomEvent.TrackUnpublished,A),e.off(U.RoomEvent.DataReceived,V),e.off(U.RoomEvent.ParticipantConnected,E),e.off(U.RoomEvent.ParticipantDisconnected,F)}},[e,o,l,m.length,x,t,n]);const f=p.useCallback(()=>r?JSON.parse(localStorage.getItem("voxket-session-logs")||"[]"):l,[l,r]),b=p.useCallback(()=>{r&&localStorage.removeItem("voxket-session-logs"),d([])},[r]),k=p.useCallback(()=>{const S=f(),T=JSON.stringify(S,null,2),C="data:application/json;charset=utf-8,"+encodeURIComponent(T),w=`voxket-session-logs-${new Date().toISOString().split("T")[0]}.json`,A=document.createElement("a");A.setAttribute("href",C),A.setAttribute("download",w),A.click()},[f]);return{sessionMetrics:o,sessionLogs:l,logEvent:x,getSessionLogs:f,clearSessionLogs:b,exportSessionLogs:k}}class Wo{constructor(){Ee(this,"listeners",{})}on(t,n){return this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push(n),()=>this.off(t,n)}once(t,n){const s=(...r)=>{this.off(t,s),n(...r)};return this.on(t,s)}off(t,n){const s=this.listeners[t];if(!s)return;const r=s.indexOf(n);r>-1&&s.splice(r,1)}removeAllListeners(t){t?delete this.listeners[t]:this.listeners={}}emit(t,...n){const s=this.listeners[t];if(!s)return;const r=[...s];for(const i of r)try{i(...n)}catch(o){console.error(`Error in event listener for ${String(t)}:`,o)}}listenerCount(t){var n;return((n=this.listeners[t])==null?void 0:n.length)??0}eventNames(){return Object.keys(this.listeners)}}class Nd{constructor(t){Ee(this,"plugins",new Map);Ee(this,"installedPlugins",new Set);Ee(this,"context");this.context={client:t,emit:t.emit.bind(t),on:t.on.bind(t),config:{}}}register(t){if(this.plugins.has(t.name))throw new Error(`Plugin '${t.name}' is already registered`);if(t.dependencies){for(const n of t.dependencies)if(!this.plugins.has(n))throw new Error(`Plugin '${t.name}' depends on '${n}' which is not registered`)}this.plugins.set(t.name,t)}async install(t,n){const s=this.plugins.get(t);if(!s)throw new Error(`Plugin '${t}' is not registered`);if(this.installedPlugins.has(t))throw new Error(`Plugin '${t}' is already installed`);if(s.dependencies)for(const i of s.dependencies)this.installedPlugins.has(i)||await this.install(i);const r={...this.context,config:{...s.config,...n}};s.install&&await s.install(r),this.installedPlugins.add(t),this.setupPluginEvents(s,r)}async uninstall(t){var s;const n=this.plugins.get(t);if(!n)throw new Error(`Plugin '${t}' is not registered`);if(this.installedPlugins.has(t)){for(const[r,i]of this.plugins)if(this.installedPlugins.has(r)&&((s=i.dependencies)!=null&&s.includes(t)))throw new Error(`Cannot uninstall '${t}' because '${r}' depends on it`);n.uninstall&&await n.uninstall(this.context),this.installedPlugins.delete(t)}}isInstalled(t){return this.installedPlugins.has(t)}getInstalledPlugins(){return Array.from(this.installedPlugins)}getAvailablePlugins(){return Array.from(this.plugins.keys())}getPluginInfo(t){return this.plugins.get(t)}setupPluginEvents(t,n){t.onSessionStart&&n.on("session.started",s=>{t.onSessionStart(n,s.id)}),t.onSessionEnd&&n.on("session.ended",s=>{t.onSessionEnd(n,s.id)}),t.onAgentResponse&&n.on("agent.response",s=>{t.onAgentResponse(n,s)})}}function sx(e){return e}function Zo(e,t,n){return{name:e,version:"1.0.0",description:`${t} modality plugin`,install:async s=>{n.onActivate&&await n.onActivate(s)},uninstall:async s=>{n.onDeactivate&&await n.onDeactivate(s)},onAgentResponse:n.onMessage}}const rx={name:"analytics",version:"1.0.0",description:"Built-in analytics tracking",install:async e=>{console.log("Analytics plugin installed"),e.on("session.started",t=>{console.log("Analytics: Session started",t.id)}),e.on("session.ended",(t,n)=>{console.log("Analytics: Session ended",t.id,n)}),e.on("chat.message.sent",t=>{console.log("Analytics: User message sent",t.content.length)})}},ox={name:"debug",version:"1.0.0",description:"Debug logging and development tools",install:async e=>{console.log("Debug plugin installed");const t=e.emit;e.emit=(n,...s)=>(console.log(`[Debug] Event: ${String(n)}`,s),t(n,...s))}},ix={name:"metrics",version:"1.0.0",description:"Advanced metrics collection",install:async e=>{console.log("Metrics plugin installed");const t=new Map;e.on("session.started",n=>{t.set(n.id,{startTime:Date.now(),events:[]})}),e.on("agent.response",n=>{console.log("Metrics: Agent response analyzed",{type:n.type,length:n.content.length,timestamp:n.timestamp})})}},Pd=v.createContext(null);function hs({config:e,children:t,autoConnect:n=!1,client:s}){const[r,i]=v.useState(null),[o,a]=v.useState(!1),[l,d]=v.useState(!1),[u,h]=v.useState(null),[m,g]=v.useState(null),[x,f]=v.useState("idle"),[b,k]=v.useState(null),[S,T]=v.useState([]),[C,w]=v.useState([]),[A,V]=v.useState([]);v.useEffect(()=>{const W=s||new Gn(e);i(W);const j=E(W);return n&&!s&&F(W),()=>{j(),s||W.disconnect().catch(console.error)}},[e,n,s]);const E=W=>{const j=()=>{d(!0),h(null)},B=()=>{a(!0),d(!1),h(null)},L=()=>{a(!1),d(!1),g(null),f("idle"),T([]),w([]),V([])},Z=z=>{h(z),d(!1)},O=z=>{g(z),f(z.state)},Q=z=>{f(z),m&&g({...m,state:z})},G=(z,te)=>{g(null),f("idle"),k(te),T([]),w([]),V([])},K=z=>{T(te=>[...te,z])},q=z=>{T(te=>te.filter(le=>le.id!==z.id))},N=z=>{w(te=>[...te,z])},$=z=>{w(te=>[...te,z])},de=z=>{console.log("📝 VoxketProvider: Received transcription:",z),V(te=>te.find(ae=>ae.id===z.id)?(console.log("📝 VoxketProvider: Duplicate transcription detected, skipping:",z.id),te):(console.log("📝 VoxketProvider: Adding new transcription:",z.id),[...te,z]))},P=()=>{console.log("🧹 VoxketProvider: Clearing chat messages and transcriptions"),w([]),V([])};return W.on("connection.connecting",j),W.on("connection.connected",B),W.on("connection.disconnected",L),W.on("connection.error",Z),W.on("session.created",O),W.on("session.state.changed",Q),W.on("session.ended",G),W.on("participant.joined",K),W.on("participant.left",q),W.on("chat.message.received",N),W.on("chat.message.sent",$),W.on("transcription.received",de),W.on("chat.history.cleared",P),()=>{console.log("📝 VoxketProvider: Cleaning up event listeners"),W.off("connection.connecting",j),W.off("connection.connected",B),W.off("connection.disconnected",L),W.off("connection.error",Z),W.off("session.created",O),W.off("session.state.changed",Q),W.off("session.ended",G),W.off("participant.joined",K),W.off("participant.left",q),W.off("chat.message.received",N),W.off("chat.message.sent",$),W.off("chat.history.cleared",P),W.off("transcription.received",de)}},F=async W=>{const j=W||r;if(j)try{await j.connect()}catch(B){console.error("Failed to connect:",B)}},I={client:r,isConnected:o,isConnecting:l,connectionError:u,currentSession:m,sessionState:x,sessionMetrics:b,participants:S,chatMessages:C,transcriptions:A,connect:()=>F(),disconnect:async()=>{if(r)try{await r.disconnect()}catch(W){console.error("Failed to disconnect:",W)}},createSession:async(W,j={})=>{if(!r)throw new Error("Client not initialized");const B={agentId:W,participantName:j.participantName||"User",metadata:j.metadata,modalities:j.modalities||["voice"]};return await r.createSession(B)},endSession:async()=>r?await r.endSession():null,sendChatMessage:async W=>{if(!r)throw new Error("Client not initialized");await r.sendChatMessage(W)},setMicrophoneEnabled:async W=>{if(!r)throw new Error("Client not initialized");await r.setMicrophoneEnabled(W)},setCameraEnabled:async W=>{if(!r)throw new Error("Client not initialized");await r.setCameraEnabled(W)},startScreenShare:async()=>{if(!r)throw new Error("Client not initialized");await r.startScreenShare()},stopScreenShare:async()=>{if(!r)throw new Error("Client not initialized");await r.stopScreenShare()}};return c.jsx(Pd.Provider,{value:I,children:t})}function lt(){const e=v.useContext(Pd);if(!e)throw new Error("useVoxket must be used within a VoxketProvider");return e}class ax extends Wo{constructor(n){super();Ee(this,"room",null);Ee(this,"registeredMethods",new Map);Ee(this,"activeInteractions",new Map);Ee(this,"currentInteraction",null);n&&this.setRoom(n)}setRoom(n){this.room=n}async registerFrontendRPC(n,s,r="embedded"){if(console.log(`RpcManager: Starting registration for method '${n}'`),!this.room)throw console.error(`RpcManager: Cannot register '${n}' - no room instance`),new Error("Room not initialized. Cannot register RPC method.");if(!this.room.localParticipant)throw console.error(`RpcManager: Cannot register '${n}' - no local participant`),new Error("Local participant not available for RPC registration");console.log(`RpcManager: Room state: ${this.room.state}`),console.log(`RpcManager: Local participant: ${this.room.localParticipant.identity}`),console.log(`RpcManager: Registering frontend RPC method: ${n}`);const i={methodName:n,component:s,presentationMode:r};this.registeredMethods.set(n,i);try{this.room.registerRpcMethod(n,async o=>{console.log(`RpcManager: RPC method '${n}' called by ${o.callerIdentity}`),console.log("RpcManager: Payload:",o.payload),this.emit("rpc.method.called",{methodName:n,data:o});let a;console.log(`RpcManager: Current registration for '${n}':`,i);let l=o.responseTimeout||30;try{a=JSON.parse(o.payload)}catch{a=o.payload}try{const d=await this.awaitUserInteraction(n,s,r,a,l);return JSON.stringify(d)}catch(d){throw console.error(`RpcManager: Error in RPC method '${n}':`,d),d}}),this.emit("rpc.method.registered",{methodName:n}),console.log(`RpcManager: Successfully registered RPC method: ${n}`)}catch(o){throw console.error(`RpcManager: Failed to register RPC method '${n}':`,o),o}}async awaitUserInteraction(n,s,r,i,o){return new Promise((a,l)=>{const d=`${n}_${Date.now()}`;console.log(`RpcManager: Starting user interaction for method: ${n}, timeout: ${o} seconds`);const u={didSuccess:(m,g)=>{console.log(`RpcManager: User interaction successful for method: ${n}`,m),this.clearInteraction(d),this.currentInteraction=null;const x={success:!0,message:"User interaction completed successfully",data:m,timestamp:new Date,...g?{successView:g}:{}};this.emit("rpc.interaction.completed",{methodName:n,response:x}),a(x)},didFail:m=>{console.log(`RpcManager: User interaction failed for method: ${n}`,m),this.clearInteraction(d);const g={success:!1,message:"User interaction failed",error:m,timestamp:new Date};this.emit("rpc.interaction.completed",{methodName:n,response:g}),a(g)},dismissView:()=>{var g;console.log(`RpcManager: User dismissed interaction for method: ${n}`),console.log("RpcManager: Current interaction before dismiss:",(g=this.currentInteraction)==null?void 0:g.methodName),this.clearInteraction(d),this.currentInteraction=null,console.log("RpcManager: Current interaction after dismiss:",this.currentInteraction);const m={success:!0,data:{dismissed:!0,reason:"User dismissed the interaction"},message:"User interaction dismissed",timestamp:new Date};this.emit("rpc.interaction.dismissed",{methodName:n,response:m}),this.emit("rpc.interaction.completed",{methodName:n,response:m}),setTimeout(()=>{var x;((x=this.currentInteraction)==null?void 0:x.methodName)===n&&(console.log(`RpcManager: Force clearing interaction for ${n}`),this.currentInteraction=null)},0),a(m)},didTimeout:m=>{console.log(`RpcManager: User interaction timeout for method: ${n}`),this.clearInteraction(d),this.currentInteraction=null;const g={success:!0,message:`User interaction timed out after ${o} seconds, it should be considered as declined, agent don't need to retry`,timestamp:new Date,...m?{timeoutView:m}:{}};this.emit("rpc.interaction.timeout",{methodName:n,response:g}),setTimeout(()=>{var x;((x=this.currentInteraction)==null?void 0:x.methodName)===n&&(console.log(`RpcManager: Force clearing interaction for ${n}`),this.currentInteraction=null)},0),a(g)}},h=setTimeout(()=>{u.didTimeout&&u.didTimeout()},o);this.activeInteractions.set(d,{resolve:m=>a(JSON.parse(m)),reject:l,timeoutId:h}),this.currentInteraction={isVisible:!0,methodName:n,component:s,presentationMode:r,timeout:o,data:i,handler:u},this.emit("rpc.interaction.started",{methodName:n,presentationMode:r}),setTimeout(async()=>{var m;if((m=this.currentInteraction)!=null&&m.handler)try{console.log(`RpcManager: Component created for method: ${n} with data:`,i)}catch(g){console.error("RpcManager: Error loading data into component:",g),u.didFail({error:"Failed to load data into component"})}},100)})}clearInteraction(n){const s=this.activeInteractions.get(n);s&&(console.log(`RpcManager: Clearing interaction: ${n}`),clearTimeout(s.timeoutId),this.activeInteractions.delete(n))}getCurrentInteraction(){return this.currentInteraction}dismissCurrentInteraction(){var n;this.currentInteraction&&(console.log(`RpcManager: Dismissing current interaction: ${this.currentInteraction.methodName}`),(n=this.currentInteraction.handler)==null||n.dismissView(),setTimeout(()=>{this.currentInteraction&&(console.log("RpcManager: Force clearing lingering interaction"),this.currentInteraction=null)},0))}getRegisteredMethods(){return Array.from(this.registeredMethods.keys())}unregisterMethod(n){this.registeredMethods.delete(n),console.log(`RpcManager: Unregistered RPC method: ${n}`)}clear(){for(const[n,s]of this.activeInteractions)clearTimeout(s.timeoutId);this.activeInteractions.clear(),this.registeredMethods.clear(),this.currentInteraction=null,console.log("RpcManager: Cleared all registrations and interactions")}}class ve extends Error{constructor(t,n,s){super(t),this.code=n,this.details=s,this.name="VoxketError"}}const wt=new WeakSet,br=new WeakSet;class Gn extends Wo{constructor(n){super();Ee(this,"config");Ee(this,"room",null);Ee(this,"pluginManager");Ee(this,"rpcManager");Ee(this,"isConnected",!1);Ee(this,"currentSession",null);Ee(this,"connectionState",U.ConnectionState.Disconnected);Ee(this,"renderedComponents",new Map);Ee(this,"textStreamHandlersRegistered",!1);Ee(this,"currentAgentInfo",null);Ee(this,"chatMessages",[]);Ee(this,"activeTranscriptions",new Map);Ee(this,"isAgentConnected",!1);Ee(this,"agentState","idle");this.config=n,this.pluginManager=new Nd(this),this.rpcManager=new ax,this.setupEventListeners(),this.initializeClient()}setupEventListeners(){this.on("connection.connected",()=>{var n,s;this.isConnected=!0,(s=(n=this.config).onConnected)==null||s.call(n)}),this.on("connection.disconnected",n=>{var s,r;this.isConnected=!1,(r=(s=this.config).onDisconnected)==null||r.call(s,n)}),this.on("connection.error",n=>{var s,r;(r=(s=this.config).onError)==null||r.call(s,n)}),this.on("chat.message.received",n=>{var s,r;this.addChatMessage(n),(r=(s=this.config).onMessageReceived)==null||r.call(s,n)}),this.on("chat.message.updated",n=>{this.updateChatMessage(n)}),this.on("chat.message.sent",n=>{this.addChatMessage(n)}),this.on("transcription.received",n=>{var s,r;(r=(s=this.config).onTranscriptionReceived)==null||r.call(s,n)}),this.on("session.state.changed",n=>{var s,r;(r=(s=this.config).onSessionStateChanged)==null||r.call(s,n)}),this.on("session.created",n=>{var s,r;(r=(s=this.config).onSessionStart)==null||r.call(s,n.id)}),this.on("session.ended",(n,s)=>{var r,i;(i=(r=this.config).onSessionEnd)==null||i.call(r,s)}),this.on("participant.joined",n=>{var s,r;(r=(s=this.config).onUserJoined)==null||r.call(s,n.id)}),this.on("participant.left",n=>{var s,r;(r=(s=this.config).onUserLeft)==null||r.call(s,n.id)}),this.setupRpcEventForwarding()}setupRpcEventForwarding(){if(!this.rpcManager){console.warn("RpcManager not initialized, skipping event forwarding setup");return}this.rpcManager.on("rpc.method.registered",n=>this.emit("rpc.method.registered",n)),this.rpcManager.on("rpc.method.called",n=>this.emit("rpc.method.called",n)),this.rpcManager.on("rpc.interaction.started",n=>this.emit("rpc.interaction.started",n)),this.rpcManager.on("rpc.interaction.completed",n=>this.emit("rpc.interaction.completed",n)),this.rpcManager.on("rpc.interaction.timeout",n=>this.emit("rpc.interaction.timeout",n)),this.rpcManager.on("rpc.interaction.dismissed",n=>this.emit("rpc.interaction.dismissed",n))}initializeClient(){this.room=new U.Room,this.setupRoomEventListeners()}setupRoomEventListeners(){this.room&&(this.room.on(U.RoomEvent.Connected,()=>{var n,s;this.connectionState=U.ConnectionState.Connected,this.emit("connection.connected"),this.rpcManager.setRoom(this.room),(s=(n=this.currentSession)==null?void 0:n.activeModalities)!=null&&s.includes("voice")&&setTimeout(async()=>{var r;try{(r=this.room)!=null&&r.localParticipant&&(this.room.localParticipant.isMicrophoneEnabled?this.emit("track.unmuted",{source:"microphone",enabled:!0}):(await this.room.localParticipant.setMicrophoneEnabled(!0),this.emit("track.unmuted",{source:"microphone",enabled:!0})))}catch(i){console.warn("VoxketClient: Failed to enable microphone after room connection:",i)}},1e3),this.textStreamHandlersRegistered||this.setupTextStreamHandlers()}),this.room.on(U.RoomEvent.Disconnected,n=>{var s;console.log("🔴 VoxketClient: Room disconnected, reason:",n),this.connectionState=U.ConnectionState.Disconnected,this.textStreamHandlersRegistered=!1,this.isAgentConnected=!1,console.log("🤖 VoxketClient: Agent marked as disconnected"),this.clearChatMessages(),n&&console.log("🔍 VoxketClient: Disconnect reason details:",{reason:n.toString(),currentSession:(s=this.currentSession)==null?void 0:s.id,agentConnected:this.isAgentConnected,connectionState:this.connectionState}),this.emit("connection.disconnected",n==null?void 0:n.toString())}),this.room.on(U.RoomEvent.ConnectionStateChanged,n=>{this.connectionState=n,n===U.ConnectionState.Connecting&&this.emit("connection.connecting")}),this.room.on(U.RoomEvent.ParticipantConnected,n=>{const s={id:n.identity,name:n.name||n.identity,isLocal:!1};this.emit("participant.joined",s)}),this.room.on(U.RoomEvent.ParticipantDisconnected,n=>{const s={id:n.identity,name:n.name||n.identity,isLocal:!1};this.emit("participant.left",s)}))}setupTextStreamHandlers(){if(!this.room)return;try{this.room.registerTextStreamHandler("lk.chat",async(s,r)=>{try{const i=await s.readAll(),o={id:`msg_${Date.now()}_${r.identity||"user"}_${Math.random().toString(36).substr(2,9)}`,content:i,timestamp:new Date,sender:{id:r.identity||"user",name:r.identity||"User",type:"participant"},metadata:{topic:"lk.chat"}};this.emit("chat.message.received",o)}catch(i){console.error("VoxketClient: Failed to process lk.chat message:",i)}})}catch(s){console.warn("VoxketClient: lk.chat handler already registered, skipping:",s)}try{console.log("📝 VoxketClient: Registering lk.transcription handler..."),this.room.registerTextStreamHandler("lk.transcription",async(s,r)=>{var i,o,a,l,d,u;console.log("📝 VoxketClient: Received transcription stream from:",r.identity);try{console.log("📝 VoxketClient: Processing transcription stream...");const h=r.identity===((o=(i=this.room)==null?void 0:i.localParticipant)==null?void 0:o.identity),m=Date.now(),g=r.identity,x=this.activeTranscriptions.get(g);let f,b=!0;x&&m-x.timestamp<1e3?(f=x.messageId,b=!1,console.log("📝 VoxketClient: Reusing existing transcription message ID:",f)):(f=`msg_${h?"user":"agent"}_${r.identity}_${m}`,this.activeTranscriptions.set(g,{messageId:f,timestamp:m}),console.log("📝 VoxketClient: Created new transcription message ID:",f));let k="";const S=((a=this.currentAgentInfo)==null?void 0:a.name)||r.identity||"AI Assistant";console.log("📝 VoxketClient: Using agent name:",S);const T=h?"participant":"agent",C=h?this.config.participantName||"User":S;console.log("📝 VoxketClient: Transcription sender info:",{participantIdentity:r.identity,localParticipantIdentity:(d=(l=this.room)==null?void 0:l.localParticipant)==null?void 0:d.identity,isFromUser:h,senderType:T,senderName:C});const w={id:f,content:"",timestamp:new Date,sender:{id:r.identity||"unknown",name:C,type:T},metadata:{topic:"lk.transcription",streaming:!0}};b&&this.emit("chat.message.received",w),console.log("📝 VoxketClient: Starting to read transcription stream...");for await(const F of s){console.log("📝 VoxketClient: Received chunk:",F.length,"chars"),k+=F;const y=this.convertMarkdownToText(k),R={...w,content:y,metadata:{...w.metadata,streaming:!0}};this.emit("chat.message.updated",R)}const A=this.convertMarkdownToText(k),V={...w,content:A,metadata:{...w.metadata,streaming:!1}};this.emit("chat.message.updated",V);const E={id:f,text:A,isFinal:!0,startTime:w.timestamp.getTime(),participantId:r.identity||"agent"};this.emit("transcription.received",E),console.log("📝 VoxketClient: Emitted transcription event:",E)}catch(h){console.error("VoxketClient: Failed to process lk.transcription message:",h);try{const m=await s.readAll(),g=((u=this.currentAgentInfo)==null?void 0:u.name)||r.identity||"AI Assistant",x={id:`msg_${Date.now()}_agent_transcription_${Math.random().toString(36).substr(2,9)}`,content:m,timestamp:new Date,sender:{id:r.identity||"agent",name:g,type:"agent"},metadata:{topic:"lk.transcription"}};this.emit("chat.message.received",x);const f={id:x.id,text:x.content,isFinal:!0,startTime:x.timestamp.getTime(),participantId:r.identity||"agent"};this.emit("transcription.received",f),console.log("📝 VoxketClient: Emitted fallback transcription event:",f)}catch(m){console.error("VoxketClient: Fallback failed for lk.transcription:",m)}}})}catch(s){console.warn("VoxketClient: lk.transcription handler already registered, skipping:",s)}try{this.room.registerTextStreamHandler("suggested_response",async s=>{const r=await s.readAll();let i=[];try{i=["tes","hello how are you","algebra make me learn that ","what is the meaning of life"]}catch(o){console.warn("VoxketClient: Failed to parse suggested_response:",o,r)}this.emit("suggested.response",i)})}catch(s){console.warn("VoxketClient: suggested_response handler already registered, skipping:",s)}try{this.room.registerTextStreamHandler("agent_state_changed",async(s,r)=>{const i=await s.readAll();console.log("🤖 VoxketClient: agent_state_changed stream received:",i);let o={};try{o=typeof i=="string"?JSON.parse(i.replace(/'/g,'"')):i}catch(a){console.warn("VoxketClient: Failed to parse agent_state_changed:",a,i)}this.isAgentConnected||(this.isAgentConnected=!0,console.log("🤖 VoxketClient: Agent marked as connected (first state change received)"),this.emit("agent.connected",o)),o.new_state==="speaking"?(this.setAgentState("speaking"),this.emit("agent.speaking",o)):o.new_state==="thinking"?(this.setAgentState("thinking"),this.emit("agent.thinking",o)):(o.new_state==="idle"||o.new_state==="listening")&&this.setAgentState("idle")})}catch(s){console.warn("VoxketClient: conversation_item_added handler already registered, skipping:",s)}try{this.room.registerTextStreamHandler("images",async(s,r)=>{try{const i=await s.readAll()}catch(i){console.error("VoxketClient: Error processing images stream:",i)}})}catch(s){console.warn("VoxketClient: images handler already registered, skipping:",s)}try{this.room.registerByteStreamHandler("images",async(s,r)=>{var i,o;try{const a=s.info,l={id:`img_${Date.now()}_${r.identity||"agent"}_${Math.random().toString(36).substr(2,9)}`,content:`�️ ${a.name||"Image"}`,sender:{id:r.identity||"agent",name:r.identity||"Agent",type:r.identity===((o=(i=this.room)==null?void 0:i.localParticipant)==null?void 0:o.identity)?"participant":"agent"},timestamp:new Date,metadata:{type:"attachment",fileName:a.name,fileSize:a.size,mimeType:a.mimeType,streamId:a.id,downloading:!0}};this.emit("chat.message.received",l),s.onProgress&&(s.onProgress=g=>{const x={...l,metadata:{...l.metadata,downloadProgress:g||0}};this.emit("chat.message.updated",x)});const d=[];for await(const g of s)d.push(g);const u=new Blob(d,{type:a.mimeType||"application/octet-stream"}),h=URL.createObjectURL(u),m={...l,metadata:{...l.metadata,downloading:!1,downloadProgress:1,downloadUrl:h,blob:u}};this.emit("chat.message.updated",m)}catch(a){console.error("VoxketClient: Error processing image attachment:",a)}})}catch(s){console.warn("VoxketClient: image handler already registered, skipping:",s)}["error","warning","status","system","debug","info"].forEach(s=>{try{this.room.registerTextStreamHandler(s,async(r,i)=>{try{const o=await r.readAll();if(console.log(`📝 VoxketClient: Received '${s}' stream:`,o),s==="error"){let a={};try{a=typeof o=="string"?JSON.parse(o):o}catch{a={message:o}}console.warn("� VoxketClient: Agent error:",a),this.emit("agent.error",a)}else this.emit("text.stream.received",{topic:s,data:o,participantInfo:i})}catch(o){console.error(`VoxketClient: Failed to process '${s}' stream:`,o)}})}catch(r){console.warn(`VoxketClient: Handler for '${s}' already registered, skipping:`,r)}});try{this.room.registerTextStreamHandler("*",async(s,r)=>{var i;try{const o=await s.readAll(),a=((i=s.info)==null?void 0:i.topic)||"unknown";console.log(`📝 VoxketClient: Received unhandled text stream for topic '${a}':`,o),this.emit("text.stream.unhandled",{topic:a,data:o,participantInfo:r})}catch(o){console.error("VoxketClient: Failed to process unhandled text stream:",o)}})}catch(s){console.warn("VoxketClient: Generic text stream handler already registered, skipping:",s)}this.textStreamHandlersRegistered=!0}async fetchConnectionDetails(n,s,r){const i=n||this.config.agentId||"default-agent",o=s||this.config.participantName||"User",a=r||this.config.modalities||["voice"];try{const l={agent_id:i,participant_name:o,participant_metadata:{user_id:""},modality:a[0],modalities:a};console.log("🔗 VoxketClient: Creating session with modalities:",a);const d=await fetch(`${this.config.baseUrl}/api/live/agent/session`,{method:"POST",headers:{accept:"application/json","X-APP-ID":this.config.appId,"X-APP-SECRET":this.config.appSecret,"Content-Type":"application/json"},body:JSON.stringify(l)});if(!d.ok){let m=`HTTP ${d.status}: Failed to fetch connection details`;try{const g=await d.json();g&&(g.error?m=`API Error: ${g.error}`:g.detail?m=`API Error: ${g.detail}`:g.message&&(m=`API Error: ${g.message}`))}catch{try{const x=await d.text();x&&(m=`API Error: ${x}`)}catch{}}throw new Error(m)}const u=await d.json();let h;return u.agent_info&&(h={id:u.agent_info.id||i,name:u.agent_info.name||"AI Assistant",avatar:u.agent_info.avatar,capabilities:u.agent_info.capabilities||["voice_interaction","text_chat"],metadata:u.agent_info.metadata||{}},this.currentAgentInfo=h),{serverUrl:u.wss_url,participantToken:u.token,voxketSessionId:u.session_id,agentInfo:h}}catch(l){console.error("VoxketClient: fetchConnectionDetails failed:",l);const d=new ve(`Failed to fetch connection details: ${l instanceof Error?l.message:"Unknown error"}`,"CONNECTION_FAILED",l);throw this.emit("connection.error",d),d}}async connect(n,s,r){var i;try{this.emit("connection.connecting");const o=await this.fetchConnectionDetails(n,s,r);return await((i=this.room)==null?void 0:i.connect(o.serverUrl,o.participantToken)),this.isConnected=!0,o}catch(o){console.error("VoxketClient: Connection failed:",o);const a=new ve(`Failed to connect to Voxket services: ${o instanceof Error?o.message:"Unknown error"}`,"CONNECTION_FAILED",o);throw this.emit("connection.error",a),a}}async disconnect(){var n;try{console.log("🔌 VoxketClient: Starting disconnect process..."),this.room&&(console.log("🔌 VoxketClient: Disconnecting from room:",{roomState:this.room.state,numParticipants:this.room.numParticipants,sessionId:(n=this.currentSession)==null?void 0:n.id}),await this.room.disconnect()),this.isConnected=!1,this.currentSession=null,this.currentAgentInfo=null,this.textStreamHandlersRegistered=!1,this.clearChatMessages(),console.log("🔌 VoxketClient: Creating new room instance..."),this.room=new U.Room,this.setupRoomEventListeners(),console.log("✅ VoxketClient: Disconnect completed successfully"),this.emit("connection.disconnected")}catch(s){console.error("❌ VoxketClient: Disconnect failed:",s);const r=new ve("Failed to disconnect properly","NETWORK_ERROR",s);throw this.emit("connection.error",r),r}}async createSession(n){var s,r,i,o;try{const a=await this.connect(n.agentId,n.participantName,n.modalities),l={id:a.voxketSessionId,agentId:n.agentId,state:"connecting",startedAt:new Date,metadata:n.metadata||{},activeModalities:n.modalities||["voice"],agentInfo:a.agentInfo||this.currentAgentInfo};if(this.currentSession=l,this.emit("session.created",l),(s=n.modalities)!=null&&s.includes("voice"))try{await new Promise(d=>setTimeout(d,500)),(r=this.room)!=null&&r.localParticipant?(await this.room.localParticipant.setMicrophoneEnabled(!0,void 0,{preConnectBuffer:!0}),this.emit("track.unmuted",{source:"microphone",enabled:!0})):console.warn("VoxketClient: No local participant found, microphone not enabled")}catch(d){console.warn("VoxketClient: Failed to enable microphone, but continuing with session:",d)}if((i=n.modalities)!=null&&i.includes("video"))try{await new Promise(d=>setTimeout(d,200)),(o=this.room)!=null&&o.localParticipant&&(console.log("🎥 VoxketClient: Attempting to enable camera for video session"),await this.room.localParticipant.setCameraEnabled(!0),this.emit("track.unmuted",{source:"camera",enabled:!0}),console.log("🎥 VoxketClient: Camera enabled successfully"))}catch(d){console.warn("VoxketClient: Failed to enable camera, but continuing with session:",d)}return setTimeout(()=>{var d;this.currentSession&&(this.currentSession.state="active",this.emit("session.state.changed","active",this.currentSession.state),this.forceAgentConnected(),console.log("🤖 VoxketClient: Session marked as active:",{sessionId:this.currentSession.id,modalities:this.currentSession.activeModalities,agentConnected:this.isAgentConnected,hasRoom:!!this.room,remoteParticipants:((d=this.room)==null?void 0:d.remoteParticipants.size)||0}))},1e3),l}catch(a){throw console.error("VoxketClient: Failed to create session:",a),a instanceof ve?a:a instanceof TypeError&&a.message.includes("fetch")?new ve("Network connection failed","CONNECTION_FAILED",a):a instanceof Error&&a.message.includes("Failed to fetch connection details")?new ve(`API connection failed: ${a.message}`,"CONNECTION_FAILED",a):new ve(`Failed to create session: ${a instanceof Error?a.message:"Unknown error"}`,"SESSION_NOT_FOUND",a)}}async startSession(n,s){const r={agentId:n||this.config.agentId||"default-agent",participantName:(s==null?void 0:s.participantName)||this.config.participantName||"User",modalities:(s==null?void 0:s.modalities)||this.config.modalities||["voice","chat"],metadata:s==null?void 0:s.metadata};return this.createSession(r)}async endSession(){var n,s;if(!this.currentSession)return null;try{const r={sessionId:this.currentSession.id,duration:Date.now()-(((n=this.currentSession.startedAt)==null?void 0:n.getTime())||0),messageCount:0,participantCount:((s=this.room)==null?void 0:s.remoteParticipants.size)||0,audioQuality:{avgBitrate:64e3,avgLatency:150,packetLoss:.01,jitter:.05},videoQuality:{avgBitrate:5e5,avgLatency:150,packetLoss:.01,jitter:.05},networkStats:{totalBytesReceived:0,totalBytesSent:0,connectionType:"webrtc",avgRoundTripTime:150},events:[]};return this.currentSession.endedAt=new Date,this.currentSession.state="disconnected",this.emit("session.ended",this.currentSession,r),await this.disconnect(),r}catch(r){throw new ve("Failed to end session","SESSION_NOT_FOUND",r)}}getCurrentSession(){return this.currentSession}getCurrentAgentInfo(){return this.currentAgentInfo}getIsAgentConnected(){return this.isAgentConnected}forceAgentConnected(){this.isAgentConnected||(this.isAgentConnected=!0,console.log("🤖 VoxketClient: Agent manually marked as connected"),this.emit("agent.connected",{forced:!0}))}getAgentState(){return this.agentState}setAgentState(n){this.agentState!==n&&(this.agentState=n,this.emit("agent.state.changed",{state:n}))}getAgentAudioTrack(){const n=this.getRemoteParticipants();for(const s of n){const r=s.getTrackPublication(U.Track.Source.Microphone);if(r!=null&&r.track)return{source:U.Track.Source.Microphone,participant:s,publication:r}}return null}getAgentVideoTrack(){const n=this.getRemoteParticipants();for(const s of n){const r=s.getTrackPublication(U.Track.Source.Camera);if(r!=null&&r.track)return{source:U.Track.Source.Camera,participant:s,publication:r}}return null}getVideoTrackRefs(){const n=[],s=this.getLocalParticipant();if(s){const i=s.getTrackPublication(U.Track.Source.Camera);i!=null&&i.track&&n.push({source:U.Track.Source.Camera,participant:s,publication:i});const o=s.getTrackPublication(U.Track.Source.ScreenShare);o!=null&&o.track&&n.push({source:U.Track.Source.ScreenShare,participant:s,publication:o})}const r=this.getRemoteParticipants();for(const i of r){const o=i.getTrackPublication(U.Track.Source.Camera);o!=null&&o.track&&n.push({source:U.Track.Source.Camera,participant:i,publication:o});const a=i.getTrackPublication(U.Track.Source.ScreenShare);a!=null&&a.track&&n.push({source:U.Track.Source.ScreenShare,participant:i,publication:a})}return n}getCameraTrackRefs(){return this.getVideoTrackRefs().filter(n=>n.source===U.Track.Source.Camera)}getScreenShareTrackRefs(){return this.getVideoTrackRefs().filter(n=>n.source===U.Track.Source.ScreenShare)}getChatMessages(){return[...this.chatMessages]}addChatMessage(n){this.chatMessages.some(r=>r.id===n.id)||this.chatMessages.push(n)}updateChatMessage(n){const s=this.chatMessages.findIndex(r=>r.id===n.id);s!==-1&&(this.chatMessages[s]=n)}clearChatMessages(){this.chatMessages=[],this.activeTranscriptions.clear(),this.dismissCurrentInteraction(),this.renderedComponents.clear(),this.forceCleanupFullscreenOverlays(),console.log("🧹 VoxketClient: Cleared chat messages and transcription history"),this.emit("chat.history.cleared")}renderUI(n={}){var o,a,l,d,u,h,m,g,x;const s=this.resolveTarget(n.target||"body"),r=this.getTargetKey(s);if(br.has(s)){console.warn("⚠️ VoxketClient: Target is already being processed, skipping renderUI");return}if(wt.has(s)){console.log("✋ VoxketClient: Target already has a React root in registry, updating existing props...");const f=this.renderedComponents.get(r);if(f&&f.root){const b={agentId:n.agentId||this.config.agentId||"default-agent",participantName:n.participantName||this.config.participantName||"User",baseUrl:this.config.baseUrl,appSecret:this.config.appSecret,appId:this.config.appId,className:n.className,theme:typeof n.theme=="string"?n.theme:void 0,modalities:n.modality||this.config.modalities||["voice"],suportsChatInput:((o=n.modality)==null?void 0:o.includes("chat"))!==!1,suportsVideoInput:((a=n.modality)==null?void 0:a.includes("video"))===!0,suportsScreenShare:((l=n.modality)==null?void 0:l.includes("screen_share"))===!0,autoStart:n.autoStart,displayType:n.displayType||"widget",popupPosition:n.popupPosition||"bottom-right",popupTriggerText:n.popupTriggerText||"Open Chat",width:n.width,height:n.height,onDisplayTypeChange:n.onDisplayTypeChange,prompts:n.prompts,statusMessage:n.statusMessage,welcomeTitle:n.welcomeTitle,welcomeSubTitle:n.welcomeSubTitle,loadingText:n.loadingText,voxketClient:this};try{f.root.render(v.createElement(hs,{config:this.config,autoConnect:n.autoStart||!1,client:this,children:v.createElement(ms,b)})),console.log("✅ VoxketClient: Successfully updated existing widget with new props");return}catch(k){throw console.error("Error re-rendering existing widget:",k),new Error(`Failed to update existing widget: ${k instanceof Error?k.message:"Unknown error"}`)}}else console.warn("⚠️ Registry inconsistency detected, cleaning up"),wt.delete(s)}let i=this.renderedComponents.get(r);if(i&&i.target===s&&wt.has(s)){console.log("🔄 VoxketClient: Reusing existing React root for target:",r);const f=i.root,b={agentId:n.agentId||this.config.agentId||"default-agent",participantName:n.participantName||this.config.participantName||"User",baseUrl:this.config.baseUrl,appSecret:this.config.appSecret,appId:this.config.appId,className:n.className,theme:typeof n.theme=="string"?n.theme:void 0,modalities:n.modality||this.config.modalities||["voice"],suportsChatInput:((d=n.modality)==null?void 0:d.includes("chat"))!==!1,suportsVideoInput:((u=n.modality)==null?void 0:u.includes("video"))===!0,suportsScreenShare:((h=n.modality)==null?void 0:h.includes("screen_share"))===!0,autoStart:n.autoStart,displayType:n.displayType||"widget",popupPosition:n.popupPosition||"bottom-right",popupTriggerText:n.popupTriggerText||"Open Chat",width:n.width,height:n.height,onDisplayTypeChange:n.onDisplayTypeChange,prompts:n.prompts,statusMessage:n.statusMessage,welcomeTitle:n.welcomeTitle,welcomeSubTitle:n.welcomeSubTitle,loadingText:n.loadingText,voxketClient:this};try{f.render(v.createElement(hs,{config:this.config,autoConnect:n.autoStart||!1,client:this,children:v.createElement(ms,b)}))}catch(k){throw console.error("Error rendering Voxket widget:",k),new Error(`Failed to render Voxket widget: ${k instanceof Error?k.message:"Unknown error"}`)}return}br.add(s);try{if(i){console.log("🧹 VoxketClient: Cleaning up existing component for different target");try{i.root.unmount(),this.renderedComponents.delete(r),wt.delete(i.target),s.innerHTML=""}catch(k){console.warn("Failed to cleanup existing root:",k)}}if(wt.has(s)){console.warn("⚠️ VoxketClient: Target already in registry, skipping root creation");return}console.log("🆕 VoxketClient: Creating new React root for target:",r);const f=eu.createRoot(s);this.renderedComponents.set(r,{root:f,target:s}),wt.add(s);const b={agentId:n.agentId||this.config.agentId||"default-agent",participantName:n.participantName||this.config.participantName||"User",baseUrl:this.config.baseUrl,appSecret:this.config.appSecret,appId:this.config.appId,className:n.className,theme:typeof n.theme=="string"?n.theme:void 0,modalities:n.modality||this.config.modalities||["voice"],suportsChatInput:((m=n.modality)==null?void 0:m.includes("chat"))!==!1,suportsVideoInput:((g=n.modality)==null?void 0:g.includes("video"))===!0,suportsScreenShare:((x=n.modality)==null?void 0:x.includes("screen_share"))===!0,autoStart:n.autoStart,displayType:n.displayType||"widget",popupPosition:n.popupPosition||"bottom-right",popupTriggerText:n.popupTriggerText||"Open Chat",width:n.width,height:n.height,onDisplayTypeChange:n.onDisplayTypeChange,prompts:n.prompts,statusMessage:n.statusMessage,welcomeTitle:n.welcomeTitle,welcomeSubTitle:n.welcomeSubTitle,loadingText:n.loadingText,voxketClient:this};if(!f||typeof f.render!="function")throw new Error("Invalid React root. Make sure React 18+ is properly installed and configured.");try{f.render(v.createElement(hs,{config:this.config,autoConnect:n.autoStart||!1,client:this,children:v.createElement(ms,b)}))}catch(k){throw console.error("Error rendering Voxket widget:",k),new Error(`Failed to render Voxket widget: ${k instanceof Error?k.message:"Unknown error"}`)}}finally{br.delete(s)}}removeUI(n){const s=n?this.resolveTarget(n):null;if(s){const r=this.getTargetKey(s),i=this.renderedComponents.get(r);i?(console.log("🗑️ VoxketClient: Removing UI for target:",r),this.renderedComponents.delete(r),wt.delete(s),setTimeout(()=>{try{i.root&&typeof i.root.unmount=="function"?s&&s.isConnected?(i.root.unmount(),console.log("✅ VoxketClient: UI removal completed for target:",r)):console.log("ℹ️ VoxketClient: Target element already disconnected, skipping unmount"):console.log("ℹ️ VoxketClient: Root already unmounted, skipping"),s&&s.isConnected&&s.parentNode&&(s.innerHTML="")}catch(a){console.warn("Failed to unmount React root:",a)}},0)):(console.log("ℹ️ VoxketClient: No component found for target, cleaning registry:",r),wt.delete(s),s.isConnected&&(s.innerHTML="")),s.querySelectorAll('[id*="voxket"], [class*="voxket"], .fixed.inset-0.z-50').forEach(a=>{try{a.remove()}catch(l){console.warn("Failed to remove element:",l)}}),s===document.body&&s.querySelectorAll(".fixed.z-50, .fixed.inset-0").forEach(l=>{if(l.classList.contains("bg-black")&&l.classList.contains("backdrop-blur-sm"))try{l.remove()}catch(d){console.warn("Failed to remove fixed element:",d)}})}}removeAllUI(){for(const[n,s]of this.renderedComponents)s.root.unmount();this.renderedComponents.clear(),this.forceCleanupFullscreenOverlays()}forceCleanupFullscreenOverlays(){document.body.querySelectorAll(".fixed.inset-0.z-50").forEach(s=>{if(s.classList.contains("bg-black")&&(s.classList.contains("backdrop-blur-sm")||s.classList.contains("bg-opacity-30")))try{s.remove()}catch(r){console.warn("Failed to remove overlay:",r)}})}resolveTarget(n){if(typeof n=="string"){const s=document.querySelector(n);if(!s)throw new Error(`Target element not found: ${n}`);return s}return n}getTargetKey(n){return n.id?n.id:n.className?n.tagName+"_"+n.className.replace(/\s+/g,"_"):n.tagName+"_"+n.outerHTML.length%1e3}async sendMessage(n,s){var r;if(!this.currentSession)throw console.error("VoxketClient: No active session found"),new ve("No active session","SESSION_NOT_FOUND");if(!this.room)throw console.error("VoxketClient: No room instance found"),new ve("No room connection","CONNECTION_FAILED");if(!this.room.localParticipant)throw console.error("VoxketClient: No local participant found"),new ve("No local participant","CONNECTION_FAILED");this.dismissCurrentInteraction();try{const i={id:`msg_${Date.now()}`,content:n,sender:{id:"user",name:this.config.participantName||"User",type:"participant"},timestamp:new Date,metadata:s||{}},o=await((r=this.room)==null?void 0:r.localParticipant.sendText(n,{topic:"lk.chat",destinationIdentities:[]}));this.emit("chat.message.sent",i)}catch(i){throw console.error("VoxketClient: Failed to send chat message:",i),new ve("Failed to send message","NETWORK_ERROR",i)}}async sendChatMessage(n,s){return this.sendMessage(n,s)}async sendAttachments(n,s){if(!this.currentSession)throw console.error("VoxketClient: No active session found"),new ve("No active session","SESSION_NOT_FOUND");if(!this.room)throw console.error("VoxketClient: No room instance found"),new ve("No room connection","CONNECTION_FAILED");if(!this.room.localParticipant)throw console.error("VoxketClient: No local participant found"),new ve("No local participant","CONNECTION_FAILED");if(!n||n.length===0)throw new ve("No files provided","INVALID_PARAMETER");this.dismissCurrentInteraction();const r=n.filter(i=>i.type.startsWith("image/"));if(r.length===0)throw new ve("Only image files are allowed","INVALID_PARAMETER");r.length!==n.length&&console.warn("VoxketClient: Some non-image files were filtered out");try{const i=r.map(async(o,a)=>{const d={id:`att_${Date.now()}_${a}`,content:`📎 ${o.name}`,sender:{id:"user",name:this.config.participantName||"User",type:"participant"},timestamp:new Date,metadata:{...s,type:"attachment",fileName:o.name,fileSize:o.size,mimeType:o.type,uploading:!0}};this.emit("chat.message.sent",d);const u=await this.room.localParticipant.sendFile(o,{mimeType:o.type,topic:"images",onProgress:m=>{const g={...d,metadata:{...d.metadata,uploadProgress:m}};this.emit("chat.message.updated",g)}});try{const m=new FileReader,g=new Promise((b,k)=>{m.onload=()=>{typeof m.result=="string"?b(m.result):k(new Error("Failed to convert to base64"))},m.onerror=k});m.readAsDataURL(o);const f={type:"image",data:await g,filename:o.name,mimeType:o.type,size:o.size};await this.room.localParticipant.sendText(JSON.stringify(f),{topic:"images",destinationIdentities:[]})}catch(m){console.warn("VoxketClient: Failed to send image data to agent:",m);try{const g=`I've shared an image: ${o.name}`;await this.room.localParticipant.sendText(g,{topic:"lk.chat",destinationIdentities:[]})}catch(g){console.warn("VoxketClient: Failed to send image notification to agent:",g)}}const h={...d,metadata:{...d.metadata,uploading:!1,uploadProgress:1,streamId:u.id}};return this.emit("chat.message.updated",h),u});await Promise.all(i)}catch(i){throw console.error("VoxketClient: Failed to send attachments:",i),new ve("Failed to send attachments","NETWORK_ERROR",i)}}async sendAttachment(n,s){return this.sendAttachments([n],s)}toggleMicrophone(n){return this.setMicrophoneEnabled(n!==!1)}async setMicrophoneEnabled(n){var s,r;try{const i=(s=this.room)==null?void 0:s.localParticipant.isMicrophoneEnabled,o=n??!i;await((r=this.room)==null?void 0:r.localParticipant.setMicrophoneEnabled(o)),o?this.emit("track.unmuted",{source:"microphone",enabled:!0}):this.emit("track.muted",{source:"microphone",enabled:!1})}catch(i){throw console.error("VoxketClient: Failed to toggle microphone:",i),new ve("Failed to toggle microphone","PERMISSION_DENIED",i)}}toggleCamera(n){return this.setCameraEnabled(n!==!1)}async setCameraEnabled(n){var s,r;try{const i=(s=this.room)==null?void 0:s.localParticipant.isCameraEnabled,o=n??!i;await((r=this.room)==null?void 0:r.localParticipant.setCameraEnabled(o)),o?this.emit("track.unmuted",{source:"camera",enabled:!0}):this.emit("track.muted",{source:"camera",enabled:!1})}catch(i){throw console.error("VoxketClient: Failed to toggle camera:",i),new ve("Failed to toggle camera","PERMISSION_DENIED",i)}}async enableCamera(){return this.setCameraEnabled(!0)}async disableCamera(){return this.setCameraEnabled(!1)}async startScreenShare(){var n;try{await((n=this.room)==null?void 0:n.localParticipant.setScreenShareEnabled(!0))}catch(s){throw new ve("Failed to start screen share","PERMISSION_DENIED",s)}}async stopScreenShare(){var n;try{await((n=this.room)==null?void 0:n.localParticipant.setScreenShareEnabled(!1))}catch(s){throw new ve("Failed to stop screen share","PERMISSION_DENIED",s)}}async getAudioInputDevices(){try{return(await navigator.mediaDevices.enumerateDevices()).filter(s=>s.kind==="audioinput")}catch(n){throw new ve("Failed to get audio input devices","DEVICE_ERROR",n)}}async getVideoInputDevices(){try{return(await navigator.mediaDevices.enumerateDevices()).filter(s=>s.kind==="videoinput")}catch(n){throw new ve("Failed to get video input devices","DEVICE_ERROR",n)}}async setAudioInputDevice(n){var s;try{if(!((s=this.room)!=null&&s.localParticipant))throw new Error("Not connected to room")}catch(r){throw new ve("Failed to set audio input device","DEVICE_ERROR",r)}}async setVideoInputDevice(n){var s;try{if(!((s=this.room)!=null&&s.localParticipant))throw new Error("Not connected to room")}catch(r){throw new ve("Failed to set video input device","DEVICE_ERROR",r)}}getLocalParticipant(){var n;return((n=this.room)==null?void 0:n.localParticipant)??null}getRemoteParticipants(){var n;return Array.from(((n=this.room)==null?void 0:n.remoteParticipants.values())??[])}getPublishPermissions(){const n=this.getLocalParticipant();if(!n)return{camera:!1,microphone:!1,screenShare:!1,data:!1};const s=n.permissions;if(!s)return{camera:!0,microphone:!0,screenShare:!0,data:!0};const r=i=>!!s.canPublish&&(s.canPublishSources.length===0||s.canPublishSources.includes(i));return{camera:r(1),microphone:r(2),screenShare:r(3),data:s.canPublishData??!1}}canPublishSource(n){return this.getPublishPermissions()[n]}getRoom(){return this.room}getConnectionState(){return this.connectionState}get connected(){return this.isConnected&&this.connectionState===U.ConnectionState.Connected}getMicrophoneTrack(){const n=this.getLocalParticipant();if(!n)return null;for(const[,s]of n.trackPublications)if(s.source===U.Track.Source.Microphone)return s.track;return null}getCameraTrack(){const n=this.getLocalParticipant();if(!n)return null;for(const[,s]of n.trackPublications)if(s.source===U.Track.Source.Camera)return s.track;return null}getScreenShareTrack(){const n=this.getLocalParticipant();if(!n)return null;for(const[,s]of n.trackPublications)if(s.source===U.Track.Source.ScreenShare)return s.track;return null}get isMicrophoneEnabled(){const n=this.getMicrophoneTrack();return n?!n.isMuted:!1}get isCameraEnabled(){const n=this.getCameraTrack();return n?!n.isMuted:!1}get isScreenShareEnabled(){const n=this.getScreenShareTrack();return n?!n.isMuted:!1}registerPlugin(n){this.pluginManager.register(n)}getPluginManager(){return this.pluginManager}getParticipants(){if(!this.room)return[];const n=[];return this.room.localParticipant&&n.push({id:this.room.localParticipant.identity,name:this.room.localParticipant.name||this.room.localParticipant.identity,isLocal:!0}),this.room.remoteParticipants.forEach(s=>{n.push({id:s.identity,name:s.name||s.identity,isLocal:!1})}),n}getSessionMetrics(){var n,s;return this.currentSession?{sessionId:this.currentSession.id,duration:Date.now()-(((n=this.currentSession.startedAt)==null?void 0:n.getTime())||0),messageCount:0,participantCount:((s=this.room)==null?void 0:s.remoteParticipants.size)||0,audioQuality:{avgBitrate:64e3,avgLatency:150,packetLoss:.01,jitter:.05},videoQuality:{avgBitrate:5e5,avgLatency:150,packetLoss:.01,jitter:.05},networkStats:{totalBytesReceived:0,totalBytesSent:0,connectionType:"webrtc",avgRoundTripTime:150},events:[]}:null}updateConfig(n){this.config={...this.config,...n}}async startRecording(){var n;try{this.emit("recording.started",{sessionId:(n=this.currentSession)==null?void 0:n.id,timestamp:new Date})}catch(s){throw new ve("Failed to start recording","RECORDING_ERROR",s)}}async stopRecording(){var n;try{this.emit("recording.stopped",{sessionId:(n=this.currentSession)==null?void 0:n.id,timestamp:new Date})}catch(s){throw new ve("Failed to stop recording","RECORDING_ERROR",s)}}async registerFrontendRPC(n,s,r="embedded"){return this.rpcManager.registerFrontendRPC(n,s,r)}getCurrentInteraction(){return this.rpcManager.getCurrentInteraction()}dismissCurrentInteraction(){this.rpcManager.dismissCurrentInteraction()}getRegisteredRpcMethods(){return this.rpcManager.getRegisteredMethods()}unregisterRpcMethod(n){this.rpcManager.unregisterMethod(n)}registerEventListener(n,s){return this.on(n,s)}registerEventEmitter(n,s){if(!this.room)throw new Error("Room not available");try{this.room.registerTextStreamHandler(n,async r=>{try{const i=await r.readAll();s(i)}catch(i){console.error(`Error processing event for topic '${n}':`,i)}})}catch(r){console.warn(`VoxketClient: Handler for topic '${n}' may already be registered:`,r)}}convertMarkdownToText(n){if(!n)return"";let s=n;return s=s.replace(/\*\*(.*?)\*\*/g,"$1"),s=s.replace(/__(.*?)__/g,"$1"),s=s.replace(/\*(.*?)\*/g,"$1"),s=s.replace(/_(.*?)_/g,"$1"),s=s.replace(/~~(.*?)~~/g,"$1"),s=s.replace(/`([^`]+)`/g,"$1"),s=s.replace(/```[\s\S]*?```/g,""),s=s.replace(/^#{1,6}\s+/gm,""),s=s.replace(/\[([^\]]+)\]\([^)]+\)/g,"$1"),s.trim()}}const cx=ue.create(jd),lx=ue.create(X1),dx=ue.create(ex),ux=ue.create(Md);function fx({onClick:e,text:t="Open Chat",position:n="bottom-right",theme:s}){const r={"top-left":"top-4 left-4","top-right":"top-4 right-4","bottom-left":"bottom-4 left-4","bottom-right":"bottom-4 right-4"},i=Le(s);return c.jsx(ue.button,{onClick:e,className:`voxket-popup-trigger fixed ${r[n]} z-50 px-4 py-2 rounded-full shadow-lg ${i.popupTrigger} transition-all duration-200 hover:scale-105`,initial:{scale:0,opacity:0},animate:{scale:1,opacity:1},exit:{scale:0,opacity:0},whileHover:{scale:1.05},whileTap:{scale:.95},"data-position":n,children:t})}function ic({children:e,theme:t,displayType:n="widget",onClose:s,popupPosition:r="bottom-right",onExpand:i}){const o=Le(t);if(n==="fullscreen")return c.jsx("div",{className:"fixed inset-0 z-[9999] bg-black/40 bg-opacity-30 backdrop-blur-sm flex items-center justify-center p-8",onClick:a=>{a.target===a.currentTarget&&s&&s()},children:c.jsxs("div",{className:"w-full h-full max-w-7xl max-h-[95vh] rounded-2xl relative bg-transparent flex flex-col",onClick:a=>{a.stopPropagation()},children:[s&&c.jsx("button",{onClick:a=>{a.preventDefault(),a.stopPropagation(),s()},className:"absolute top-4 cursor-pointer right-4 z-[10000] w-12 h-12 rounded-full bg-gray-900 bg-opacity-90 text-white flex items-center justify-center hover:bg-gray-800 transition-all duration-200 shadow-lg border border-gray-700 backdrop-blur-sm",title:"Exit Fullscreen",type:"button",children:c.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:c.jsx("path",{d:"M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"})})}),c.jsxs("div",{id:"voice-card",className:`voxket-widget-root theme-${t} ${o.card} w-full h-full flex flex-col rounded-xl shadow-2xl relative overflow-hidden`,"data-theme":t,style:{minHeight:"600px",height:"100%",contain:"layout style paint",overscrollBehavior:"contain"},children:[c.jsx("div",{className:o.cardTopGradient}),c.jsx("div",{className:o.cardPurpleBlur}),c.jsx("div",{className:o.cardPinkBlur}),c.jsx("div",{className:"relative z-10 flex flex-col h-full",children:e}),c.jsx("div",{className:o.cardPulse1}),c.jsx("div",{className:o.cardPulse2,style:{animationDelay:"1s"}})]})]})});if(n==="popup"){const a={"top-left":"top-4 left-4","top-right":"top-4 right-4","bottom-left":"bottom-4 left-4","bottom-right":"bottom-4 right-4"};return c.jsx("div",{className:"fixed rounded-2xl inset-0 z-[9999] pointer-events-none",children:c.jsxs("div",{className:`fixed rounded-2xl ${a[r]} pointer-events-auto`,children:[s&&c.jsx("button",{onClick:s,className:"absolute -top-2 -right-2 z-10 w-8 h-8 rounded-full bg-gray-900 bg-opacity-90 text-white flex items-center justify-center hover:bg-gray-800 transition-all duration-200 text-sm shadow-lg border border-gray-700",children:"×"}),c.jsxs("div",{id:"voice-card",className:`voxket-widget-root theme-${t} ${o.card} rounded-2xl flex flex-col relative overflow-hidden`,"data-theme":t,style:{width:"350px",height:"500px",contain:"layout style paint",overscrollBehavior:"contain"},children:[c.jsx("div",{className:o.cardTopGradient}),c.jsx("div",{className:o.cardPurpleBlur}),c.jsx("div",{className:o.cardPinkBlur}),c.jsx("div",{className:"relative z-10 flex flex-col h-full w-full",children:e}),c.jsx("div",{className:o.cardPulse1}),c.jsx("div",{className:o.cardPulse2,style:{animationDelay:"1s"}})]})]})})}return c.jsxs("div",{id:"voice-card",className:`voxket-widget-root theme-${t} ${o.card} relative overflow-hidden`,"data-theme":t,style:{height:"100%",maxHeight:"100%",contain:"layout style paint",overscrollBehavior:"contain"},children:[c.jsx("div",{className:o.cardTopGradient}),c.jsx("div",{className:o.cardPurpleBlur}),c.jsx("div",{className:o.cardPinkBlur}),c.jsx("div",{className:"relative z-10 flex flex-col h-full",children:e}),c.jsx("div",{className:o.cardPulse1}),c.jsx("div",{className:o.cardPulse2,style:{animationDelay:"1s"}})]})}function ms(e){if(typeof window>"u")return null;const{agentId:t,participantName:n,baseUrl:s,appSecret:r,appId:i,prompts:o,statusMessage:a,welcomeTitle:l,welcomeSubTitle:d,className:u,width:h,height:m,loadingText:g,suportsChatInput:x=!0,suportsVideoInput:f=!0,suportsScreenShare:b=!0,theme:k="vox",onSessionStart:S,onSessionEnd:T,enableSessionLogging:C=!0,onSessionLogsUpdate:w,onSessionMetricsUpdate:A,modalities:V=["voice"],displayType:E="widget",popupPosition:F="bottom-right",popupTriggerText:y="Open Chat",onPopupToggle:R,voxketClient:H,onDisplayTypeChange:se}=e,[ne,oe]=p.useState(()=>H?!!H.getCurrentSession():!1),[ce,ee]=p.useState(!1),[I,W]=p.useState(t||""),[j,B]=p.useState(n||"User"),[L,Z]=p.useState(()=>H?H.getCurrentSession():null),[O,Q]=p.useState(()=>{var D,me,Y;if(H){const fe=H.getCurrentSession();if((D=fe==null?void 0:fe.activeModalities)!=null&&D.includes("chat"))return"chat";if((me=fe==null?void 0:fe.activeModalities)!=null&&me.includes("voice"))return"voice";if((Y=fe==null?void 0:fe.activeModalities)!=null&&Y.includes("video"))return"video"}return"welcome"}),[G,K]=p.useState(!1);p.useEffect(()=>{E==="fullscreen"&&console.log("🎯 Widget: Switched to fullscreen mode")},[E]),p.useEffect(()=>{ne&&!ce?console.log("📊 Session started:",{currentMode:O,sessionId:L==null?void 0:L.id}):!ne&&!ce&&O==="welcome"&&console.log("📊 Returned to welcome screen")},[ne,O,ce]);const q=p.useMemo(()=>{if(H)return console.log("🔄 Using existing VoxketClient to preserve session state"),H;const D={appId:i,appSecret:r,baseUrl:s,agentId:I,participantName:j||"User",modalities:V};return new Gn(D)},[H,i,r,s,I,j,V]),N=V,$=p.useMemo(()=>{const D=q.getRoom();return console.log("🏠 Widget: Room reference updated:",{roomExists:!!D,roomState:D==null?void 0:D.state,sessionStarted:ne,currentMode:O}),D||new U.Room},[q,ne,O]);p.useEffect(()=>{if($){const D=()=>{console.log("🏠 Widget: Room state changed:",{state:$.state,numParticipants:$.numParticipants,isConnected:$.state==="connected",sessionId:L==null?void 0:L.id})},me=(Y,fe,Pe)=>{console.log("🎵 Widget: Track subscribed:",{trackKind:Y.kind,trackSource:Y.source,participantSid:Pe.sid,participantIdentity:Pe.identity,sessionId:L==null?void 0:L.id})};return $.on(U.RoomEvent.Connected,D),$.on(U.RoomEvent.Disconnected,D),$.on(U.RoomEvent.TrackSubscribed,me),()=>{$.off(U.RoomEvent.Connected,D),$.off(U.RoomEvent.Disconnected,D),$.off(U.RoomEvent.TrackSubscribed,me)}}},[$,L==null?void 0:L.id]),p.useEffect(()=>{!ce&&O==="welcome"?console.log("🎬 Widget: Welcome screen ready"):ne&&O!=="welcome"&&console.log("🎬 Widget: Session mode active:",O)},[O,ce,ne]);const de={suportsChatInput:x,suportsVideoInput:f,suportsScreenShare:b};p.useEffect(()=>{(O==="voice"||O==="video"||O==="chat")&&!L&&!ne&&!ce&&!q.connected&&(console.log("🔄 Auto-correcting: Found orphaned mode without session, returning to welcome"),Q("welcome"),ee(!1))},[O,L,ne,ce,q]);const{sessionMetrics:P,sessionLogs:z,logEvent:te}=Vd({room:$,onSessionStart:S,onSessionEnd:T,enableConsoleLogging:C,enableLocalStorage:C,voxketSessionId:L==null?void 0:L.id});p.useEffect(()=>{w&&w(z)},[z,w]),p.useEffect(()=>{A&&P&&A(P)},[P,A]),p.useEffect(()=>{const D=Y=>{console.log("🔴 Widget: Room disconnected:",Y),console.log("🔍 Widget: Current state on disconnect:",{currentMode:O,sessionStarted:ne,currentSessionId:L==null?void 0:L.id,loading:ce}),ee(!1),oe(!1),Z(null),O!=="welcome"?(console.log("🔄 Widget: Setting mode to welcome after disconnect"),Q("welcome")):console.log("📝 Widget: Already in welcome mode, no change needed")},me=Y=>{console.log("📹 Media devices error:",Y)};return $.on(U.RoomEvent.MediaDevicesError,me),$.on(U.RoomEvent.Disconnected,D),()=>{$.off(U.RoomEvent.Disconnected,D),$.off(U.RoomEvent.MediaDevicesError,me)}},[$]);const le=async()=>{try{ee(!0),Q("voice"),console.log("🎤 Starting voice session...",{agentId:I,participantName:j}),console.log("🎤 Pre-start state:",{currentMode:"voice",sessionStarted:!1,loading:!0}),te("USER_STARTED_VOICE_SESSION",{agentId:I,participantName:j});const D=await q.startSession(I,{participantName:j||"User",modalities:["voice",...f?["video"]:[]]});console.log("✅ Voice session started successfully:",D.id),Z(D),oe(!0),ee(!1),S&&S(D.id)}catch(D){console.error("❌ Failed to start voice session:",D),ee(!1),oe(!1),Q("welcome")}},ae=async()=>{try{ee(!0),oe(!0),Q("chat"),te("USER_STARTED_CHAT_SESSION",{agentId:I,participantName:j});const D=await q.startSession(I,{participantName:j||"User",modalities:["chat"]});Z(D),ee(!1),S&&S(D.id)}catch(D){console.error("Failed to start chat session:",D),ee(!1),oe(!1),Q("welcome")}},Fe=async()=>{try{ee(!0),Q("video"),console.log("📺 Starting video session...",{agentId:I,participantName:j}),console.log("📺 Pre-start state:",{currentMode:"video",sessionStarted:!1,loading:!0}),te("USER_STARTED_VIDEO_SESSION",{agentId:I,participantName:j});const D=await q.startSession(I,{participantName:j||"User",modalities:["video","voice"]});console.log("✅ Video session started successfully:",D.id),Z(D),oe(!0),ee(!1),S&&S(D.id)}catch(D){console.error("❌ Failed to start video session:",D),ee(!1),oe(!1),Q("welcome")}},Ne=()=>{console.log("🔄 Widget: handleBackToWelcome called",{currentMode:O,sessionStarted:ne,currentSessionId:L==null?void 0:L.id,displayType:E,loading:ce}),Q("welcome"),ee(!1),se&&se(e.displayType||"widget"),L&&ne?(console.log("🧹 Widget: Cleaning up active session"),oe(!1),Z(null),console.log("🔌 Widget: Disconnecting client and cleaning up room"),q.disconnect().catch(D=>{console.error("❌ Widget: Error during disconnect:",D)})):(console.log("📝 Widget: No active session to clean up"),q.connected&&(console.log("🔌 Widget: Force disconnecting client for fresh state"),q.disconnect().catch(D=>{console.error("❌ Widget: Error during force disconnect:",D)}))),E==="popup"&&!G&&K(!0),console.log("✅ Widget: handleBackToWelcome completed",{newCurrentMode:"welcome",newLoading:!1,newSessionStarted:!1})},Ce=()=>{const D=!G;K(D),R&&R(D),!D&&!(L&&ne)&&(Q("welcome"),oe(!1),Z(null))},Be=()=>{console.log("🔄 Closing fullscreen, switching to widget display type"),e.onDisplayTypeChange?e.onDisplayTypeChange("widget"):console.warn("⚠️ No onDisplayTypeChange callback provided")},Ye=()=>{if(console.log("🔄 Expand to fullscreen requested"),e.onDisplayTypeChange)e.onDisplayTypeChange("fullscreen");else{console.warn("⚠️ No onDisplayTypeChange callback provided for expand functionality");const D=document.getElementById("voice-card")||document.querySelector(".voxket-widget-container");D&&D.requestFullscreen&&D.requestFullscreen().catch(me=>{console.warn("⚠️ Fullscreen API not supported or failed:",me)})}};p.useEffect(()=>{var D,me,Y;if(H&&q){const fe=q.getCurrentSession();q.connected,fe&&(console.log("✅ Restoring session state:",fe.id),Z(fe),oe(!0),ee(!1),(D=fe.activeModalities)!=null&&D.includes("chat")?Q("chat"):(me=fe.activeModalities)!=null&&me.includes("voice")?Q("voice"):(Y=fe.activeModalities)!=null&&Y.includes("video")&&Q("video"))}},[H,q]),p.useEffect(()=>()=>{H||q.disconnect()},[q,H]);let dt="w-96",zt="h-[25rem]",Wt={};if(h&&(h.startsWith("w-")?dt=h:(Wt.width=h,dt="")),m&&(m.startsWith("h-")?zt=m:(Wt.height=m,zt="")),E==="popup"&&!G)return console.log("🟡 Showing popup trigger button"),c.jsx(fx,{onClick:Ce,text:y,position:F,theme:k});let Zt=`voxket-widget-root theme-${k}`,Vt={scrollMargin:0,scrollPadding:0,contain:"layout style paint"};E==="widget"?(Zt+=` flex items-center justify-center min-h-fit ${dt} ${zt} ${u}`,Vt={...Vt,...Wt}):(Zt=`${u||""}`,Vt={});const _=c.jsx("div",{className:"h-full flex flex-col overflow-hidden relative z-10",children:c.jsxs(an,{mode:"wait",children:[O==="welcome"&&!ce&&c.jsx(ux,{agentId:I,participantName:j||"",onAgentIdChange:W,onParticipantNameChange:B,onStartCall:le,onStartChat:ae,onStartVideo:Fe,disabled:ne||ce,prompts:o,statusMessage:a,title:l,subTitle:d,theme:k,modalities:N,initial:{opacity:0,y:0},animate:{opacity:1,y:0},exit:{opacity:0,y:40},transition:{duration:.3,ease:"easeInOut"}},"welcome"),O==="voice"&&c.jsxs(Ze.RoomContext.Provider,{value:$,children:[c.jsx(Ze.RoomAudioRenderer,{},`audio-${(L==null?void 0:L.id)||"no-session"}`),c.jsx(Ze.StartAudio,{label:"Start Audio"},`start-audio-${(L==null?void 0:L.id)||"no-session"}`),c.jsx(cx,{loadingText:g,participantName:j||"User",capabilities:de,sessionStarted:ne,disabled:!1,theme:k,client:q,displayType:E,onBack:E==="popup"?Ce:Ne,initial:{opacity:0,y:40},animate:{opacity:1,y:0},exit:{opacity:0,y:-40},transition:{duration:.3,ease:"easeInOut"}},"voice-session")]}),O==="chat"&&c.jsx(lx,{client:q,theme:k,displayType:E,onBack:E==="popup"?Ce:Ne,onEndChat:Ne,disabled:!ne,initial:{opacity:0,y:40},animate:{opacity:1,y:0},exit:{opacity:0,y:-40},transition:{duration:.3,ease:"easeInOut"}},"chat-view"),O==="video"&&c.jsxs(Ze.RoomContext.Provider,{value:$,children:[c.jsx(Ze.RoomAudioRenderer,{},`audio-video-${(L==null?void 0:L.id)||"no-session"}`),c.jsx(Ze.StartAudio,{label:"Start Audio"},`start-audio-video-${(L==null?void 0:L.id)||"no-session"}`),c.jsx(dx,{client:q,theme:k,displayType:E,onBack:E==="popup"?Ce:Ne,onEndCall:Ne,disabled:!ne,initial:{opacity:0,y:40},animate:{opacity:1,y:0},exit:{opacity:0,y:-40},transition:{duration:.3,ease:"easeInOut"}},"video-session")]})]})});return E==="fullscreen"||E==="popup"?c.jsx(ic,{theme:k,displayType:E,popupPosition:F,onClose:E==="fullscreen"?Be:Ce,children:_}):c.jsx("div",{className:Zt,style:Vt,children:c.jsx(ic,{theme:k,displayType:E,popupPosition:F,onExpand:Ye,children:_})})}class Rd extends p.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("VoxketWidget Error:",t,n)}render(){if(this.state.hasError){if(this.props.fallback){const t=this.props.fallback;return p.createElement(t,{error:this.state.error})}return p.createElement("div",{style:{padding:"20px",border:"1px solid #ff4444",borderRadius:"8px",background:"#fff5f5",color:"#cc0000"}},"VoxketWidget encountered an error. Please check the console for details.")}return this.props.children}}function hx({logs:e,onClear:t,onExport:n}){const[s,r]=v.useState(!1),[i,o]=v.useState(""),a=e.filter(l=>!i||l.event.toLowerCase().includes(i.toLowerCase()));return s?c.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:c.jsxs("div",{className:"bg-white rounded-lg shadow-xl max-w-4xl w-full max-h-[80vh] flex flex-col m-4",children:[c.jsxs("div",{className:"flex items-center justify-between p-4 border-b",children:[c.jsxs("h2",{className:"text-lg font-semibold",children:["Session Logs (",e.length,")"]}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("input",{type:"text",placeholder:"Filter events...",value:i,onChange:l=>o(l.target.value),className:"px-3 py-1 border rounded text-sm"}),c.jsx("button",{onClick:t,className:"px-3 py-1 bg-red-600 text-white rounded text-sm hover:bg-red-700",children:"Clear"}),c.jsx("button",{onClick:n,className:"px-3 py-1 bg-green-600 text-white rounded text-sm hover:bg-green-700",children:"Export"}),c.jsx("button",{onClick:()=>r(!1),className:"px-3 py-1 bg-gray-600 text-white rounded text-sm hover:bg-gray-700",children:"Close"})]})]}),c.jsx("div",{className:"flex-1 overflow-auto p-4",children:a.length===0?c.jsx("p",{className:"text-gray-500 text-center py-8",children:"No logs found"}):c.jsx("div",{className:"space-y-2",children:a.map((l,d)=>c.jsxs("div",{className:"border rounded p-3 text-sm",children:[c.jsxs("div",{className:"flex items-center justify-between mb-1",children:[c.jsx("span",{className:"font-semibold text-blue-600",children:l.event}),c.jsx("span",{className:"text-gray-500 text-xs",children:new Date(l.timestamp).toLocaleTimeString()})]}),l.sessionId&&c.jsxs("div",{className:"text-xs text-gray-600 mb-1",children:["Session: ",l.sessionId]}),l.data&&c.jsx("div",{className:"bg-gray-50 p-2 rounded text-xs",children:c.jsx("pre",{className:"whitespace-pre-wrap overflow-auto",children:JSON.stringify(l.data,null,2)})})]},d))})})]})}):c.jsxs("button",{onClick:()=>r(!0),className:"fixed bottom-4 right-4 bg-blue-600 text-white px-4 py-2 rounded-lg shadow-lg hover:bg-blue-700 transition-colors text-sm z-50",children:["Session Logs (",e.length,")"]})}function mx({metrics:e}){return e?c.jsxs("div",{className:"bg-gray-100 p-4 rounded-lg",children:[c.jsx("h3",{className:"font-semibold mb-2",children:"Current Session"}),c.jsxs("div",{className:"grid grid-cols-2 gap-4 text-sm",children:[c.jsxs("div",{children:[c.jsx("span",{className:"text-gray-600",children:"Session ID:"}),c.jsx("div",{className:"font-mono text-xs",children:e.sessionId})]}),c.jsxs("div",{children:[c.jsx("span",{className:"text-gray-600",children:"Start Time:"}),c.jsx("div",{children:new Date(e.startTime).toLocaleString()})]}),c.jsxs("div",{children:[c.jsx("span",{className:"text-gray-600",children:"Messages:"}),c.jsx("div",{children:e.totalMessages})]}),c.jsxs("div",{children:[c.jsx("span",{className:"text-gray-600",children:"Participants:"}),c.jsx("div",{children:e.participantCount})]}),c.jsxs("div",{children:[c.jsx("span",{className:"text-gray-600",children:"Connection Issues:"}),c.jsx("div",{children:e.connectionIssues})]}),c.jsxs("div",{children:[c.jsx("span",{className:"text-gray-600",children:"Duration:"}),c.jsxs("div",{children:[Math.round((Date.now()-new Date(e.startTime).getTime())/1e3),"s"]})]})]})]}):null}function Ut(){const{currentSession:e,sessionState:t,sessionMetrics:n,createSession:s,endSession:r}=lt(),i=v.useCallback(async(a,l)=>await s(a,l),[s]),o=v.useCallback(async()=>await r(),[r]);return{session:e,state:t,metrics:n,isActive:e!==null&&t!=="disconnected",isConnecting:t==="connecting",isConnected:t==="connected"||t==="active",start:i,stop:o}}function Id(){const{sessionMetrics:e,currentSession:t}=lt();return{metrics:e,sessionId:t==null?void 0:t.id,duration:e==null?void 0:e.duration,participantCount:e==null?void 0:e.participantCount,messageCount:e==null?void 0:e.messageCount,audioQuality:e==null?void 0:e.audioQuality,networkStats:e==null?void 0:e.networkStats}}function Dd(){const{setMicrophoneEnabled:e,client:t}=lt(),[n,s]=v.useState(!1),[r,i]=v.useState(!1),o=v.useCallback(async()=>{if(!r){i(!0);try{const d=!n;await e(d),s(d)}catch(d){console.error("Failed to toggle microphone:",d)}finally{i(!1)}}},[n,r,e]),a=v.useCallback(async()=>{if(!(n||r)){i(!0);try{await e(!0),s(!0)}catch(d){console.error("Failed to enable microphone:",d)}finally{i(!1)}}},[n,r,e]),l=v.useCallback(async()=>{if(!(!n||r)){i(!0);try{await e(!1),s(!1)}catch(d){console.error("Failed to disable microphone:",d)}finally{i(!1)}}},[n,r,e]);return{isEnabled:n,isLoading:r,toggle:o,enable:a,disable:l}}function $d(){const{setCameraEnabled:e}=lt(),[t,n]=v.useState(!1),[s,r]=v.useState(!1),i=v.useCallback(async()=>{if(!s){r(!0);try{const l=!t;await e(l),n(l)}catch(l){console.error("Failed to toggle camera:",l)}finally{r(!1)}}},[t,s,e]),o=v.useCallback(async()=>{if(!(t||s)){r(!0);try{await e(!0),n(!0)}catch(l){console.error("Failed to enable camera:",l)}finally{r(!1)}}},[t,s,e]),a=v.useCallback(async()=>{if(!(!t||s)){r(!0);try{await e(!1),n(!1)}catch(l){console.error("Failed to disable camera:",l)}finally{r(!1)}}},[t,s,e]);return{isEnabled:t,isLoading:s,toggle:i,enable:o,disable:a}}function Fd(){const{startScreenShare:e,stopScreenShare:t}=lt(),[n,s]=v.useState(!1),[r,i]=v.useState(!1),o=v.useCallback(async()=>{if(!(n||r)){i(!0);try{await e(),s(!0)}catch(d){console.error("Failed to start screen share:",d)}finally{i(!1)}}},[n,r,e]),a=v.useCallback(async()=>{if(!(!n||r)){i(!0);try{await t(),s(!1)}catch(d){console.error("Failed to stop screen share:",d)}finally{i(!1)}}},[n,r,t]),l=v.useCallback(async()=>{n?await a():await o()},[n,o,a]);return{isSharing:n,isLoading:r,start:o,stop:a,toggle:l}}function px(){const{client:e}=lt(),[t,n]=v.useState({tracks:[],layout:{type:"grid",showLocalVideo:!0,aspectRatio:"16:9"},isRecording:!1}),s=v.useMemo(()=>t.tracks.find(f=>f.isLocal),[t.tracks]),r=v.useMemo(()=>t.tracks.filter(f=>!f.isLocal),[t.tracks]),i=v.useCallback(async()=>{try{s!=null&&s.isEnabled?await(e==null?void 0:e.disableCamera()):await(e==null?void 0:e.enableCamera())}catch(f){throw console.error("Failed to toggle camera:",f),f}},[e,s]),o=v.useCallback(async()=>{try{t.tracks.find(b=>b.isScreenShare)?await(e==null?void 0:e.stopScreenShare()):await(e==null?void 0:e.startScreenShare())}catch(f){throw console.error("Failed to toggle screen share:",f),f}},[e,t.tracks]),a=v.useCallback(f=>{n(b=>({...b,layout:f}))},[]),l=v.useCallback(f=>{n(b=>({...b,pinnedTrack:f}))},[]),d=v.useCallback(()=>{n(f=>({...f,pinnedTrack:void 0}))},[]),u=v.useCallback(async()=>{try{await(e==null?void 0:e.startRecording()),n(f=>({...f,isRecording:!0}))}catch(f){throw console.error("Failed to start recording:",f),f}},[e]),h=v.useCallback(async()=>{try{await(e==null?void 0:e.stopRecording()),n(f=>({...f,isRecording:!1}))}catch(f){throw console.error("Failed to stop recording:",f),f}},[e]),m=v.useCallback(f=>t.tracks.find(b=>b.id===f),[t.tracks]),g=v.useCallback(f=>t.tracks.filter(b=>b.participantId===f),[t.tracks]),x=v.useCallback(f=>f.isEnabled&&t.tracks.includes(f),[t.tracks]);return v.useEffect(()=>{if(!e)return;const f=S=>{n(T=>({...T,tracks:[...T.tracks.filter(C=>C.id!==S.id),S]}))},b=S=>{n(T=>{var C;return{...T,tracks:T.tracks.filter(w=>w.id!==S),pinnedTrack:((C=T.pinnedTrack)==null?void 0:C.id)===S?void 0:T.pinnedTrack}})},k=S=>{n(T=>({...T,tracks:T.tracks.map(C=>C.id===S.id?S:C)}))};return e.on("videoTrackAdded",f),e.on("videoTrackRemoved",b),e.on("videoTrackUpdated",k),()=>{e.off("videoTrackAdded",f),e.off("videoTrackRemoved",b),e.off("videoTrackUpdated",k)}},[e]),{tracks:t.tracks,localTrack:s,remoteTraracks:r,pinnedTrack:t.pinnedTrack,layout:t.layout,isRecording:t.isRecording,toggleCamera:i,toggleScreenShare:o,setLayout:a,pinTrack:l,unpinTrack:d,startRecording:u,stopRecording:h,getTrackById:m,getTracksByParticipant:g,isTrackActive:x}}function Bs(){const{chatMessages:e,sendChatMessage:t,currentSession:n}=lt(),[s,r]=v.useState(!1),i=v.useCallback(async d=>{if(!(!d.trim()||s||!n)){r(!0);try{await t(d.trim())}catch(u){throw console.error("Failed to send chat message:",u),u}finally{r(!1)}}},[t,s,n]),{userMessages:o,agentMessages:a,allMessages:l}=v.useMemo(()=>{const d=e.filter(h=>h.sender.type==="participant"),u=e.filter(h=>h.sender.type==="agent");return{userMessages:d,agentMessages:u,allMessages:e}},[e]);return{messages:l,userMessages:o,agentMessages:a,messageCount:l.length,isSending:s,canSend:!!n&&!s,send:i}}function gx(){const{send:e,isSending:t,canSend:n}=Bs(),[s,r]=v.useState(""),i=v.useCallback(async()=>{if(!(!s.trim()||!n))try{await e(s),r("")}catch(a){throw a}},[s,e,n]),o=v.useCallback(a=>{a.key==="Enter"&&!a.shiftKey&&(a.preventDefault(),i())},[i]);return{value:s,setValue:r,send:i,handleKeyPress:o,isSending:t,canSend:n&&s.trim().length>0}}function Go(){const{isConnected:e,isConnecting:t,connectionError:n,connect:s,disconnect:r}=lt(),i=v.useCallback(async()=>{if(!(e||t))try{await s()}catch(a){throw console.error("Failed to connect:",a),a}},[s,e,t]),o=v.useCallback(async()=>{if(e)try{await r()}catch(a){throw console.error("Failed to disconnect:",a),a}},[r,e]);return{isConnected:e,isConnecting:t,isDisconnected:!e&&!t,error:n,hasError:!!n,connect:i,disconnect:o}}function Od(){const{participants:e}=lt();return{participants:e,count:e.length,localParticipant:e.find(t=>t.isLocal),remoteParticipants:e.filter(t=>!t.isLocal)}}const Ld=v.createContext({}),Kn=()=>v.useContext(Ld);function _d({children:e,...t}){return c.jsx(Ld.Provider,{value:t,children:e})}function ps({name:e,children:t,fallback:n,className:s}){return c.jsx("div",{className:`voxket-slot voxket-slot--${e} ${s||""}`,children:t||n})}function Bd(e,t={}){return Object.assign(e,t)}function Hd({showMicrophoneControl:e=!0,showCameraControl:t=!0,showScreenShareControl:n=!0,showSessionActions:s=!0,customControls:r,className:i=""}){const o=Ut(),a=Dd(),l=$d(),d=Fd(),u=Kn(),h=["voxket-session-controls",`voxket-session-controls--${u.variant||"default"}`,`voxket-session-controls--${u.size||"md"}`,o.isActive?"voxket-session-controls--active":"voxket-session-controls--inactive",i].filter(Boolean).join(" ");return!o.isActive&&!s?c.jsx("div",{className:h,children:c.jsx("div",{className:"voxket-controls-inactive",children:c.jsx("p",{children:"Controls available during active session"})})}):c.jsxs("div",{className:h,children:[s&&c.jsx("div",{className:"voxket-session-actions",children:o.isActive?c.jsx("button",{onClick:o.stop,className:"voxket-button voxket-button--danger",children:"End Session"}):c.jsx(yx,{})}),o.isActive&&c.jsxs("div",{className:"voxket-media-controls",children:[e&&c.jsxs("button",{onClick:a.toggle,disabled:a.isLoading,className:`voxket-button voxket-button--media ${a.isEnabled?"voxket-button--active":""}`,title:a.isEnabled?"Mute microphone":"Unmute microphone",children:[c.jsx("span",{className:"voxket-icon",children:"🎤"}),a.isLoading?"Loading...":a.isEnabled?"Mute":"Unmute"]}),t&&c.jsxs("button",{onClick:l.toggle,disabled:l.isLoading,className:`voxket-button voxket-button--media ${l.isEnabled?"voxket-button--active":""}`,title:l.isEnabled?"Stop camera":"Start camera",children:[c.jsx("span",{className:"voxket-icon",children:"📹"}),l.isLoading?"Loading...":l.isEnabled?"Stop Video":"Start Video"]}),n&&c.jsxs("button",{onClick:d.toggle,disabled:d.isLoading,className:`voxket-button voxket-button--media ${d.isSharing?"voxket-button--active":""}`,title:d.isSharing?"Stop screen share":"Start screen share",children:[c.jsx("span",{className:"voxket-icon",children:"🖥️"}),d.isLoading?"Loading...":d.isSharing?"Stop Share":"Share Screen"]})]}),r&&c.jsx("div",{className:"voxket-custom-controls",children:r})]})}function yx(){Ut();const[e,t]=v.useState(!1),n=async()=>{t(!0);try{console.log("Start session - agentId needed")}catch(s){console.error("Failed to start session:",s)}finally{t(!1)}};return c.jsx("button",{onClick:n,disabled:e,className:"voxket-button voxket-button--primary",children:e?"Starting...":"Start Session"})}function Ko({showConnectionStatus:e=!0,showSessionInfo:t=!0,showAgentInfo:n=!0,className:s=""}){const r=Ut(),i=Go(),o=Kn(),a=["voxket-session-header",`voxket-session-header--${o.variant||"default"}`,`voxket-session-header--${o.size||"md"}`,s].filter(Boolean).join(" ");return c.jsxs("div",{className:a,children:[e&&c.jsxs("div",{className:"voxket-connection-status",children:[c.jsx("div",{className:`voxket-status-indicator ${i.isConnected?"connected":"disconnected"}`}),c.jsx("span",{className:"voxket-status-text",children:i.isConnecting?"Connecting...":i.isConnected?"Connected":"Disconnected"})]}),t&&r.session&&c.jsxs("div",{className:"voxket-session-info",children:[c.jsxs("div",{className:"voxket-session-id",children:["Session: ",r.session.id.slice(-8)]}),c.jsxs("div",{className:"voxket-session-state",children:["State: ",r.state]})]}),n&&r.session&&c.jsxs("div",{className:"voxket-agent-info",children:[c.jsxs("div",{className:"voxket-agent-id",children:["Agent: ",r.session.agentId]}),c.jsxs("div",{className:"voxket-modalities",children:["Modalities: ",r.session.activeModalities.join(", ")]})]}),i.error&&c.jsxs("div",{className:"voxket-error-message",children:["Error: ",i.error.message]})]})}function Yo({showChat:e=!0,showTranscriptions:t=!1,customContent:n,className:s=""}){const r=Ut(),i=Bs(),o=Kn(),a=["voxket-session-content",`voxket-session-content--${o.variant||"default"}`,`voxket-session-content--${o.size||"md"}`,s].filter(Boolean).join(" ");return r.isActive?c.jsx("div",{className:a,children:n||c.jsxs(c.Fragment,{children:[e&&c.jsxs("div",{className:"voxket-chat-container",children:[c.jsxs("div",{className:"voxket-chat-messages",children:[i.messages.map(l=>c.jsxs("div",{className:`voxket-message voxket-message--${l.sender.type}`,children:[c.jsxs("div",{className:"voxket-message-header",children:[c.jsx("span",{className:"voxket-message-sender",children:l.sender.name}),c.jsx("span",{className:"voxket-message-time",children:l.timestamp.toLocaleTimeString()})]}),c.jsx("div",{className:"voxket-message-content",children:l.content})]},l.id)),i.messages.length===0&&c.jsx("div",{className:"voxket-empty-messages",children:c.jsx("p",{children:"No messages yet. Start the conversation!"})})]}),c.jsx(xx,{})]}),t&&c.jsx("div",{className:"voxket-transcriptions",children:c.jsx("div",{className:"voxket-transcription-placeholder",children:c.jsx("p",{children:"Voice transcriptions will appear here"})})})]})}):c.jsx("div",{className:a,children:c.jsx("div",{className:"voxket-inactive-state",children:c.jsxs("div",{className:"voxket-inactive-message",children:[c.jsx("h3",{children:"Start a conversation"}),c.jsx("p",{children:"Begin a session to start chatting with the AI agent"})]})})})}function xx(){const e=Bs(),[t,n]=v.useState(""),s=async()=>{if(!(!t.trim()||!e.canSend))try{await e.send(t),n("")}catch(i){console.error("Failed to send message:",i)}},r=i=>{i.key==="Enter"&&!i.shiftKey&&(i.preventDefault(),s())};return c.jsxs("div",{className:"voxket-chat-input",children:[c.jsx("input",{type:"text",value:t,onChange:i=>n(i.target.value),onKeyPress:r,placeholder:"Type your message...",disabled:!e.canSend,className:"voxket-input"}),c.jsx("button",{onClick:s,disabled:!e.canSend||!t.trim(),className:"voxket-send-button",children:e.isSending?"Sending...":"Send"})]})}function qo({showMetrics:e=!0,showParticipants:t=!0,showStatus:n=!0,customFooter:s,className:r=""}){const i=Ut(),o=Id(),a=Od(),l=Kn(),d=["voxket-session-footer",`voxket-session-footer--${l.variant||"default"}`,`voxket-session-footer--${l.size||"md"}`,r].filter(Boolean).join(" ");return i.isActive?c.jsx("div",{className:d,children:s||c.jsxs(c.Fragment,{children:[n&&c.jsxs("div",{className:"voxket-session-status",children:[c.jsx("div",{className:"voxket-status-indicator voxket-status-indicator--active"}),c.jsx("span",{className:"voxket-status-text",children:"Session Active"})]}),e&&o.metrics&&c.jsxs("div",{className:"voxket-session-metrics",children:[c.jsxs("div",{className:"voxket-metric",children:[c.jsx("span",{className:"voxket-metric-label",children:"Duration:"}),c.jsx("span",{className:"voxket-metric-value",children:bx(o.duration||0)})]}),c.jsxs("div",{className:"voxket-metric",children:[c.jsx("span",{className:"voxket-metric-label",children:"Messages:"}),c.jsx("span",{className:"voxket-metric-value",children:o.metrics.messageCount})]})]}),t&&c.jsxs("div",{className:"voxket-participants-info",children:[c.jsxs("span",{className:"voxket-participants-count",children:[a.count," participant",a.count!==1?"s":""]}),a.remoteParticipants.length>0&&c.jsx("div",{className:"voxket-participant-list",children:a.remoteParticipants.map(u=>c.jsx("span",{className:"voxket-participant-name",children:u.name},u.id))})]})]})}):c.jsx("div",{className:d,children:c.jsx("div",{className:"voxket-footer-inactive",children:c.jsx("span",{className:"voxket-status-text",children:"Ready to start session"})})})}function bx(e){const t=Math.floor(e/1e3),n=Math.floor(t/60),s=Math.floor(n/60);return s>0?`${s}:${(n%60).toString().padStart(2,"0")}:${(t%60).toString().padStart(2,"0")}`:`${n}:${(t%60).toString().padStart(2,"0")}`}function vx({agentId:e,sessionConfig:t,autoStart:n=!1,onSessionStart:s,onSessionEnd:r,variant:i="default",size:o="md",theme:a,className:l="",children:d}){var g;const u=Ut(),h=Go();v.useEffect(()=>{n&&e&&h.isConnected&&!u.isActive&&u.start(e,t).catch(console.error)},[n,e,h.isConnected,u.isActive]),v.useEffect(()=>{var x;(x=u.session)!=null&&x.id&&s&&s(u.session.id)},[(g=u.session)==null?void 0:g.id,s]),v.useEffect(()=>()=>{u.isActive&&r&&u.stop().then(r).catch(console.error)},[]);const m=["voxket-session",`voxket-session--${i}`,`voxket-session--${o}`,u.isActive?"voxket-session--active":"voxket-session--inactive",l].filter(Boolean).join(" ");return c.jsx(_d,{variant:i,size:o,theme:a,className:l,children:c.jsx("div",{className:m,children:d||c.jsxs(c.Fragment,{children:[c.jsx(ps,{name:"header",fallback:c.jsx(Ko,{})}),c.jsx(ps,{name:"content",fallback:c.jsx(Yo,{})}),c.jsx(ps,{name:"footer",fallback:c.jsx(qo,{})})]})})})}const Ud=Bd(vx,{Header:Ko,Content:Yo,Footer:qo,Controls:Hd}),Bt={name:"default",colors:{primary:"#3B82F6",secondary:"#6B7280",accent:"#8B5CF6",background:"#FFFFFF",surface:"#F9FAFB",text:{primary:"#111827",secondary:"#6B7280",muted:"#9CA3AF",inverse:"#FFFFFF"},status:{success:"#10B981",warning:"#F59E0B",error:"#EF4444",info:"#3B82F6"},border:"#E5E7EB",shadow:"0 1px 3px 0 rgba(0, 0, 0, 0.1)"},typography:{fontFamily:"system-ui, -apple-system, sans-serif",fontSize:{xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem"},fontWeight:{normal:400,medium:500,semibold:600,bold:700},lineHeight:{tight:1.25,normal:1.5,relaxed:1.75}},spacing:{xs:"0.25rem",sm:"0.5rem",md:"1rem",lg:"1.5rem",xl:"2rem"},borderRadius:{none:"0",sm:"0.25rem",md:"0.5rem",lg:"0.75rem",full:"9999px"},shadows:{sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1)"}},Kr={...Bt,name:"dark",colors:{primary:"#60A5FA",secondary:"#9CA3AF",accent:"#A78BFA",background:"#111827",surface:"#1F2937",text:{primary:"#F9FAFB",secondary:"#D1D5DB",muted:"#9CA3AF",inverse:"#111827"},status:{success:"#34D399",warning:"#FBBF24",error:"#F87171",info:"#60A5FA"},border:"#374151",shadow:"0 1px 3px 0 rgba(0, 0, 0, 0.3)"}},Yr={...Bt,name:"enterprise",colors:{primary:"#1E40AF",secondary:"#64748B",accent:"#7C3AED",background:"#FFFFFF",surface:"#F8FAFC",text:{primary:"#0F172A",secondary:"#475569",muted:"#94A3B8",inverse:"#FFFFFF"},status:{success:"#059669",warning:"#D97706",error:"#DC2626",info:"#1E40AF"},border:"#CBD5E1",shadow:"0 1px 3px 0 rgba(0, 0, 0, 0.1)"},borderRadius:{none:"0",sm:"0.125rem",md:"0.25rem",lg:"0.375rem",full:"9999px"}},zd=v.createContext(null),Wd=()=>{const e=v.useContext(zd);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e};function wx({theme:e="default",themes:t={},children:n,cssVariables:s=!0,className:r=""}){const[i,o]=v.useState(()=>{const m={default:Bt,dark:Kr,enterprise:Yr,...t};return typeof e=="string"?m[e]||Bt:e}),[a,l]=v.useState(()=>({default:Bt,dark:Kr,enterprise:Yr,...t})),d=m=>{if(typeof m=="string"){const g=a[m];g&&o(g)}else o(m)},u=m=>{l(g=>({...g,[m.name]:m}))};v.useEffect(()=>{if(s&&typeof document<"u"){const m=document.documentElement;Object.entries(Zd(i)).forEach(([g,x])=>{m.style.setProperty(`--voxket-${g}`,x)})}},[i,s]);const h={theme:i,setTheme:d,themes:a,registerTheme:u};return c.jsx(zd.Provider,{value:h,children:c.jsx("div",{className:`voxket-theme voxket-theme--${i.name} ${r}`,children:n})})}function Zd(e){const t={},n=(s,r="")=>{for(const[i,o]of Object.entries(s)){const a=r?`${r}-${i}`:i;typeof o=="object"&&o!==null&&!Array.isArray(o)?n(o,a):t[a]=String(o)}};return n(e),t}function Sx(e=Bt,t){return{...e,...t,colors:{...e.colors,...t.colors},typography:{...e.typography,...t.typography},spacing:{...e.spacing,...t.spacing},borderRadius:{...e.borderRadius,...t.borderRadius},shadows:{...e.shadows,...t.shadows}}}function Cx(e){var n;const{theme:t}=Wd();return((n=t.components)==null?void 0:n[e])||{}}const kx=Zo("voice-modality","voice",{onActivate:async e=>{const t=e.config;t.enableTranscription&&Tx(e),t.enableVoiceActivation&&Ex(e,t),console.log("Voice modality activated",t)},onDeactivate:async e=>{console.log("Voice modality deactivated")},onMessage:async(e,t)=>{t.type==="audio"&&Ax(e,t)}});function Tx(e,t){e.on("participant.speaking.started",n=>{console.log("Transcription: Started for",n.name)}),e.on("participant.speaking.stopped",n=>{console.log("Transcription: Stopped for",n.name)})}function Ex(e,t){const n=t.silenceThreshold||-50;console.log("Voice activation setup with threshold:",n)}function Ax(e,t){console.log("Playing audio response:",t.content)}const jx=Zo("chat-modality","chat",{onActivate:async e=>{const t=e.config;t.enableRichText&&Mx(),t.enableFileUpload&&Vx(e),t.enableCustomComponents&&Nx(),console.log("Chat modality activated",t)},onDeactivate:async e=>{console.log("Chat modality deactivated")},onMessage:async(e,t)=>{const n=e.config;t.type==="ui_component"?Px(e,t):t.type==="text"&&n.enableRichText&&Rx(e,t)}});function Mx(e){console.log("Rich text support enabled")}function Vx(e){console.log("File upload enabled"),e.on("chat.file.uploaded",t=>{console.log("File uploaded:",t.name)})}function Nx(e){console.log("Custom components enabled");const t=new Map;t.set("quick-actions",Ix),t.set("form",Dx),t.set("card",$x),t.set("chart",Fx)}function Px(e,t){const{componentType:n,props:s}=t.metadata;console.log("Rendering custom component:",n,s),e.emit("chat.component.render",{type:n,props:s,timestamp:new Date})}function Rx(e,t){console.log("Processing rich text message:",t.content)}function Ix(e){return{type:"quick-actions",actions:e.actions||[],layout:e.layout||"horizontal"}}function Dx(e){return{type:"form",fields:e.fields||[],submitAction:e.submitAction,validation:e.validation}}function $x(e){return{type:"card",title:e.title,content:e.content,actions:e.actions,variant:e.variant||"default"}}function Fx(e){return{type:"chart",chartType:e.chartType||"line",data:e.data,options:e.options}}function gs({track:e,participantName:t,showControls:n=!0,showName:s=!0,showMuteIndicator:r=!0,isPinned:i=!1,className:o="",onClick:a,onPin:l,onUnpin:d}){const u=v.useRef(null),[h,m]=v.useState(!1);v.useEffect(()=>{if(!u.current||!e.isEnabled)return;const b=u.current;return b.srcObject=null,()=>{b.srcObject&&(b.srcObject=null)}},[e]);const g=()=>{a==null||a(e)},x=b=>{b.stopPropagation(),i?d==null||d(e):l==null||l(e)},f=["voxket-video-tile",e.isLocal?"voxket-video-tile--local":"voxket-video-tile--remote",e.isScreenShare?"voxket-video-tile--screen-share":"voxket-video-tile--camera",i?"voxket-video-tile--pinned":"",e.isEnabled?"":"voxket-video-tile--disabled",h?"voxket-video-tile--hovered":"",o].filter(Boolean).join(" ");return c.jsxs("div",{className:f,onClick:g,onMouseEnter:()=>m(!0),onMouseLeave:()=>m(!1),style:{aspectRatio:e.dimensions?`${e.dimensions.width} / ${e.dimensions.height}`:"16 / 9"},children:[c.jsx("video",{ref:u,className:"voxket-video-element",autoPlay:!0,playsInline:!0,muted:e.isLocal}),!e.isEnabled&&c.jsxs("div",{className:"voxket-video-placeholder",children:[c.jsx("div",{className:"voxket-video-placeholder-icon",children:e.isScreenShare?"🖥️":"📹"}),c.jsx("p",{className:"voxket-video-placeholder-text",children:e.isScreenShare?"Screen sharing paused":"Camera off"})]}),c.jsxs("div",{className:"voxket-video-overlay",children:[s&&t&&c.jsxs("div",{className:"voxket-video-name",children:[t,e.isLocal&&" (You)"]}),r&&!e.isEnabled&&c.jsx("div",{className:"voxket-video-mute-indicator",children:"🔇"}),n&&(h||i)&&c.jsxs("div",{className:"voxket-video-controls",children:[c.jsx("button",{className:`voxket-video-control-btn ${i?"voxket-video-control-btn--active":""}`,onClick:x,title:i?"Unpin video":"Pin video",children:"📌"}),e.isScreenShare&&c.jsx("div",{className:"voxket-video-indicator",children:"🖥️"}),e.source&&c.jsx("div",{className:"voxket-video-source",children:e.source})]})]}),!e.isEnabled&&c.jsx("div",{className:"voxket-video-loading",children:c.jsx("div",{className:"voxket-spinner"})})]})}function Ox({tracks:e,layout:t,className:n="",onLayoutChange:s,onTrackClick:r,maxVisibleTracks:i=9,showPagination:o=!0}){const[a,l]=v.useState(0),[d,u]=v.useState(null),h=v.useMemo(()=>{let S=[...e];t.type==="speaker"&&d&&(S=[d,...e.filter(w=>w.id!==d.id)]);const T=a*i,C=T+i;return S.slice(T,C)},[e,t,d,a,i]),m=Math.ceil(e.length/i),g=v.useMemo(()=>{const S=h.length;switch(t.type){case"grid":const T=Math.ceil(Math.sqrt(S)),C=Math.ceil(S/T);return{display:"grid",gridTemplateColumns:`repeat(${T}, 1fr)`,gridTemplateRows:`repeat(${C}, 1fr)`,gap:"8px"};case"speaker":return{display:"flex",flexDirection:"column",gap:"8px"};case"sidebar":return{display:"flex",gap:"8px"};case"gallery":return{display:"flex",flexWrap:"wrap",gap:"8px",justifyContent:"center"};default:return{}}},[t.type,h.length]),x=S=>{u(S)},f=()=>{u(null)},b=S=>{s==null||s({...t,type:S})},k=["voxket-video-grid",`voxket-video-grid--${t.type}`,`voxket-video-grid--${h.length}-tracks`,n].filter(Boolean).join(" ");return e.length===0?c.jsx("div",{className:"voxket-video-grid-empty",children:c.jsxs("div",{className:"voxket-video-grid-empty-content",children:[c.jsx("div",{className:"voxket-video-grid-empty-icon",children:"📹"}),c.jsx("p",{children:"No video tracks available"})]})}):c.jsxs("div",{className:k,children:[c.jsxs("div",{className:"voxket-video-grid-controls",children:[c.jsx("div",{className:"voxket-video-layout-controls",children:["grid","speaker","sidebar","gallery"].map(S=>c.jsx("button",{className:`voxket-layout-btn ${t.type===S?"voxket-layout-btn--active":""}`,onClick:()=>b(S),title:`Switch to ${S} layout`,children:Lx(S)},S))}),c.jsxs("div",{className:"voxket-video-count",children:[e.length," participant",e.length!==1?"s":""]})]}),c.jsx("div",{className:"voxket-video-grid-content",style:g,children:t.type==="speaker"&&d?c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"voxket-video-speaker-main",children:c.jsx(gs,{track:d,participantName:`Participant ${d.participantId}`,isPinned:!0,onClick:r,onUnpin:f})}),c.jsx("div",{className:"voxket-video-speaker-sidebar",children:h.filter(S=>S.id!==d.id).map(S=>c.jsx(gs,{track:S,participantName:`Participant ${S.participantId}`,showControls:!1,onClick:r,onPin:x},S.id))})]}):h.map(S=>c.jsx(gs,{track:S,participantName:`Participant ${S.participantId}`,isPinned:(d==null?void 0:d.id)===S.id,onClick:r,onPin:x,onUnpin:f},S.id))}),o&&m>1&&c.jsxs("div",{className:"voxket-video-pagination",children:[c.jsx("button",{className:"voxket-pagination-btn",onClick:()=>l(Math.max(0,a-1)),disabled:a===0,children:"←"}),c.jsxs("span",{className:"voxket-pagination-info",children:["Page ",a+1," of ",m]}),c.jsx("button",{className:"voxket-pagination-btn",onClick:()=>l(Math.min(m-1,a+1)),disabled:a===m-1,children:"→"})]})]})}function Lx(e){switch(e){case"grid":return"⊞";case"speaker":return"🎤";case"sidebar":return"⫸";case"gallery":return"⊡";case"picture-in-picture":return"⧉";default:return"⊞"}}function _x({localTrack:e,onToggleCamera:t,onToggleScreenShare:n,onLayoutChange:s,showLayoutControls:r=!0,showCameraControls:i=!0,showScreenShareControls:o=!0,className:a=""}){const l=["voxket-video-controls",a].filter(Boolean).join(" "),d=u=>{s==null||s({type:u,showLocalVideo:!0,aspectRatio:"16:9"})};return c.jsxs("div",{className:l,children:[i&&c.jsxs("div",{className:"voxket-video-controls-section",children:[c.jsx("h4",{className:"voxket-video-controls-title",children:"Camera"}),c.jsxs("button",{className:`voxket-control-btn ${e!=null&&e.isEnabled?"voxket-control-btn--active":""}`,onClick:t,title:e!=null&&e.isEnabled?"Turn off camera":"Turn on camera",children:[c.jsx("span",{className:"voxket-control-icon",children:e!=null&&e.isEnabled?"📹":"📷"}),c.jsx("span",{className:"voxket-control-label",children:e!=null&&e.isEnabled?"Camera On":"Camera Off"})]}),(e==null?void 0:e.dimensions)&&c.jsxs("div",{className:"voxket-video-info",children:[e.dimensions.width," × ",e.dimensions.height]})]}),o&&c.jsxs("div",{className:"voxket-video-controls-section",children:[c.jsx("h4",{className:"voxket-video-controls-title",children:"Screen Share"}),c.jsxs("button",{className:`voxket-control-btn ${e!=null&&e.isScreenShare?"voxket-control-btn--active":""}`,onClick:n,title:e!=null&&e.isScreenShare?"Stop screen sharing":"Start screen sharing",children:[c.jsx("span",{className:"voxket-control-icon",children:e!=null&&e.isScreenShare?"🛑":"🖥️"}),c.jsx("span",{className:"voxket-control-label",children:e!=null&&e.isScreenShare?"Stop Sharing":"Share Screen"})]})]}),r&&c.jsxs("div",{className:"voxket-video-controls-section",children:[c.jsx("h4",{className:"voxket-video-controls-title",children:"Layout"}),c.jsx("div",{className:"voxket-layout-buttons",children:[{type:"grid",icon:"⊞",label:"Grid"},{type:"speaker",icon:"🎤",label:"Speaker"},{type:"sidebar",icon:"⫸",label:"Sidebar"},{type:"gallery",icon:"⊡",label:"Gallery"}].map(({type:u,icon:h,label:m})=>c.jsxs("button",{className:"voxket-layout-control-btn",onClick:()=>d(u),title:`Switch to ${m} layout`,children:[c.jsx("span",{className:"voxket-control-icon",children:h}),c.jsx("span",{className:"voxket-control-label",children:m})]},u))})]}),c.jsxs("div",{className:"voxket-video-controls-section",children:[c.jsx("h4",{className:"voxket-video-controls-title",children:"Video Settings"}),c.jsxs("div",{className:"voxket-video-settings",children:[c.jsxs("div",{className:"voxket-setting-group",children:[c.jsx("label",{className:"voxket-setting-label",children:"Quality"}),c.jsxs("select",{className:"voxket-setting-select",children:[c.jsx("option",{value:"high",children:"High (720p)"}),c.jsx("option",{value:"medium",children:"Medium (480p)"}),c.jsx("option",{value:"low",children:"Low (240p)"})]})]}),c.jsxs("div",{className:"voxket-setting-group",children:[c.jsx("label",{className:"voxket-setting-label",children:"Frame Rate"}),c.jsxs("select",{className:"voxket-setting-select",children:[c.jsx("option",{value:"30",children:"30 fps"}),c.jsx("option",{value:"15",children:"15 fps"}),c.jsx("option",{value:"10",children:"10 fps"})]})]}),c.jsxs("div",{className:"voxket-setting-group",children:[c.jsx("label",{className:"voxket-setting-label",children:"Bandwidth"}),c.jsxs("select",{className:"voxket-setting-select",children:[c.jsx("option",{value:"unlimited",children:"Unlimited"}),c.jsx("option",{value:"1000",children:"1 Mbps"}),c.jsx("option",{value:"500",children:"500 Kbps"}),c.jsx("option",{value:"250",children:"250 Kbps"})]})]})]})]}),c.jsxs("div",{className:"voxket-video-controls-section",children:[c.jsx("h4",{className:"voxket-video-controls-title",children:"Statistics"}),c.jsxs("div",{className:"voxket-video-stats",children:[c.jsxs("div",{className:"voxket-stat-item",children:[c.jsx("span",{className:"voxket-stat-label",children:"Resolution:"}),c.jsx("span",{className:"voxket-stat-value",children:e!=null&&e.dimensions?`${e.dimensions.width}×${e.dimensions.height}`:"N/A"})]}),c.jsxs("div",{className:"voxket-stat-item",children:[c.jsx("span",{className:"voxket-stat-label",children:"Source:"}),c.jsx("span",{className:"voxket-stat-value",children:(e==null?void 0:e.source)||"None"})]}),c.jsxs("div",{className:"voxket-stat-item",children:[c.jsx("span",{className:"voxket-stat-label",children:"Status:"}),c.jsx("span",{className:`voxket-stat-value ${e!=null&&e.isEnabled?"voxket-stat-value--active":"voxket-stat-value--inactive"}`,children:e!=null&&e.isEnabled?"Active":"Inactive"})]})]})]})]})}const Gd=({handler:e,loadData:t,data:n,client:s,addLocalMessage:r})=>{const[i,o]=p.useState(null),[a,l]=p.useState(!0),[d,u]=p.useState(!1),[h]=p.useState(Date.now());p.useEffect(()=>{(async()=>{try{if(l(!0),console.log("📋 AssignmentView: Loading assignment data..."),console.log("📋 AssignmentView: Received data from RPC:",n),n&&typeof n=="object"){const b={title:n.title||"Untitled Assignment",description:n.description||"No description provided",estimated_time_of_completion:n.estimated_time_of_completion||"Unknown"};o(b),console.log("📋 AssignmentView: Assignment loaded from RPC data:",b)}}catch(b){console.error("📋 AssignmentView: Error loading assignment:",b),o({title:"Assignment Loading Error",description:"There was an error loading the assignment details. Please try again.",estimated_time_of_completion:"Unknown"})}finally{l(!1)}})()},[n,t]);const m=({message:f,assignment:b})=>{const k=f.toLowerCase().includes("declined"),S=k?"bg-red-50 border-red-200":"bg-green-50 border-green-200",T=k?"text-red-700":"text-green-700",C=k?"❌":"🎉";return c.jsxs("div",{className:`max-w-sm mx-auto ${S} border rounded-lg shadow p-3 flex flex-col items-center`,children:[c.jsx("div",{className:"text-2xl mb-2",children:C}),c.jsx("div",{className:`${T} font-semibold text-sm mb-1`,children:f}),c.jsx("div",{className:"text-xs text-gray-600 text-center mb-1",children:b.title}),c.jsx("div",{className:"text-xs text-gray-500",children:"Thank you for your response!"})]})},g=async()=>{if(!(!i||!e)){u(!0);try{const f={message:"accepted"};console.log("📋 AssignmentView: Assignment accepted:",f),e.didSuccess(f,c.jsx(m,{message:"Assignment accepted!",assignment:i}))}catch(f){console.error("📋 AssignmentView: Error accepting assignment:",f),e.didFail({error:"Failed to accept assignment"})}finally{u(!1)}}},x=async()=>{if(!(!i||!e)){u(!0);try{const f={message:"declined"};console.log("📋 AssignmentView: Assignment declined:",f),e.didSuccess(f,c.jsx(m,{message:"Assignment declined",assignment:i}))}catch(f){console.error("📋 AssignmentView: Error declining assignment:",f),e.didFail({error:"Failed to decline assignment"})}finally{u(!1)}}};return a?c.jsx("div",{className:"max-w-sm mx-auto bg-white rounded-lg shadow-lg p-3",children:c.jsxs("div",{className:"flex items-center justify-center py-4",children:[c.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-blue-600"}),c.jsx("span",{className:"ml-2 text-xs text-gray-600",children:"Loading assignment..."})]})}):i?c.jsxs("div",{className:"max-w-sm mx-auto bg-white rounded-lg shadow-lg overflow-hidden",children:[c.jsx("div",{className:"bg-gradient-to-r from-blue-600 to-purple-600 text-white p-3",children:c.jsx("div",{className:"flex items-center justify-between",children:c.jsx("h3",{className:"text-xs font-semibold text-white truncate",children:i.title})})}),c.jsxs("div",{className:"p-3 text-black",children:[c.jsx("div",{className:"bg-gray-50 rounded p-2 mb-3",children:c.jsx("p",{className:"text-xs text-black leading-snug",children:i.description})}),c.jsx("div",{className:"mb-3 text-black",children:c.jsxs("div",{className:"flex items-center text-xs text-gray-600",children:[c.jsx("span",{className:"text-xs mr-1",children:"📅"}),c.jsxs("span",{children:["Est: ",i.estimated_time_of_completion]})]})}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx("button",{onClick:g,disabled:d,className:"flex-1 bg-green-600 text-white py-2 px-3 rounded text-xs font-medium hover:bg-green-700 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:d?c.jsxs("span",{className:"flex items-center justify-center",children:[c.jsx("div",{className:"animate-spin rounded-full h-2 w-2 border-b-2 border-white mr-1"}),c.jsx("span",{className:"text-xs",children:"Processing..."})]}):"Accept"}),c.jsx("button",{onClick:x,disabled:d,className:"flex-1 bg-red-600 text-white py-2 px-3 rounded text-xs font-medium hover:bg-red-700 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:"Decline"})]})]})]}):c.jsx("div",{className:"max-w-sm mx-auto bg-white rounded-lg shadow-lg p-3",children:c.jsxs("div",{className:"text-center py-4",children:[c.jsx("div",{className:"text-red-600 text-sm font-semibold mb-2",children:"⚠️ Assignment Error"}),c.jsx("p",{className:"text-xs text-gray-600 mb-3",children:"Failed to load assignment details."})]})})};function Bx(){const[e,t]=p.useState(null),[n,s]=p.useState([]);p.useEffect(()=>{const a=new Gn({appId:"your-app-id",appSecret:"your-app-secret",baseUrl:"https://your-voxket-api.com",agentId:"your-agent-id",participantName:"User",modalities:["chat"]});return t(a),a.on("rpc.method.called",l=>{console.log("RPC Method Called:",l)}),a.on("rpc.interaction.completed",l=>{console.log("RPC Interaction Completed:",l)}),()=>{a.disconnect()}},[]);const r=async()=>{if(e)try{await e.registerFrontendRPC("give_assignment",Gd,"embedded");const a=e.getRegisteredRpcMethods();s(a),console.log("✅ Assignment RPC registered successfully")}catch(a){console.error("❌ Failed to register assignment RPC:",a)}},i=async()=>{if(!e)return;const a=({handler:l,timeout:d})=>{const[u,h]=p.useState(""),m=[{id:"pro",name:"Pro Plan",price:"$29/month"},{id:"enterprise",name:"Enterprise Plan",price:"$99/month"},{id:"basic",name:"Basic Plan",price:"$9/month"}],g=f=>{h(f)},x=()=>{const f=m.find(b=>b.id===u);l==null||l.didSuccess({selectedProduct:u,productName:f==null?void 0:f.name,price:f==null?void 0:f.price,timestamp:new Date().toISOString()})};return c.jsxs("div",{className:"p-6 bg-white rounded-lg",children:[c.jsx("h3",{className:"text-xl font-bold mb-4",children:"Choose Your Plan"}),c.jsx("p",{className:"text-gray-600 mb-4",children:"Select the plan that best fits your needs:"}),c.jsx("div",{className:"space-y-3 mb-6",children:m.map(f=>c.jsx("div",{onClick:()=>g(f.id),className:`p-4 border rounded-lg cursor-pointer transition-all ${u===f.id?"border-blue-500 bg-blue-50":"border-gray-200 hover:border-gray-300"}`,children:c.jsxs("div",{className:"flex justify-between items-center",children:[c.jsxs("div",{children:[c.jsx("h4",{className:"font-medium",children:f.name}),c.jsx("p",{className:"text-gray-600 text-sm",children:f.price})]}),c.jsx("div",{className:`w-4 h-4 rounded-full ${u===f.id?"bg-blue-500":"border-2 border-gray-300"}`})]})},f.id))}),c.jsxs("div",{className:"flex justify-end space-x-3",children:[c.jsx("button",{onClick:()=>l==null?void 0:l.dismissView(),className:"px-4 py-2 border border-gray-300 text-gray-700 rounded hover:bg-gray-50",children:"Cancel"}),c.jsx("button",{onClick:x,disabled:!u,className:"px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600 disabled:opacity-50",children:"Select Plan"})]}),d&&c.jsxs("p",{className:"text-xs text-gray-500 mt-2",children:["Time remaining: ",d," seconds"]})]})};try{await e.registerFrontendRPC("recommend_product",a,"modal");const l=e.getRegisteredRpcMethods();s(l),console.log("✅ Product Recommendation RPC registered successfully")}catch(l){console.error("❌ Failed to register product recommendation RPC:",l)}},o=async()=>{if(!e)return;const a=({handler:l})=>{const[d,u]=p.useState(0),[h,m]=p.useState(""),g=()=>{l==null||l.didSuccess({rating:d,comment:h,timestamp:new Date().toISOString()})};return c.jsxs("div",{className:"p-4 bg-white rounded-lg",children:[c.jsx("h3",{className:"text-lg font-semibold mb-3",children:"How was your experience?"}),c.jsxs("div",{className:"mb-4",children:[c.jsx("p",{className:"text-sm text-gray-600 mb-2",children:"Rate your experience:"}),c.jsx("div",{className:"flex space-x-1",children:[1,2,3,4,5].map(x=>c.jsx("button",{onClick:()=>u(x),className:`text-2xl ${x<=d?"text-yellow-400":"text-gray-300"}`,children:"⭐"},x))})]}),c.jsxs("div",{className:"mb-4",children:[c.jsx("p",{className:"text-sm text-gray-600 mb-2",children:"Additional comments:"}),c.jsx("textarea",{value:h,onChange:x=>m(x.target.value),className:"w-full p-2 border border-gray-300 rounded text-sm",rows:3,placeholder:"Tell us more about your experience..."})]}),c.jsxs("div",{className:"flex justify-end space-x-2",children:[c.jsx("button",{onClick:()=>l==null?void 0:l.dismissView(),className:"px-3 py-1 text-sm border border-gray-300 text-gray-700 rounded hover:bg-gray-50",children:"Skip"}),c.jsx("button",{onClick:g,disabled:d===0,className:"px-3 py-1 text-sm bg-blue-500 text-white rounded hover:bg-blue-600 disabled:opacity-50",children:"Submit"})]})]})};try{await e.registerFrontendRPC("collect_feedback",a,"embedded");const l=e.getRegisteredRpcMethods();s(l),console.log("✅ Feedback RPC registered successfully")}catch(l){console.error("❌ Failed to register feedback RPC:",l)}};return c.jsxs("div",{className:"p-6",children:[c.jsx("h2",{className:"text-2xl font-bold mb-6",children:"Frontend RPC Examples"}),c.jsxs("div",{className:"space-y-4 mb-6",children:[c.jsxs("div",{children:[c.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Register RPC Methods"}),c.jsxs("div",{className:"space-x-2",children:[c.jsx("button",{onClick:r,className:"px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600",children:"Register Assignment RPC"}),c.jsx("button",{onClick:i,className:"px-4 py-2 bg-green-500 text-white rounded hover:bg-green-600",children:"Register Product Recommendation RPC"}),c.jsx("button",{onClick:o,className:"px-4 py-2 bg-purple-500 text-white rounded hover:bg-purple-600",children:"Register Feedback RPC"})]})]}),c.jsxs("div",{children:[c.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Registered Methods"}),n.length>0?c.jsx("ul",{className:"list-disc list-inside space-y-1",children:n.map(a=>c.jsx("li",{className:"text-gray-700",children:c.jsx("code",{className:"bg-gray-100 px-2 py-1 rounded",children:a})},a))}):c.jsx("p",{className:"text-gray-500",children:"No methods registered yet"})]})]}),c.jsxs("div",{className:"bg-gray-50 p-4 rounded-lg",children:[c.jsx("h3",{className:"text-lg font-semibold mb-2",children:"How it works"}),c.jsxs("ol",{className:"list-decimal list-inside space-y-2 text-sm text-gray-700",children:[c.jsxs("li",{children:["Register RPC methods with React components using ",c.jsx("code",{children:"client.registerFrontendRPC()"})]}),c.jsx("li",{children:"When the agent calls an RPC method, the corresponding component will be displayed"}),c.jsx("li",{children:"Users interact with the component, and the response is sent back to the agent"}),c.jsx("li",{children:"Components can be displayed in different modes: embedded, modal, or fullscreen"}),c.jsx("li",{children:"Each component has a timeout and can handle success/failure scenarios"})]})]}),c.jsxs("div",{className:"mt-6 bg-blue-50 p-4 rounded-lg",children:[c.jsx("h3",{className:"text-lg font-semibold mb-2 text-blue-800",children:"Agent Side"}),c.jsx("p",{className:"text-sm text-blue-700 mb-2",children:"On the agent side, you can call these RPC methods like this:"}),c.jsx("pre",{className:"bg-white p-3 rounded text-xs text-gray-800 overflow-x-auto",children:`// Agent calls RPC method
135
+ `,style:{minHeight:"2.5rem",display:o===s?"block":"none"},children:i},o))})}function r1({statusMessage:e,theme:t}){const n=_e(t);return l.jsxs("div",{className:"z-10 flex items-center space-x-2 mt-2 pb-2",children:[l.jsx("div",{className:n.statusIndicator}),l.jsx("span",{className:`text-xs ${n.text.muted}`,children:e})]})}const Md=w.forwardRef(({disabled:e,onStartCall:t,onStartChat:n,onStartVideo:s,prompts:r=['"Book a meeting with the marketing team"',`"What's the status of project Alpha?"`,`"Summarize yesterday's sales report"`,'"Find a good Italian restaurant nearby"','"Remind me to call John tomorrow at 10 AM"'],statusMessage:i="Agent is ready",title:o="Choose how to interact",subTitle:a="Ask me anything or give me a task to complete",theme:c="vox",modalities:d=["voice","chat","video"]},u)=>{const f=_e(c),h=d.includes("voice"),p=d.includes("chat"),x=d.includes("video"),m=[h,p,x].filter(Boolean).length;return l.jsxs("div",{className:"flex p-8 flex-col items-center h-full justify-center w-full relative","aria-disabled":e,style:{background:"transparent"},children:[l.jsxs("div",{className:"mt-1 relative flex items-center justify-center mb-8 w-full",style:{minHeight:"120px"},children:[l.jsxs("div",{className:"absolute inset-0 flex items-center justify-center",children:[l.jsx("div",{className:f.pulseRings.ring1}),l.jsx("div",{className:f.pulseRings.ring2,style:{animationDelay:"0.5s"}}),l.jsx("div",{className:f.pulseRings.ring3,style:{animationDelay:"1s"}})]}),l.jsx("div",{className:"relative z-10 flex items-center justify-center",children:h&&p&&x?l.jsxs("div",{className:"flex gap-4 items-center justify-center",children:[l.jsx(as,{onClick:t,disabled:e,theme:c}),l.jsx(yr,{onClick:n,disabled:e,theme:c}),l.jsx(xr,{onClick:s||t,disabled:e,theme:c})]}):m>1?l.jsxs("div",{className:"flex gap-6 items-center justify-center",children:[h&&l.jsx(as,{onClick:t,disabled:e,theme:c}),p&&l.jsx(yr,{onClick:n,disabled:e,theme:c}),x&&s&&l.jsx(xr,{onClick:s,disabled:e,theme:c})]}):l.jsx("div",{className:"flex items-center justify-center",children:h?l.jsx(as,{onClick:t,disabled:e,theme:c}):p?l.jsx(yr,{onClick:n,disabled:e,theme:c}):x&&s?l.jsx(xr,{onClick:s,disabled:e,theme:c}):l.jsx(as,{onClick:t,disabled:e,theme:c})})})]}),l.jsxs("div",{className:"text-center flex flex-col items-center gap-y-2 mb-6 w-full",children:[l.jsx("h3",{className:`text-xl font-semibold mb-2 ${f.text.accent}`,children:o}),l.jsx("p",{className:`text-sm leading-relaxed px-4 ${f.text.secondary}`,children:a}),m>1&&l.jsxs("div",{className:"flex gap-6 mt-4 text-xs justify-center",children:[h&&l.jsxs("div",{className:"flex flex-col items-center gap-1",children:[l.jsx(Ad,{className:"w-4 h-4"}),l.jsx("span",{className:f.text.muted,children:"Voice"})]}),p&&l.jsxs("div",{className:"flex flex-col items-center gap-1",children:[l.jsx(Ed,{className:"w-4 h-4"}),l.jsx("span",{className:f.text.muted,children:"Chat"})]}),x&&l.jsxs("div",{className:"flex flex-col items-center gap-1",children:[l.jsx(jd,{className:"w-4 h-4"}),l.jsx("span",{className:f.text.muted,children:"Video"})]})]})]}),l.jsx(s1,{prompts:r,theme:c}),l.jsx(r1,{statusMessage:i,theme:c})]})});Md.displayName="Welcome";class Wo extends g.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("VoxketWidget Error:",t,n)}render(){if(this.state.hasError){if(this.props.fallback){const t=this.props.fallback;return g.createElement(t,{error:this.state.error})}return g.createElement("div",{style:{padding:"20px",border:"1px solid #ff4444",borderRadius:"8px",background:"#fff5f5",color:"#cc0000"}},"VoxketWidget encountered an error. Please check the console for details.")}return this.props.children}}function Vd({room:e,onSessionEnd:t,onSessionStart:n,enableConsoleLogging:s=!0,enableLocalStorage:r=!0,voxketSessionId:i}={}){const[o,a]=g.useState(null),[c,d]=g.useState([]),[u,f]=g.useState(null),[h,p]=g.useState([]),x=g.useCallback((C,T)=>{const k={timestamp:new Date,event:C,data:T,sessionId:o==null?void 0:o.sessionId,participantId:u==null?void 0:u.identity};if(d(v=>[...v,k]),r){const v=JSON.parse(localStorage.getItem("voxket-session-logs")||"[]");v.push(k),localStorage.setItem("voxket-session-logs",JSON.stringify(v))}return k},[o==null?void 0:o.sessionId,u==null?void 0:u.identity,s,r]);g.useEffect(()=>{if(!e)return;const C=()=>{const y=i||`session-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,D=new Date,W={sessionId:y,startTime:D,totalMessages:0,connectionIssues:0,participantCount:h.length,events:[]};a(W),x("SESSION_STARTED",{sessionId:y,startTime:D}),n==null||n(y)},T=()=>{if(o){const y=new Date,D=y.getTime()-o.startTime.getTime(),W={...o,endTime:y,duration:D,events:c};x("SESSION_ENDED",{sessionId:o.sessionId,duration:`${Math.round(D/1e3)}s`,totalMessages:o.totalMessages,connectionIssues:o.connectionIssues}),t==null||t(W),a(null),d([])}},k=y=>{x("CONNECTION_STATE_CHANGED",{state:y}),y===K.ConnectionState.Reconnecting&&o&&(a(D=>D?{...D,connectionIssues:D.connectionIssues+1}:null),x("CONNECTION_ISSUE",{type:"reconnecting"}))},v=y=>{x("TRACK_PUBLISHED",{trackKind:y.kind,trackSource:y.source})},j=y=>{x("TRACK_UNPUBLISHED",{trackKind:y.kind,trackSource:y.source})},V=(y,D)=>{o&&a(W=>W?{...W,totalMessages:W.totalMessages+1}:null),x("DATA_RECEIVED",{participantId:D==null?void 0:D.identity,dataSize:y.length})},E=y=>{x("PARTICIPANT_CONNECTED",{participantId:y.identity,participantName:y.name}),p(D=>[...D,y]),o&&a(D=>D?{...D,participantCount:D.participantCount+1}:null)},_=y=>{x("PARTICIPANT_DISCONNECTED",{participantId:y.identity,participantName:y.name}),p(D=>D.filter(W=>W.identity!==y.identity))};return e.localParticipant&&f(e.localParticipant),e.on(K.RoomEvent.Connected,C),e.on(K.RoomEvent.Disconnected,T),e.on(K.RoomEvent.ConnectionStateChanged,k),e.on(K.RoomEvent.TrackPublished,v),e.on(K.RoomEvent.TrackUnpublished,j),e.on(K.RoomEvent.DataReceived,V),e.on(K.RoomEvent.ParticipantConnected,E),e.on(K.RoomEvent.ParticipantDisconnected,_),()=>{e.off(K.RoomEvent.Connected,C),e.off(K.RoomEvent.Disconnected,T),e.off(K.RoomEvent.ConnectionStateChanged,k),e.off(K.RoomEvent.TrackPublished,v),e.off(K.RoomEvent.TrackUnpublished,j),e.off(K.RoomEvent.DataReceived,V),e.off(K.RoomEvent.ParticipantConnected,E),e.off(K.RoomEvent.ParticipantDisconnected,_)}},[e,o,c,h.length,x,t,n]);const m=g.useCallback(()=>r?JSON.parse(localStorage.getItem("voxket-session-logs")||"[]"):c,[c,r]),b=g.useCallback(()=>{r&&localStorage.removeItem("voxket-session-logs"),d([])},[r]),S=g.useCallback(()=>{const C=m(),T=JSON.stringify(C,null,2),k="data:application/json;charset=utf-8,"+encodeURIComponent(T),v=`voxket-session-logs-${new Date().toISOString().split("T")[0]}.json`,j=document.createElement("a");j.setAttribute("href",k),j.setAttribute("download",v),j.click()},[m]);return{sessionMetrics:o,sessionLogs:c,logEvent:x,getSessionLogs:m,clearSessionLogs:b,exportSessionLogs:S}}class Zo{constructor(){Ne(this,"listeners",{})}on(t,n){return this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push(n),()=>this.off(t,n)}once(t,n){const s=(...r)=>{this.off(t,s),n(...r)};return this.on(t,s)}off(t,n){const s=this.listeners[t];if(!s)return;const r=s.indexOf(n);r>-1&&s.splice(r,1)}removeAllListeners(t){t?delete this.listeners[t]:this.listeners={}}emit(t,...n){const s=this.listeners[t];if(!s)return;const r=[...s];for(const i of r)try{i(...n)}catch(o){console.error(`Error in event listener for ${String(t)}:`,o)}}listenerCount(t){var n;return((n=this.listeners[t])==null?void 0:n.length)??0}eventNames(){return Object.keys(this.listeners)}}class Pd{constructor(t){Ne(this,"plugins",new Map);Ne(this,"installedPlugins",new Set);Ne(this,"context");this.context={client:t,emit:t.emit.bind(t),on:t.on.bind(t),config:{}}}register(t){if(this.plugins.has(t.name))throw new Error(`Plugin '${t.name}' is already registered`);if(t.dependencies){for(const n of t.dependencies)if(!this.plugins.has(n))throw new Error(`Plugin '${t.name}' depends on '${n}' which is not registered`)}this.plugins.set(t.name,t)}async install(t,n){const s=this.plugins.get(t);if(!s)throw new Error(`Plugin '${t}' is not registered`);if(this.installedPlugins.has(t))throw new Error(`Plugin '${t}' is already installed`);if(s.dependencies)for(const i of s.dependencies)this.installedPlugins.has(i)||await this.install(i);const r={...this.context,config:{...s.config,...n}};s.install&&await s.install(r),this.installedPlugins.add(t),this.setupPluginEvents(s,r)}async uninstall(t){var s;const n=this.plugins.get(t);if(!n)throw new Error(`Plugin '${t}' is not registered`);if(this.installedPlugins.has(t)){for(const[r,i]of this.plugins)if(this.installedPlugins.has(r)&&((s=i.dependencies)!=null&&s.includes(t)))throw new Error(`Cannot uninstall '${t}' because '${r}' depends on it`);n.uninstall&&await n.uninstall(this.context),this.installedPlugins.delete(t)}}isInstalled(t){return this.installedPlugins.has(t)}getInstalledPlugins(){return Array.from(this.installedPlugins)}getAvailablePlugins(){return Array.from(this.plugins.keys())}getPluginInfo(t){return this.plugins.get(t)}setupPluginEvents(t,n){t.onSessionStart&&n.on("session.started",s=>{t.onSessionStart(n,s.id)}),t.onSessionEnd&&n.on("session.ended",s=>{t.onSessionEnd(n,s.id)}),t.onAgentResponse&&n.on("agent.response",s=>{t.onAgentResponse(n,s)})}}function o1(e){return e}function Go(e,t,n){return{name:e,version:"1.0.0",description:`${t} modality plugin`,install:async s=>{n.onActivate&&await n.onActivate(s)},uninstall:async s=>{n.onDeactivate&&await n.onDeactivate(s)},onAgentResponse:n.onMessage}}const i1={name:"analytics",version:"1.0.0",description:"Built-in analytics tracking",install:async e=>{console.log("Analytics plugin installed"),e.on("session.started",t=>{console.log("Analytics: Session started",t.id)}),e.on("session.ended",(t,n)=>{console.log("Analytics: Session ended",t.id,n)}),e.on("chat.message.sent",t=>{console.log("Analytics: User message sent",t.content.length)})}},a1={name:"debug",version:"1.0.0",description:"Debug logging and development tools",install:async e=>{console.log("Debug plugin installed");const t=e.emit;e.emit=(n,...s)=>(console.log(`[Debug] Event: ${String(n)}`,s),t(n,...s))}},l1={name:"metrics",version:"1.0.0",description:"Advanced metrics collection",install:async e=>{console.log("Metrics plugin installed");const t=new Map;e.on("session.started",n=>{t.set(n.id,{startTime:Date.now(),events:[]})}),e.on("agent.response",n=>{console.log("Metrics: Agent response analyzed",{type:n.type,length:n.content.length,timestamp:n.timestamp})})}},Rd=w.createContext(null);function hs({config:e,children:t,autoConnect:n=!1,client:s}){const[r,i]=w.useState(null),[o,a]=w.useState(!1),[c,d]=w.useState(!1),[u,f]=w.useState(null),[h,p]=w.useState(null),[x,m]=w.useState("idle"),[b,S]=w.useState(null),[C,T]=w.useState([]),[k,v]=w.useState([]),[j,V]=w.useState([]);w.useEffect(()=>{const B=s||new Wn(e);i(B);const M=E(B);return n&&!s&&_(B),()=>{M(),s||B.disconnect().catch(console.error)}},[e,n,s]);const E=B=>{const M=()=>{d(!0),f(null)},O=()=>{a(!0),d(!1),f(null)},q=()=>{a(!1),d(!1),p(null),m("idle"),T([]),v([]),V([])},Y=Z=>{f(Z),d(!1)},H=Z=>{p(Z),m(Z.state)},re=Z=>{m(Z),h&&p({...h,state:Z})},$=(Z,G)=>{p(null),m("idle"),S(G),T([]),v([]),V([])},I=Z=>{T(G=>[...G,Z])},L=Z=>{T(G=>G.filter(de=>de.id!==Z.id))},N=Z=>{v(G=>[...G,Z])},F=Z=>{v(G=>[...G,Z])},se=Z=>{console.log("📝 VoxketProvider: Received transcription:",Z),V(G=>G.find(ae=>ae.id===Z.id)?(console.log("📝 VoxketProvider: Duplicate transcription detected, skipping:",Z.id),G):(console.log("📝 VoxketProvider: Adding new transcription:",Z.id),[...G,Z]))},A=()=>{console.log("🧹 VoxketProvider: Clearing chat messages and transcriptions"),v([]),V([])};return B.on("connection.connecting",M),B.on("connection.connected",O),B.on("connection.disconnected",q),B.on("connection.error",Y),B.on("session.created",H),B.on("session.state.changed",re),B.on("session.ended",$),B.on("participant.joined",I),B.on("participant.left",L),B.on("chat.message.received",N),B.on("chat.message.sent",F),B.on("transcription.received",se),B.on("chat.history.cleared",A),()=>{console.log("📝 VoxketProvider: Cleaning up event listeners"),B.off("connection.connecting",M),B.off("connection.connected",O),B.off("connection.disconnected",q),B.off("connection.error",Y),B.off("session.created",H),B.off("session.state.changed",re),B.off("session.ended",$),B.off("participant.joined",I),B.off("participant.left",L),B.off("chat.message.received",N),B.off("chat.message.sent",F),B.off("chat.history.cleared",A),B.off("transcription.received",se)}},_=async B=>{const M=B||r;if(M)try{await M.connect()}catch(O){console.error("Failed to connect:",O)}},R={client:r,isConnected:o,isConnecting:c,connectionError:u,currentSession:h,sessionState:x,sessionMetrics:b,participants:C,chatMessages:k,transcriptions:j,connect:()=>_(),disconnect:async()=>{if(r)try{await r.disconnect()}catch(B){console.error("Failed to disconnect:",B)}},createSession:async(B,M={})=>{if(!r)throw new Error("Client not initialized");const O={agentId:B,participantName:M.participantName||"User",metadata:M.metadata,modalities:M.modalities||["voice"]};return await r.createSession(O)},endSession:async()=>r?await r.endSession():null,sendChatMessage:async B=>{if(!r)throw new Error("Client not initialized");await r.sendChatMessage(B)},setMicrophoneEnabled:async B=>{if(!r)throw new Error("Client not initialized");await r.setMicrophoneEnabled(B)},setCameraEnabled:async B=>{if(!r)throw new Error("Client not initialized");await r.setCameraEnabled(B)},startScreenShare:async()=>{if(!r)throw new Error("Client not initialized");await r.startScreenShare()},stopScreenShare:async()=>{if(!r)throw new Error("Client not initialized");await r.stopScreenShare()}};return l.jsx(Rd.Provider,{value:R,children:t})}function ft(){const e=w.useContext(Rd);if(!e)throw new Error("useVoxket must be used within a VoxketProvider");return e}class c1 extends Zo{constructor(n){super();Ne(this,"room",null);Ne(this,"registeredMethods",new Map);Ne(this,"activeInteractions",new Map);Ne(this,"currentInteraction",null);n&&this.setRoom(n)}setRoom(n){this.room=n}async registerFrontendRPC(n,s,r="embedded"){if(console.log(`RpcManager: Starting registration for method '${n}'`),!this.room)throw console.error(`RpcManager: Cannot register '${n}' - no room instance`),new Error("Room not initialized. Cannot register RPC method.");if(!this.room.localParticipant)throw console.error(`RpcManager: Cannot register '${n}' - no local participant`),new Error("Local participant not available for RPC registration");console.log(`RpcManager: Room state: ${this.room.state}`),console.log(`RpcManager: Local participant: ${this.room.localParticipant.identity}`),console.log(`RpcManager: Registering frontend RPC method: ${n}`);const i={methodName:n,component:s,presentationMode:r};this.registeredMethods.set(n,i);try{this.room.registerRpcMethod(n,async o=>{console.log(`RpcManager: RPC method '${n}' called by ${o.callerIdentity}`),console.log("RpcManager: Payload:",o.payload),this.emit("rpc.method.called",{methodName:n,data:o});let a;console.log(`RpcManager: Current registration for '${n}':`,i);let c=o.responseTimeout||30;try{a=JSON.parse(o.payload)}catch{a=o.payload}try{const d=await this.awaitUserInteraction(n,s,r,a,c);return JSON.stringify(d)}catch(d){throw console.error(`RpcManager: Error in RPC method '${n}':`,d),d}}),this.emit("rpc.method.registered",{methodName:n}),console.log(`RpcManager: Successfully registered RPC method: ${n}`)}catch(o){throw console.error(`RpcManager: Failed to register RPC method '${n}':`,o),o}}async awaitUserInteraction(n,s,r,i,o){return new Promise((a,c)=>{const d=`${n}_${Date.now()}`;console.log(`RpcManager: Starting user interaction for method: ${n}, timeout: ${o} seconds`);const u={didSuccess:(h,p)=>{console.log(`RpcManager: User interaction successful for method: ${n}`,h),this.clearInteraction(d),this.currentInteraction=null;const x={success:!0,message:"User interaction completed successfully",data:h,timestamp:new Date,...p?{successView:p}:{}};this.emit("rpc.interaction.completed",{methodName:n,response:x}),a(x)},didFail:h=>{console.log(`RpcManager: User interaction failed for method: ${n}`,h),this.clearInteraction(d);const p={success:!1,message:"User interaction failed",error:h,timestamp:new Date};this.emit("rpc.interaction.completed",{methodName:n,response:p}),a(p)},dismissView:()=>{var p;console.log(`RpcManager: User dismissed interaction for method: ${n}`),console.log("RpcManager: Current interaction before dismiss:",(p=this.currentInteraction)==null?void 0:p.methodName),this.clearInteraction(d),this.currentInteraction=null,console.log("RpcManager: Current interaction after dismiss:",this.currentInteraction);const h={success:!0,data:{dismissed:!0,reason:"User dismissed the interaction"},message:"User interaction dismissed",timestamp:new Date};this.emit("rpc.interaction.dismissed",{methodName:n,response:h}),this.emit("rpc.interaction.completed",{methodName:n,response:h}),setTimeout(()=>{var x;((x=this.currentInteraction)==null?void 0:x.methodName)===n&&(console.log(`RpcManager: Force clearing interaction for ${n}`),this.currentInteraction=null)},0),a(h)},didTimeout:h=>{console.log(`RpcManager: User interaction timeout for method: ${n}`),this.clearInteraction(d),this.currentInteraction=null;const p={success:!0,message:`User interaction timed out after ${o} seconds, it should be considered as declined, agent don't need to retry`,timestamp:new Date,...h?{timeoutView:h}:{}};this.emit("rpc.interaction.timeout",{methodName:n,response:p}),setTimeout(()=>{var x;((x=this.currentInteraction)==null?void 0:x.methodName)===n&&(console.log(`RpcManager: Force clearing interaction for ${n}`),this.currentInteraction=null)},0),a(p)}},f=setTimeout(()=>{u.didTimeout&&u.didTimeout()},o);this.activeInteractions.set(d,{resolve:h=>a(JSON.parse(h)),reject:c,timeoutId:f}),this.currentInteraction={isVisible:!0,methodName:n,component:s,presentationMode:r,timeout:o,data:i,handler:u},this.emit("rpc.interaction.started",{methodName:n,presentationMode:r}),setTimeout(async()=>{var h;if((h=this.currentInteraction)!=null&&h.handler)try{console.log(`RpcManager: Component created for method: ${n} with data:`,i)}catch(p){console.error("RpcManager: Error loading data into component:",p),u.didFail({error:"Failed to load data into component"})}},100)})}clearInteraction(n){const s=this.activeInteractions.get(n);s&&(console.log(`RpcManager: Clearing interaction: ${n}`),clearTimeout(s.timeoutId),this.activeInteractions.delete(n))}getCurrentInteraction(){return this.currentInteraction}dismissCurrentInteraction(){var n;this.currentInteraction&&(console.log(`RpcManager: Dismissing current interaction: ${this.currentInteraction.methodName}`),(n=this.currentInteraction.handler)==null||n.dismissView(),setTimeout(()=>{this.currentInteraction&&(console.log("RpcManager: Force clearing lingering interaction"),this.currentInteraction=null)},0))}getRegisteredMethods(){return Array.from(this.registeredMethods.keys())}unregisterMethod(n){this.registeredMethods.delete(n),console.log(`RpcManager: Unregistered RPC method: ${n}`)}clear(){for(const[n,s]of this.activeInteractions)clearTimeout(s.timeoutId);this.activeInteractions.clear(),this.registeredMethods.clear(),this.currentInteraction=null,console.log("RpcManager: Cleared all registrations and interactions")}}class we extends Error{constructor(t,n,s){super(t),this.code=n,this.details=s,this.name="VoxketError"}}const Ct=new WeakSet,br=new WeakSet;class Wn extends Zo{constructor(n){super();Ne(this,"config");Ne(this,"room",null);Ne(this,"pluginManager");Ne(this,"rpcManager");Ne(this,"isConnected",!1);Ne(this,"currentSession",null);Ne(this,"connectionState",K.ConnectionState.Disconnected);Ne(this,"renderedComponents",new Map);Ne(this,"textStreamHandlersRegistered",!1);Ne(this,"currentAgentInfo",null);Ne(this,"chatMessages",[]);Ne(this,"activeTranscriptions",new Map);Ne(this,"isAgentConnected",!1);Ne(this,"agentState","idle");this.config=n,this.pluginManager=new Pd(this),this.rpcManager=new c1,this.setupEventListeners(),this.initializeClient()}setupEventListeners(){this.on("connection.connected",()=>{var n,s;this.isConnected=!0,(s=(n=this.config).onConnected)==null||s.call(n)}),this.on("connection.disconnected",n=>{var s,r;this.isConnected=!1,(r=(s=this.config).onDisconnected)==null||r.call(s,n)}),this.on("connection.error",n=>{var s,r;(r=(s=this.config).onError)==null||r.call(s,n)}),this.on("chat.message.received",n=>{var s,r;this.addChatMessage(n),(r=(s=this.config).onMessageReceived)==null||r.call(s,n)}),this.on("chat.message.updated",n=>{this.updateChatMessage(n)}),this.on("chat.message.sent",n=>{this.addChatMessage(n)}),this.on("transcription.received",n=>{var s,r;(r=(s=this.config).onTranscriptionReceived)==null||r.call(s,n)}),this.on("session.state.changed",n=>{var s,r;(r=(s=this.config).onSessionStateChanged)==null||r.call(s,n)}),this.on("session.created",n=>{var s,r;(r=(s=this.config).onSessionStart)==null||r.call(s,n.id)}),this.on("session.ended",(n,s)=>{var r,i;(i=(r=this.config).onSessionEnd)==null||i.call(r,s)}),this.on("participant.joined",n=>{var s,r;(r=(s=this.config).onUserJoined)==null||r.call(s,n.id)}),this.on("participant.left",n=>{var s,r;(r=(s=this.config).onUserLeft)==null||r.call(s,n.id)}),this.setupRpcEventForwarding()}setupRpcEventForwarding(){if(!this.rpcManager){console.warn("RpcManager not initialized, skipping event forwarding setup");return}this.rpcManager.on("rpc.method.registered",n=>this.emit("rpc.method.registered",n)),this.rpcManager.on("rpc.method.called",n=>this.emit("rpc.method.called",n)),this.rpcManager.on("rpc.interaction.started",n=>this.emit("rpc.interaction.started",n)),this.rpcManager.on("rpc.interaction.completed",n=>this.emit("rpc.interaction.completed",n)),this.rpcManager.on("rpc.interaction.timeout",n=>this.emit("rpc.interaction.timeout",n)),this.rpcManager.on("rpc.interaction.dismissed",n=>this.emit("rpc.interaction.dismissed",n))}initializeClient(){this.room=new K.Room,this.setupRoomEventListeners()}setupRoomEventListeners(){this.room&&(this.room.on(K.RoomEvent.Connected,()=>{var n,s;this.connectionState=K.ConnectionState.Connected,this.emit("connection.connected"),this.rpcManager.setRoom(this.room),(s=(n=this.currentSession)==null?void 0:n.activeModalities)!=null&&s.includes("voice")&&setTimeout(async()=>{var r;try{(r=this.room)!=null&&r.localParticipant&&(this.room.localParticipant.isMicrophoneEnabled?this.emit("track.unmuted",{source:"microphone",enabled:!0}):(await this.room.localParticipant.setMicrophoneEnabled(!0),this.emit("track.unmuted",{source:"microphone",enabled:!0})))}catch(i){console.warn("VoxketClient: Failed to enable microphone after room connection:",i)}},1e3),this.textStreamHandlersRegistered||this.setupTextStreamHandlers()}),this.room.on(K.RoomEvent.Disconnected,n=>{var s;console.log("🔴 VoxketClient: Room disconnected, reason:",n),this.connectionState=K.ConnectionState.Disconnected,this.textStreamHandlersRegistered=!1,this.isAgentConnected=!1,console.log("🤖 VoxketClient: Agent marked as disconnected"),this.clearChatMessages(),n&&console.log("🔍 VoxketClient: Disconnect reason details:",{reason:n.toString(),currentSession:(s=this.currentSession)==null?void 0:s.id,agentConnected:this.isAgentConnected,connectionState:this.connectionState}),this.emit("connection.disconnected",n==null?void 0:n.toString())}),this.room.on(K.RoomEvent.ConnectionStateChanged,n=>{this.connectionState=n,n===K.ConnectionState.Connecting&&this.emit("connection.connecting")}),this.room.on(K.RoomEvent.ParticipantConnected,n=>{const s={id:n.identity,name:n.name||n.identity,isLocal:!1};this.emit("participant.joined",s)}),this.room.on(K.RoomEvent.ParticipantDisconnected,n=>{const s={id:n.identity,name:n.name||n.identity,isLocal:!1};this.emit("participant.left",s)}))}setupTextStreamHandlers(){if(!this.room)return;try{this.room.registerTextStreamHandler("lk.chat",async(s,r)=>{try{const i=await s.readAll(),o={id:`msg_${Date.now()}_${r.identity||"user"}_${Math.random().toString(36).substr(2,9)}`,content:i,timestamp:new Date,sender:{id:r.identity||"user",name:r.identity||"User",type:"participant"},metadata:{topic:"lk.chat"}};this.emit("chat.message.received",o)}catch(i){console.error("VoxketClient: Failed to process lk.chat message:",i)}})}catch(s){console.warn("VoxketClient: lk.chat handler already registered, skipping:",s)}try{console.log("📝 VoxketClient: Registering lk.transcription handler..."),this.room.registerTextStreamHandler("lk.transcription",async(s,r)=>{var i,o,a,c,d,u;console.log("📝 VoxketClient: Received transcription stream from:",r.identity);try{console.log("📝 VoxketClient: Processing transcription stream...");const f=r.identity===((o=(i=this.room)==null?void 0:i.localParticipant)==null?void 0:o.identity),h=Date.now(),p=r.identity,x=this.activeTranscriptions.get(p);let m,b=!0;x&&h-x.timestamp<1e3?(m=x.messageId,b=!1,console.log("📝 VoxketClient: Reusing existing transcription message ID:",m)):(m=`msg_${f?"user":"agent"}_${r.identity}_${h}`,this.activeTranscriptions.set(p,{messageId:m,timestamp:h}),console.log("📝 VoxketClient: Created new transcription message ID:",m));let S="";const C=((a=this.currentAgentInfo)==null?void 0:a.name)||r.identity||"AI Assistant";console.log("📝 VoxketClient: Using agent name:",C);const T=f?"participant":"agent",k=f?this.config.participantName||"User":C;console.log("📝 VoxketClient: Transcription sender info:",{participantIdentity:r.identity,localParticipantIdentity:(d=(c=this.room)==null?void 0:c.localParticipant)==null?void 0:d.identity,isFromUser:f,senderType:T,senderName:k});const v={id:m,content:"",timestamp:new Date,sender:{id:r.identity||"unknown",name:k,type:T},metadata:{topic:"lk.transcription",streaming:!0}};b&&this.emit("chat.message.received",v),console.log("📝 VoxketClient: Starting to read transcription stream...");for await(const _ of s){console.log("📝 VoxketClient: Received chunk:",_.length,"chars"),S+=_;const y=this.convertMarkdownToText(S),D={...v,content:y,metadata:{...v.metadata,streaming:!0}};this.emit("chat.message.updated",D)}const j=this.convertMarkdownToText(S),V={...v,content:j,metadata:{...v.metadata,streaming:!1}};this.emit("chat.message.updated",V);const E={id:m,text:j,isFinal:!0,startTime:v.timestamp.getTime(),participantId:r.identity||"agent"};this.emit("transcription.received",E),console.log("📝 VoxketClient: Emitted transcription event:",E)}catch(f){console.error("VoxketClient: Failed to process lk.transcription message:",f);try{const h=await s.readAll(),p=((u=this.currentAgentInfo)==null?void 0:u.name)||r.identity||"AI Assistant",x={id:`msg_${Date.now()}_agent_transcription_${Math.random().toString(36).substr(2,9)}`,content:h,timestamp:new Date,sender:{id:r.identity||"agent",name:p,type:"agent"},metadata:{topic:"lk.transcription"}};this.emit("chat.message.received",x);const m={id:x.id,text:x.content,isFinal:!0,startTime:x.timestamp.getTime(),participantId:r.identity||"agent"};this.emit("transcription.received",m),console.log("📝 VoxketClient: Emitted fallback transcription event:",m)}catch(h){console.error("VoxketClient: Fallback failed for lk.transcription:",h)}}})}catch(s){console.warn("VoxketClient: lk.transcription handler already registered, skipping:",s)}try{this.room.registerTextStreamHandler("suggested_response",async s=>{const r=await s.readAll();let i=[];try{i=["tes","hello how are you","algebra make me learn that ","what is the meaning of life"]}catch(o){console.warn("VoxketClient: Failed to parse suggested_response:",o,r)}this.emit("suggested.response",i)})}catch(s){console.warn("VoxketClient: suggested_response handler already registered, skipping:",s)}try{this.room.registerTextStreamHandler("agent_state_changed",async(s,r)=>{const i=await s.readAll();console.log("🤖 VoxketClient: agent_state_changed stream received:",i);let o={};try{o=typeof i=="string"?JSON.parse(i.replace(/'/g,'"')):i}catch(a){console.warn("VoxketClient: Failed to parse agent_state_changed:",a,i)}this.isAgentConnected||(this.isAgentConnected=!0,console.log("🤖 VoxketClient: Agent marked as connected (first state change received)"),this.emit("agent.connected",o)),o.new_state==="speaking"?(this.setAgentState("speaking"),this.emit("agent.speaking",o)):o.new_state==="thinking"?(this.setAgentState("thinking"),this.emit("agent.thinking",o)):(o.new_state==="idle"||o.new_state==="listening")&&this.setAgentState("idle")})}catch(s){console.warn("VoxketClient: conversation_item_added handler already registered, skipping:",s)}try{this.room.registerTextStreamHandler("images",async(s,r)=>{try{const i=await s.readAll()}catch(i){console.error("VoxketClient: Error processing images stream:",i)}})}catch(s){console.warn("VoxketClient: images handler already registered, skipping:",s)}try{this.room.registerByteStreamHandler("images",async(s,r)=>{var i,o;try{const a=s.info,c={id:`img_${Date.now()}_${r.identity||"agent"}_${Math.random().toString(36).substr(2,9)}`,content:`�️ ${a.name||"Image"}`,sender:{id:r.identity||"agent",name:r.identity||"Agent",type:r.identity===((o=(i=this.room)==null?void 0:i.localParticipant)==null?void 0:o.identity)?"participant":"agent"},timestamp:new Date,metadata:{type:"attachment",fileName:a.name,fileSize:a.size,mimeType:a.mimeType,streamId:a.id,downloading:!0}};this.emit("chat.message.received",c),s.onProgress&&(s.onProgress=p=>{const x={...c,metadata:{...c.metadata,downloadProgress:p||0}};this.emit("chat.message.updated",x)});const d=[];for await(const p of s)d.push(p);const u=new Blob(d,{type:a.mimeType||"application/octet-stream"}),f=URL.createObjectURL(u),h={...c,metadata:{...c.metadata,downloading:!1,downloadProgress:1,downloadUrl:f,blob:u}};this.emit("chat.message.updated",h)}catch(a){console.error("VoxketClient: Error processing image attachment:",a)}})}catch(s){console.warn("VoxketClient: image handler already registered, skipping:",s)}["error","warning","status","system","debug","info"].forEach(s=>{try{this.room.registerTextStreamHandler(s,async(r,i)=>{try{const o=await r.readAll();if(console.log(`📝 VoxketClient: Received '${s}' stream:`,o),s==="error"){let a={};try{a=typeof o=="string"?JSON.parse(o):o}catch{a={message:o}}console.warn("� VoxketClient: Agent error:",a),this.emit("agent.error",a)}else this.emit("text.stream.received",{topic:s,data:o,participantInfo:i})}catch(o){console.error(`VoxketClient: Failed to process '${s}' stream:`,o)}})}catch(r){console.warn(`VoxketClient: Handler for '${s}' already registered, skipping:`,r)}});try{this.room.registerTextStreamHandler("*",async(s,r)=>{var i;try{const o=await s.readAll(),a=((i=s.info)==null?void 0:i.topic)||"unknown";console.log(`📝 VoxketClient: Received unhandled text stream for topic '${a}':`,o),this.emit("text.stream.unhandled",{topic:a,data:o,participantInfo:r})}catch(o){console.error("VoxketClient: Failed to process unhandled text stream:",o)}})}catch(s){console.warn("VoxketClient: Generic text stream handler already registered, skipping:",s)}this.textStreamHandlersRegistered=!0}async fetchConnectionDetails(n,s,r){const i=n||this.config.agentId||"default-agent",o=s||this.config.participantName||"User",a=r||this.config.modalities||["voice"];try{const c={agent_id:i,participant_name:o,participant_metadata:{user_id:""},modality:a[0],modalities:a};console.log("🔗 VoxketClient: Creating session with modalities:",a);const d=await fetch(`${this.config.baseUrl}/api/live/agent/session`,{method:"POST",headers:{accept:"application/json","X-APP-ID":this.config.appId,"X-APP-SECRET":this.config.appSecret,"Content-Type":"application/json"},body:JSON.stringify(c)});if(!d.ok){let h=`HTTP ${d.status}: Failed to fetch connection details`;try{const p=await d.json();p&&(p.error?h=`API Error: ${p.error}`:p.detail?h=`API Error: ${p.detail}`:p.message&&(h=`API Error: ${p.message}`))}catch{try{const x=await d.text();x&&(h=`API Error: ${x}`)}catch{}}throw new Error(h)}const u=await d.json();let f;return u.agent_info&&(f={id:u.agent_info.id||i,name:u.agent_info.name||"AI Assistant",avatar:u.agent_info.avatar,capabilities:u.agent_info.capabilities||["voice_interaction","text_chat"],metadata:u.agent_info.metadata||{}},this.currentAgentInfo=f),{serverUrl:u.wss_url,participantToken:u.token,voxketSessionId:u.session_id,agentInfo:f}}catch(c){console.error("VoxketClient: fetchConnectionDetails failed:",c);const d=new we(`Failed to fetch connection details: ${c instanceof Error?c.message:"Unknown error"}`,"CONNECTION_FAILED",c);throw this.emit("connection.error",d),d}}async connect(n,s,r){var i;try{this.emit("connection.connecting");const o=await this.fetchConnectionDetails(n,s,r);return await((i=this.room)==null?void 0:i.connect(o.serverUrl,o.participantToken)),this.isConnected=!0,o}catch(o){console.error("VoxketClient: Connection failed:",o);const a=new we(`Failed to connect to Voxket services: ${o instanceof Error?o.message:"Unknown error"}`,"CONNECTION_FAILED",o);throw this.emit("connection.error",a),a}}async disconnect(){var n;try{console.log("🔌 VoxketClient: Starting disconnect process..."),this.room&&(console.log("🔌 VoxketClient: Disconnecting from room:",{roomState:this.room.state,numParticipants:this.room.numParticipants,sessionId:(n=this.currentSession)==null?void 0:n.id}),await this.room.disconnect()),this.isConnected=!1,this.currentSession=null,this.currentAgentInfo=null,this.textStreamHandlersRegistered=!1,this.clearChatMessages(),console.log("🔌 VoxketClient: Creating new room instance..."),this.room=new K.Room,this.setupRoomEventListeners(),console.log("✅ VoxketClient: Disconnect completed successfully"),this.emit("connection.disconnected")}catch(s){console.error("❌ VoxketClient: Disconnect failed:",s);const r=new we("Failed to disconnect properly","NETWORK_ERROR",s);throw this.emit("connection.error",r),r}}async createSession(n){var s,r,i,o;try{const a=await this.connect(n.agentId,n.participantName,n.modalities),c={id:a.voxketSessionId,agentId:n.agentId,state:"connecting",startedAt:new Date,metadata:n.metadata||{},activeModalities:n.modalities||["voice"],agentInfo:a.agentInfo||this.currentAgentInfo};if(this.currentSession=c,this.emit("session.created",c),(s=n.modalities)!=null&&s.includes("voice"))try{await new Promise(d=>setTimeout(d,500)),(r=this.room)!=null&&r.localParticipant?(await this.room.localParticipant.setMicrophoneEnabled(!0,void 0,{preConnectBuffer:!0}),this.emit("track.unmuted",{source:"microphone",enabled:!0})):console.warn("VoxketClient: No local participant found, microphone not enabled")}catch(d){console.warn("VoxketClient: Failed to enable microphone, but continuing with session:",d)}if((i=n.modalities)!=null&&i.includes("video"))try{await new Promise(d=>setTimeout(d,200)),(o=this.room)!=null&&o.localParticipant&&(console.log("🎥 VoxketClient: Attempting to enable camera for video session"),await this.room.localParticipant.setCameraEnabled(!0),this.emit("track.unmuted",{source:"camera",enabled:!0}),console.log("🎥 VoxketClient: Camera enabled successfully"))}catch(d){console.warn("VoxketClient: Failed to enable camera, but continuing with session:",d)}return setTimeout(()=>{var d;this.currentSession&&(this.currentSession.state="active",this.emit("session.state.changed","active",this.currentSession.state),this.forceAgentConnected(),console.log("🤖 VoxketClient: Session marked as active:",{sessionId:this.currentSession.id,modalities:this.currentSession.activeModalities,agentConnected:this.isAgentConnected,hasRoom:!!this.room,remoteParticipants:((d=this.room)==null?void 0:d.remoteParticipants.size)||0}))},1e3),c}catch(a){throw console.error("VoxketClient: Failed to create session:",a),a instanceof we?a:a instanceof TypeError&&a.message.includes("fetch")?new we("Network connection failed","CONNECTION_FAILED",a):a instanceof Error&&a.message.includes("Failed to fetch connection details")?new we(`API connection failed: ${a.message}`,"CONNECTION_FAILED",a):new we(`Failed to create session: ${a instanceof Error?a.message:"Unknown error"}`,"SESSION_NOT_FOUND",a)}}async startSession(n,s){const r={agentId:n||this.config.agentId||"default-agent",participantName:(s==null?void 0:s.participantName)||this.config.participantName||"User",modalities:(s==null?void 0:s.modalities)||this.config.modalities||["voice","chat"],metadata:s==null?void 0:s.metadata};return this.createSession(r)}async endSession(){var n,s;if(!this.currentSession)return null;try{const r={sessionId:this.currentSession.id,duration:Date.now()-(((n=this.currentSession.startedAt)==null?void 0:n.getTime())||0),messageCount:0,participantCount:((s=this.room)==null?void 0:s.remoteParticipants.size)||0,audioQuality:{avgBitrate:64e3,avgLatency:150,packetLoss:.01,jitter:.05},videoQuality:{avgBitrate:5e5,avgLatency:150,packetLoss:.01,jitter:.05},networkStats:{totalBytesReceived:0,totalBytesSent:0,connectionType:"webrtc",avgRoundTripTime:150},events:[]};return this.currentSession.endedAt=new Date,this.currentSession.state="disconnected",this.emit("session.ended",this.currentSession,r),await this.disconnect(),r}catch(r){throw new we("Failed to end session","SESSION_NOT_FOUND",r)}}getCurrentSession(){return this.currentSession}getCurrentAgentInfo(){return this.currentAgentInfo}getIsAgentConnected(){return this.isAgentConnected}forceAgentConnected(){this.isAgentConnected||(this.isAgentConnected=!0,console.log("🤖 VoxketClient: Agent manually marked as connected"),this.emit("agent.connected",{forced:!0}))}getAgentState(){return this.agentState}setAgentState(n){this.agentState!==n&&(this.agentState=n,this.emit("agent.state.changed",{state:n}))}getAgentAudioTrack(){const n=this.getRemoteParticipants();for(const s of n){const r=s.getTrackPublication(K.Track.Source.Microphone);if(r!=null&&r.track)return{source:K.Track.Source.Microphone,participant:s,publication:r}}return null}getAgentVideoTrack(){const n=this.getRemoteParticipants();for(const s of n){const r=s.getTrackPublication(K.Track.Source.Camera);if(r!=null&&r.track)return{source:K.Track.Source.Camera,participant:s,publication:r}}return null}getVideoTrackRefs(){const n=[],s=this.getLocalParticipant();if(s){const i=s.getTrackPublication(K.Track.Source.Camera);i!=null&&i.track&&n.push({source:K.Track.Source.Camera,participant:s,publication:i});const o=s.getTrackPublication(K.Track.Source.ScreenShare);o!=null&&o.track&&n.push({source:K.Track.Source.ScreenShare,participant:s,publication:o})}const r=this.getRemoteParticipants();for(const i of r){const o=i.getTrackPublication(K.Track.Source.Camera);o!=null&&o.track&&n.push({source:K.Track.Source.Camera,participant:i,publication:o});const a=i.getTrackPublication(K.Track.Source.ScreenShare);a!=null&&a.track&&n.push({source:K.Track.Source.ScreenShare,participant:i,publication:a})}return n}getCameraTrackRefs(){return this.getVideoTrackRefs().filter(n=>n.source===K.Track.Source.Camera)}getScreenShareTrackRefs(){return this.getVideoTrackRefs().filter(n=>n.source===K.Track.Source.ScreenShare)}getChatMessages(){return[...this.chatMessages]}addChatMessage(n){this.chatMessages.some(r=>r.id===n.id)||this.chatMessages.push(n)}updateChatMessage(n){const s=this.chatMessages.findIndex(r=>r.id===n.id);s!==-1&&(this.chatMessages[s]=n)}clearChatMessages(){this.chatMessages=[],this.activeTranscriptions.clear(),this.dismissCurrentInteraction(),this.renderedComponents.clear(),this.forceCleanupFullscreenOverlays(),console.log("🧹 VoxketClient: Cleared chat messages and transcription history"),this.emit("chat.history.cleared")}renderUI(n={}){var o,a,c,d,u,f,h,p,x;const s=this.resolveTarget(n.target||"body"),r=this.getTargetKey(s);if(br.has(s)){console.warn("⚠️ VoxketClient: Target is already being processed, skipping renderUI");return}if(Ct.has(s)){console.log("✋ VoxketClient: Target already has a React root in registry, updating existing props...");const m=this.renderedComponents.get(r);if(m&&m.root){const b={agentId:n.agentId||this.config.agentId||"default-agent",participantName:n.participantName||this.config.participantName||"User",baseUrl:this.config.baseUrl,appSecret:this.config.appSecret,appId:this.config.appId,className:n.className,theme:typeof n.theme=="string"?n.theme:void 0,modalities:n.modality||this.config.modalities||["voice"],suportsChatInput:((o=n.modality)==null?void 0:o.includes("chat"))!==!1,suportsVideoInput:((a=n.modality)==null?void 0:a.includes("video"))===!0,suportsScreenShare:((c=n.modality)==null?void 0:c.includes("screen_share"))===!0,autoStart:n.autoStart,displayType:n.displayType||"widget",popupPosition:n.popupPosition||"bottom-right",popupTriggerText:n.popupTriggerText||"Open Chat",width:n.width,height:n.height,onDisplayTypeChange:n.onDisplayTypeChange,prompts:n.prompts,statusMessage:n.statusMessage,welcomeTitle:n.welcomeTitle,welcomeSubTitle:n.welcomeSubTitle,loadingText:n.loadingText,voxketClient:this};try{m.root.render(w.createElement(hs,{config:this.config,autoConnect:n.autoStart||!1,client:this,children:w.createElement(ms,b)})),console.log("✅ VoxketClient: Successfully updated existing widget with new props");return}catch(S){throw console.error("Error re-rendering existing widget:",S),new Error(`Failed to update existing widget: ${S instanceof Error?S.message:"Unknown error"}`)}}else console.warn("⚠️ Registry inconsistency detected, cleaning up"),Ct.delete(s)}let i=this.renderedComponents.get(r);if(i&&i.target===s&&Ct.has(s)){console.log("🔄 VoxketClient: Reusing existing React root for target:",r);const m=i.root,b={agentId:n.agentId||this.config.agentId||"default-agent",participantName:n.participantName||this.config.participantName||"User",baseUrl:this.config.baseUrl,appSecret:this.config.appSecret,appId:this.config.appId,className:n.className,theme:typeof n.theme=="string"?n.theme:void 0,modalities:n.modality||this.config.modalities||["voice"],suportsChatInput:((d=n.modality)==null?void 0:d.includes("chat"))!==!1,suportsVideoInput:((u=n.modality)==null?void 0:u.includes("video"))===!0,suportsScreenShare:((f=n.modality)==null?void 0:f.includes("screen_share"))===!0,autoStart:n.autoStart,displayType:n.displayType||"widget",popupPosition:n.popupPosition||"bottom-right",popupTriggerText:n.popupTriggerText||"Open Chat",width:n.width,height:n.height,onDisplayTypeChange:n.onDisplayTypeChange,prompts:n.prompts,statusMessage:n.statusMessage,welcomeTitle:n.welcomeTitle,welcomeSubTitle:n.welcomeSubTitle,loadingText:n.loadingText,voxketClient:this};try{m.render(w.createElement(hs,{config:this.config,autoConnect:n.autoStart||!1,client:this,children:w.createElement(ms,b)}))}catch(S){throw console.error("Error rendering Voxket widget:",S),new Error(`Failed to render Voxket widget: ${S instanceof Error?S.message:"Unknown error"}`)}return}br.add(s);try{if(i){console.log("🧹 VoxketClient: Cleaning up existing component for different target");try{i.root.unmount(),this.renderedComponents.delete(r),Ct.delete(i.target),s.innerHTML=""}catch(S){console.warn("Failed to cleanup existing root:",S)}}if(Ct.has(s)){console.warn("⚠️ VoxketClient: Target already in registry, skipping root creation");return}console.log("🆕 VoxketClient: Creating new React root for target:",r);const m=eu.createRoot(s);this.renderedComponents.set(r,{root:m,target:s}),Ct.add(s);const b={agentId:n.agentId||this.config.agentId||"default-agent",participantName:n.participantName||this.config.participantName||"User",baseUrl:this.config.baseUrl,appSecret:this.config.appSecret,appId:this.config.appId,className:n.className,theme:typeof n.theme=="string"?n.theme:void 0,modalities:n.modality||this.config.modalities||["voice"],suportsChatInput:((h=n.modality)==null?void 0:h.includes("chat"))!==!1,suportsVideoInput:((p=n.modality)==null?void 0:p.includes("video"))===!0,suportsScreenShare:((x=n.modality)==null?void 0:x.includes("screen_share"))===!0,autoStart:n.autoStart,displayType:n.displayType||"widget",popupPosition:n.popupPosition||"bottom-right",popupTriggerText:n.popupTriggerText||"Open Chat",width:n.width,height:n.height,onDisplayTypeChange:n.onDisplayTypeChange,prompts:n.prompts,statusMessage:n.statusMessage,welcomeTitle:n.welcomeTitle,welcomeSubTitle:n.welcomeSubTitle,loadingText:n.loadingText,voxketClient:this};if(!m||typeof m.render!="function")throw new Error("Invalid React root. Make sure React 18+ is properly installed and configured.");try{m.render(w.createElement(hs,{config:this.config,autoConnect:n.autoStart||!1,client:this,children:w.createElement(ms,b)}))}catch(S){throw console.error("Error rendering Voxket widget:",S),new Error(`Failed to render Voxket widget: ${S instanceof Error?S.message:"Unknown error"}`)}}finally{br.delete(s)}}removeUI(n){const s=n?this.resolveTarget(n):null;if(s){const r=this.getTargetKey(s),i=this.renderedComponents.get(r);i?(console.log("🗑️ VoxketClient: Removing UI for target:",r),this.renderedComponents.delete(r),Ct.delete(s),setTimeout(()=>{try{i.root&&typeof i.root.unmount=="function"?s&&s.isConnected?(i.root.unmount(),console.log("✅ VoxketClient: UI removal completed for target:",r)):console.log("ℹ️ VoxketClient: Target element already disconnected, skipping unmount"):console.log("ℹ️ VoxketClient: Root already unmounted, skipping"),s&&s.isConnected&&s.parentNode&&(s.innerHTML="")}catch(a){console.warn("Failed to unmount React root:",a)}},0)):(console.log("ℹ️ VoxketClient: No component found for target, cleaning registry:",r),Ct.delete(s),s.isConnected&&(s.innerHTML="")),s.querySelectorAll('[id*="voxket"], [class*="voxket"], .fixed.inset-0.z-50').forEach(a=>{try{a.remove()}catch(c){console.warn("Failed to remove element:",c)}}),s===document.body&&s.querySelectorAll(".fixed.z-50, .fixed.inset-0").forEach(c=>{if(c.classList.contains("bg-black")&&c.classList.contains("backdrop-blur-sm"))try{c.remove()}catch(d){console.warn("Failed to remove fixed element:",d)}})}}removeAllUI(){for(const[n,s]of this.renderedComponents)s.root.unmount();this.renderedComponents.clear(),this.forceCleanupFullscreenOverlays()}forceCleanupFullscreenOverlays(){document.body.querySelectorAll(".fixed.inset-0.z-50").forEach(s=>{if(s.classList.contains("bg-black")&&(s.classList.contains("backdrop-blur-sm")||s.classList.contains("bg-opacity-30")))try{s.remove()}catch(r){console.warn("Failed to remove overlay:",r)}})}resolveTarget(n){if(typeof n=="string"){const s=document.querySelector(n);if(!s)throw new Error(`Target element not found: ${n}`);return s}return n}getTargetKey(n){return n.id?n.id:n.className?n.tagName+"_"+n.className.replace(/\s+/g,"_"):n.tagName+"_"+n.outerHTML.length%1e3}async sendMessage(n,s){var r;if(!this.currentSession)throw console.error("VoxketClient: No active session found"),new we("No active session","SESSION_NOT_FOUND");if(!this.room)throw console.error("VoxketClient: No room instance found"),new we("No room connection","CONNECTION_FAILED");if(!this.room.localParticipant)throw console.error("VoxketClient: No local participant found"),new we("No local participant","CONNECTION_FAILED");this.dismissCurrentInteraction();try{const i={id:`msg_${Date.now()}`,content:n,sender:{id:"user",name:this.config.participantName||"User",type:"participant"},timestamp:new Date,metadata:s||{}},o=await((r=this.room)==null?void 0:r.localParticipant.sendText(n,{topic:"lk.chat",destinationIdentities:[]}));this.emit("chat.message.sent",i)}catch(i){throw console.error("VoxketClient: Failed to send chat message:",i),new we("Failed to send message","NETWORK_ERROR",i)}}async sendChatMessage(n,s){return this.sendMessage(n,s)}async sendAttachments(n,s){if(!this.currentSession)throw console.error("VoxketClient: No active session found"),new we("No active session","SESSION_NOT_FOUND");if(!this.room)throw console.error("VoxketClient: No room instance found"),new we("No room connection","CONNECTION_FAILED");if(!this.room.localParticipant)throw console.error("VoxketClient: No local participant found"),new we("No local participant","CONNECTION_FAILED");if(!n||n.length===0)throw new we("No files provided","INVALID_PARAMETER");this.dismissCurrentInteraction();const r=n.filter(i=>i.type.startsWith("image/"));if(r.length===0)throw new we("Only image files are allowed","INVALID_PARAMETER");r.length!==n.length&&console.warn("VoxketClient: Some non-image files were filtered out");try{const i=r.map(async(o,a)=>{const d={id:`att_${Date.now()}_${a}`,content:`📎 ${o.name}`,sender:{id:"user",name:this.config.participantName||"User",type:"participant"},timestamp:new Date,metadata:{...s,type:"attachment",fileName:o.name,fileSize:o.size,mimeType:o.type,uploading:!0}};this.emit("chat.message.sent",d);const u=await this.room.localParticipant.sendFile(o,{mimeType:o.type,topic:"images",onProgress:h=>{const p={...d,metadata:{...d.metadata,uploadProgress:h}};this.emit("chat.message.updated",p)}});try{const h=new FileReader,p=new Promise((b,S)=>{h.onload=()=>{typeof h.result=="string"?b(h.result):S(new Error("Failed to convert to base64"))},h.onerror=S});h.readAsDataURL(o);const m={type:"image",data:await p,filename:o.name,mimeType:o.type,size:o.size};await this.room.localParticipant.sendText(JSON.stringify(m),{topic:"images",destinationIdentities:[]})}catch(h){console.warn("VoxketClient: Failed to send image data to agent:",h);try{const p=`I've shared an image: ${o.name}`;await this.room.localParticipant.sendText(p,{topic:"lk.chat",destinationIdentities:[]})}catch(p){console.warn("VoxketClient: Failed to send image notification to agent:",p)}}const f={...d,metadata:{...d.metadata,uploading:!1,uploadProgress:1,streamId:u.id}};return this.emit("chat.message.updated",f),u});await Promise.all(i)}catch(i){throw console.error("VoxketClient: Failed to send attachments:",i),new we("Failed to send attachments","NETWORK_ERROR",i)}}async sendAttachment(n,s){return this.sendAttachments([n],s)}toggleMicrophone(n){return this.setMicrophoneEnabled(n!==!1)}async setMicrophoneEnabled(n){var s,r;try{const i=(s=this.room)==null?void 0:s.localParticipant.isMicrophoneEnabled,o=n??!i;await((r=this.room)==null?void 0:r.localParticipant.setMicrophoneEnabled(o)),o?this.emit("track.unmuted",{source:"microphone",enabled:!0}):this.emit("track.muted",{source:"microphone",enabled:!1})}catch(i){throw console.error("VoxketClient: Failed to toggle microphone:",i),new we("Failed to toggle microphone","PERMISSION_DENIED",i)}}toggleCamera(n){return this.setCameraEnabled(n!==!1)}async setCameraEnabled(n){var s,r;try{const i=(s=this.room)==null?void 0:s.localParticipant.isCameraEnabled,o=n??!i;await((r=this.room)==null?void 0:r.localParticipant.setCameraEnabled(o)),o?this.emit("track.unmuted",{source:"camera",enabled:!0}):this.emit("track.muted",{source:"camera",enabled:!1})}catch(i){throw console.error("VoxketClient: Failed to toggle camera:",i),new we("Failed to toggle camera","PERMISSION_DENIED",i)}}async enableCamera(){return this.setCameraEnabled(!0)}async disableCamera(){return this.setCameraEnabled(!1)}async startScreenShare(){var n;try{await((n=this.room)==null?void 0:n.localParticipant.setScreenShareEnabled(!0))}catch(s){throw new we("Failed to start screen share","PERMISSION_DENIED",s)}}async stopScreenShare(){var n;try{await((n=this.room)==null?void 0:n.localParticipant.setScreenShareEnabled(!1))}catch(s){throw new we("Failed to stop screen share","PERMISSION_DENIED",s)}}async getAudioInputDevices(){try{return(await navigator.mediaDevices.enumerateDevices()).filter(s=>s.kind==="audioinput")}catch(n){throw new we("Failed to get audio input devices","DEVICE_ERROR",n)}}async getVideoInputDevices(){try{return(await navigator.mediaDevices.enumerateDevices()).filter(s=>s.kind==="videoinput")}catch(n){throw new we("Failed to get video input devices","DEVICE_ERROR",n)}}async setAudioInputDevice(n){var s;try{if(!((s=this.room)!=null&&s.localParticipant))throw new Error("Not connected to room")}catch(r){throw new we("Failed to set audio input device","DEVICE_ERROR",r)}}async setVideoInputDevice(n){var s;try{if(!((s=this.room)!=null&&s.localParticipant))throw new Error("Not connected to room")}catch(r){throw new we("Failed to set video input device","DEVICE_ERROR",r)}}getLocalParticipant(){var n;return((n=this.room)==null?void 0:n.localParticipant)??null}getRemoteParticipants(){var n;return Array.from(((n=this.room)==null?void 0:n.remoteParticipants.values())??[])}getPublishPermissions(){const n=this.getLocalParticipant();if(!n)return{camera:!1,microphone:!1,screenShare:!1,data:!1};const s=n.permissions;if(!s)return{camera:!0,microphone:!0,screenShare:!0,data:!0};const r=i=>!!s.canPublish&&(s.canPublishSources.length===0||s.canPublishSources.includes(i));return{camera:r(1),microphone:r(2),screenShare:r(3),data:s.canPublishData??!1}}canPublishSource(n){return this.getPublishPermissions()[n]}getRoom(){return this.room}getConnectionState(){return this.connectionState}get connected(){return this.isConnected&&this.connectionState===K.ConnectionState.Connected}getMicrophoneTrack(){const n=this.getLocalParticipant();if(!n)return null;for(const[,s]of n.trackPublications)if(s.source===K.Track.Source.Microphone)return s.track;return null}getCameraTrack(){const n=this.getLocalParticipant();if(!n)return null;for(const[,s]of n.trackPublications)if(s.source===K.Track.Source.Camera)return s.track;return null}getScreenShareTrack(){const n=this.getLocalParticipant();if(!n)return null;for(const[,s]of n.trackPublications)if(s.source===K.Track.Source.ScreenShare)return s.track;return null}get isMicrophoneEnabled(){const n=this.getMicrophoneTrack();return n?!n.isMuted:!1}get isCameraEnabled(){const n=this.getCameraTrack();return n?!n.isMuted:!1}get isScreenShareEnabled(){const n=this.getScreenShareTrack();return n?!n.isMuted:!1}registerPlugin(n){this.pluginManager.register(n)}getPluginManager(){return this.pluginManager}getParticipants(){if(!this.room)return[];const n=[];return this.room.localParticipant&&n.push({id:this.room.localParticipant.identity,name:this.room.localParticipant.name||this.room.localParticipant.identity,isLocal:!0}),this.room.remoteParticipants.forEach(s=>{n.push({id:s.identity,name:s.name||s.identity,isLocal:!1})}),n}getSessionMetrics(){var n,s;return this.currentSession?{sessionId:this.currentSession.id,duration:Date.now()-(((n=this.currentSession.startedAt)==null?void 0:n.getTime())||0),messageCount:0,participantCount:((s=this.room)==null?void 0:s.remoteParticipants.size)||0,audioQuality:{avgBitrate:64e3,avgLatency:150,packetLoss:.01,jitter:.05},videoQuality:{avgBitrate:5e5,avgLatency:150,packetLoss:.01,jitter:.05},networkStats:{totalBytesReceived:0,totalBytesSent:0,connectionType:"webrtc",avgRoundTripTime:150},events:[]}:null}updateConfig(n){this.config={...this.config,...n}}async startRecording(){var n;try{this.emit("recording.started",{sessionId:(n=this.currentSession)==null?void 0:n.id,timestamp:new Date})}catch(s){throw new we("Failed to start recording","RECORDING_ERROR",s)}}async stopRecording(){var n;try{this.emit("recording.stopped",{sessionId:(n=this.currentSession)==null?void 0:n.id,timestamp:new Date})}catch(s){throw new we("Failed to stop recording","RECORDING_ERROR",s)}}async registerFrontendRPC(n,s,r="embedded"){return this.rpcManager.registerFrontendRPC(n,s,r)}getCurrentInteraction(){return this.rpcManager.getCurrentInteraction()}dismissCurrentInteraction(){this.rpcManager.dismissCurrentInteraction()}getRegisteredRpcMethods(){return this.rpcManager.getRegisteredMethods()}unregisterRpcMethod(n){this.rpcManager.unregisterMethod(n)}registerEventListener(n,s){return this.on(n,s)}registerEventEmitter(n,s){if(!this.room)throw new Error("Room not available");try{this.room.registerTextStreamHandler(n,async r=>{try{const i=await r.readAll();s(i)}catch(i){console.error(`Error processing event for topic '${n}':`,i)}})}catch(r){console.warn(`VoxketClient: Handler for topic '${n}' may already be registered:`,r)}}convertMarkdownToText(n){if(!n)return"";let s=n;return s=s.replace(/\*\*(.*?)\*\*/g,"$1"),s=s.replace(/__(.*?)__/g,"$1"),s=s.replace(/\*(.*?)\*/g,"$1"),s=s.replace(/_(.*?)_/g,"$1"),s=s.replace(/~~(.*?)~~/g,"$1"),s=s.replace(/`([^`]+)`/g,"$1"),s=s.replace(/```[\s\S]*?```/g,""),s=s.replace(/^#{1,6}\s+/gm,""),s=s.replace(/\[([^\]]+)\]\([^)]+\)/g,"$1"),s.trim()}}const d1=le.create(Nd),u1=le.create(Xx),f1=le.create(n1),h1=le.create(Md);function m1({theme:e,mode:t,loadingText:n}){const s=_e(e),r=()=>{switch(t){case"voice":return n||"Connecting to voice agent...";case"chat":return n||"Starting chat session...";case"video":return n||"Connecting to video call...";default:return n||"Connecting..."}};return l.jsxs("div",{className:"flex flex-col items-center justify-center h-full w-full p-8",children:[l.jsxs("div",{className:"text-center",children:[l.jsx("h3",{className:`text-lg font-semibold mb-2 ${s.text.accent}`,children:r()}),l.jsx("p",{className:`text-sm ${s.text.muted}`,children:"Please wait a moment..."})]}),l.jsxs("div",{className:"flex space-x-1 mt-4",children:[l.jsx("div",{className:"w-2 h-2 rounded-full animate-bounce bg-blue-500",style:{animationDelay:"0ms"}}),l.jsx("div",{className:"w-2 h-2 rounded-full animate-bounce bg-blue-500",style:{animationDelay:"150ms"}}),l.jsx("div",{className:"w-2 h-2 rounded-full animate-bounce bg-blue-500",style:{animationDelay:"300ms"}})]})]})}const g1=le.create(m1);function p1({onClick:e,text:t="Open Chat",position:n="bottom-right",theme:s}){const r={"top-left":"top-4 left-4","top-right":"top-4 right-4","bottom-left":"bottom-4 left-4","bottom-right":"bottom-4 right-4"},i=_e(s);return l.jsx(le.button,{onClick:e,className:`voxket-popup-trigger fixed ${r[n]} z-50 px-4 py-2 rounded-full shadow-lg ${i.popupTrigger} transition-all duration-200 hover:scale-105`,initial:{scale:0,opacity:0},animate:{scale:1,opacity:1},exit:{scale:0,opacity:0},whileHover:{scale:1.05},whileTap:{scale:.95},"data-position":n,children:t})}function al({children:e,theme:t,displayType:n="widget",onClose:s,popupPosition:r="bottom-right",onExpand:i}){const o=_e(t);if(n==="fullscreen")return l.jsx("div",{className:"fixed inset-0 z-[9999] bg-black/40 bg-opacity-30 backdrop-blur-sm flex items-center justify-center p-8",onClick:a=>{a.target===a.currentTarget&&s&&s()},children:l.jsxs("div",{className:"w-full h-full max-w-7xl max-h-[95vh] rounded-2xl relative bg-transparent flex flex-col",onClick:a=>{a.stopPropagation()},children:[s&&l.jsx("button",{onClick:a=>{a.preventDefault(),a.stopPropagation(),s()},className:"absolute top-4 cursor-pointer right-4 z-[10000] w-12 h-12 rounded-full bg-gray-900 bg-opacity-90 text-white flex items-center justify-center hover:bg-gray-800 transition-all duration-200 shadow-lg border border-gray-700 backdrop-blur-sm",title:"Exit Fullscreen",type:"button",children:l.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:l.jsx("path",{d:"M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"})})}),l.jsxs("div",{id:"voice-card",className:`voxket-widget-root theme-${t} ${o.card} w-full h-full flex flex-col rounded-xl shadow-2xl relative overflow-hidden`,"data-theme":t,style:{minHeight:"600px",height:"100%",contain:"layout style paint",overscrollBehavior:"contain"},children:[l.jsx("div",{className:o.cardTopGradient}),l.jsx("div",{className:o.cardPurpleBlur}),l.jsx("div",{className:o.cardPinkBlur}),l.jsx("div",{className:"relative z-10 flex flex-col h-full",children:e}),l.jsx("div",{className:o.cardPulse1}),l.jsx("div",{className:o.cardPulse2,style:{animationDelay:"1s"}})]})]})});if(n==="popup"){const a={"top-left":"top-4 left-4","top-right":"top-4 right-4","bottom-left":"bottom-4 left-4","bottom-right":"bottom-4 right-4"};return l.jsx("div",{className:"fixed rounded-2xl inset-0 z-[9999] pointer-events-none",children:l.jsxs("div",{className:`fixed rounded-2xl ${a[r]} pointer-events-auto`,children:[s&&l.jsx("button",{onClick:s,className:"absolute -top-2 -right-2 z-10 w-8 h-8 rounded-full bg-gray-900 bg-opacity-90 text-white flex items-center justify-center hover:bg-gray-800 transition-all duration-200 text-sm shadow-lg border border-gray-700",children:"×"}),l.jsxs("div",{id:"voice-card",className:`voxket-widget-root theme-${t} ${o.card} rounded-2xl flex flex-col relative overflow-hidden`,"data-theme":t,style:{width:"350px",height:"500px",contain:"layout style paint",overscrollBehavior:"contain"},children:[l.jsx("div",{className:o.cardTopGradient}),l.jsx("div",{className:o.cardPurpleBlur}),l.jsx("div",{className:o.cardPinkBlur}),l.jsx("div",{className:"relative z-10 flex flex-col h-full w-full",children:e}),l.jsx("div",{className:o.cardPulse1}),l.jsx("div",{className:o.cardPulse2,style:{animationDelay:"1s"}})]})]})})}return l.jsxs("div",{id:"voice-card",className:`voxket-widget-root theme-${t} ${o.card} relative overflow-hidden`,"data-theme":t,style:{height:"100%",maxHeight:"100%",contain:"layout style paint",overscrollBehavior:"contain"},children:[l.jsx("div",{className:o.cardTopGradient}),l.jsx("div",{className:o.cardPurpleBlur}),l.jsx("div",{className:o.cardPinkBlur}),l.jsx("div",{className:"relative z-10 flex flex-col h-full",children:e}),l.jsx("div",{className:o.cardPulse1}),l.jsx("div",{className:o.cardPulse2,style:{animationDelay:"1s"}})]})}function y1(e){if(typeof window>"u")return null;const{agentId:t,participantName:n,baseUrl:s,appSecret:r,appId:i,prompts:o,statusMessage:a,welcomeTitle:c,welcomeSubTitle:d,className:u,width:f,height:h,loadingText:p,suportsChatInput:x=!0,suportsVideoInput:m=!0,suportsScreenShare:b=!0,theme:S="vox",onSessionStart:C,onSessionEnd:T,enableSessionLogging:k=!0,onSessionLogsUpdate:v,onSessionMetricsUpdate:j,modalities:V=["voice"],displayType:E="widget",popupPosition:_="bottom-right",popupTriggerText:y="Open Chat",onPopupToggle:D,voxketClient:W,onDisplayTypeChange:te}=e,[ue,ie]=g.useState(!1),[fe,ne]=g.useState(null),[R,B]=g.useState(()=>{try{if(W)return!!W.getCurrentSession()}catch(U){console.error("Error checking existing session:",U)}return!1}),[M,O]=g.useState(!1),[q,Y]=g.useState(t||""),[H,re]=g.useState(n||"User"),[$,I]=g.useState(()=>{try{if(W)return W.getCurrentSession()}catch(U){console.error("Error getting current session:",U)}return null}),[L,N]=g.useState(()=>{var U,me,xe;try{if(W){const Ee=W.getCurrentSession();if((U=Ee==null?void 0:Ee.activeModalities)!=null&&U.includes("chat"))return"chat";if((me=Ee==null?void 0:Ee.activeModalities)!=null&&me.includes("voice"))return"voice";if((xe=Ee==null?void 0:Ee.activeModalities)!=null&&xe.includes("video"))return"video"}}catch(Ee){console.error("Error determining current mode:",Ee)}return"welcome"}),[F,se]=g.useState(!1);g.useEffect(()=>{E==="fullscreen"&&console.log("🎯 Widget: Switched to fullscreen mode")},[E]),g.useEffect(()=>{R&&!M?console.log("📊 Session started:",{currentMode:L,sessionId:$==null?void 0:$.id}):!R&&!M&&L==="welcome"&&console.log("📊 Returned to welcome screen")},[R,L,M]);const A=g.useMemo(()=>{try{if(W)return console.log("🔄 Using existing VoxketClient to preserve session state"),W;if(!i||!r||!s){const me=`Missing required props: ${i?"":"appId "}${r?"":"appSecret "}${s?"":"baseUrl"}`;return console.error("❌ VoxketClient creation failed:",me),ne(new Error(me)),ie(!0),null}const U={appId:i,appSecret:r,baseUrl:s,agentId:q,participantName:H||"User",modalities:V};return console.log("🔧 Creating new VoxketClient with config:",{appId:i.substring(0,8)+"...",baseUrl:s,agentId:q,participantName:H||"User",modalities:V}),new Wn(U)}catch(U){return console.error("❌ Failed to create VoxketClient:",U),ne(U),ie(!0),null}},[W,i,r,s,q,H,V]),Z=V,G=g.useMemo(()=>{try{if(!A)return console.warn("⚠️ No VoxketClient available, creating fallback room"),new K.Room;const U=A.getRoom();return console.log("🏠 Widget: Room reference updated:",{roomExists:!!U,roomState:U==null?void 0:U.state,sessionStarted:R,currentMode:L}),U||new K.Room}catch(U){return console.error("❌ Error getting room from client:",U),new K.Room}},[A,R,L]);g.useEffect(()=>{if(G){const U=()=>{console.log("🏠 Widget: Room state changed:",{state:G.state,numParticipants:G.numParticipants,isConnected:G.state==="connected",sessionId:$==null?void 0:$.id})},me=(xe,Ee,ot)=>{console.log("🎵 Widget: Track subscribed:",{trackKind:xe.kind,trackSource:xe.source,participantSid:ot.sid,participantIdentity:ot.identity,sessionId:$==null?void 0:$.id})};return G.on(K.RoomEvent.Connected,U),G.on(K.RoomEvent.Disconnected,U),G.on(K.RoomEvent.TrackSubscribed,me),()=>{G.off(K.RoomEvent.Connected,U),G.off(K.RoomEvent.Disconnected,U),G.off(K.RoomEvent.TrackSubscribed,me)}}},[G,$==null?void 0:$.id]),g.useEffect(()=>{!M&&L==="welcome"?console.log("🎬 Widget: Welcome screen ready"):R&&L!=="welcome"&&console.log("🎬 Widget: Session mode active:",L)},[L,M,R]);const de={suportsChatInput:x,suportsVideoInput:m,suportsScreenShare:b};g.useEffect(()=>{(L==="voice"||L==="video"||L==="chat")&&!$&&!R&&!M&&A&&!A.connected&&(console.log("🔄 Auto-correcting: Found orphaned mode without session, returning to welcome"),N("welcome"),O(!1))},[L,$,R,M,A]);const{sessionMetrics:ae,sessionLogs:Oe,logEvent:Be}=Vd({room:G,onSessionStart:C,onSessionEnd:T,enableConsoleLogging:k,enableLocalStorage:k,voxketSessionId:$==null?void 0:$.id});g.useEffect(()=>{v&&v(Oe)},[Oe,v]),g.useEffect(()=>{j&&ae&&j(ae)},[ae,j]),g.useEffect(()=>{if(!A)return;const U=()=>{const me=A.connected,xe=A.getCurrentSession();console.log("🔗 Connection state changed:",{isConnected:me,currentSessionId:xe==null?void 0:xe.id,currentMode:L,loading:M,sessionStarted:R}),!me&&R&&!M&&(console.log("🔴 Connection lost during active session - returning to welcome"),O(!1),B(!1),I(null),N("welcome")),me&&xe&&M&&(console.log("🟢 Connected with active session - removing loader"),O(!1),B(!0),I(xe))};return A.on("connectionStateChanged",U),A.on("sessionEnded",()=>{console.log("📞 Session ended - returning to welcome"),O(!1),B(!1),I(null),N("welcome")}),()=>{A.off("connectionStateChanged",U),A.off("sessionEnded",()=>{})}},[A,L,M,R]),g.useEffect(()=>{const U=xe=>{console.log("🔴 Widget: Room disconnected:",xe),console.log("🔍 Widget: Current state on disconnect:",{currentMode:L,sessionStarted:R,currentSessionId:$==null?void 0:$.id,loading:M}),O(!1),B(!1),I(null),N("welcome"),console.log("🏠 Widget: Automatically returning to welcome screen after disconnect")},me=xe=>{console.log("📹 Media devices error:",xe),O(!1),B(!1),I(null),N("welcome")};return G.on(K.RoomEvent.MediaDevicesError,me),G.on(K.RoomEvent.Disconnected,U),()=>{G.off(K.RoomEvent.Disconnected,U),G.off(K.RoomEvent.MediaDevicesError,me)}},[G,L,R,$==null?void 0:$.id,M]);const Pe=async()=>{try{if(!A){console.error("❌ VoxketClient not available"),ne(new Error("VoxketClient not initialized")),ie(!0);return}O(!0),N("voice"),console.log("🎤 Starting voice session...",{agentId:q,participantName:H}),console.log("🎤 Pre-start state:",{currentMode:"voice",sessionStarted:!1,loading:!0}),Be("USER_STARTED_VOICE_SESSION",{agentId:q,participantName:H});const U=await A.startSession(q,{participantName:H||"User",modalities:["voice",...m?["video"]:[]]});console.log("✅ Voice session started successfully:",U.id),I(U),B(!0),O(!1),C&&C(U.id)}catch(U){console.error("❌ Failed to start voice session:",U),O(!1),B(!1),N("welcome")}},ze=async()=>{try{if(!A){console.error("❌ VoxketClient not available"),ne(new Error("VoxketClient not initialized")),ie(!0);return}O(!0),N("chat"),console.log("💬 Starting chat session...",{agentId:q,participantName:H}),Be("USER_STARTED_CHAT_SESSION",{agentId:q,participantName:H});const U=await A.startSession(q,{participantName:H||"User",modalities:["chat"]});console.log("✅ Chat session started successfully:",U.id),I(U),B(!0),O(!1),C&&C(U.id)}catch(U){console.error("❌ Failed to start chat session:",U),O(!1),B(!1),N("welcome")}},Xe=async()=>{try{if(!A){console.error("❌ VoxketClient not available"),ne(new Error("VoxketClient not initialized")),ie(!0);return}O(!0),N("video"),console.log("📺 Starting video session...",{agentId:q,participantName:H}),console.log("📺 Pre-start state:",{currentMode:"video",sessionStarted:!1,loading:!0}),Be("USER_STARTED_VIDEO_SESSION",{agentId:q,participantName:H});const U=await A.startSession(q,{participantName:H||"User",modalities:["video","voice"]});console.log("✅ Video session started successfully:",U.id),I(U),B(!0),O(!1),C&&C(U.id)}catch(U){console.error("❌ Failed to start video session:",U),O(!1),B(!1),N("welcome")}},rt=()=>{console.log("🔄 Widget: handleBackToWelcome called",{currentMode:L,sessionStarted:R,currentSessionId:$==null?void 0:$.id,displayType:E,loading:M}),N("welcome"),O(!1),te&&te(e.displayType||"widget"),$&&R?(console.log("🧹 Widget: Cleaning up active session"),B(!1),I(null),A&&(console.log("🔌 Widget: Disconnecting client and cleaning up room"),A.disconnect().catch(U=>{console.error("❌ Widget: Error during disconnect:",U)}))):(console.log("📝 Widget: No active session to clean up"),A&&A.connected&&(console.log("🔌 Widget: Force disconnecting client for fresh state"),A.disconnect().catch(U=>{console.error("❌ Widget: Error during force disconnect:",U)}))),E==="popup"&&!F&&se(!0),console.log("✅ Widget: handleBackToWelcome completed",{newCurrentMode:"welcome",newLoading:!1,newSessionStarted:!1})},wt=()=>{const U=!F;se(U),D&&D(U),!U&&!($&&R)&&(N("welcome"),B(!1),I(null))},Gn=()=>{console.log("🔄 Closing fullscreen, switching to widget display type"),e.onDisplayTypeChange?e.onDisplayTypeChange("widget"):console.warn("⚠️ No onDisplayTypeChange callback provided")},Kn=()=>{if(console.log("🔄 Expand to fullscreen requested"),e.onDisplayTypeChange)e.onDisplayTypeChange("fullscreen");else{console.warn("⚠️ No onDisplayTypeChange callback provided for expand functionality");const U=document.getElementById("voice-card")||document.querySelector(".voxket-widget-container");U&&U.requestFullscreen&&U.requestFullscreen().catch(me=>{console.warn("⚠️ Fullscreen API not supported or failed:",me)})}};g.useEffect(()=>{var U,me,xe;if(W&&A){const Ee=A.getCurrentSession();A.connected,Ee&&(console.log("✅ Restoring session state:",Ee.id),I(Ee),B(!0),O(!1),(U=Ee.activeModalities)!=null&&U.includes("chat")?N("chat"):(me=Ee.activeModalities)!=null&&me.includes("voice")?N("voice"):(xe=Ee.activeModalities)!=null&&xe.includes("video")&&N("video"))}},[W,A]),g.useEffect(()=>()=>{!W&&A&&A.disconnect()},[A,W]);let Zt=L==="video"?"w-[32rem]":"w-96",z=L==="video"?"h-[30rem]":"h-[25rem]",oe={};if(f&&(f.startsWith("w-")?Zt=f:(oe.width=f,Zt="")),h&&(h.startsWith("h-")?z=h:(oe.height=h,z="")),E==="popup"&&!F)return console.log("🟡 Showing popup trigger button"),l.jsx(p1,{onClick:wt,text:y,position:_,theme:S});if(ue||!A){const U=(fe==null?void 0:fe.message)||"VoxketWidget encountered an error. Please check your configuration.";return l.jsx("div",{className:`voxket-widget-root theme-${S} flex items-center justify-center p-8 ${u||""}`,style:{width:f||"400px",height:h||"500px",border:"1px solid #ff4444",borderRadius:"8px",background:"#fff5f5",color:"#cc0000"},children:l.jsxs("div",{className:"text-center",children:[l.jsx("div",{className:"text-4xl mb-4",children:"⚠️"}),l.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Widget Error"}),l.jsx("p",{className:"text-sm mb-4",children:U}),l.jsx("button",{onClick:()=>{ie(!1),ne(null),window.location.reload()},className:"px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700 transition-colors",children:"Retry"})]})})}let ke=`voxket-widget-root theme-${S}`,ee={scrollMargin:0,scrollPadding:0,contain:"layout style paint"};E==="widget"?(ke+=` flex items-center justify-center min-h-fit ${Zt} ${z} ${u}`,ee={...ee,...oe}):(ke=`${u||""}`,ee={});const Te=l.jsx("div",{className:"h-full flex flex-col overflow-hidden relative z-10",children:l.jsxs(Et,{mode:"wait",children:[L==="welcome"&&!M&&l.jsx(h1,{agentId:q,participantName:H||"",onAgentIdChange:Y,onParticipantNameChange:re,onStartCall:Pe,onStartChat:ze,onStartVideo:Xe,disabled:R||M,prompts:o,statusMessage:a,title:c,subTitle:d,theme:S,modalities:Z,initial:{opacity:0,y:0},animate:{opacity:1,y:0},exit:{opacity:0,y:40},transition:{duration:.3,ease:"easeInOut"}},"welcome"),M&&(L==="voice"||L==="chat"||L==="video")&&l.jsx(g1,{theme:S,mode:L,loadingText:p,initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.9},transition:{duration:.3,ease:"easeInOut"}},`loading-${L}`),L==="voice"&&!M&&R&&A&&l.jsxs(Ke.RoomContext.Provider,{value:G,children:[l.jsx(Ke.RoomAudioRenderer,{},`audio-${($==null?void 0:$.id)||"no-session"}`),l.jsx(Ke.StartAudio,{label:"Start Audio"},`start-audio-${($==null?void 0:$.id)||"no-session"}`),l.jsx(d1,{loadingText:p,participantName:H||"User",capabilities:de,sessionStarted:R,disabled:!1,theme:S,client:A,displayType:E,onBack:E==="popup"?wt:rt,initial:{opacity:0,y:40},animate:{opacity:1,y:0},exit:{opacity:0,y:-40},transition:{duration:.3,ease:"easeInOut"}},"voice-session")]}),L==="chat"&&!M&&R&&A&&l.jsx(u1,{client:A,theme:S,displayType:E,onBack:E==="popup"?wt:rt,onEndChat:rt,disabled:!1,initial:{opacity:0,y:40},animate:{opacity:1,y:0},exit:{opacity:0,y:-40},transition:{duration:.3,ease:"easeInOut"}},"chat-view"),L==="video"&&!M&&R&&A&&l.jsxs(Ke.RoomContext.Provider,{value:G,children:[l.jsx(Ke.RoomAudioRenderer,{},`audio-video-${($==null?void 0:$.id)||"no-session"}`),l.jsx(Ke.StartAudio,{label:"Start Audio"},`start-audio-video-${($==null?void 0:$.id)||"no-session"}`),l.jsx(f1,{client:A,theme:S,displayType:E,onBack:E==="popup"?wt:rt,onEndCall:rt,disabled:!1,initial:{opacity:0,y:40},animate:{opacity:1,y:0},exit:{opacity:0,y:-40},transition:{duration:.3,ease:"easeInOut"}},"video-session")]})]})});return E==="fullscreen"||E==="popup"?l.jsx(al,{theme:S,displayType:E,popupPosition:_,onClose:E==="fullscreen"?Gn:wt,children:Te}):l.jsx("div",{className:ke,style:ee,children:l.jsx(al,{theme:S,displayType:E,popupPosition:_,onExpand:Kn,children:Te})})}function ms(e){return l.jsx(Wo,{children:l.jsx(y1,{...e})})}function x1({logs:e,onClear:t,onExport:n}){const[s,r]=w.useState(!1),[i,o]=w.useState(""),a=e.filter(c=>!i||c.event.toLowerCase().includes(i.toLowerCase()));return s?l.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:l.jsxs("div",{className:"bg-white rounded-lg shadow-xl max-w-4xl w-full max-h-[80vh] flex flex-col m-4",children:[l.jsxs("div",{className:"flex items-center justify-between p-4 border-b",children:[l.jsxs("h2",{className:"text-lg font-semibold",children:["Session Logs (",e.length,")"]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("input",{type:"text",placeholder:"Filter events...",value:i,onChange:c=>o(c.target.value),className:"px-3 py-1 border rounded text-sm"}),l.jsx("button",{onClick:t,className:"px-3 py-1 bg-red-600 text-white rounded text-sm hover:bg-red-700",children:"Clear"}),l.jsx("button",{onClick:n,className:"px-3 py-1 bg-green-600 text-white rounded text-sm hover:bg-green-700",children:"Export"}),l.jsx("button",{onClick:()=>r(!1),className:"px-3 py-1 bg-gray-600 text-white rounded text-sm hover:bg-gray-700",children:"Close"})]})]}),l.jsx("div",{className:"flex-1 overflow-auto p-4",children:a.length===0?l.jsx("p",{className:"text-gray-500 text-center py-8",children:"No logs found"}):l.jsx("div",{className:"space-y-2",children:a.map((c,d)=>l.jsxs("div",{className:"border rounded p-3 text-sm",children:[l.jsxs("div",{className:"flex items-center justify-between mb-1",children:[l.jsx("span",{className:"font-semibold text-blue-600",children:c.event}),l.jsx("span",{className:"text-gray-500 text-xs",children:new Date(c.timestamp).toLocaleTimeString()})]}),c.sessionId&&l.jsxs("div",{className:"text-xs text-gray-600 mb-1",children:["Session: ",c.sessionId]}),c.data&&l.jsx("div",{className:"bg-gray-50 p-2 rounded text-xs",children:l.jsx("pre",{className:"whitespace-pre-wrap overflow-auto",children:JSON.stringify(c.data,null,2)})})]},d))})})]})}):l.jsxs("button",{onClick:()=>r(!0),className:"fixed bottom-4 right-4 bg-blue-600 text-white px-4 py-2 rounded-lg shadow-lg hover:bg-blue-700 transition-colors text-sm z-50",children:["Session Logs (",e.length,")"]})}function b1({metrics:e}){return e?l.jsxs("div",{className:"bg-gray-100 p-4 rounded-lg",children:[l.jsx("h3",{className:"font-semibold mb-2",children:"Current Session"}),l.jsxs("div",{className:"grid grid-cols-2 gap-4 text-sm",children:[l.jsxs("div",{children:[l.jsx("span",{className:"text-gray-600",children:"Session ID:"}),l.jsx("div",{className:"font-mono text-xs",children:e.sessionId})]}),l.jsxs("div",{children:[l.jsx("span",{className:"text-gray-600",children:"Start Time:"}),l.jsx("div",{children:new Date(e.startTime).toLocaleString()})]}),l.jsxs("div",{children:[l.jsx("span",{className:"text-gray-600",children:"Messages:"}),l.jsx("div",{children:e.totalMessages})]}),l.jsxs("div",{children:[l.jsx("span",{className:"text-gray-600",children:"Participants:"}),l.jsx("div",{children:e.participantCount})]}),l.jsxs("div",{children:[l.jsx("span",{className:"text-gray-600",children:"Connection Issues:"}),l.jsx("div",{children:e.connectionIssues})]}),l.jsxs("div",{children:[l.jsx("span",{className:"text-gray-600",children:"Duration:"}),l.jsxs("div",{children:[Math.round((Date.now()-new Date(e.startTime).getTime())/1e3),"s"]})]})]})]}):null}function Wt(){const{currentSession:e,sessionState:t,sessionMetrics:n,createSession:s,endSession:r}=ft(),i=w.useCallback(async(a,c)=>await s(a,c),[s]),o=w.useCallback(async()=>await r(),[r]);return{session:e,state:t,metrics:n,isActive:e!==null&&t!=="disconnected",isConnecting:t==="connecting",isConnected:t==="connected"||t==="active",start:i,stop:o}}function Id(){const{sessionMetrics:e,currentSession:t}=ft();return{metrics:e,sessionId:t==null?void 0:t.id,duration:e==null?void 0:e.duration,participantCount:e==null?void 0:e.participantCount,messageCount:e==null?void 0:e.messageCount,audioQuality:e==null?void 0:e.audioQuality,networkStats:e==null?void 0:e.networkStats}}function Dd(){const{setMicrophoneEnabled:e,client:t}=ft(),[n,s]=w.useState(!1),[r,i]=w.useState(!1),o=w.useCallback(async()=>{if(!r){i(!0);try{const d=!n;await e(d),s(d)}catch(d){console.error("Failed to toggle microphone:",d)}finally{i(!1)}}},[n,r,e]),a=w.useCallback(async()=>{if(!(n||r)){i(!0);try{await e(!0),s(!0)}catch(d){console.error("Failed to enable microphone:",d)}finally{i(!1)}}},[n,r,e]),c=w.useCallback(async()=>{if(!(!n||r)){i(!0);try{await e(!1),s(!1)}catch(d){console.error("Failed to disable microphone:",d)}finally{i(!1)}}},[n,r,e]);return{isEnabled:n,isLoading:r,toggle:o,enable:a,disable:c}}function $d(){const{setCameraEnabled:e}=ft(),[t,n]=w.useState(!1),[s,r]=w.useState(!1),i=w.useCallback(async()=>{if(!s){r(!0);try{const c=!t;await e(c),n(c)}catch(c){console.error("Failed to toggle camera:",c)}finally{r(!1)}}},[t,s,e]),o=w.useCallback(async()=>{if(!(t||s)){r(!0);try{await e(!0),n(!0)}catch(c){console.error("Failed to enable camera:",c)}finally{r(!1)}}},[t,s,e]),a=w.useCallback(async()=>{if(!(!t||s)){r(!0);try{await e(!1),n(!1)}catch(c){console.error("Failed to disable camera:",c)}finally{r(!1)}}},[t,s,e]);return{isEnabled:t,isLoading:s,toggle:i,enable:o,disable:a}}function Fd(){const{startScreenShare:e,stopScreenShare:t}=ft(),[n,s]=w.useState(!1),[r,i]=w.useState(!1),o=w.useCallback(async()=>{if(!(n||r)){i(!0);try{await e(),s(!0)}catch(d){console.error("Failed to start screen share:",d)}finally{i(!1)}}},[n,r,e]),a=w.useCallback(async()=>{if(!(!n||r)){i(!0);try{await t(),s(!1)}catch(d){console.error("Failed to stop screen share:",d)}finally{i(!1)}}},[n,r,t]),c=w.useCallback(async()=>{n?await a():await o()},[n,o,a]);return{isSharing:n,isLoading:r,start:o,stop:a,toggle:c}}function v1(){const{client:e}=ft(),[t,n]=w.useState({tracks:[],layout:{type:"grid",showLocalVideo:!0,aspectRatio:"16:9"},isRecording:!1}),s=w.useMemo(()=>t.tracks.find(m=>m.isLocal),[t.tracks]),r=w.useMemo(()=>t.tracks.filter(m=>!m.isLocal),[t.tracks]),i=w.useCallback(async()=>{try{s!=null&&s.isEnabled?await(e==null?void 0:e.disableCamera()):await(e==null?void 0:e.enableCamera())}catch(m){throw console.error("Failed to toggle camera:",m),m}},[e,s]),o=w.useCallback(async()=>{try{t.tracks.find(b=>b.isScreenShare)?await(e==null?void 0:e.stopScreenShare()):await(e==null?void 0:e.startScreenShare())}catch(m){throw console.error("Failed to toggle screen share:",m),m}},[e,t.tracks]),a=w.useCallback(m=>{n(b=>({...b,layout:m}))},[]),c=w.useCallback(m=>{n(b=>({...b,pinnedTrack:m}))},[]),d=w.useCallback(()=>{n(m=>({...m,pinnedTrack:void 0}))},[]),u=w.useCallback(async()=>{try{await(e==null?void 0:e.startRecording()),n(m=>({...m,isRecording:!0}))}catch(m){throw console.error("Failed to start recording:",m),m}},[e]),f=w.useCallback(async()=>{try{await(e==null?void 0:e.stopRecording()),n(m=>({...m,isRecording:!1}))}catch(m){throw console.error("Failed to stop recording:",m),m}},[e]),h=w.useCallback(m=>t.tracks.find(b=>b.id===m),[t.tracks]),p=w.useCallback(m=>t.tracks.filter(b=>b.participantId===m),[t.tracks]),x=w.useCallback(m=>m.isEnabled&&t.tracks.includes(m),[t.tracks]);return w.useEffect(()=>{if(!e)return;const m=C=>{n(T=>({...T,tracks:[...T.tracks.filter(k=>k.id!==C.id),C]}))},b=C=>{n(T=>{var k;return{...T,tracks:T.tracks.filter(v=>v.id!==C),pinnedTrack:((k=T.pinnedTrack)==null?void 0:k.id)===C?void 0:T.pinnedTrack}})},S=C=>{n(T=>({...T,tracks:T.tracks.map(k=>k.id===C.id?C:k)}))};return e.on("videoTrackAdded",m),e.on("videoTrackRemoved",b),e.on("videoTrackUpdated",S),()=>{e.off("videoTrackAdded",m),e.off("videoTrackRemoved",b),e.off("videoTrackUpdated",S)}},[e]),{tracks:t.tracks,localTrack:s,remoteTraracks:r,pinnedTrack:t.pinnedTrack,layout:t.layout,isRecording:t.isRecording,toggleCamera:i,toggleScreenShare:o,setLayout:a,pinTrack:c,unpinTrack:d,startRecording:u,stopRecording:f,getTrackById:h,getTracksByParticipant:p,isTrackActive:x}}function Bs(){const{chatMessages:e,sendChatMessage:t,currentSession:n}=ft(),[s,r]=w.useState(!1),i=w.useCallback(async d=>{if(!(!d.trim()||s||!n)){r(!0);try{await t(d.trim())}catch(u){throw console.error("Failed to send chat message:",u),u}finally{r(!1)}}},[t,s,n]),{userMessages:o,agentMessages:a,allMessages:c}=w.useMemo(()=>{const d=e.filter(f=>f.sender.type==="participant"),u=e.filter(f=>f.sender.type==="agent");return{userMessages:d,agentMessages:u,allMessages:e}},[e]);return{messages:c,userMessages:o,agentMessages:a,messageCount:c.length,isSending:s,canSend:!!n&&!s,send:i}}function w1(){const{send:e,isSending:t,canSend:n}=Bs(),[s,r]=w.useState(""),i=w.useCallback(async()=>{if(!(!s.trim()||!n))try{await e(s),r("")}catch(a){throw a}},[s,e,n]),o=w.useCallback(a=>{a.key==="Enter"&&!a.shiftKey&&(a.preventDefault(),i())},[i]);return{value:s,setValue:r,send:i,handleKeyPress:o,isSending:t,canSend:n&&s.trim().length>0}}function Ko(){const{isConnected:e,isConnecting:t,connectionError:n,connect:s,disconnect:r}=ft(),i=w.useCallback(async()=>{if(!(e||t))try{await s()}catch(a){throw console.error("Failed to connect:",a),a}},[s,e,t]),o=w.useCallback(async()=>{if(e)try{await r()}catch(a){throw console.error("Failed to disconnect:",a),a}},[r,e]);return{isConnected:e,isConnecting:t,isDisconnected:!e&&!t,error:n,hasError:!!n,connect:i,disconnect:o}}function Od(){const{participants:e}=ft();return{participants:e,count:e.length,localParticipant:e.find(t=>t.isLocal),remoteParticipants:e.filter(t=>!t.isLocal)}}const Ld=w.createContext({}),Zn=()=>w.useContext(Ld);function _d({children:e,...t}){return l.jsx(Ld.Provider,{value:t,children:e})}function gs({name:e,children:t,fallback:n,className:s}){return l.jsx("div",{className:`voxket-slot voxket-slot--${e} ${s||""}`,children:t||n})}function Bd(e,t={}){return Object.assign(e,t)}function Hd({showMicrophoneControl:e=!0,showCameraControl:t=!0,showScreenShareControl:n=!0,showSessionActions:s=!0,customControls:r,className:i=""}){const o=Wt(),a=Dd(),c=$d(),d=Fd(),u=Zn(),f=["voxket-session-controls",`voxket-session-controls--${u.variant||"default"}`,`voxket-session-controls--${u.size||"md"}`,o.isActive?"voxket-session-controls--active":"voxket-session-controls--inactive",i].filter(Boolean).join(" ");return!o.isActive&&!s?l.jsx("div",{className:f,children:l.jsx("div",{className:"voxket-controls-inactive",children:l.jsx("p",{children:"Controls available during active session"})})}):l.jsxs("div",{className:f,children:[s&&l.jsx("div",{className:"voxket-session-actions",children:o.isActive?l.jsx("button",{onClick:o.stop,className:"voxket-button voxket-button--danger",children:"End Session"}):l.jsx(S1,{})}),o.isActive&&l.jsxs("div",{className:"voxket-media-controls",children:[e&&l.jsxs("button",{onClick:a.toggle,disabled:a.isLoading,className:`voxket-button voxket-button--media ${a.isEnabled?"voxket-button--active":""}`,title:a.isEnabled?"Mute microphone":"Unmute microphone",children:[l.jsx("span",{className:"voxket-icon",children:"🎤"}),a.isLoading?"Loading...":a.isEnabled?"Mute":"Unmute"]}),t&&l.jsxs("button",{onClick:c.toggle,disabled:c.isLoading,className:`voxket-button voxket-button--media ${c.isEnabled?"voxket-button--active":""}`,title:c.isEnabled?"Stop camera":"Start camera",children:[l.jsx("span",{className:"voxket-icon",children:"📹"}),c.isLoading?"Loading...":c.isEnabled?"Stop Video":"Start Video"]}),n&&l.jsxs("button",{onClick:d.toggle,disabled:d.isLoading,className:`voxket-button voxket-button--media ${d.isSharing?"voxket-button--active":""}`,title:d.isSharing?"Stop screen share":"Start screen share",children:[l.jsx("span",{className:"voxket-icon",children:"🖥️"}),d.isLoading?"Loading...":d.isSharing?"Stop Share":"Share Screen"]})]}),r&&l.jsx("div",{className:"voxket-custom-controls",children:r})]})}function S1(){Wt();const[e,t]=w.useState(!1),n=async()=>{t(!0);try{console.log("Start session - agentId needed")}catch(s){console.error("Failed to start session:",s)}finally{t(!1)}};return l.jsx("button",{onClick:n,disabled:e,className:"voxket-button voxket-button--primary",children:e?"Starting...":"Start Session"})}function Yo({showConnectionStatus:e=!0,showSessionInfo:t=!0,showAgentInfo:n=!0,className:s=""}){const r=Wt(),i=Ko(),o=Zn(),a=["voxket-session-header",`voxket-session-header--${o.variant||"default"}`,`voxket-session-header--${o.size||"md"}`,s].filter(Boolean).join(" ");return l.jsxs("div",{className:a,children:[e&&l.jsxs("div",{className:"voxket-connection-status",children:[l.jsx("div",{className:`voxket-status-indicator ${i.isConnected?"connected":"disconnected"}`}),l.jsx("span",{className:"voxket-status-text",children:i.isConnecting?"Connecting...":i.isConnected?"Connected":"Disconnected"})]}),t&&r.session&&l.jsxs("div",{className:"voxket-session-info",children:[l.jsxs("div",{className:"voxket-session-id",children:["Session: ",r.session.id.slice(-8)]}),l.jsxs("div",{className:"voxket-session-state",children:["State: ",r.state]})]}),n&&r.session&&l.jsxs("div",{className:"voxket-agent-info",children:[l.jsxs("div",{className:"voxket-agent-id",children:["Agent: ",r.session.agentId]}),l.jsxs("div",{className:"voxket-modalities",children:["Modalities: ",r.session.activeModalities.join(", ")]})]}),i.error&&l.jsxs("div",{className:"voxket-error-message",children:["Error: ",i.error.message]})]})}function qo({showChat:e=!0,showTranscriptions:t=!1,customContent:n,className:s=""}){const r=Wt(),i=Bs(),o=Zn(),a=["voxket-session-content",`voxket-session-content--${o.variant||"default"}`,`voxket-session-content--${o.size||"md"}`,s].filter(Boolean).join(" ");return r.isActive?l.jsx("div",{className:a,children:n||l.jsxs(l.Fragment,{children:[e&&l.jsxs("div",{className:"voxket-chat-container",children:[l.jsxs("div",{className:"voxket-chat-messages",children:[i.messages.map(c=>l.jsxs("div",{className:`voxket-message voxket-message--${c.sender.type}`,children:[l.jsxs("div",{className:"voxket-message-header",children:[l.jsx("span",{className:"voxket-message-sender",children:c.sender.name}),l.jsx("span",{className:"voxket-message-time",children:c.timestamp.toLocaleTimeString()})]}),l.jsx("div",{className:"voxket-message-content",children:c.content})]},c.id)),i.messages.length===0&&l.jsx("div",{className:"voxket-empty-messages",children:l.jsx("p",{children:"No messages yet. Start the conversation!"})})]}),l.jsx(C1,{})]}),t&&l.jsx("div",{className:"voxket-transcriptions",children:l.jsx("div",{className:"voxket-transcription-placeholder",children:l.jsx("p",{children:"Voice transcriptions will appear here"})})})]})}):l.jsx("div",{className:a,children:l.jsx("div",{className:"voxket-inactive-state",children:l.jsxs("div",{className:"voxket-inactive-message",children:[l.jsx("h3",{children:"Start a conversation"}),l.jsx("p",{children:"Begin a session to start chatting with the AI agent"})]})})})}function C1(){const e=Bs(),[t,n]=w.useState(""),s=async()=>{if(!(!t.trim()||!e.canSend))try{await e.send(t),n("")}catch(i){console.error("Failed to send message:",i)}},r=i=>{i.key==="Enter"&&!i.shiftKey&&(i.preventDefault(),s())};return l.jsxs("div",{className:"voxket-chat-input",children:[l.jsx("input",{type:"text",value:t,onChange:i=>n(i.target.value),onKeyPress:r,placeholder:"Type your message...",disabled:!e.canSend,className:"voxket-input"}),l.jsx("button",{onClick:s,disabled:!e.canSend||!t.trim(),className:"voxket-send-button",children:e.isSending?"Sending...":"Send"})]})}function Xo({showMetrics:e=!0,showParticipants:t=!0,showStatus:n=!0,customFooter:s,className:r=""}){const i=Wt(),o=Id(),a=Od(),c=Zn(),d=["voxket-session-footer",`voxket-session-footer--${c.variant||"default"}`,`voxket-session-footer--${c.size||"md"}`,r].filter(Boolean).join(" ");return i.isActive?l.jsx("div",{className:d,children:s||l.jsxs(l.Fragment,{children:[n&&l.jsxs("div",{className:"voxket-session-status",children:[l.jsx("div",{className:"voxket-status-indicator voxket-status-indicator--active"}),l.jsx("span",{className:"voxket-status-text",children:"Session Active"})]}),e&&o.metrics&&l.jsxs("div",{className:"voxket-session-metrics",children:[l.jsxs("div",{className:"voxket-metric",children:[l.jsx("span",{className:"voxket-metric-label",children:"Duration:"}),l.jsx("span",{className:"voxket-metric-value",children:k1(o.duration||0)})]}),l.jsxs("div",{className:"voxket-metric",children:[l.jsx("span",{className:"voxket-metric-label",children:"Messages:"}),l.jsx("span",{className:"voxket-metric-value",children:o.metrics.messageCount})]})]}),t&&l.jsxs("div",{className:"voxket-participants-info",children:[l.jsxs("span",{className:"voxket-participants-count",children:[a.count," participant",a.count!==1?"s":""]}),a.remoteParticipants.length>0&&l.jsx("div",{className:"voxket-participant-list",children:a.remoteParticipants.map(u=>l.jsx("span",{className:"voxket-participant-name",children:u.name},u.id))})]})]})}):l.jsx("div",{className:d,children:l.jsx("div",{className:"voxket-footer-inactive",children:l.jsx("span",{className:"voxket-status-text",children:"Ready to start session"})})})}function k1(e){const t=Math.floor(e/1e3),n=Math.floor(t/60),s=Math.floor(n/60);return s>0?`${s}:${(n%60).toString().padStart(2,"0")}:${(t%60).toString().padStart(2,"0")}`:`${n}:${(t%60).toString().padStart(2,"0")}`}function T1({agentId:e,sessionConfig:t,autoStart:n=!1,onSessionStart:s,onSessionEnd:r,variant:i="default",size:o="md",theme:a,className:c="",children:d}){var p;const u=Wt(),f=Ko();w.useEffect(()=>{n&&e&&f.isConnected&&!u.isActive&&u.start(e,t).catch(console.error)},[n,e,f.isConnected,u.isActive]),w.useEffect(()=>{var x;(x=u.session)!=null&&x.id&&s&&s(u.session.id)},[(p=u.session)==null?void 0:p.id,s]),w.useEffect(()=>()=>{u.isActive&&r&&u.stop().then(r).catch(console.error)},[]);const h=["voxket-session",`voxket-session--${i}`,`voxket-session--${o}`,u.isActive?"voxket-session--active":"voxket-session--inactive",c].filter(Boolean).join(" ");return l.jsx(_d,{variant:i,size:o,theme:a,className:c,children:l.jsx("div",{className:h,children:d||l.jsxs(l.Fragment,{children:[l.jsx(gs,{name:"header",fallback:l.jsx(Yo,{})}),l.jsx(gs,{name:"content",fallback:l.jsx(qo,{})}),l.jsx(gs,{name:"footer",fallback:l.jsx(Xo,{})})]})})})}const Ud=Bd(T1,{Header:Yo,Content:qo,Footer:Xo,Controls:Hd}),Ut={name:"default",colors:{primary:"#3B82F6",secondary:"#6B7280",accent:"#8B5CF6",background:"#FFFFFF",surface:"#F9FAFB",text:{primary:"#111827",secondary:"#6B7280",muted:"#9CA3AF",inverse:"#FFFFFF"},status:{success:"#10B981",warning:"#F59E0B",error:"#EF4444",info:"#3B82F6"},border:"#E5E7EB",shadow:"0 1px 3px 0 rgba(0, 0, 0, 0.1)"},typography:{fontFamily:"system-ui, -apple-system, sans-serif",fontSize:{xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem"},fontWeight:{normal:400,medium:500,semibold:600,bold:700},lineHeight:{tight:1.25,normal:1.5,relaxed:1.75}},spacing:{xs:"0.25rem",sm:"0.5rem",md:"1rem",lg:"1.5rem",xl:"2rem"},borderRadius:{none:"0",sm:"0.25rem",md:"0.5rem",lg:"0.75rem",full:"9999px"},shadows:{sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1)"}},Kr={...Ut,name:"dark",colors:{primary:"#60A5FA",secondary:"#9CA3AF",accent:"#A78BFA",background:"#111827",surface:"#1F2937",text:{primary:"#F9FAFB",secondary:"#D1D5DB",muted:"#9CA3AF",inverse:"#111827"},status:{success:"#34D399",warning:"#FBBF24",error:"#F87171",info:"#60A5FA"},border:"#374151",shadow:"0 1px 3px 0 rgba(0, 0, 0, 0.3)"}},Yr={...Ut,name:"enterprise",colors:{primary:"#1E40AF",secondary:"#64748B",accent:"#7C3AED",background:"#FFFFFF",surface:"#F8FAFC",text:{primary:"#0F172A",secondary:"#475569",muted:"#94A3B8",inverse:"#FFFFFF"},status:{success:"#059669",warning:"#D97706",error:"#DC2626",info:"#1E40AF"},border:"#CBD5E1",shadow:"0 1px 3px 0 rgba(0, 0, 0, 0.1)"},borderRadius:{none:"0",sm:"0.125rem",md:"0.25rem",lg:"0.375rem",full:"9999px"}},zd=w.createContext(null),Wd=()=>{const e=w.useContext(zd);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e};function E1({theme:e="default",themes:t={},children:n,cssVariables:s=!0,className:r=""}){const[i,o]=w.useState(()=>{const h={default:Ut,dark:Kr,enterprise:Yr,...t};return typeof e=="string"?h[e]||Ut:e}),[a,c]=w.useState(()=>({default:Ut,dark:Kr,enterprise:Yr,...t})),d=h=>{if(typeof h=="string"){const p=a[h];p&&o(p)}else o(h)},u=h=>{c(p=>({...p,[h.name]:h}))};w.useEffect(()=>{if(s&&typeof document<"u"){const h=document.documentElement;Object.entries(Zd(i)).forEach(([p,x])=>{h.style.setProperty(`--voxket-${p}`,x)})}},[i,s]);const f={theme:i,setTheme:d,themes:a,registerTheme:u};return l.jsx(zd.Provider,{value:f,children:l.jsx("div",{className:`voxket-theme voxket-theme--${i.name} ${r}`,children:n})})}function Zd(e){const t={},n=(s,r="")=>{for(const[i,o]of Object.entries(s)){const a=r?`${r}-${i}`:i;typeof o=="object"&&o!==null&&!Array.isArray(o)?n(o,a):t[a]=String(o)}};return n(e),t}function A1(e=Ut,t){return{...e,...t,colors:{...e.colors,...t.colors},typography:{...e.typography,...t.typography},spacing:{...e.spacing,...t.spacing},borderRadius:{...e.borderRadius,...t.borderRadius},shadows:{...e.shadows,...t.shadows}}}function j1(e){var n;const{theme:t}=Wd();return((n=t.components)==null?void 0:n[e])||{}}const N1=Go("voice-modality","voice",{onActivate:async e=>{const t=e.config;t.enableTranscription&&M1(e),t.enableVoiceActivation&&V1(e,t),console.log("Voice modality activated",t)},onDeactivate:async e=>{console.log("Voice modality deactivated")},onMessage:async(e,t)=>{t.type==="audio"&&P1(e,t)}});function M1(e,t){e.on("participant.speaking.started",n=>{console.log("Transcription: Started for",n.name)}),e.on("participant.speaking.stopped",n=>{console.log("Transcription: Stopped for",n.name)})}function V1(e,t){const n=t.silenceThreshold||-50;console.log("Voice activation setup with threshold:",n)}function P1(e,t){console.log("Playing audio response:",t.content)}const R1=Go("chat-modality","chat",{onActivate:async e=>{const t=e.config;t.enableRichText&&I1(),t.enableFileUpload&&D1(e),t.enableCustomComponents&&$1(),console.log("Chat modality activated",t)},onDeactivate:async e=>{console.log("Chat modality deactivated")},onMessage:async(e,t)=>{const n=e.config;t.type==="ui_component"?F1(e,t):t.type==="text"&&n.enableRichText&&O1(e,t)}});function I1(e){console.log("Rich text support enabled")}function D1(e){console.log("File upload enabled"),e.on("chat.file.uploaded",t=>{console.log("File uploaded:",t.name)})}function $1(e){console.log("Custom components enabled");const t=new Map;t.set("quick-actions",L1),t.set("form",_1),t.set("card",B1),t.set("chart",H1)}function F1(e,t){const{componentType:n,props:s}=t.metadata;console.log("Rendering custom component:",n,s),e.emit("chat.component.render",{type:n,props:s,timestamp:new Date})}function O1(e,t){console.log("Processing rich text message:",t.content)}function L1(e){return{type:"quick-actions",actions:e.actions||[],layout:e.layout||"horizontal"}}function _1(e){return{type:"form",fields:e.fields||[],submitAction:e.submitAction,validation:e.validation}}function B1(e){return{type:"card",title:e.title,content:e.content,actions:e.actions,variant:e.variant||"default"}}function H1(e){return{type:"chart",chartType:e.chartType||"line",data:e.data,options:e.options}}function ps({track:e,participantName:t,showControls:n=!0,showName:s=!0,showMuteIndicator:r=!0,isPinned:i=!1,className:o="",onClick:a,onPin:c,onUnpin:d}){const u=w.useRef(null),[f,h]=w.useState(!1);w.useEffect(()=>{if(!u.current||!e.isEnabled)return;const b=u.current;return b.srcObject=null,()=>{b.srcObject&&(b.srcObject=null)}},[e]);const p=()=>{a==null||a(e)},x=b=>{b.stopPropagation(),i?d==null||d(e):c==null||c(e)},m=["voxket-video-tile",e.isLocal?"voxket-video-tile--local":"voxket-video-tile--remote",e.isScreenShare?"voxket-video-tile--screen-share":"voxket-video-tile--camera",i?"voxket-video-tile--pinned":"",e.isEnabled?"":"voxket-video-tile--disabled",f?"voxket-video-tile--hovered":"",o].filter(Boolean).join(" ");return l.jsxs("div",{className:m,onClick:p,onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),style:{aspectRatio:e.dimensions?`${e.dimensions.width} / ${e.dimensions.height}`:"16 / 9"},children:[l.jsx("video",{ref:u,className:"voxket-video-element",autoPlay:!0,playsInline:!0,muted:e.isLocal}),!e.isEnabled&&l.jsxs("div",{className:"voxket-video-placeholder",children:[l.jsx("div",{className:"voxket-video-placeholder-icon",children:e.isScreenShare?"🖥️":"📹"}),l.jsx("p",{className:"voxket-video-placeholder-text",children:e.isScreenShare?"Screen sharing paused":"Camera off"})]}),l.jsxs("div",{className:"voxket-video-overlay",children:[s&&t&&l.jsxs("div",{className:"voxket-video-name",children:[t,e.isLocal&&" (You)"]}),r&&!e.isEnabled&&l.jsx("div",{className:"voxket-video-mute-indicator",children:"🔇"}),n&&(f||i)&&l.jsxs("div",{className:"voxket-video-controls",children:[l.jsx("button",{className:`voxket-video-control-btn ${i?"voxket-video-control-btn--active":""}`,onClick:x,title:i?"Unpin video":"Pin video",children:"📌"}),e.isScreenShare&&l.jsx("div",{className:"voxket-video-indicator",children:"🖥️"}),e.source&&l.jsx("div",{className:"voxket-video-source",children:e.source})]})]}),!e.isEnabled&&l.jsx("div",{className:"voxket-video-loading",children:l.jsx("div",{className:"voxket-spinner"})})]})}function U1({tracks:e,layout:t,className:n="",onLayoutChange:s,onTrackClick:r,maxVisibleTracks:i=9,showPagination:o=!0}){const[a,c]=w.useState(0),[d,u]=w.useState(null),f=w.useMemo(()=>{let C=[...e];t.type==="speaker"&&d&&(C=[d,...e.filter(v=>v.id!==d.id)]);const T=a*i,k=T+i;return C.slice(T,k)},[e,t,d,a,i]),h=Math.ceil(e.length/i),p=w.useMemo(()=>{const C=f.length;switch(t.type){case"grid":const T=Math.ceil(Math.sqrt(C)),k=Math.ceil(C/T);return{display:"grid",gridTemplateColumns:`repeat(${T}, 1fr)`,gridTemplateRows:`repeat(${k}, 1fr)`,gap:"8px"};case"speaker":return{display:"flex",flexDirection:"column",gap:"8px"};case"sidebar":return{display:"flex",gap:"8px"};case"gallery":return{display:"flex",flexWrap:"wrap",gap:"8px",justifyContent:"center"};default:return{}}},[t.type,f.length]),x=C=>{u(C)},m=()=>{u(null)},b=C=>{s==null||s({...t,type:C})},S=["voxket-video-grid",`voxket-video-grid--${t.type}`,`voxket-video-grid--${f.length}-tracks`,n].filter(Boolean).join(" ");return e.length===0?l.jsx("div",{className:"voxket-video-grid-empty",children:l.jsxs("div",{className:"voxket-video-grid-empty-content",children:[l.jsx("div",{className:"voxket-video-grid-empty-icon",children:"📹"}),l.jsx("p",{children:"No video tracks available"})]})}):l.jsxs("div",{className:S,children:[l.jsxs("div",{className:"voxket-video-grid-controls",children:[l.jsx("div",{className:"voxket-video-layout-controls",children:["grid","speaker","sidebar","gallery"].map(C=>l.jsx("button",{className:`voxket-layout-btn ${t.type===C?"voxket-layout-btn--active":""}`,onClick:()=>b(C),title:`Switch to ${C} layout`,children:z1(C)},C))}),l.jsxs("div",{className:"voxket-video-count",children:[e.length," participant",e.length!==1?"s":""]})]}),l.jsx("div",{className:"voxket-video-grid-content",style:p,children:t.type==="speaker"&&d?l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"voxket-video-speaker-main",children:l.jsx(ps,{track:d,participantName:`Participant ${d.participantId}`,isPinned:!0,onClick:r,onUnpin:m})}),l.jsx("div",{className:"voxket-video-speaker-sidebar",children:f.filter(C=>C.id!==d.id).map(C=>l.jsx(ps,{track:C,participantName:`Participant ${C.participantId}`,showControls:!1,onClick:r,onPin:x},C.id))})]}):f.map(C=>l.jsx(ps,{track:C,participantName:`Participant ${C.participantId}`,isPinned:(d==null?void 0:d.id)===C.id,onClick:r,onPin:x,onUnpin:m},C.id))}),o&&h>1&&l.jsxs("div",{className:"voxket-video-pagination",children:[l.jsx("button",{className:"voxket-pagination-btn",onClick:()=>c(Math.max(0,a-1)),disabled:a===0,children:"←"}),l.jsxs("span",{className:"voxket-pagination-info",children:["Page ",a+1," of ",h]}),l.jsx("button",{className:"voxket-pagination-btn",onClick:()=>c(Math.min(h-1,a+1)),disabled:a===h-1,children:"→"})]})]})}function z1(e){switch(e){case"grid":return"⊞";case"speaker":return"🎤";case"sidebar":return"⫸";case"gallery":return"⊡";case"picture-in-picture":return"⧉";default:return"⊞"}}function W1({localTrack:e,onToggleCamera:t,onToggleScreenShare:n,onLayoutChange:s,showLayoutControls:r=!0,showCameraControls:i=!0,showScreenShareControls:o=!0,className:a=""}){const c=["voxket-video-controls",a].filter(Boolean).join(" "),d=u=>{s==null||s({type:u,showLocalVideo:!0,aspectRatio:"16:9"})};return l.jsxs("div",{className:c,children:[i&&l.jsxs("div",{className:"voxket-video-controls-section",children:[l.jsx("h4",{className:"voxket-video-controls-title",children:"Camera"}),l.jsxs("button",{className:`voxket-control-btn ${e!=null&&e.isEnabled?"voxket-control-btn--active":""}`,onClick:t,title:e!=null&&e.isEnabled?"Turn off camera":"Turn on camera",children:[l.jsx("span",{className:"voxket-control-icon",children:e!=null&&e.isEnabled?"📹":"📷"}),l.jsx("span",{className:"voxket-control-label",children:e!=null&&e.isEnabled?"Camera On":"Camera Off"})]}),(e==null?void 0:e.dimensions)&&l.jsxs("div",{className:"voxket-video-info",children:[e.dimensions.width," × ",e.dimensions.height]})]}),o&&l.jsxs("div",{className:"voxket-video-controls-section",children:[l.jsx("h4",{className:"voxket-video-controls-title",children:"Screen Share"}),l.jsxs("button",{className:`voxket-control-btn ${e!=null&&e.isScreenShare?"voxket-control-btn--active":""}`,onClick:n,title:e!=null&&e.isScreenShare?"Stop screen sharing":"Start screen sharing",children:[l.jsx("span",{className:"voxket-control-icon",children:e!=null&&e.isScreenShare?"🛑":"🖥️"}),l.jsx("span",{className:"voxket-control-label",children:e!=null&&e.isScreenShare?"Stop Sharing":"Share Screen"})]})]}),r&&l.jsxs("div",{className:"voxket-video-controls-section",children:[l.jsx("h4",{className:"voxket-video-controls-title",children:"Layout"}),l.jsx("div",{className:"voxket-layout-buttons",children:[{type:"grid",icon:"⊞",label:"Grid"},{type:"speaker",icon:"🎤",label:"Speaker"},{type:"sidebar",icon:"⫸",label:"Sidebar"},{type:"gallery",icon:"⊡",label:"Gallery"}].map(({type:u,icon:f,label:h})=>l.jsxs("button",{className:"voxket-layout-control-btn",onClick:()=>d(u),title:`Switch to ${h} layout`,children:[l.jsx("span",{className:"voxket-control-icon",children:f}),l.jsx("span",{className:"voxket-control-label",children:h})]},u))})]}),l.jsxs("div",{className:"voxket-video-controls-section",children:[l.jsx("h4",{className:"voxket-video-controls-title",children:"Video Settings"}),l.jsxs("div",{className:"voxket-video-settings",children:[l.jsxs("div",{className:"voxket-setting-group",children:[l.jsx("label",{className:"voxket-setting-label",children:"Quality"}),l.jsxs("select",{className:"voxket-setting-select",children:[l.jsx("option",{value:"high",children:"High (720p)"}),l.jsx("option",{value:"medium",children:"Medium (480p)"}),l.jsx("option",{value:"low",children:"Low (240p)"})]})]}),l.jsxs("div",{className:"voxket-setting-group",children:[l.jsx("label",{className:"voxket-setting-label",children:"Frame Rate"}),l.jsxs("select",{className:"voxket-setting-select",children:[l.jsx("option",{value:"30",children:"30 fps"}),l.jsx("option",{value:"15",children:"15 fps"}),l.jsx("option",{value:"10",children:"10 fps"})]})]}),l.jsxs("div",{className:"voxket-setting-group",children:[l.jsx("label",{className:"voxket-setting-label",children:"Bandwidth"}),l.jsxs("select",{className:"voxket-setting-select",children:[l.jsx("option",{value:"unlimited",children:"Unlimited"}),l.jsx("option",{value:"1000",children:"1 Mbps"}),l.jsx("option",{value:"500",children:"500 Kbps"}),l.jsx("option",{value:"250",children:"250 Kbps"})]})]})]})]}),l.jsxs("div",{className:"voxket-video-controls-section",children:[l.jsx("h4",{className:"voxket-video-controls-title",children:"Statistics"}),l.jsxs("div",{className:"voxket-video-stats",children:[l.jsxs("div",{className:"voxket-stat-item",children:[l.jsx("span",{className:"voxket-stat-label",children:"Resolution:"}),l.jsx("span",{className:"voxket-stat-value",children:e!=null&&e.dimensions?`${e.dimensions.width}×${e.dimensions.height}`:"N/A"})]}),l.jsxs("div",{className:"voxket-stat-item",children:[l.jsx("span",{className:"voxket-stat-label",children:"Source:"}),l.jsx("span",{className:"voxket-stat-value",children:(e==null?void 0:e.source)||"None"})]}),l.jsxs("div",{className:"voxket-stat-item",children:[l.jsx("span",{className:"voxket-stat-label",children:"Status:"}),l.jsx("span",{className:`voxket-stat-value ${e!=null&&e.isEnabled?"voxket-stat-value--active":"voxket-stat-value--inactive"}`,children:e!=null&&e.isEnabled?"Active":"Inactive"})]})]})]})]})}const Gd=({handler:e,loadData:t,data:n,client:s,addLocalMessage:r})=>{const[i,o]=g.useState(null),[a,c]=g.useState(!0),[d,u]=g.useState(!1),[f]=g.useState(Date.now());g.useEffect(()=>{(async()=>{try{if(c(!0),console.log("📋 AssignmentView: Loading assignment data..."),console.log("📋 AssignmentView: Received data from RPC:",n),n&&typeof n=="object"){const b={title:n.title||"Untitled Assignment",description:n.description||"No description provided",estimated_time_of_completion:n.estimated_time_of_completion||"Unknown"};o(b),console.log("📋 AssignmentView: Assignment loaded from RPC data:",b)}}catch(b){console.error("📋 AssignmentView: Error loading assignment:",b),o({title:"Assignment Loading Error",description:"There was an error loading the assignment details. Please try again.",estimated_time_of_completion:"Unknown"})}finally{c(!1)}})()},[n,t]);const h=({message:m,assignment:b})=>{const S=m.toLowerCase().includes("declined"),C=S?"bg-red-50 border-red-200":"bg-green-50 border-green-200",T=S?"text-red-700":"text-green-700",k=S?"❌":"🎉";return l.jsxs("div",{className:`max-w-sm mx-auto ${C} border rounded-lg shadow p-3 flex flex-col items-center`,children:[l.jsx("div",{className:"text-2xl mb-2",children:k}),l.jsx("div",{className:`${T} font-semibold text-sm mb-1`,children:m}),l.jsx("div",{className:"text-xs text-gray-600 text-center mb-1",children:b.title}),l.jsx("div",{className:"text-xs text-gray-500",children:"Thank you for your response!"})]})},p=async()=>{if(!(!i||!e)){u(!0);try{const m={message:"accepted"};console.log("📋 AssignmentView: Assignment accepted:",m),e.didSuccess(m,l.jsx(h,{message:"Assignment accepted!",assignment:i}))}catch(m){console.error("📋 AssignmentView: Error accepting assignment:",m),e.didFail({error:"Failed to accept assignment"})}finally{u(!1)}}},x=async()=>{if(!(!i||!e)){u(!0);try{const m={message:"declined"};console.log("📋 AssignmentView: Assignment declined:",m),e.didSuccess(m,l.jsx(h,{message:"Assignment declined",assignment:i}))}catch(m){console.error("📋 AssignmentView: Error declining assignment:",m),e.didFail({error:"Failed to decline assignment"})}finally{u(!1)}}};return a?l.jsx("div",{className:"max-w-sm mx-auto bg-white rounded-lg shadow-lg p-3",children:l.jsxs("div",{className:"flex items-center justify-center py-4",children:[l.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-blue-600"}),l.jsx("span",{className:"ml-2 text-xs text-gray-600",children:"Loading assignment..."})]})}):i?l.jsxs("div",{className:"max-w-sm mx-auto bg-white rounded-lg shadow-lg overflow-hidden",children:[l.jsx("div",{className:"bg-gradient-to-r from-blue-600 to-purple-600 text-white p-3",children:l.jsx("div",{className:"flex items-center justify-between",children:l.jsx("h3",{className:"text-xs font-semibold text-white truncate",children:i.title})})}),l.jsxs("div",{className:"p-3 text-black",children:[l.jsx("div",{className:"bg-gray-50 rounded p-2 mb-3",children:l.jsx("p",{className:"text-xs text-black leading-snug",children:i.description})}),l.jsx("div",{className:"mb-3 text-black",children:l.jsxs("div",{className:"flex items-center text-xs text-gray-600",children:[l.jsx("span",{className:"text-xs mr-1",children:"📅"}),l.jsxs("span",{children:["Est: ",i.estimated_time_of_completion]})]})}),l.jsxs("div",{className:"flex gap-2",children:[l.jsx("button",{onClick:p,disabled:d,className:"flex-1 bg-green-600 text-white py-2 px-3 rounded text-xs font-medium hover:bg-green-700 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:d?l.jsxs("span",{className:"flex items-center justify-center",children:[l.jsx("div",{className:"animate-spin rounded-full h-2 w-2 border-b-2 border-white mr-1"}),l.jsx("span",{className:"text-xs",children:"Processing..."})]}):"Accept"}),l.jsx("button",{onClick:x,disabled:d,className:"flex-1 bg-red-600 text-white py-2 px-3 rounded text-xs font-medium hover:bg-red-700 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:"Decline"})]})]})]}):l.jsx("div",{className:"max-w-sm mx-auto bg-white rounded-lg shadow-lg p-3",children:l.jsxs("div",{className:"text-center py-4",children:[l.jsx("div",{className:"text-red-600 text-sm font-semibold mb-2",children:"⚠️ Assignment Error"}),l.jsx("p",{className:"text-xs text-gray-600 mb-3",children:"Failed to load assignment details."})]})})};function Z1(){const[e,t]=g.useState(null),[n,s]=g.useState([]);g.useEffect(()=>{const a=new Wn({appId:"your-app-id",appSecret:"your-app-secret",baseUrl:"https://your-voxket-api.com",agentId:"your-agent-id",participantName:"User",modalities:["chat"]});return t(a),a.on("rpc.method.called",c=>{console.log("RPC Method Called:",c)}),a.on("rpc.interaction.completed",c=>{console.log("RPC Interaction Completed:",c)}),()=>{a.disconnect()}},[]);const r=async()=>{if(e)try{await e.registerFrontendRPC("give_assignment",Gd,"embedded");const a=e.getRegisteredRpcMethods();s(a),console.log("✅ Assignment RPC registered successfully")}catch(a){console.error("❌ Failed to register assignment RPC:",a)}},i=async()=>{if(!e)return;const a=({handler:c,timeout:d})=>{const[u,f]=g.useState(""),h=[{id:"pro",name:"Pro Plan",price:"$29/month"},{id:"enterprise",name:"Enterprise Plan",price:"$99/month"},{id:"basic",name:"Basic Plan",price:"$9/month"}],p=m=>{f(m)},x=()=>{const m=h.find(b=>b.id===u);c==null||c.didSuccess({selectedProduct:u,productName:m==null?void 0:m.name,price:m==null?void 0:m.price,timestamp:new Date().toISOString()})};return l.jsxs("div",{className:"p-6 bg-white rounded-lg",children:[l.jsx("h3",{className:"text-xl font-bold mb-4",children:"Choose Your Plan"}),l.jsx("p",{className:"text-gray-600 mb-4",children:"Select the plan that best fits your needs:"}),l.jsx("div",{className:"space-y-3 mb-6",children:h.map(m=>l.jsx("div",{onClick:()=>p(m.id),className:`p-4 border rounded-lg cursor-pointer transition-all ${u===m.id?"border-blue-500 bg-blue-50":"border-gray-200 hover:border-gray-300"}`,children:l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsxs("div",{children:[l.jsx("h4",{className:"font-medium",children:m.name}),l.jsx("p",{className:"text-gray-600 text-sm",children:m.price})]}),l.jsx("div",{className:`w-4 h-4 rounded-full ${u===m.id?"bg-blue-500":"border-2 border-gray-300"}`})]})},m.id))}),l.jsxs("div",{className:"flex justify-end space-x-3",children:[l.jsx("button",{onClick:()=>c==null?void 0:c.dismissView(),className:"px-4 py-2 border border-gray-300 text-gray-700 rounded hover:bg-gray-50",children:"Cancel"}),l.jsx("button",{onClick:x,disabled:!u,className:"px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600 disabled:opacity-50",children:"Select Plan"})]}),d&&l.jsxs("p",{className:"text-xs text-gray-500 mt-2",children:["Time remaining: ",d," seconds"]})]})};try{await e.registerFrontendRPC("recommend_product",a,"modal");const c=e.getRegisteredRpcMethods();s(c),console.log("✅ Product Recommendation RPC registered successfully")}catch(c){console.error("❌ Failed to register product recommendation RPC:",c)}},o=async()=>{if(!e)return;const a=({handler:c})=>{const[d,u]=g.useState(0),[f,h]=g.useState(""),p=()=>{c==null||c.didSuccess({rating:d,comment:f,timestamp:new Date().toISOString()})};return l.jsxs("div",{className:"p-4 bg-white rounded-lg",children:[l.jsx("h3",{className:"text-lg font-semibold mb-3",children:"How was your experience?"}),l.jsxs("div",{className:"mb-4",children:[l.jsx("p",{className:"text-sm text-gray-600 mb-2",children:"Rate your experience:"}),l.jsx("div",{className:"flex space-x-1",children:[1,2,3,4,5].map(x=>l.jsx("button",{onClick:()=>u(x),className:`text-2xl ${x<=d?"text-yellow-400":"text-gray-300"}`,children:"⭐"},x))})]}),l.jsxs("div",{className:"mb-4",children:[l.jsx("p",{className:"text-sm text-gray-600 mb-2",children:"Additional comments:"}),l.jsx("textarea",{value:f,onChange:x=>h(x.target.value),className:"w-full p-2 border border-gray-300 rounded text-sm",rows:3,placeholder:"Tell us more about your experience..."})]}),l.jsxs("div",{className:"flex justify-end space-x-2",children:[l.jsx("button",{onClick:()=>c==null?void 0:c.dismissView(),className:"px-3 py-1 text-sm border border-gray-300 text-gray-700 rounded hover:bg-gray-50",children:"Skip"}),l.jsx("button",{onClick:p,disabled:d===0,className:"px-3 py-1 text-sm bg-blue-500 text-white rounded hover:bg-blue-600 disabled:opacity-50",children:"Submit"})]})]})};try{await e.registerFrontendRPC("collect_feedback",a,"embedded");const c=e.getRegisteredRpcMethods();s(c),console.log("✅ Feedback RPC registered successfully")}catch(c){console.error("❌ Failed to register feedback RPC:",c)}};return l.jsxs("div",{className:"p-6",children:[l.jsx("h2",{className:"text-2xl font-bold mb-6",children:"Frontend RPC Examples"}),l.jsxs("div",{className:"space-y-4 mb-6",children:[l.jsxs("div",{children:[l.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Register RPC Methods"}),l.jsxs("div",{className:"space-x-2",children:[l.jsx("button",{onClick:r,className:"px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600",children:"Register Assignment RPC"}),l.jsx("button",{onClick:i,className:"px-4 py-2 bg-green-500 text-white rounded hover:bg-green-600",children:"Register Product Recommendation RPC"}),l.jsx("button",{onClick:o,className:"px-4 py-2 bg-purple-500 text-white rounded hover:bg-purple-600",children:"Register Feedback RPC"})]})]}),l.jsxs("div",{children:[l.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Registered Methods"}),n.length>0?l.jsx("ul",{className:"list-disc list-inside space-y-1",children:n.map(a=>l.jsx("li",{className:"text-gray-700",children:l.jsx("code",{className:"bg-gray-100 px-2 py-1 rounded",children:a})},a))}):l.jsx("p",{className:"text-gray-500",children:"No methods registered yet"})]})]}),l.jsxs("div",{className:"bg-gray-50 p-4 rounded-lg",children:[l.jsx("h3",{className:"text-lg font-semibold mb-2",children:"How it works"}),l.jsxs("ol",{className:"list-decimal list-inside space-y-2 text-sm text-gray-700",children:[l.jsxs("li",{children:["Register RPC methods with React components using ",l.jsx("code",{children:"client.registerFrontendRPC()"})]}),l.jsx("li",{children:"When the agent calls an RPC method, the corresponding component will be displayed"}),l.jsx("li",{children:"Users interact with the component, and the response is sent back to the agent"}),l.jsx("li",{children:"Components can be displayed in different modes: embedded, modal, or fullscreen"}),l.jsx("li",{children:"Each component has a timeout and can handle success/failure scenarios"})]})]}),l.jsxs("div",{className:"mt-6 bg-blue-50 p-4 rounded-lg",children:[l.jsx("h3",{className:"text-lg font-semibold mb-2 text-blue-800",children:"Agent Side"}),l.jsx("p",{className:"text-sm text-blue-700 mb-2",children:"On the agent side, you can call these RPC methods like this:"}),l.jsx("pre",{className:"bg-white p-3 rounded text-xs text-gray-800 overflow-x-auto",children:`// Agent calls RPC method
131
136
  const response = await participant.performRpc({
132
137
  method: 'give_assignment',
133
138
  data: JSON.stringify({
@@ -138,4 +143,4 @@ const response = await participant.performRpc({
138
143
  })
139
144
  });
140
145
 
141
- console.log('User response:', response);`})]})]})}const Hx={async checkAvailableRpcs(e){const t=e.getRegisteredRpcMethods();return console.log("🔍 Agent: Available RPC methods:",t),t},async triggerAssignment(e,t){const n={title:"Complete Q4 Sales Analysis Report",description:"Please analyze the Q4 sales data and create a comprehensive report with insights, trends, and recommendations for the upcoming quarter. Include visualizations and executive summary.",estimated_time_of_completion:"2-3 hours"};try{console.log("🤖 Agent: Triggering give_assignment RPC with data:",n);const s=await e.localParticipant.performRpc(t,"give_assignment",JSON.stringify(n),{responseTimeout:12e4}),r=JSON.parse(s);return console.log("✅ Agent: Received user response:",r),await this.processAssignmentResponse(r),r}catch(s){throw console.error("❌ Agent: RPC failed:",s),s}},async processAssignmentResponse(e){console.log("🧠 Agent: Processing assignment response...");const t=e.status,n=e.assignmentId,s=e.timeSpent;return t==="accepted"?(console.log("🎉 Agent: User accepted the assignment!"),console.log(`� Assignment ID: ${n}`),console.log(`⏱️ Time to respond: ${s}ms`),console.log("💬 Agent: Sending follow-up:","Great! I've recorded that you've accepted the assignment. You'll receive the detailed requirements and access to the data shortly. Let me know if you need any clarification!")):t==="declined"?(console.log("❌ Agent: User declined the assignment"),console.log("💬 Agent: Sending follow-up:","No problem! Is there anything specific about this assignment that doesn't work for you? I can suggest alternatives or modify the requirements.")):t==="completed"&&(console.log("✅ Agent: User completed the assignment"),console.log("💬 Agent: Sending follow-up:","Excellent work! Could you please share the completed report? I'm excited to review your analysis and insights.")),{status:t,assignmentId:n,timeSpent:s,processed:!0,followupAction:t==="accepted"?"send_requirements":t==="declined"?"offer_alternatives":"request_deliverables"}},getAssignmentExamples(){return{marketing:{title:"Create Social Media Campaign",description:"Design and plan a social media campaign for our new product launch. Include content calendar, post designs, and engagement strategy.",estimated_time_of_completion:"4-5 hours"},technical:{title:"API Integration Documentation",description:"Create comprehensive documentation for our new API endpoints, including examples, error codes, and best practices for developers.",estimated_time_of_completion:"6-8 hours"},research:{title:"Market Research Analysis",description:"Research and analyze competitor pricing strategies in our target market. Provide recommendations for our pricing model.",estimated_time_of_completion:"3-4 hours"},quick:{title:"Customer Feedback Summary",description:"Review this week's customer feedback and create a summary of key themes and actionable insights.",estimated_time_of_completion:"30-45 minutes"}}}},Ux=e=>typeof window>"u"?null:p.createElement(Rd,{children:p.createElement(ms,e)});exports.AssignmentView=Gd;exports.CompoundProvider=_d;exports.InteractiveComponent=fn;exports.PluginManager=Nd;exports.RpcExamples=Bx;exports.SessionContainer=Ud;exports.SessionContent=Yo;exports.SessionControls=Hd;exports.SessionFooter=qo;exports.SessionHeader=Ko;exports.SessionLogViewer=hx;exports.SessionMetricsComponent=mx;exports.Slot=ps;exports.ThemeProvider=wx;exports.VideoControls=_x;exports.VideoGrid=Ox;exports.VideoTile=gs;exports.VoxketClient=Gn;exports.VoxketErrorBoundary=Rd;exports.VoxketEventEmitter=Wo;exports.VoxketProvider=hs;exports.VoxketSDK=Gn;exports.VoxketSessionComponent=Ud;exports.agentRpcExample=Hx;exports.analyticsPlugin=rx;exports.chatModalityPlugin=jx;exports.createCustomTheme=Sx;exports.createModalityPlugin=Zo;exports.createPlugin=sx;exports.darkTheme=Kr;exports.debugPlugin=ox;exports.default=Ux;exports.defaultTheme=Bt;exports.enterpriseTheme=Yr;exports.flattenTheme=Zd;exports.metricsPlugin=ix;exports.useComponentTheme=Cx;exports.useCompoundContext=Kn;exports.useSessionLogging=Vd;exports.useTheme=Wd;exports.useVoxket=lt;exports.useVoxketCamera=$d;exports.useVoxketChat=Bs;exports.useVoxketChatInput=gx;exports.useVoxketConnection=Go;exports.useVoxketMetrics=Id;exports.useVoxketMicrophone=Dd;exports.useVoxketParticipants=Od;exports.useVoxketScreenShare=Fd;exports.useVoxketSession=Ut;exports.useVoxketVideo=px;exports.voiceModalityPlugin=kx;exports.withCompoundComponent=Bd;
146
+ console.log('User response:', response);`})]})]})}const G1={async checkAvailableRpcs(e){const t=e.getRegisteredRpcMethods();return console.log("🔍 Agent: Available RPC methods:",t),t},async triggerAssignment(e,t){const n={title:"Complete Q4 Sales Analysis Report",description:"Please analyze the Q4 sales data and create a comprehensive report with insights, trends, and recommendations for the upcoming quarter. Include visualizations and executive summary.",estimated_time_of_completion:"2-3 hours"};try{console.log("🤖 Agent: Triggering give_assignment RPC with data:",n);const s=await e.localParticipant.performRpc(t,"give_assignment",JSON.stringify(n),{responseTimeout:12e4}),r=JSON.parse(s);return console.log("✅ Agent: Received user response:",r),await this.processAssignmentResponse(r),r}catch(s){throw console.error("❌ Agent: RPC failed:",s),s}},async processAssignmentResponse(e){console.log("🧠 Agent: Processing assignment response...");const t=e.status,n=e.assignmentId,s=e.timeSpent;return t==="accepted"?(console.log("🎉 Agent: User accepted the assignment!"),console.log(`� Assignment ID: ${n}`),console.log(`⏱️ Time to respond: ${s}ms`),console.log("💬 Agent: Sending follow-up:","Great! I've recorded that you've accepted the assignment. You'll receive the detailed requirements and access to the data shortly. Let me know if you need any clarification!")):t==="declined"?(console.log("❌ Agent: User declined the assignment"),console.log("💬 Agent: Sending follow-up:","No problem! Is there anything specific about this assignment that doesn't work for you? I can suggest alternatives or modify the requirements.")):t==="completed"&&(console.log("✅ Agent: User completed the assignment"),console.log("💬 Agent: Sending follow-up:","Excellent work! Could you please share the completed report? I'm excited to review your analysis and insights.")),{status:t,assignmentId:n,timeSpent:s,processed:!0,followupAction:t==="accepted"?"send_requirements":t==="declined"?"offer_alternatives":"request_deliverables"}},getAssignmentExamples(){return{marketing:{title:"Create Social Media Campaign",description:"Design and plan a social media campaign for our new product launch. Include content calendar, post designs, and engagement strategy.",estimated_time_of_completion:"4-5 hours"},technical:{title:"API Integration Documentation",description:"Create comprehensive documentation for our new API endpoints, including examples, error codes, and best practices for developers.",estimated_time_of_completion:"6-8 hours"},research:{title:"Market Research Analysis",description:"Research and analyze competitor pricing strategies in our target market. Provide recommendations for our pricing model.",estimated_time_of_completion:"3-4 hours"},quick:{title:"Customer Feedback Summary",description:"Review this week's customer feedback and create a summary of key themes and actionable insights.",estimated_time_of_completion:"30-45 minutes"}}}},K1=e=>typeof window>"u"?null:g.createElement(Wo,{children:g.createElement(ms,e)});exports.AssignmentView=Gd;exports.CompoundProvider=_d;exports.InteractiveComponent=un;exports.PluginManager=Pd;exports.RpcExamples=Z1;exports.SessionContainer=Ud;exports.SessionContent=qo;exports.SessionControls=Hd;exports.SessionFooter=Xo;exports.SessionHeader=Yo;exports.SessionLogViewer=x1;exports.SessionMetricsComponent=b1;exports.Slot=gs;exports.ThemeProvider=E1;exports.VideoControls=W1;exports.VideoGrid=U1;exports.VideoTile=ps;exports.VoxketClient=Wn;exports.VoxketErrorBoundary=Wo;exports.VoxketEventEmitter=Zo;exports.VoxketProvider=hs;exports.VoxketSDK=Wn;exports.VoxketSessionComponent=Ud;exports.agentRpcExample=G1;exports.analyticsPlugin=i1;exports.chatModalityPlugin=R1;exports.createCustomTheme=A1;exports.createModalityPlugin=Go;exports.createPlugin=o1;exports.darkTheme=Kr;exports.debugPlugin=a1;exports.default=K1;exports.defaultTheme=Ut;exports.enterpriseTheme=Yr;exports.flattenTheme=Zd;exports.metricsPlugin=l1;exports.useComponentTheme=j1;exports.useCompoundContext=Zn;exports.useSessionLogging=Vd;exports.useTheme=Wd;exports.useVoxket=ft;exports.useVoxketCamera=$d;exports.useVoxketChat=Bs;exports.useVoxketChatInput=w1;exports.useVoxketConnection=Ko;exports.useVoxketMetrics=Id;exports.useVoxketMicrophone=Dd;exports.useVoxketParticipants=Od;exports.useVoxketScreenShare=Fd;exports.useVoxketSession=Wt;exports.useVoxketVideo=v1;exports.voiceModalityPlugin=N1;exports.withCompoundComponent=Bd;