fluxy-bot 0.15.13 → 0.15.14
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-fluxy/assets/{fluxy-DwS9I76o.js → fluxy-0tWF4Wwc.js} +23 -23
- package/dist-fluxy/assets/globals-CCAaaNDA.css +2 -0
- package/dist-fluxy/assets/{globals-DCVXWA_E.js → globals-CdjENGUF.js} +1 -1
- package/dist-fluxy/assets/onboard-C43CX3tE.js +1 -0
- package/dist-fluxy/fluxy.html +3 -3
- package/dist-fluxy/onboard.html +3 -3
- package/package.json +1 -1
- package/supervisor/channels/manager.ts +64 -26
- package/supervisor/chat/src/components/Chat/MessageBubble.tsx +45 -2
- package/workspace/skills/whatsapp-support/SCRIPT.md +72 -1
- package/dist-fluxy/assets/globals-2ZsZBw2U.css +0 -2
- package/dist-fluxy/assets/onboard-qc5PlGsB.js +0 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */
|
|
2
|
+
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction: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-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}}}@layer theme{: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-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-orange-400:oklch(75% .183 55.934);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-600:oklch(66.6% .179 58.318);--color-green-500:oklch(72.3% .219 149.579);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--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-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-900:oklch(21% .034 264.665);--color-black:#000;--color-white:#fff;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--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);--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-wider:.05em;--tracking-widest:.1em;--leading-relaxed:1.625;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--animate-spin:spin 1s linear infinite;--animate-ping:ping 1s cubic-bezier(0, 0, .2, 1) infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--animate-bounce:bounce 1s infinite;--blur-sm:8px;--blur-md:12px;--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);--color-background:#212121;--color-foreground:#f5f5f5}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.inset-0{inset:calc(var(--spacing) * 0)}.inset-y-0{inset-block:calc(var(--spacing) * 0)}.start{inset-inline-start:var(--spacing)}.-top-1\.5{top:calc(var(--spacing) * -1.5)}.top-1{top:calc(var(--spacing) * 1)}.top-1\/2{top:50%}.top-2{top:calc(var(--spacing) * 2)}.top-4{top:calc(var(--spacing) * 4)}.top-full{top:100%}.-right-1\.5{right:calc(var(--spacing) * -1.5)}.right-0{right:calc(var(--spacing) * 0)}.right-2{right:calc(var(--spacing) * 2)}.right-3{right:calc(var(--spacing) * 3)}.right-4{right:calc(var(--spacing) * 4)}.left-0{left:calc(var(--spacing) * 0)}.left-1\/2{left:50%}.left-3{left:calc(var(--spacing) * 3)}.z-10{z-index:10}.z-50{z-index:50}.z-\[200\]{z-index:200}.z-\[300\]{z-index:300}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.mx-4{margin-inline:calc(var(--spacing) * 4)}.my-1\.5{margin-block:calc(var(--spacing) * 1.5)}.my-2{margin-block:calc(var(--spacing) * 2)}.-mt-3{margin-top:calc(var(--spacing) * -3)}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:calc(var(--spacing) * 1)}.mt-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-2\.5{margin-top:calc(var(--spacing) * 2.5)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-5{margin-top:calc(var(--spacing) * 5)}.mt-6{margin-top:calc(var(--spacing) * 6)}.mt-px{margin-top:1px}.mr-1\.5{margin-right:calc(var(--spacing) * 1.5)}.mb-1{margin-bottom:calc(var(--spacing) * 1)}.mb-1\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-5{margin-bottom:calc(var(--spacing) * 5)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.-ml-1{margin-left:calc(var(--spacing) * -1)}.ml-0\.5{margin-left:calc(var(--spacing) * .5)}.ml-1{margin-left:calc(var(--spacing) * 1)}.ml-3{margin-left:calc(var(--spacing) * 3)}.ml-auto{margin-left:auto}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.h-1{height:calc(var(--spacing) * 1)}.h-1\.5{height:calc(var(--spacing) * 1.5)}.h-2{height:calc(var(--spacing) * 2)}.h-2\.5{height:calc(var(--spacing) * 2.5)}.h-3{height:calc(var(--spacing) * 3)}.h-3\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-11{height:calc(var(--spacing) * 11)}.h-12{height:calc(var(--spacing) * 12)}.h-14{height:calc(var(--spacing) * 14)}.h-16{height:calc(var(--spacing) * 16)}.h-28{height:calc(var(--spacing) * 28)}.h-\[18px\]{height:18px}.h-\[22px\]{height:22px}.h-\[140px\]{height:140px}.h-\[180px\]{height:180px}.h-dvh{height:100dvh}.h-full{height:100%}.max-h-48{max-height:calc(var(--spacing) * 48)}.max-h-\[85vh\]{max-height:85vh}.min-h-0{min-height:calc(var(--spacing) * 0)}.w-1\.5{width:calc(var(--spacing) * 1.5)}.w-2{width:calc(var(--spacing) * 2)}.w-2\.5{width:calc(var(--spacing) * 2.5)}.w-3{width:calc(var(--spacing) * 3)}.w-3\.5{width:calc(var(--spacing) * 3.5)}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-6{width:calc(var(--spacing) * 6)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-10{width:calc(var(--spacing) * 10)}.w-11{width:calc(var(--spacing) * 11)}.w-12{width:calc(var(--spacing) * 12)}.w-14{width:calc(var(--spacing) * 14)}.w-16{width:calc(var(--spacing) * 16)}.w-28{width:calc(var(--spacing) * 28)}.w-\[18px\]{width:18px}.w-\[140px\]{width:140px}.w-auto{width:auto}.w-full{width:100%}.max-w-\[75\%\]{max-width:75%}.max-w-\[90vw\]{max-width:90vw}.max-w-\[92\%\]{max-width:92%}.max-w-\[320px\]{max-width:320px}.max-w-\[340px\]{max-width:340px}.max-w-\[360px\]{max-width:360px}.max-w-\[480px\]{max-width:480px}.max-w-none{max-width:none}.min-w-0{min-width:calc(var(--spacing) * 0)}.min-w-\[160px\]{min-width:160px}.min-w-\[180px\]{min-width:180px}.flex-1{flex:1}.flex-shrink-0,.shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.-translate-x-1\/2{--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-0{--tw-translate-x:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-1{--tw-translate-x:calc(var(--spacing) * 1);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-5{--tw-translate-x:calc(var(--spacing) * 5);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-\[18px\]{--tw-translate-x:18px;translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-bounce{animation:var(--animate-bounce)}.animate-ping{animation:var(--animate-ping)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.resize-none{resize:none}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-0\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:calc(var(--spacing) * 1)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-3\.5{gap:calc(var(--spacing) * 3.5)}.gap-4{gap:calc(var(--spacing) * 4)}:where(.space-y-1\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2.5) * calc(1 - var(--tw-space-y-reverse)))}: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)))}:where(.space-y-3\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3.5) * calc(1 - var(--tw-space-y-reverse)))}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.75rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-\[24px\]{border-radius:24px}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-\[1\.5px\]{border-style:var(--tw-border-style);border-width:1.5px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-\[\#25D366\]\/20{border-color:oklab(76.0953% -.174012 .10152/.2)}.border-\[\#AF27E3\]{border-color:#af27e3}.border-\[\#AF27E3\]\/10{border-color:oklab(57.9061% .181738 -.18985/.1)}.border-\[\#AF27E3\]\/20{border-color:oklab(57.9061% .181738 -.18985/.2)}.border-\[\#AF27E3\]\/30{border-color:oklab(57.9061% .181738 -.18985/.3)}.border-\[\#AF27E3\]\/40{border-color:oklab(57.9061% .181738 -.18985/.4)}.border-amber-500\/20{border-color:#f99c0033}@supports (color:color-mix(in lab, red, red)){.border-amber-500\/20{border-color:color-mix(in oklab, var(--color-amber-500) 20%, transparent)}}.border-blue-500\/20{border-color:#3080ff33}@supports (color:color-mix(in lab, red, red)){.border-blue-500\/20{border-color:color-mix(in oklab, var(--color-blue-500) 20%, transparent)}}.border-border{border-color:#3a3a3a}.border-emerald-500\/15{border-color:#00bb7f26}@supports (color:color-mix(in lab, red, red)){.border-emerald-500\/15{border-color:color-mix(in oklab, var(--color-emerald-500) 15%, transparent)}}.border-emerald-500\/20{border-color:#00bb7f33}@supports (color:color-mix(in lab, red, red)){.border-emerald-500\/20{border-color:color-mix(in oklab, var(--color-emerald-500) 20%, transparent)}}.border-muted-foreground\/20{border-color:oklab(68.2953% 2.98023e-8 5.96046e-8/.2)}.border-muted-foreground\/30{border-color:oklab(68.2953% 2.98023e-8 5.96046e-8/.3)}.border-red-500\/15{border-color:#fb2c3626}@supports (color:color-mix(in lab, red, red)){.border-red-500\/15{border-color:color-mix(in oklab, var(--color-red-500) 15%, transparent)}}.border-red-500\/20{border-color:#fb2c3633}@supports (color:color-mix(in lab, red, red)){.border-red-500\/20{border-color:color-mix(in oklab, var(--color-red-500) 20%, transparent)}}.border-white\/10{border-color:#ffffff1a}@supports (color:color-mix(in lab, red, red)){.border-white\/10{border-color:color-mix(in oklab, var(--color-white) 10%, transparent)}}.border-white\/20{border-color:#fff3}@supports (color:color-mix(in lab, red, red)){.border-white\/20{border-color:color-mix(in oklab, var(--color-white) 20%, transparent)}}.border-white\/\[0\.04\]{border-color:#ffffff0a}@supports (color:color-mix(in lab, red, red)){.border-white\/\[0\.04\]{border-color:color-mix(in oklab, var(--color-white) 4%, transparent)}}.border-white\/\[0\.06\]{border-color:#ffffff0f}@supports (color:color-mix(in lab, red, red)){.border-white\/\[0\.06\]{border-color:color-mix(in oklab, var(--color-white) 6%, transparent)}}.border-white\/\[0\.08\]{border-color:#ffffff14}@supports (color:color-mix(in lab, red, red)){.border-white\/\[0\.08\]{border-color:color-mix(in oklab, var(--color-white) 8%, transparent)}}.border-white\/\[0\.12\]{border-color:#ffffff1f}@supports (color:color-mix(in lab, red, red)){.border-white\/\[0\.12\]{border-color:color-mix(in oklab, var(--color-white) 12%, transparent)}}.border-t-\[\#04D1FE\]{border-top-color:#04d1fe}.border-t-muted-foreground\/60{border-top-color:oklab(68.2953% 2.98023e-8 5.96046e-8/.6)}.border-t-primary{border-top-color:#3c8fff}.border-t-white\/50{border-top-color:#ffffff80}@supports (color:color-mix(in lab, red, red)){.border-t-white\/50{border-top-color:color-mix(in oklab, var(--color-white) 50%, transparent)}}.bg-\[\#1c1c1e\]{background-color:#1c1c1e}.bg-\[\#007AFF\]\/15{background-color:oklab(60.2765% -.047404 -.212489/.15)}.bg-\[\#25D366\]{background-color:#25d366}.bg-\[\#25D366\]\/10{background-color:oklab(76.0953% -.174012 .10152/.1)}.bg-\[\#222\]{background-color:#222}.bg-\[\#181818\]{background-color:#181818}.bg-\[\#AF27E3\]{background-color:#af27e3}.bg-\[\#AF27E3\]\/10{background-color:oklab(57.9061% .181738 -.18985/.1)}.bg-\[\#AF27E3\]\/15{background-color:oklab(57.9061% .181738 -.18985/.15)}.bg-amber-500\/8{background-color:#f99c0014}@supports (color:color-mix(in lab, red, red)){.bg-amber-500\/8{background-color:color-mix(in oklab, var(--color-amber-500) 8%, transparent)}}.bg-amber-500\/15{background-color:#f99c0026}@supports (color:color-mix(in lab, red, red)){.bg-amber-500\/15{background-color:color-mix(in oklab, var(--color-amber-500) 15%, transparent)}}.bg-amber-600{background-color:var(--color-amber-600)}.bg-background{background-color:#212121}.bg-black\/60{background-color:#0009}@supports (color:color-mix(in lab, red, red)){.bg-black\/60{background-color:color-mix(in oklab, var(--color-black) 60%, transparent)}}.bg-black\/80{background-color:#000c}@supports (color:color-mix(in lab, red, red)){.bg-black\/80{background-color:color-mix(in oklab, var(--color-black) 80%, transparent)}}.bg-black\/85{background-color:#000000d9}@supports (color:color-mix(in lab, red, red)){.bg-black\/85{background-color:color-mix(in oklab, var(--color-black) 85%, transparent)}}.bg-black\/90{background-color:#000000e6}@supports (color:color-mix(in lab, red, red)){.bg-black\/90{background-color:color-mix(in oklab, var(--color-black) 90%, transparent)}}.bg-blue-500\/10{background-color:#3080ff1a}@supports (color:color-mix(in lab, red, red)){.bg-blue-500\/10{background-color:color-mix(in oklab, var(--color-blue-500) 10%, transparent)}}.bg-destructive{background-color:#fd486b}.bg-destructive\/10{background-color:oklab(67.0267% .20922 .0534847/.1)}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-emerald-500\/8{background-color:#00bb7f14}@supports (color:color-mix(in lab, red, red)){.bg-emerald-500\/8{background-color:color-mix(in oklab, var(--color-emerald-500) 8%, transparent)}}.bg-emerald-500\/10{background-color:#00bb7f1a}@supports (color:color-mix(in lab, red, red)){.bg-emerald-500\/10{background-color:color-mix(in oklab, var(--color-emerald-500) 10%, transparent)}}.bg-emerald-500\/15{background-color:#00bb7f26}@supports (color:color-mix(in lab, red, red)){.bg-emerald-500\/15{background-color:color-mix(in oklab, var(--color-emerald-500) 15%, transparent)}}.bg-emerald-500\/20{background-color:#00bb7f33}@supports (color:color-mix(in lab, red, red)){.bg-emerald-500\/20{background-color:color-mix(in oklab, var(--color-emerald-500) 20%, transparent)}}.bg-emerald-500\/\[0\.04\]{background-color:#00bb7f0a}@supports (color:color-mix(in lab, red, red)){.bg-emerald-500\/\[0\.04\]{background-color:color-mix(in oklab, var(--color-emerald-500) 4%, transparent)}}.bg-gray-200{background-color:var(--color-gray-200)}.bg-green-500{background-color:var(--color-green-500)}.bg-muted{background-color:#333}.bg-muted-foreground{background-color:#999}.bg-muted-foreground\/60{background-color:oklab(68.2953% 2.98023e-8 5.96046e-8/.6)}.bg-orange-400{background-color:var(--color-orange-400)}.bg-popover{background-color:#2a2a2a}.bg-primary{background-color:#3c8fff}.bg-red-500{background-color:var(--color-red-500)}.bg-red-500\/8{background-color:#fb2c3614}@supports (color:color-mix(in lab, red, red)){.bg-red-500\/8{background-color:color-mix(in oklab, var(--color-red-500) 8%, transparent)}}.bg-red-500\/10{background-color:#fb2c361a}@supports (color:color-mix(in lab, red, red)){.bg-red-500\/10{background-color:color-mix(in oklab, var(--color-red-500) 10%, transparent)}}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-white\/5{background-color:#ffffff0d}@supports (color:color-mix(in lab, red, red)){.bg-white\/5{background-color:color-mix(in oklab, var(--color-white) 5%, transparent)}}.bg-white\/10{background-color:#ffffff1a}@supports (color:color-mix(in lab, red, red)){.bg-white\/10{background-color:color-mix(in oklab, var(--color-white) 10%, transparent)}}.bg-white\/20{background-color:#fff3}@supports (color:color-mix(in lab, red, red)){.bg-white\/20{background-color:color-mix(in oklab, var(--color-white) 20%, transparent)}}.bg-white\/70{background-color:#ffffffb3}@supports (color:color-mix(in lab, red, red)){.bg-white\/70{background-color:color-mix(in oklab, var(--color-white) 70%, transparent)}}.bg-white\/\[0\.02\]{background-color:#ffffff05}@supports (color:color-mix(in lab, red, red)){.bg-white\/\[0\.02\]{background-color:color-mix(in oklab, var(--color-white) 2%, transparent)}}.bg-white\/\[0\.03\]{background-color:#ffffff08}@supports (color:color-mix(in lab, red, red)){.bg-white\/\[0\.03\]{background-color:color-mix(in oklab, var(--color-white) 3%, transparent)}}.bg-white\/\[0\.04\]{background-color:#ffffff0a}@supports (color:color-mix(in lab, red, red)){.bg-white\/\[0\.04\]{background-color:color-mix(in oklab, var(--color-white) 4%, transparent)}}.bg-white\/\[0\.05\]{background-color:#ffffff0d}@supports (color:color-mix(in lab, red, red)){.bg-white\/\[0\.05\]{background-color:color-mix(in oklab, var(--color-white) 5%, transparent)}}.bg-white\/\[0\.06\]{background-color:#ffffff0f}@supports (color:color-mix(in lab, red, red)){.bg-white\/\[0\.06\]{background-color:color-mix(in oklab, var(--color-white) 6%, transparent)}}.bg-white\/\[0\.08\]{background-color:#ffffff14}@supports (color:color-mix(in lab, red, red)){.bg-white\/\[0\.08\]{background-color:color-mix(in oklab, var(--color-white) 8%, transparent)}}.fill-current{fill:currentColor}.fill-white{fill:var(--color-white)}.object-contain{object-fit:contain}.object-cover{object-fit:cover}.p-1{padding:calc(var(--spacing) * 1)}.p-1\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.px-0\.5{padding-inline:calc(var(--spacing) * .5)}.px-1{padding-inline:calc(var(--spacing) * 1)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-3\.5{padding-inline:calc(var(--spacing) * 3.5)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.px-7{padding-inline:calc(var(--spacing) * 7)}.px-8{padding-inline:calc(var(--spacing) * 8)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-8{padding-block:calc(var(--spacing) * 8)}.pt-1{padding-top:calc(var(--spacing) * 1)}.pt-2\.5{padding-top:calc(var(--spacing) * 2.5)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-5{padding-top:calc(var(--spacing) * 5)}.pt-6{padding-top:calc(var(--spacing) * 6)}.pr-0\.5{padding-right:calc(var(--spacing) * .5)}.pr-10{padding-right:calc(var(--spacing) * 10)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pb-5{padding-bottom:calc(var(--spacing) * 5)}.pb-6{padding-bottom:calc(var(--spacing) * 6)}.pb-8{padding-bottom:calc(var(--spacing) * 8)}.pl-1{padding-left:calc(var(--spacing) * 1)}.pl-4{padding-left:calc(var(--spacing) * 4)}.text-center{text-align:center}.text-left{text-align:left}.font-mono{font-family:var(--font-mono)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[0\.8rem\]{font-size:.8rem}.text-\[8px\]{font-size:8px}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[12px\]{font-size:12px}.text-\[13px\]{font-size:13px}.text-\[14px\]{font-size:14px}.text-\[17px\]{font-size:17px}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-\[0\.3em\]{--tw-tracking:.3em;letter-spacing:.3em}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-\[\#3C8FFF\]{color:#3c8fff}.text-\[\#007AFF\]{color:#007aff}.text-\[\#25D366\]{color:#25d366}.text-\[\#AF27E3\]{color:#af27e3}.text-\[\#AF27E3\]\/60{color:oklab(57.9061% .181738 -.18985/.6)}.text-amber-400{color:var(--color-amber-400)}.text-amber-400\/50{color:#fcbb0080}@supports (color:color-mix(in lab, red, red)){.text-amber-400\/50{color:color-mix(in oklab, var(--color-amber-400) 50%, transparent)}}.text-amber-400\/60{color:#fcbb0099}@supports (color:color-mix(in lab, red, red)){.text-amber-400\/60{color:color-mix(in oklab, var(--color-amber-400) 60%, transparent)}}.text-amber-400\/70{color:#fcbb00b3}@supports (color:color-mix(in lab, red, red)){.text-amber-400\/70{color:color-mix(in oklab, var(--color-amber-400) 70%, transparent)}}.text-amber-400\/90{color:#fcbb00e6}@supports (color:color-mix(in lab, red, red)){.text-amber-400\/90{color:color-mix(in oklab, var(--color-amber-400) 90%, transparent)}}.text-blue-400{color:var(--color-blue-400)}.text-destructive{color:#fd486b}.text-destructive-foreground{color:#fff}.text-emerald-400{color:var(--color-emerald-400)}.text-emerald-400\/60{color:#00d29499}@supports (color:color-mix(in lab, red, red)){.text-emerald-400\/60{color:color-mix(in oklab, var(--color-emerald-400) 60%, transparent)}}.text-emerald-400\/70{color:#00d294b3}@supports (color:color-mix(in lab, red, red)){.text-emerald-400\/70{color:color-mix(in oklab, var(--color-emerald-400) 70%, transparent)}}.text-emerald-400\/90{color:#00d294e6}@supports (color:color-mix(in lab, red, red)){.text-emerald-400\/90{color:color-mix(in oklab, var(--color-emerald-400) 90%, transparent)}}.text-foreground{color:#f5f5f5}.text-gray-400{color:var(--color-gray-400)}.text-gray-900{color:var(--color-gray-900)}.text-muted-foreground{color:#999}.text-muted-foreground\/50{color:oklab(68.2953% 2.98023e-8 5.96046e-8/.5)}.text-primary-foreground{color:#fff}.text-primary-foreground\/60{color:oklab(100% 0 5.96046e-8/.6)}.text-red-400{color:var(--color-red-400)}.text-red-400\/70{color:#ff6568b3}@supports (color:color-mix(in lab, red, red)){.text-red-400\/70{color:color-mix(in oklab, var(--color-red-400) 70%, transparent)}}.text-red-400\/90{color:#ff6568e6}@supports (color:color-mix(in lab, red, red)){.text-red-400\/90{color:color-mix(in oklab, var(--color-red-400) 90%, transparent)}}.text-white{color:var(--color-white)}.text-white\/20{color:#fff3}@supports (color:color-mix(in lab, red, red)){.text-white\/20{color:color-mix(in oklab, var(--color-white) 20%, transparent)}}.text-white\/25{color:#ffffff40}@supports (color:color-mix(in lab, red, red)){.text-white\/25{color:color-mix(in oklab, var(--color-white) 25%, transparent)}}.text-white\/30{color:#ffffff4d}@supports (color:color-mix(in lab, red, red)){.text-white\/30{color:color-mix(in oklab, var(--color-white) 30%, transparent)}}.text-white\/35{color:#ffffff59}@supports (color:color-mix(in lab, red, red)){.text-white\/35{color:color-mix(in oklab, var(--color-white) 35%, transparent)}}.text-white\/40{color:#fff6}@supports (color:color-mix(in lab, red, red)){.text-white\/40{color:color-mix(in oklab, var(--color-white) 40%, transparent)}}.text-white\/50{color:#ffffff80}@supports (color:color-mix(in lab, red, red)){.text-white\/50{color:color-mix(in oklab, var(--color-white) 50%, transparent)}}.text-white\/60{color:#fff9}@supports (color:color-mix(in lab, red, red)){.text-white\/60{color:color-mix(in oklab, var(--color-white) 60%, transparent)}}.text-white\/70{color:#ffffffb3}@supports (color:color-mix(in lab, red, red)){.text-white\/70{color:color-mix(in oklab, var(--color-white) 70%, transparent)}}.text-white\/80{color:#fffc}@supports (color:color-mix(in lab, red, red)){.text-white\/80{color:color-mix(in oklab, var(--color-white) 80%, transparent)}}.uppercase{text-transform:uppercase}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.no-underline{text-decoration-line:none}.underline{text-decoration-line:underline}.decoration-\[\#3C8FFF\]\/30{text-decoration-color:oklab(65.65% -.0412982 -.180011/.3)}.underline-offset-2{text-underline-offset:2px}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-75{opacity:.75}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-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)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.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,)}.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,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[width\]{transition-property:width;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-100{--tw-duration:.1s;transition-duration:.1s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.will-change-transform{will-change:transform}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}@media (hover:hover){.group-hover\:opacity-100:is(:where(.group):hover *){opacity:1}}.placeholder\:text-gray-400::placeholder{color:var(--color-gray-400)}.placeholder\:text-white\/20::placeholder{color:#fff3}@supports (color:color-mix(in lab, red, red)){.placeholder\:text-white\/20::placeholder{color:color-mix(in oklab, var(--color-white) 20%, transparent)}}@media (hover:hover){.hover\:border-white\/10:hover{border-color:#ffffff1a}@supports (color:color-mix(in lab, red, red)){.hover\:border-white\/10:hover{border-color:color-mix(in oklab, var(--color-white) 10%, transparent)}}.hover\:border-white\/15:hover{border-color:#ffffff26}@supports (color:color-mix(in lab, red, red)){.hover\:border-white\/15:hover{border-color:color-mix(in oklab, var(--color-white) 15%, transparent)}}.hover\:bg-\[\#25D366\]\/15:hover{background-color:oklab(76.0953% -.174012 .10152/.15)}.hover\:bg-amber-500:hover{background-color:var(--color-amber-500)}.hover\:bg-gray-100:hover{background-color:var(--color-gray-100)}.hover\:bg-muted-foreground\/10:hover{background-color:oklab(68.2953% 2.98023e-8 5.96046e-8/.1)}.hover\:bg-red-500\/20:hover{background-color:#fb2c3633}@supports (color:color-mix(in lab, red, red)){.hover\:bg-red-500\/20:hover{background-color:color-mix(in oklab, var(--color-red-500) 20%, transparent)}}.hover\:bg-white\/20:hover{background-color:#fff3}@supports (color:color-mix(in lab, red, red)){.hover\:bg-white\/20:hover{background-color:color-mix(in oklab, var(--color-white) 20%, transparent)}}.hover\:bg-white\/30:hover{background-color:#ffffff4d}@supports (color:color-mix(in lab, red, red)){.hover\:bg-white\/30:hover{background-color:color-mix(in oklab, var(--color-white) 30%, transparent)}}.hover\:bg-white\/\[0\.1\]:hover{background-color:#ffffff1a}@supports (color:color-mix(in lab, red, red)){.hover\:bg-white\/\[0\.1\]:hover{background-color:color-mix(in oklab, var(--color-white) 10%, transparent)}}.hover\:bg-white\/\[0\.02\]:hover{background-color:#ffffff05}@supports (color:color-mix(in lab, red, red)){.hover\:bg-white\/\[0\.02\]:hover{background-color:color-mix(in oklab, var(--color-white) 2%, transparent)}}.hover\:bg-white\/\[0\.04\]:hover{background-color:#ffffff0a}@supports (color:color-mix(in lab, red, red)){.hover\:bg-white\/\[0\.04\]:hover{background-color:color-mix(in oklab, var(--color-white) 4%, transparent)}}.hover\:bg-white\/\[0\.06\]:hover{background-color:#ffffff0f}@supports (color:color-mix(in lab, red, red)){.hover\:bg-white\/\[0\.06\]:hover{background-color:color-mix(in oklab, var(--color-white) 6%, transparent)}}.hover\:bg-white\/\[0\.08\]:hover{background-color:#ffffff14}@supports (color:color-mix(in lab, red, red)){.hover\:bg-white\/\[0\.08\]:hover{background-color:color-mix(in oklab, var(--color-white) 8%, transparent)}}.hover\:bg-white\/\[0\.09\]:hover{background-color:#ffffff17}@supports (color:color-mix(in lab, red, red)){.hover\:bg-white\/\[0\.09\]:hover{background-color:color-mix(in oklab, var(--color-white) 9%, transparent)}}.hover\:text-\[\#c44df7\]:hover{color:#c44df7}.hover\:text-blue-300:hover{color:var(--color-blue-300)}.hover\:text-foreground:hover{color:#f5f5f5}.hover\:text-gray-600:hover{color:var(--color-gray-600)}.hover\:text-muted-foreground:hover{color:#999}.hover\:text-white:hover{color:var(--color-white)}.hover\:text-white\/40:hover{color:#fff6}@supports (color:color-mix(in lab, red, red)){.hover\:text-white\/40:hover{color:color-mix(in oklab, var(--color-white) 40%, transparent)}}.hover\:text-white\/50:hover{color:#ffffff80}@supports (color:color-mix(in lab, red, red)){.hover\:text-white\/50:hover{color:color-mix(in oklab, var(--color-white) 50%, transparent)}}.hover\:text-white\/60:hover{color:#fff9}@supports (color:color-mix(in lab, red, red)){.hover\:text-white\/60:hover{color:color-mix(in oklab, var(--color-white) 60%, transparent)}}.hover\:text-white\/70:hover{color:#ffffffb3}@supports (color:color-mix(in lab, red, red)){.hover\:text-white\/70:hover{color:color-mix(in oklab, var(--color-white) 70%, transparent)}}.hover\:text-white\/80:hover{color:#fffc}@supports (color:color-mix(in lab, red, red)){.hover\:text-white\/80:hover{color:color-mix(in oklab, var(--color-white) 80%, transparent)}}.hover\:decoration-\[\#3C8FFF\]:hover{text-decoration-color:#3c8fff}.hover\:opacity-80:hover{opacity:.8}.hover\:opacity-90:hover{opacity:.9}}.focus\:border-\[\#AF27E3\]\/30:focus{border-color:oklab(57.9061% .181738 -.18985/.3)}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-30:disabled{opacity:.3}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}.disabled\:opacity-60:disabled{opacity:.6}@media (width>=40rem){.sm\:items-center{align-items:center}}.\[\&\>\*\:first-child\]\:mt-0>:first-child{margin-top:calc(var(--spacing) * 0)}.\[\&\>\*\:last-child\]\:mb-0>:last-child{margin-bottom:calc(var(--spacing) * 0)}}html{touch-action:manipulation;-ms-touch-action:manipulation}body{background-color:var(--color-background);color:var(--color-foreground);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;overscroll-behavior:none}::selection{background-color:#af27e340}::-webkit-scrollbar{width:6px}::-webkit-scrollbar-track{background:0 0}::-webkit-scrollbar-thumb{background:#3a3a3a;border-radius:3px}::-webkit-scrollbar-thumb:hover{background:#4a4a4a}.text-gradient{color:#0000;-webkit-text-fill-color:transparent;background-image:linear-gradient(135deg,#04d1fe,#af27e3,#fb4072);-webkit-background-clip:text;background-clip:text}.bg-gradient-brand{background-image:linear-gradient(135deg,#04d1fe,#af27e3,#fb4072)}.glow-border{box-shadow:0 0 0 1px #af27e31a,0 0 20px -5px #af27e326}.animated-border{position:relative;overflow:hidden}.animated-border:before{content:"";background:conic-gradient(#04d1fe,#af27e3,#fb4072,#04d1fe);animation:3s linear infinite border-spin;position:absolute;inset:-150%}.animated-border>*{z-index:1;position:relative}.animated-border-slow:before{animation-duration:5s}.input-glow:focus{border-color:#af27e366;box-shadow:0 0 0 1px #af27e326,0 0 20px -5px #af27e340,0 0 4px -1px #04d1fe1a}@keyframes border-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{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-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}@keyframes spin{to{transform:rotate(360deg)}}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@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}}
|
|
@@ -15,4 +15,4 @@ Error generating stack: `+e.message+`
|
|
|
15
15
|
${g}px !important;
|
|
16
16
|
}
|
|
17
17
|
`),()=>{s.current?.removeAttribute(`data-motion-pop-id`),v.contains(_)&&v.removeChild(_)}},[t]),(0,W.jsx)($c,{isPresent:t,childRef:s,sizeRef:c,pop:a,children:a===!1?e:T.cloneElement(e,{ref:u})})}var tl=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o,anchorX:s,anchorY:c,root:l})=>{let u=Se(nl),d=(0,T.useId)(),f=!0,p=(0,T.useMemo)(()=>(f=!1,{id:d,initial:t,isPresent:n,custom:i,onExitComplete:e=>{u.set(e,!0);for(let e of u.values())if(!e)return;r&&r()},register:e=>(u.set(e,!1),()=>u.delete(e))}),[n,u,r]);return a&&f&&(p={...p}),(0,T.useMemo)(()=>{u.forEach((e,t)=>u.set(t,!1))},[n]),T.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),e=(0,W.jsx)(el,{pop:o===`popLayout`,isPresent:n,anchorX:s,anchorY:c,root:l,children:e}),(0,W.jsx)(we.Provider,{value:p,children:e})};function nl(){return new Map}function rl(e=!0){let t=(0,T.useContext)(we);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,a=(0,T.useId)();(0,T.useEffect)(()=>{if(e)return i(a)},[e]);let o=(0,T.useCallback)(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}var il=e=>e.key||``;function al(e){let t=[];return T.Children.forEach(e,e=>{(0,T.isValidElement)(e)&&t.push(e)}),t}var ol=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:a=`sync`,propagate:o=!1,anchorX:s=`left`,anchorY:c=`top`,root:l})=>{let[u,d]=rl(o),f=(0,T.useMemo)(()=>al(e),[e]),p=o&&!u?[]:f.map(il),m=(0,T.useRef)(!0),h=(0,T.useRef)(f),g=Se(()=>new Map),_=(0,T.useRef)(new Set),[v,y]=(0,T.useState)(f),[b,x]=(0,T.useState)(f);Ce(()=>{m.current=!1,h.current=f;for(let e=0;e<b.length;e++){let t=il(b[e]);p.includes(t)?(g.delete(t),_.current.delete(t)):g.get(t)!==!0&&g.set(t,!1)}},[b,p.length,p.join(`-`)]);let S=[];if(f!==v){let e=[...f];for(let t=0;t<b.length;t++){let n=b[t],r=il(n);p.includes(r)||(e.splice(t,0,n),S.push(n))}return a===`wait`&&S.length&&(e=S),x(al(e)),y(f),null}let{forceRender:C}=(0,T.useContext)(xe);return(0,W.jsx)(W.Fragment,{children:b.map(e=>{let v=il(e),y=o&&!u?!1:f===b||p.includes(v);return(0,W.jsx)(tl,{isPresent:y,initial:!m.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:a,root:l,onExitComplete:y?void 0:()=>{if(_.current.has(v))return;if(g.has(v))_.current.add(v),g.set(v,!0);else return;let e=!0;g.forEach(t=>{t||(e=!1)}),e&&(C?.(),x(h.current),o&&d?.(),r&&r())},anchorX:s,anchorY:c,children:e},v)})})},sl=(0,T.createContext)({strict:!1}),G={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`]},cl=!1;function ll(){if(cl)return;let e={};for(let t in G)e[t]={isEnabled:e=>G[t].some(t=>!!e[t])};po(e),cl=!0}function ul(){return ll(),mo()}function dl(e){let t=ul();for(let n in e)t[n]={...t[n],...e[n]};po(t)}var fl=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.propagate.ignoreStrict.viewport`.split(`.`));function pl(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||fl.has(e)}var ml=c({default:()=>hl}),hl,gl=o((()=>{throw hl={},Error(`Could not resolve "@emotion/is-prop-valid" imported by "framer-motion". Is it installed?`)})),_l=e=>!pl(e);function vl(e){typeof e==`function`&&(_l=t=>t.startsWith(`on`)?!pl(t):e(t))}try{vl((gl(),d(ml)).default)}catch{}function yl(e,t,n){let r={};for(let i in e)i===`values`&&typeof e.values==`object`||z(e[i])||(_l(i)||n===!0&&pl(i)||!t&&!pl(i)||e.draggable&&i.startsWith(`onDrag`))&&(r[i]=e[i]);return r}var bl=(0,T.createContext)({});function xl(e,t){if(ao(e)){let{initial:t,animate:n}=e;return{initial:t===!1||no(t)?t:void 0,animate:no(n)?n:void 0}}return e.inherit===!1?{}:t}function Sl(e){let{initial:t,animate:n}=xl(e,(0,T.useContext)(bl));return(0,T.useMemo)(()=>({initial:t,animate:n}),[Cl(t),Cl(n)])}function Cl(e){return Array.isArray(e)?e.join(` `):e}var wl=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Tl(e,t,n){for(let r in t)!z(t[r])&&!Jo(r,n)&&(e[r]=t[r])}function El({transformTemplate:e},t){return(0,T.useMemo)(()=>{let n=wl();return Ho(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Dl(e,t){let n=e.style||{},r={};return Tl(r,n,e),Object.assign(r,El(e,t)),r}function Ol(e,t){let n={},r=Dl(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=`none`,r.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=r,n}var kl=()=>({...wl(),attrs:{}});function Al(e,t,n,r){let i=(0,T.useMemo)(()=>{let n=kl();return ns(n,t,is(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};Tl(t,e.style,e),i.style={...t,...i.style}}return i}var jl=[`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 Ml(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(jl.indexOf(e)>-1||/[A-Z]/u.test(e))}function Nl(e,t,n,{latestValues:r},i,a=!1,o){let s=(o??Ml(e)?Al:Ol)(t,r,i,e),c=yl(t,typeof e==`string`,a),l=e===T.Fragment?{}:{...c,...s,ref:n},{children:u}=t,d=(0,T.useMemo)(()=>z(u)?u.get():u,[u]);return(0,T.createElement)(e,{...l,children:d})}function Pl({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:Fl(n,r,i,e),renderState:t()}}function Fl(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=dc(a[e]);let{initial:o,animate:s}=e,c=ao(e),l=oo(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u||=o===!1;let d=u?s:o;if(d&&typeof d!=`boolean`&&!to(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=Si(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=u?t.length-1:0;t=t[e]}t!==null&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}var Il=e=>(t,n)=>{let r=(0,T.useContext)(bl),i=(0,T.useContext)(we),a=()=>Pl(e,t,r,i);return n?a():Se(a)},Ll=Il({scrapeMotionValuesFromProps:Yo,createRenderState:wl}),Rl=Il({scrapeMotionValuesFromProps:os,createRenderState:kl}),K=Symbol.for(`motionComponentSymbol`);function q(e,t,n){let r=(0,T.useRef)(n);(0,T.useInsertionEffect)(()=>{r.current=n});let i=(0,T.useRef)(null);return(0,T.useCallback)(n=>{n&&e.onMount?.(n);let a=r.current;if(typeof a==`function`)if(n){let e=a(n);typeof e==`function`&&(i.current=e)}else i.current?(i.current(),i.current=null):a(n);else a&&(a.current=n);t&&(n?t.mount(n):t.unmount())},[t])}var J=(0,T.createContext)({});function Y(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function X(e,t,n,r,i,a){let{visualElement:o}=(0,T.useContext)(bl),s=(0,T.useContext)(sl),c=(0,T.useContext)(we),l=(0,T.useContext)(Yc),u=l.reducedMotion,d=l.skipAnimations,f=(0,T.useRef)(null),p=(0,T.useRef)(!1);r||=s.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u,skipAnimations:d,isSVG:a}),p.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));let m=f.current,h=(0,T.useContext)(J);m&&!m.projection&&i&&(m.type===`html`||m.type===`svg`)&&zl(f.current,n,i,h);let g=(0,T.useRef)(!1);(0,T.useInsertionEffect)(()=>{m&&g.current&&m.update(n,c)});let _=n[Ii],v=(0,T.useRef)(!!_&&typeof window<`u`&&!window.MotionHandoffIsComplete?.(_)&&window.MotionHasOptimisedAnimation?.(_));return Ce(()=>{p.current=!0,m&&(g.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),v.current&&m.animationState&&m.animationState.animateChanges())}),(0,T.useEffect)(()=>{m&&(!v.current&&m.animationState&&m.animationState.animateChanges(),v.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(_)}),!1),m.enteringChildren=void 0)}),m}function zl(e,t,n,r){let{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutAnchor:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t[`data-framer-portal-id`]?void 0:Bl(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&Y(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:l,layoutAnchor:u})}function Bl(e){if(e)return e.options.allowProjection===!1?Bl(e.parent):e.projection}function Vl(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&dl(r);let a=n?n===`svg`:Ml(e),o=a?Rl:Ll;function s(n,s){let c,l={...(0,T.useContext)(Yc),...n,layoutId:Hl(n)},{isStatic:u}=l,d=Sl(n),f=o(n,u);if(!u&&typeof window<`u`){Ul(l,r);let t=Wl(l);c=t.MeasureLayout,d.visualElement=X(e,f,l,i,t.ProjectionNode,a)}return(0,W.jsxs)(bl.Provider,{value:d,children:[c&&d.visualElement?(0,W.jsx)(c,{visualElement:d.visualElement,...l}):null,Nl(e,n,q(f,d.visualElement,s),f,u,t,a)]})}s.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let c=(0,T.forwardRef)(s);return c[K]=e,c}function Hl({layoutId:e}){let t=(0,T.useContext)(xe).id;return t&&e!==void 0?t+`-`+e:e}function Ul(e,t){(0,T.useContext)(sl).strict}function Wl(e){let{drag:t,layout:n}=ul();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function Gl(e,t){if(typeof Proxy>`u`)return Vl;let n=new Map,r=(n,r)=>Vl(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,Vl(a,void 0,e,t)),n.get(a))})}var Kl=(e,t)=>t.isSVG??Ml(e)?new ss(t):new Zo(t,{allowProjection:e!==T.Fragment}),ql=class extends _o{constructor(e){super(e),e.animationState||=ms(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();to(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},Jl=0,Yl={animation:{Feature:ql},exit:{Feature:class extends _o{constructor(){super(...arguments),this.id=Jl++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;if(e&&n===!1){if(this.isExitComplete){let{initial:e,custom:t}=this.node.getProps();if(typeof e==`string`){let n=Ci(this.node,e,t);if(n){let{transition:e,transitionEnd:t,...r}=n;for(let e in r)this.node.getValue(e)?.jump(r[e])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive(`exit`,!1);this.isExitComplete=!1;return}let r=this.node.animationState.setActive(`exit`,!e);t&&!e&&r.then(()=>{this.isExitComplete=!0,t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function Xl(e){return{point:{x:e.pageX,y:e.pageY}}}var Zl=e=>t=>ba(t)&&e(t,Xl(t));function Ql(e,t,n,r){return sc(e,t,Zl(n),r)}var $l=({current:e})=>e?e.ownerDocument.defaultView:null,eu=(e,t)=>Math.abs(e-t);function tu(e,t){let n=eu(e.x,t.x),r=eu(e.y,t.y);return Math.sqrt(n**2+r**2)}var nu=new Set([`auto`,`scroll`]),ru=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=iu(this.lastRawMoveEventInfo,this.transformPagePoint));let e=ou(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=tu(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=F;this.history.push({...r,timestamp:i});let{onStart:a,onMove:o}=this.handlers;t||(a&&a(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=iu(t,this.transformPagePoint),N.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=ou(e.type===`pointercancel`?this.lastMoveEventInfo:iu(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!ba(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;let s=iu(Xl(e),this.transformPagePoint),{point:c}=s,{timestamp:l}=F;this.history=[{...c,timestamp:l}];let{onSessionStart:u}=t;u&&u(e,ou(s,this.history)),this.removeListeners=Ne(Ql(this.contextWindow,`pointermove`,this.handlePointerMove),Ql(this.contextWindow,`pointerup`,this.handlePointerUp),Ql(this.contextWindow,`pointercancel`,this.handlePointerUp)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(nu.has(e.overflowX)||nu.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.addEventListener(`scroll`,this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.removeEventListener(`scroll`,this.onWindowScroll)}}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},i={x:r.x-t.x,y:r.y-t.y};i.x===0&&i.y===0||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,r),N.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),P(this.updatePoint)}};function iu(e,t){return t?{point:t(e.point)}:e}function au(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ou({point:e},t){return{point:e,delta:au(e,cu(t)),offset:au(e,su(t)),velocity:lu(t,.1)}}function su(e){return e[0]}function cu(e){return e[e.length-1]}function lu(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=cu(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Ie(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>Ie(t)*2&&(r=e[1]);let a=Le(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function uu(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?R(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?R(n,e,r.max):Math.min(e,n)),e}function du(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function fu(e,{top:t,left:n,bottom:r,right:i}){return{x:du(e.x,n,i),y:du(e.y,t,r)}}function pu(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function mu(e,t){return{x:pu(e.x,t.x),y:pu(e.y,t.y)}}function hu(e,t){let n=.5,r=Ds(e),i=Ds(t);return i>r?n=Pe(t.min,t.max-r,e.min):r>i&&(n=Pe(e.min,e.max-i,t.min)),j(0,1,n)}function gu(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}var _u=.35;function vu(e=_u){return e===!1?e=0:e===!0&&(e=_u),{x:yu(e,`left`,`right`),y:yu(e,`top`,`bottom`)}}function yu(e,t,n){return{min:bu(e,t),max:bu(e,n)}}function bu(e,t){return typeof e==`number`?e:e[t]||0}var xu=new WeakMap,Su=class{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=$a(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){let{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;let i=e=>{t&&this.snapToCursor(Xl(e).point),this.stopAnimation()},a=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=ha(n),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ys(e=>{let t=this.getAxisMotionValue(e).get()||0;if(zt.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=Ds(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&N.update(()=>i(e,t),!1,!0),Pi(this.visualElement,`transform`);let{animationState:a}=this.visualElement;a&&a.setActive(`whileDrag`,!0)},o=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:o}=t;if(r&&this.currentDirection===null){this.currentDirection=Eu(o),this.currentDirection!==null&&i&&i(this.currentDirection);return}this.updateAxis(`x`,t.point,o),this.updateAxis(`y`,t.point,o),this.visualElement.render(),a&&N.update(()=>a(e,t),!1,!0)},s=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{let{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:l}=this.getProps();this.panSession=new ru(e,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:n,contextWindow:$l(this.visualElement),element:this.visualElement.current})}stop(e,t){let n=e||this.latestPointerEvent,r=t||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!n)return;let{velocity:a}=r;this.startAnimation(a);let{onDragEnd:o}=this.getProps();o&&N.postRender(()=>o(n,r))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive(`whileDrag`,!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!Tu(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=uu(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&Y(e)?this.constraints||=this.resolveRefConstraints():e&&n?this.constraints=fu(n.layoutBox,e):this.constraints=!1,this.elastic=vu(t),r!==this.constraints&&!Y(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&Ys(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=gu(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Y(e))return!1;let n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;let i=Ro(n,r.root,this.visualElement.getTransformPagePoint()),a=mu(r.layout.layoutBox,i);if(t){let e=t(yo(a));this.hasMutatedConstraints=!!e,e&&(a=vo(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=Ys(o=>{if(!Tu(o,t,this.currentDirection))return;let c=s&&s[o]||{};(a===!0||a===o)&&(c={min:0,max:0});let l=r?200:1e6,u=r?40:1e7,d={type:`inertia`,velocity:n?e[o]:0,bounceStiffness:l,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...i,...c};return this.startAxisValueAnimation(o,d)});return Promise.all(c).then(o)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return Pi(this.visualElement,e),n.start(bi(e,n,0,t,this.visualElement,!1))}stopAnimation(){Ys(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps();return n[t]||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){Ys(t=>{let{drag:n}=this.getProps();if(!Tu(t,n,this.currentDirection))return;let{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){let{min:n,max:a}=r.layout.layoutBox[t],o=i.get()||0;i.set(e[t]-R(n,a,.5)+o)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Y(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};Ys(e=>{let t=this.getAxisMotionValue(e);if(t&&this.constraints!==!1){let n=t.get();r[e]=hu({min:n,max:n},this.constraints[e])}});let{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},``):`none`,n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),Ys(t=>{if(!Tu(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set(R(i,a,r[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;xu.set(this.visualElement,this);let e=this.visualElement.current,t=Ql(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&wa(i);n&&r&&!a&&this.start(t)}),n,r=()=>{let{dragConstraints:t}=this.getProps();Y(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||=wu(e,t.current,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),N.read(r);let o=sc(window,`resize`,()=>this.scalePositionWithinConstraints()),s=i.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(Ys(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())}));return()=>{o(),t(),a(),s&&s(),n&&n()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=_u,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function Cu(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function wu(e,t,n){let r=Ka(e,Cu(n)),i=Ka(t,Cu(n));return()=>{r(),i()}}function Tu(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Eu(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var Du=class extends _o{constructor(e){super(e),this.removeGroupControls=M,this.removeListeners=M,this.controls=new Su(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||M}update(){let{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},Ou=e=>(t,n)=>{e&&N.update(()=>e(t,n),!1,!0)},ku=class extends _o{constructor(){super(...arguments),this.removePointerDownListener=M}onPointerDown(e){this.session=new ru(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:$l(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:Ou(e),onStart:Ou(t),onMove:Ou(n),onEnd:(e,t)=>{delete this.session,r&&N.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=Ql(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},Au=!1,ju=class extends T.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),Au&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),pc.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,{projection:a}=n;return a?(a.isPresent=i,e.layoutDependency!==t&&a.setOptions({...a.options,layoutDependency:t}),Au=!0,r||e.layoutDependency!==t||t===void 0||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||N.postRender(()=>{let e=a.getStack();(!e||!e.members.length)&&this.safeToRemove()})),null):null}componentDidUpdate(){let{visualElement:e,layoutAnchor:t}=this.props,{projection:n}=e;n&&(n.options.layoutAnchor=t,n.root.didUpdate(),da.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;Au=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}};function Mu(e){let[t,n]=rl(),r=(0,T.useContext)(xe);return(0,W.jsx)(ju,{...e,layoutGroup:r,switchLayoutGroup:(0,T.useContext)(J),isPresent:t,safeToRemove:n})}var Nu={pan:{Feature:ku},drag:{Feature:Du,ProjectionNode:Jc,MeasureLayout:Mu}};function Pu(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&N.postRender(()=>i(t,Xl(t)))}var Fu=class extends _o{mount(){let{current:e}=this.node;e&&(this.unmount=va(e,(e,t)=>(Pu(this.node,t,`Start`),e=>Pu(this.node,e,`End`))))}unmount(){}},Iu=class extends _o{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(`:focus-visible`)}catch{e=!0}!e||!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=Ne(sc(this.node.current,`focus`,()=>this.onFocus()),sc(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function Lu(e,t,n){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive(`whileTap`,n===`Start`);let i=r[`onTap`+(n===`End`?``:n)];i&&N.postRender(()=>i(t,Xl(t)))}var Ru=class extends _o{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=ja(e,(e,t)=>(Lu(this.node,t,`Start`),(e,{success:t})=>Lu(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}},zu=new WeakMap,Bu=new WeakMap,Vu=e=>{let t=zu.get(e.target);t&&t(e)},Hu=e=>{e.forEach(Vu)};function Uu({root:e,...t}){let n=e||document;Bu.has(n)||Bu.set(n,{});let r=Bu.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Hu,{root:e,...t})),r[i]}function Wu(e,t,n){let r=Uu(t);return zu.set(e,n),r.observe(e),()=>{zu.delete(e),r.unobserve(e)}}var Z={some:0,all:1},Gu=class extends _o{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:Z[r]};this.stopObserver=Wu(this.node.current,a,e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)})}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(Ku(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function Ku({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var qu={inView:{Feature:Gu},tap:{Feature:Ru},focus:{Feature:Iu},hover:{Feature:Fu}},Ju={layout:{ProjectionNode:Jc,MeasureLayout:Mu}},Yu=Gl({...Yl,...qu,...Nu,...Ju},Kl);function Xu(e){let t=e.match(/^100\.(\d+)\./);if(t&&+t[1]>=64&&+t[1]<=127)return`tailscale`;if(/^192\.168\./.test(e)||/^10\./.test(e))return`lan`;let n=e.match(/^172\.(\d+)\./);return n&&+n[1]>=16&&+n[1]<=31?`lan`:e===`localhost`||e===`127.0.0.1`?`localhost`:e.endsWith(`.trycloudflare.com`)?`tunnel`:e.endsWith(`.fluxy.bot`)?`relay`:`custom-domain`}function Zu(e){return e===`tailscale`||e===`lan`||e===`localhost`}var Qu={tailscale:`Tailscale`,lan:`Local network`,localhost:`Localhost`,tunnel:`Cloudflare tunnel`,relay:`Relay`,"custom-domain":`Custom domain`},$u=[{id:`anthropic`,name:`Claude`,subtitle:`by Anthropic`,icon:`/icons/claude.png`},{id:`openai`,name:`OpenAI Codex`,subtitle:`ChatGPT Plus / Pro`,icon:`/icons/codex.png`}],ed={anthropic:[{id:`claude-opus-4-6`,label:`Opus 4.6`},{id:`claude-sonnet-4-6`,label:`Sonnet 4.6`},{id:`claude-haiku-4-5-20251001`,label:`Haiku 4.5`}],openai:[{id:`gpt-5.2-codex:medium`,label:`GPT-5.2 Codex Medium`},{id:`gpt-5.2-codex:high`,label:`GPT-5.2 Codex High`},{id:`gpt-5.2-codex:xhigh`,label:`GPT-5.2 Codex Extra High`},{id:`gpt-5.3-codex:medium`,label:`GPT-5.3 Codex Medium (Pro)`},{id:`gpt-5.3-codex:high`,label:`GPT-5.3 Codex High (Pro)`},{id:`gpt-5.3-codex:xhigh`,label:`GPT-5.3 Codex Extra High (Pro)`}]};function td({models:e,value:t,onChange:n}){let[r,i]=(0,T.useState)(!1),a=(0,T.useRef)(null);(0,T.useEffect)(()=>{if(!r)return;let e=e=>{a.current&&!a.current.contains(e.target)&&i(!1)};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[r]);let o=e.find(e=>e.id===t);return(0,W.jsxs)(`div`,{className:`relative`,ref:a,children:[(0,W.jsxs)(`button`,{type:`button`,onClick:()=>i(e=>!e),className:`w-full flex items-center justify-between bg-white/[0.03] border border-white/[0.08] text-white rounded-xl px-4 py-2.5 text-[13px] outline-none hover:border-white/15 focus:border-[#AF27E3]/30 transition-colors`,children:[(0,W.jsx)(`span`,{className:o?`text-white`:`text-white/20`,children:o?o.label:`Choose a model...`}),(0,W.jsx)(se,{className:`h-4 w-4 text-white/30 transition-transform ${r?`rotate-180`:``}`})]}),r&&(0,W.jsx)(`div`,{className:`absolute left-0 right-0 top-full mt-1 bg-[#222] border border-white/[0.08] rounded-xl shadow-xl py-1 z-10 max-h-48 overflow-y-auto`,children:e.map(e=>(0,W.jsx)(`button`,{onClick:()=>{n(e.id),i(!1)},className:`w-full text-left px-4 py-2 text-[13px] transition-colors ${t===e.id?`text-[#AF27E3] bg-[#AF27E3]/10`:`text-white/70 hover:bg-white/[0.04] hover:text-white`}`,children:e.label},e.id))})]})}function nd({onComplete:e,isInitialSetup:t=!1,onSave:n,onTunnelSwitch:r}){let i=t?7:6,[a,o]=(0,T.useState)(0),[s,c]=(0,T.useState)(``),[l,u]=(0,T.useState)(`anthropic`),[d,f]=(0,T.useState)(``),[p,m]=(0,T.useState)(!1),[h,g]=(0,T.useState)({anthropic:`idle`,openai:`idle`}),[_,v]=(0,T.useState)(!1),[y,b]=(0,T.useState)(``),[x,S]=(0,T.useState)(!1),[C,w]=(0,T.useState)(),[ee,te]=(0,T.useState)(!1),[ne,re]=(0,T.useState)(!1),[E,se]=(0,T.useState)(),[A,be]=(0,T.useState)(``),[xe,Se]=(0,T.useState)(null),[Ce,we]=(0,T.useState)(``),[Te,Ee]=(0,T.useState)({}),[j,De]=(0,T.useState)(``),[Oe,ke]=(0,T.useState)(!1),[Ae,je]=(0,T.useState)(!1),[M,Me]=(0,T.useState)(``),Ne=(0,T.useRef)(null),[Pe,Fe]=(0,T.useState)(`quick`),[Ie,Le]=(0,T.useState)(``),[Re,ze]=(0,T.useState)(``),[Be,Ve]=(0,T.useState)(`relay`),[He,Ue]=(0,T.useState)(null),[We,Ge]=(0,T.useState)(!1),[Ke,qe]=(0,T.useState)(!1),[Je,Ye]=(0,T.useState)({}),[Xe,Ze]=(0,T.useState)(!1),[Qe,$e]=(0,T.useState)(``),[et,tt]=(0,T.useState)(``),[nt,rt]=(0,T.useState)(!1),[it,at]=(0,T.useState)(`tunnel`),[ot,st]=(0,T.useState)(!1),[ct,lt]=(0,T.useState)(``),[ut,dt]=(0,T.useState)(!1),[N,P]=(0,T.useState)(``),[F,ft]=(0,T.useState)(!1),[pt,mt]=(0,T.useState)(!1),[ht,gt]=(0,T.useState)(``),[_t,vt]=(0,T.useState)(`admin`),[yt,bt]=(0,T.useState)(``),[xt,St]=(0,T.useState)(``),[Ct,wt]=(0,T.useState)(!1),[Tt,Et]=(0,T.useState)(!1),[Dt,Ot]=(0,T.useState)(!1),[kt,At]=(0,T.useState)(``),[jt,Mt]=(0,T.useState)(``),[Nt,Pt]=(0,T.useState)(!1),[Ft,It]=(0,T.useState)(!1),[Lt,Rt]=(0,T.useState)(!1),[zt,I]=(0,T.useState)(``),[Bt,Vt]=(0,T.useState)(!1),[Ht,Ut]=(0,T.useState)(``),[L,Wt]=(0,T.useState)(``),[Gt,Kt]=(0,T.useState)(``),[qt,Jt]=(0,T.useState)(``),[Yt,Xt]=(0,T.useState)(!1),[Zt,Qt]=(0,T.useState)(!1),[$t,en]=(0,T.useState)(``),[tn,nn]=(0,T.useState)([]),[rn,an]=(0,T.useState)(!1),[on,sn]=(0,T.useState)(!1),[cn,ln]=(0,T.useState)(``),[R,un]=(0,T.useState)(``),[dn,fn]=(0,T.useState)(!1),[pn,mn]=(0,T.useState)(`password`),[hn,gn]=(0,T.useState)(!1),_n=(0,T.useRef)(!1),vn=h[l]===`connected`,yn=`fluxy_totp_setup`;function bn(){try{sessionStorage.setItem(yn,JSON.stringify({secret:Ht,qrUri:L,otpauthUri:Gt,phase:pn,portalPass:yt,portalPassConfirm:xt}))}catch{}}function xn(){try{let e=sessionStorage.getItem(yn);if(!e)return!1;let t=JSON.parse(e);if(t.secret&&t.phase===`totp-setup`)return Ut(t.secret),Wt(t.qrUri||``),Kt(t.otpauthUri||``),Vt(!0),mn(`totp-setup`),o(3),t.portalPass&&(bt(t.portalPass),St(t.portalPassConfirm||``)),!0}catch{}return!1}function Sn(){try{sessionStorage.removeItem(yn)}catch{}}(0,T.useEffect)(()=>{fetch(`/api/onboard/status`).then(e=>e.json()).then(e=>{e.userName&&c(e.userName),e.handle&&(be(e.handle.username),De(e.handle.tier||`at`),Ue({username:e.handle.username,tier:e.handle.tier,url:e.handle.url}),je(!0),Me(e.handle.url)),e.portalUser&&vt(e.portalUser),e.portalConfigured&&Et(!0),e.provider&&u(e.provider),e.model&&f(e.model),e.whisperEnabled&&(Rt(!0),I(e.whisperKey||``)),e.totpEnabled&&(Vt(!0),Xt(!0)),e.tunnelMode&&Fe(e.tunnelMode),e.tunnelDomain&&Le(e.tunnelDomain),e.tunnelUrl&&ze(e.tunnelUrl),e.handle||Ve(`tunnel`),_n.current=!0,e.totpEnabled||xn()}).catch(()=>{_n.current=!0})},[]),(0,T.useEffect)(()=>{at(Xu(window.location.hostname))},[]),(0,T.useEffect)(()=>{fn(window.matchMedia(`(max-width: 768px)`).matches||`ontouchstart`in window)},[]),(0,T.useEffect)(()=>{l!==`anthropic`||h.anthropic===`connected`||fetch(`/api/auth/claude/status`).then(e=>e.json()).then(e=>{e.authenticated&&g(e=>({...e,anthropic:`connected`}))}).catch(()=>{})},[l]),(0,T.useEffect)(()=>{l!==`openai`||h.openai===`connected`||fetch(`/api/auth/codex/status`).then(e=>e.json()).then(e=>{e.authenticated&&g(e=>({...e,openai:`connected`}))}).catch(()=>{})},[l]),(0,T.useEffect)(()=>{if(!ne)return;let e=setInterval(async()=>{try{(await(await fetch(`/api/auth/codex/status`)).json()).authenticated&&(re(!1),g(e=>({...e,openai:`connected`})))}catch{}},2e3);return()=>clearInterval(e)},[ne]),(0,T.useEffect)(()=>{if(Ne.current&&clearTimeout(Ne.current),!_n.current||Pe===`off`||He&&Ae&&A===He.username)return;Se(null),we(``),Ee({}),Ye({}),Ze(!1),$e(``),tt(``),je(!1),Me(``);let e=A.trim();if(e){if(e.length<3){Se(`invalid`),we(`At least 3 characters`);return}return Se(`checking`),Ne.current=setTimeout(async()=>{try{let t=await(await fetch(`/api/handle/check/${encodeURIComponent(e)}`)).json();if(!t.valid)Se(`invalid`),we(t.error);else{let e={},n={};for(let r of t.handles)e[r.tier]=r.available,r.reserved&&(n[r.tier]=!0);Ee(e),Ye(n),Se(`ready`),De(``)}}catch{Se(null)}},400),()=>{Ne.current&&clearTimeout(Ne.current)}}},[A]),(0,T.useEffect)(()=>{if(!A||A.length<3||xe!==`ready`)return;let e=async()=>{try{let e=await(await fetch(`/api/handle/check/${encodeURIComponent(A.trim())}`)).json();if(e.valid){let t={},n={};for(let r of e.handles)t[r.tier]=r.available,r.reserved&&(n[r.tier]=!0);Ee(t),Ye(n)}}catch{}};return window.addEventListener(`focus`,e),()=>window.removeEventListener(`focus`,e)},[A,xe]);let Cn=e=>{be(e.toLowerCase().replace(/[^a-z0-9-]/g,``))},wn=async()=>{if(!(!A||xe!==`ready`||!Te[j])){ke(!0);try{let e=await(await fetch(`/api/handle/register`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({username:A,tier:j})})).json();e.ok?(je(!0),Me(e.url)):(we(e.error||`Registration failed`),Se(`invalid`))}catch{we(`Could not reach server`),Se(`invalid`)}finally{ke(!1)}}},Tn=async()=>{if(!(!A||xe!==`ready`||!Te[j])){qe(!0);try{let e=await(await fetch(`/api/handle/change`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({username:A,tier:j})})).json();e.ok?(je(!0),Me(e.url),Ue({username:A,tier:j,url:e.url}),Ge(!1)):(we(e.error||`Handle change failed`),Se(`invalid`))}catch{we(`Could not reach server`),Se(`invalid`)}finally{qe(!1)}}},En=async()=>{if(!(!A||!Qe)){rt(!0),tt(``);try{let e=await(await fetch(`/api/handle/claim-reserved`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({handle:A,hash:Qe})})).json();e.ok?(je(!0),Me(e.url),Ze(!1),$e(``),De(`premium`),Ve(`relay`)):tt(e.error||`Invalid activation code`)}catch{tt(`Could not reach server`)}finally{rt(!1)}}},Dn=e=>{l===`openai`&&e!==`openai`&&ne&&(fetch(`/api/auth/codex/cancel`,{method:`POST`}),re(!1)),u(e),f(``),v(!1),b(``),w(void 0),re(!1),se(void 0)},On=e=>{if(window.matchMedia(`(display-mode: standalone)`).matches||navigator.standalone===!0){let t=document.createElement(`a`);t.href=e,t.target=`_blank`,t.rel=`noopener noreferrer`,document.body.appendChild(t),t.click(),document.body.removeChild(t)}else window.open(e,`_blank`,`noopener,noreferrer`)},kn=async()=>{w(void 0);try{let e=await(await fetch(`/api/auth/claude/start`,{method:`POST`})).json();e.success&&e.authUrl?(On(e.authUrl),v(!0)):w(e.error||`Failed to start authentication`)}catch(e){w(e.message)}},An=async()=>{if(y.trim()){S(!0),w(void 0);try{let e=await(await fetch(`/api/auth/claude/exchange`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({code:y.trim()})})).json();e.success?g(e=>({...e,anthropic:`connected`})):w(e.error||`Code exchange failed`)}catch(e){w(e.message)}finally{S(!1)}}},jn=async()=>{try{let e=await navigator.clipboard.readText();e&&b(e.trim())}catch{}},Mn=async()=>{te(!0),w(void 0);try{(await(await fetch(`/api/auth/claude/status`)).json()).authenticated?g(e=>({...e,anthropic:`connected`})):w(`No active session found. Please authenticate first.`)}catch{}finally{te(!1)}},Nn=async()=>{re(!0),se(void 0);try{let e=await(await fetch(`/api/auth/codex/start`,{method:`POST`})).json();e.success&&e.authUrl?On(e.authUrl):(re(!1),se(e.error||`Failed to start authentication`))}catch(e){re(!1),se(e.message)}},Pn=()=>{re(!1),fetch(`/api/auth/codex/cancel`,{method:`POST`})},Fn=yt===xt,In=yt.length>=6&&Fn,Ln=Tt?yt.length===0||Nt&&In:In,Rn=(()=>{switch(a){case 0:return!0;case 1:return s.trim().length>0;case 2:return ot||F?!1:Pe===`off`||Pe===`named`||Be===`tunnel`?A.trim().length>=3:Ae;case 3:return!(pn!==`password`||!Ln||Bt&&!Yt);case 4:return!!(l&&d&&vn);case 5:return!0;default:return!1}})(),zn=()=>{Rn&&a<i-1&&o(e=>e+1)},Bn=()=>{a>0&&o(e=>e-1)},Vn=e=>{e.key===`Enter`&&Rn&&zn()},Hn=async()=>{m(!0);let r={userName:s.trim(),agentName:A.trim()||`Fluxy`,provider:l,model:d,apiKey:``,whisperEnabled:Lt,whisperKey:Lt?zt:``,portalUser:_t.trim(),portalPass:yt};try{n?await n(r):await fetch(`/api/onboard`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(r)}),t?(m(!1),o(6)):e()}catch(e){console.error(`[OnboardWizard] Onboard failed:`,e),m(!1)}},Un=`w-full bg-white/[0.05] border border-white/[0.08] text-white rounded-xl px-4 py-3 text-base outline-none input-glow placeholder:text-white/20 transition-all`,Wn=`w-full bg-white/[0.03] border border-white/[0.08] text-white rounded-xl px-4 py-2.5 text-[13px] outline-none input-glow placeholder:text-white/20 transition-all`;return(0,W.jsxs)(`div`,{className:`fixed inset-0 z-[200] flex items-center justify-center p-4`,children:[(0,W.jsx)(`div`,{className:`absolute inset-0 bg-black/85 backdrop-blur-md`}),(0,W.jsxs)(Yu.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{duration:.3},className:`relative w-full max-w-[480px] bg-[#181818] border border-white/[0.06] rounded-[24px] shadow-2xl overflow-hidden`,children:[(0,W.jsx)(`div`,{className:`flex justify-center gap-2 pt-6`,children:Array.from({length:i},(e,t)=>(0,W.jsx)(`div`,{className:`h-1.5 rounded-full transition-all duration-300 ${t===a?`w-7 bg-gradient-brand`:t<a?`w-1.5 bg-gradient-brand opacity-60`:`w-1.5 bg-white/10`}`},t))}),(0,W.jsx)(ol,{mode:`wait`,children:(0,W.jsxs)(Yu.div,{initial:{opacity:0,x:30},animate:{opacity:1,x:0},exit:{opacity:0,x:-30},transition:{duration:.2,ease:`easeOut`},className:`px-8 pt-6 pb-8`,children:[a===0&&(0,W.jsxs)(`div`,{className:`flex flex-col items-center text-center`,children:[(0,W.jsxs)(`video`,{autoPlay:!0,loop:!0,muted:!0,playsInline:!0,className:`h-[180px] mb-4`,children:[(0,W.jsx)(`source`,{src:`/fluxy_say_hi.mov`,type:`video/mp4; codecs="hvc1"`}),(0,W.jsx)(`source`,{src:`/fluxy_say_hi.webm`,type:`video/webm`})]}),(0,W.jsx)(`h1`,{className:`text-2xl font-bold text-white tracking-tight`,children:`Welcome to Fluxy`}),(0,W.jsx)(`p`,{className:`text-white/40 text-[14px] mt-2 leading-relaxed max-w-[320px]`,children:`Let's set up your AI assistant in just a few steps.`}),(0,W.jsxs)(`button`,{onClick:zn,className:`mt-6 px-7 py-3 bg-gradient-brand hover:opacity-90 text-white text-[14px] font-semibold rounded-full transition-colors flex items-center gap-2`,children:[`Get Started`,(0,W.jsx)(ae,{className:`h-4 w-4`})]})]}),a===1&&(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`h1`,{className:`text-xl font-bold text-white tracking-tight`,children:`What's your name?`}),(0,W.jsx)(`p`,{className:`text-white/40 text-[13px] mt-1.5 leading-relaxed`,children:`This is how your agent will address you.`}),(0,W.jsxs)(`div`,{className:`mt-5 flex items-center gap-3`,children:[(0,W.jsx)(`input`,{type:`text`,value:s,onChange:e=>c(e.target.value),onKeyDown:Vn,placeholder:`Enter your name`,autoFocus:!0,autoComplete:`off`,"data-1p-ignore":!0,"data-lpignore":`true`,className:Un+` flex-1`}),(0,W.jsx)(`button`,{onClick:zn,disabled:!Rn,className:`shrink-0 h-12 w-12 flex items-center justify-center rounded-full bg-gradient-brand hover:opacity-90 text-white transition-colors disabled:opacity-30`,children:(0,W.jsx)(ae,{className:`h-5 w-5`})})]})]}),a===2&&Pe===`off`&&(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`h1`,{className:`text-xl font-bold text-white tracking-tight`,children:`Bot Name & Access`}),(0,W.jsx)(`p`,{className:`text-white/40 text-[13px] mt-1.5 leading-relaxed`,children:`Give your bot a name. This is used throughout the app as your bot's identity.`}),(0,W.jsx)(`div`,{className:`relative mt-5`,children:(0,W.jsx)(`input`,{type:`text`,value:A,onChange:e=>Cn(e.target.value),maxLength:30,placeholder:`your-bot-name`,spellCheck:!1,autoCapitalize:`none`,autoCorrect:`off`,autoComplete:`off`,"data-1p-ignore":!0,"data-lpignore":`true`,autoFocus:!0,className:Un+` pr-10 font-mono`})}),(0,W.jsx)(`div`,{className:`mt-4 bg-white/[0.03] border border-white/[0.06] rounded-xl px-4 py-3`,children:(0,W.jsx)(`p`,{className:`text-white/40 text-[12px] leading-relaxed`,children:`Private network mode — your bot is only accessible via your local network or VPN. No public URL will be created.`})}),!t&&(0,W.jsx)(`div`,{className:`mt-3 flex items-center gap-2`,children:(0,W.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full text-[11px] font-medium border ${Zu(it)?`bg-emerald-500/10 text-emerald-400 border-emerald-500/20`:`bg-blue-500/10 text-blue-400 border-blue-500/20`}`,children:[Zu(it)?(0,W.jsx)(ve,{className:`h-3 w-3`}):(0,W.jsx)(de,{className:`h-3 w-3`}),`Accessing via `,Qu[it]]})}),!t&&!F&&(0,W.jsxs)(`button`,{onClick:()=>{ft(!0),gt(``)},className:`w-full mt-4 flex items-center justify-between px-4 py-3 rounded-xl border border-white/[0.06] bg-white/[0.02] hover:border-white/10 hover:bg-white/[0.04] transition-all text-left`,children:[(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`p`,{className:`text-[13px] text-white/70 font-medium`,children:`Re-enable public tunnel access`}),(0,W.jsx)(`p`,{className:`text-[11px] text-white/30 mt-0.5`,children:`Start a Cloudflare tunnel to make your bot accessible from anywhere`})]}),(0,W.jsx)(de,{className:`h-4 w-4 text-white/30 shrink-0 ml-3`})]}),F&&(0,W.jsxs)(`div`,{className:`mt-4 space-y-3`,children:[(0,W.jsx)(`div`,{className:`bg-amber-500/8 border border-amber-500/20 rounded-xl px-4 py-3`,children:(0,W.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,W.jsx)(_e,{className:`h-4 w-4 text-amber-400 shrink-0 mt-0.5`}),(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`p`,{className:`text-amber-400/90 text-[13px] font-medium`,children:`Enable public access?`}),(0,W.jsxs)(`p`,{className:`text-amber-400/60 text-[12px] mt-1 leading-relaxed`,children:[`This will start a Cloudflare tunnel, making your bot reachable from the internet.`,He&&` Your handle will reconnect automatically.`]})]})]})}),ht&&(0,W.jsx)(`p`,{className:`text-red-400/70 text-[12px]`,children:ht}),(0,W.jsxs)(`div`,{className:`flex gap-2`,children:[(0,W.jsx)(`button`,{onClick:async()=>{if(r){mt(!0),gt(``);try{await r(`quick`),Fe(`quick`),ft(!1)}catch(e){gt(e.message||`Failed to start tunnel`)}finally{mt(!1)}}},disabled:pt||!r,className:`flex-1 py-2.5 bg-gradient-brand hover:opacity-90 text-white text-[13px] font-semibold rounded-full transition-colors flex items-center justify-center gap-2 disabled:opacity-40`,children:pt?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(fe,{className:`h-4 w-4 animate-spin`}),`Starting tunnel...`]}):`Enable Tunnel`}),(0,W.jsx)(`button`,{onClick:()=>{ft(!1),gt(``)},disabled:pt,className:`px-5 py-2.5 bg-white/[0.04] hover:bg-white/[0.08] border border-white/[0.08] text-white/60 text-[13px] font-medium rounded-full transition-colors`,children:`Cancel`})]})]}),(0,W.jsxs)(`button`,{onClick:zn,disabled:!Rn,className:`w-full mt-5 py-3 bg-gradient-brand hover:opacity-90 text-white text-[14px] font-semibold rounded-full transition-colors flex items-center justify-center gap-2 disabled:opacity-40`,children:[`Continue`,(0,W.jsx)(ae,{className:`h-4 w-4`})]})]}),a===2&&Pe===`named`&&(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`h1`,{className:`text-xl font-bold text-white tracking-tight`,children:`Bot Name & Access`}),(0,W.jsx)(`p`,{className:`text-white/40 text-[13px] mt-1.5 leading-relaxed`,children:`This is your bot's identity. Your named tunnel domain is already configured.`}),(0,W.jsx)(`div`,{className:`relative mt-5`,children:(0,W.jsx)(`input`,{type:`text`,value:A,onChange:e=>Cn(e.target.value),maxLength:30,placeholder:`your-bot-name`,spellCheck:!1,autoCapitalize:`none`,autoCorrect:`off`,autoComplete:`off`,"data-1p-ignore":!0,"data-lpignore":`true`,autoFocus:!0,className:Un+` pr-10 font-mono`})}),(0,W.jsxs)(`div`,{className:`mt-4 flex items-center gap-2 bg-white/[0.03] border border-white/[0.06] rounded-xl px-4 py-3`,children:[(0,W.jsxs)(`span`,{className:`font-mono text-[13px] text-white/70 truncate flex-1 text-left`,children:[`https://`,Ie]}),(0,W.jsx)(`button`,{onClick:()=>{navigator.clipboard.writeText(`https://${Ie}`),wt(!0),setTimeout(()=>wt(!1),2e3)},className:`shrink-0 text-white/30 hover:text-white/60 transition-colors`,children:Ct?(0,W.jsx)(oe,{className:`h-4 w-4 text-emerald-400`}):(0,W.jsx)(ce,{className:`h-4 w-4`})})]})]}),a===2&&Pe===`quick`&&(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`h1`,{className:`text-xl font-bold text-white tracking-tight`,children:`Bot Name & Access`}),(0,W.jsx)(`p`,{className:`text-white/40 text-[13px] mt-1.5 leading-relaxed`,children:`This is your bot's name and permanent handle — access it from anywhere.`}),He&&Ae&&!We&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`div`,{className:`mt-4 bg-emerald-500/8 border border-emerald-500/15 rounded-xl px-4 py-3`,children:[(0,W.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,W.jsx)(oe,{className:`h-4 w-4 text-emerald-400`}),(0,W.jsx)(`p`,{className:`text-emerald-400/90 text-[13px] font-medium`,children:`Current handle`})]}),(0,W.jsx)(`p`,{className:`text-emerald-400/60 text-[12px] mt-1 font-mono`,children:M})]}),(0,W.jsxs)(`div`,{className:`flex gap-2 mt-4`,children:[(0,W.jsxs)(`button`,{onClick:zn,className:`flex-1 py-3 bg-gradient-brand hover:opacity-90 text-white text-[14px] font-semibold rounded-full transition-colors flex items-center justify-center gap-2`,children:[`Continue`,(0,W.jsx)(ae,{className:`h-4 w-4`})]}),(0,W.jsx)(`button`,{onClick:()=>{Ge(!0),je(!1),be(``),Se(null),Ee({}),Ve(`relay`)},className:`px-5 py-3 bg-white/[0.04] hover:bg-white/[0.08] border border-white/[0.08] text-white/60 text-[13px] font-medium rounded-full transition-colors`,children:`Change`})]})]}),We&&!Ae&&(0,W.jsxs)(`div`,{className:`mt-4 bg-amber-500/8 border border-amber-500/20 rounded-xl px-4 py-3`,children:[(0,W.jsx)(`p`,{className:`text-amber-400/90 text-[13px] font-medium`,children:`Changing your handle`}),(0,W.jsxs)(`p`,{className:`text-amber-400/60 text-[12px] mt-1`,children:[`Your current handle `,(0,W.jsx)(`span`,{className:`font-mono`,children:He?.url}),` will be released and become available for others.`]})]}),(!He||We||!Ae)&&!(He&&Ae&&!We)&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`div`,{className:`relative mt-5`,children:[(0,W.jsx)(`input`,{type:`text`,value:A,onChange:e=>Cn(e.target.value),maxLength:30,placeholder:`your-bot-name`,spellCheck:!1,autoCapitalize:`none`,autoCorrect:`off`,autoComplete:`off`,"data-1p-ignore":!0,"data-lpignore":`true`,autoFocus:!0,disabled:Ae,className:Un+` pr-10 font-mono`+(Ae?` opacity-50`:``)}),xe&&A.length>0&&!Ae&&(0,W.jsxs)(`div`,{className:`absolute right-4 top-1/2 -translate-y-1/2`,children:[xe===`checking`&&(0,W.jsx)(`div`,{className:`w-5 h-5 border-2 border-white/10 border-t-[#04D1FE] rounded-full animate-spin`}),xe===`invalid`&&(0,W.jsx)(`div`,{className:`w-6 h-6 rounded-full bg-amber-500/15 flex items-center justify-center`,children:(0,W.jsx)(`svg`,{className:`w-3.5 h-3.5 text-amber-400`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:3,children:(0,W.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M12 9v3m0 4h.01`})})})]})]}),xe===`invalid`&&Ce&&(0,W.jsx)(`p`,{className:`text-amber-400 text-[12px] mt-2`,children:Ce}),xe===`ready`&&A.length>0&&!Ae&&(0,W.jsxs)(`div`,{className:`space-y-3 mt-4`,children:[(()=>{let e=Te.at===!1,t=Be===`relay`&&j===`at`;return(0,W.jsxs)(`button`,{onClick:()=>{e||(De(`at`),Ve(`relay`))},disabled:e,className:`w-full rounded-xl border transition-all duration-200 text-left px-4 py-3 ${e?`border-white/[0.04] opacity-50 cursor-not-allowed`:t?`border-[#AF27E3]/30 bg-white/[0.04]`:`border-white/[0.06] hover:border-white/10 hover:bg-white/[0.02]`}`,children:[(0,W.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,W.jsx)(`span`,{className:`text-[12px] font-semibold text-white/60 uppercase tracking-wider`,children:`Free`}),(0,W.jsx)(`span`,{className:`text-[11px] font-medium px-2.5 py-0.5 rounded-full border ${e?`bg-red-500/10 text-red-400 border-red-500/20`:`bg-emerald-500/10 text-emerald-400 border-emerald-500/20`}`,children:e?`Taken`:`Available`})]}),(0,W.jsxs)(`p`,{className:`font-mono text-[13px] mt-1.5 ${t?`text-white/80`:`text-white/40`}`,children:[`my.fluxy.bot/`,A]})]})})(),(()=>{let e=Te.premium,t=e===!1,n=t&&Je.premium;return(0,W.jsxs)(`div`,{className:`rounded-xl border transition-all duration-200 text-left px-4 py-3 ${n?`border-[#AF27E3]/20`:`border-white/[0.06]`}`,children:[(0,W.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,W.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,W.jsx)(`span`,{className:`text-[12px] font-semibold text-white/60 uppercase tracking-wider`,children:`Premium`}),(0,W.jsx)(`span`,{className:`text-[11px] font-medium px-2.5 py-0.5 rounded-full border bg-[#AF27E3]/15 text-[#AF27E3] border-[#AF27E3]/20`,children:`$5`})]}),(0,W.jsx)(`span`,{className:`text-[11px] font-medium px-2.5 py-0.5 rounded-full border ${n?`bg-[#AF27E3]/10 text-[#AF27E3] border-[#AF27E3]/20`:t?`bg-red-500/10 text-red-400 border-red-500/20`:`bg-emerald-500/10 text-emerald-400 border-emerald-500/20`}`,children:n?`Reserved`:t?`Taken`:`Available`})]}),(0,W.jsxs)(`p`,{className:`font-mono text-[13px] mt-1.5 text-white/40`,children:[`fluxy.bot/`,A]}),e&&(0,W.jsxs)(`div`,{className:`mt-3 pt-3 border-t border-white/[0.06] flex items-center justify-between`,children:[(0,W.jsx)(`p`,{className:`text-[12px] text-white/40`,children:`Purchase on fluxy.bot`}),(0,W.jsx)(`a`,{href:`https://www.fluxy.bot/#reserve`,target:`_blank`,rel:`noopener noreferrer`,className:`text-[12px] font-medium text-[#AF27E3] hover:text-[#c44df7] transition-colors`,children:`Purchase`})]}),n&&(0,W.jsx)(`div`,{className:`mt-3 pt-3 border-t border-[#AF27E3]/10`,children:Xe?(0,W.jsxs)(`div`,{className:`space-y-2.5`,children:[(0,W.jsxs)(`p`,{className:`text-[12px] text-white/40`,children:[`Enter the 5-character code from your `,(0,W.jsx)(`span`,{className:`text-white/60 font-medium`,children:`fluxy.bot`}),` account`]}),(0,W.jsxs)(`div`,{className:`flex gap-2`,children:[(0,W.jsx)(`input`,{type:`text`,value:Qe,onChange:e=>$e(e.target.value.trim()),maxLength:5,placeholder:`e.g. a3Kx9`,spellCheck:!1,autoComplete:`off`,autoFocus:!0,className:`flex-1 bg-white/[0.05] border border-white/[0.08] text-white rounded-lg px-3 py-2 text-[13px] font-mono outline-none focus:border-[#AF27E3]/30 transition-colors placeholder:text-white/20 tracking-widest text-center`}),(0,W.jsx)(`button`,{onClick:En,disabled:nt||Qe.length<5,className:`px-4 py-2 bg-gradient-brand hover:opacity-90 text-white text-[13px] font-semibold rounded-lg transition-colors flex items-center gap-1.5 disabled:opacity-40`,children:nt?(0,W.jsx)(fe,{className:`h-3.5 w-3.5 animate-spin`}):`Activate`})]}),et&&(0,W.jsx)(`p`,{className:`text-red-400 text-[12px]`,children:et}),(0,W.jsx)(`button`,{onClick:()=>{Ze(!1),$e(``),tt(``)},className:`text-[11px] text-white/25 hover:text-white/40 transition-colors`,children:`Cancel`})]}):(0,W.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,W.jsx)(`p`,{className:`text-[12px] text-white/40`,children:`Is that yours?`}),(0,W.jsx)(`button`,{onClick:()=>{Ze(!0),$e(``),tt(``)},className:`text-[12px] font-medium text-[#AF27E3] hover:text-[#c44df7] transition-colors`,children:`Activate`})]})})]})})(),(0,W.jsxs)(`button`,{onClick:()=>{Ve(`tunnel`),De(`skip`)},className:`w-full rounded-xl border transition-all duration-200 text-left px-4 py-3 ${j===`skip`?`border-[#AF27E3]/30 bg-white/[0.04]`:`border-white/[0.06] hover:border-white/10 hover:bg-white/[0.02]`}`,children:[(0,W.jsx)(`span`,{className:`text-[12px] font-semibold text-white/60 uppercase tracking-wider`,children:`No handle`}),(0,W.jsx)(`p`,{className:`text-[13px] mt-1.5 ${j===`skip`?`text-white/60`:`text-white/30`}`,children:`I'll use the random tunnel URL`})]})]}),Ae&&(0,W.jsxs)(`div`,{className:`mt-4 bg-emerald-500/8 border border-emerald-500/15 rounded-xl px-4 py-3`,children:[(0,W.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,W.jsx)(oe,{className:`h-4 w-4 text-emerald-400`}),(0,W.jsx)(`p`,{className:`text-emerald-400/90 text-[13px] font-medium`,children:`Handle claimed!`})]}),(0,W.jsx)(`p`,{className:`text-emerald-400/60 text-[12px] mt-1 font-mono`,children:M})]}),xe===`ready`&&A.length>0&&!Ae&&(0,W.jsx)(`button`,{onClick:j===`skip`?zn:Be===`relay`&&j===`at`?We?Tn:wn:void 0,disabled:!j||Oe||Ke||j===`at`&&!Te.at,className:`w-full mt-4 py-3 bg-gradient-brand hover:opacity-90 text-white text-[14px] font-semibold rounded-full transition-colors flex items-center justify-center gap-2 disabled:opacity-40 disabled:cursor-not-allowed`,children:Oe||Ke?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(fe,{className:`h-4 w-4 animate-spin`}),We?`Changing...`:`Claiming...`]}):j?j===`skip`?(0,W.jsxs)(W.Fragment,{children:[`Continue`,(0,W.jsx)(ae,{className:`h-4 w-4`})]}):(0,W.jsxs)(W.Fragment,{children:[We?`Change Handle`:`Claim & Continue`,(0,W.jsx)(ae,{className:`h-4 w-4`})]}):(0,W.jsx)(W.Fragment,{children:`Select an option to continue`})}),Ae&&(0,W.jsxs)(`button`,{onClick:zn,className:`w-full mt-4 py-3 bg-gradient-brand hover:opacity-90 text-white text-[14px] font-semibold rounded-full transition-colors flex items-center justify-center gap-2`,children:[`Continue`,(0,W.jsx)(ae,{className:`h-4 w-4`})]}),We&&!Ae&&(0,W.jsx)(`button`,{onClick:()=>{Ge(!1),be(He.username),je(!0),Me(He.url),De(He.tier),Ve(`relay`),Se(null)},className:`w-full mt-2 py-2 text-white/25 hover:text-white/40 text-[12px] transition-colors`,children:`Cancel — keep current handle`})]}),!t&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`div`,{className:`mt-5 flex items-center gap-2`,children:(0,W.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full text-[11px] font-medium border ${Zu(it)?`bg-emerald-500/10 text-emerald-400 border-emerald-500/20`:`bg-blue-500/10 text-blue-400 border-blue-500/20`}`,children:[Zu(it)?(0,W.jsx)(ye,{className:`h-3 w-3`}):(0,W.jsx)(de,{className:`h-3 w-3`}),`Accessing via `,Qu[it]]})}),!ot&&(0,W.jsxs)(`button`,{onClick:()=>{Zu(it)&&(st(!0),lt(``),P(``))},disabled:!Zu(it),className:`w-full mt-3 flex items-center justify-between px-4 py-3 rounded-xl border transition-all text-left ${Zu(it)?`border-white/[0.06] bg-white/[0.02] hover:border-white/10 hover:bg-white/[0.04] cursor-pointer`:`border-white/[0.04] bg-transparent opacity-50 cursor-not-allowed`}`,children:[(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`p`,{className:`text-[13px] text-white/70 font-medium`,children:`Switch to private network only`}),(0,W.jsx)(`p`,{className:`text-[11px] text-white/30 mt-0.5`,children:Zu(it)?`Stop the tunnel and relay — access only via Tailscale or LAN`:`Connect via Tailscale or private network to unlock`})]}),(0,W.jsx)(ve,{className:`h-4 w-4 text-white/30 shrink-0 ml-3`})]}),ot&&(0,W.jsxs)(`div`,{className:`mt-3 space-y-3`,children:[(0,W.jsx)(`div`,{className:`bg-amber-500/8 border border-amber-500/20 rounded-xl px-4 py-3`,children:(0,W.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,W.jsx)(_e,{className:`h-4 w-4 text-amber-400 shrink-0 mt-0.5`}),(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`p`,{className:`text-amber-400/90 text-[13px] font-medium`,children:`Switch to private network only?`}),(0,W.jsx)(`p`,{className:`text-amber-400/60 text-[12px] mt-1 leading-relaxed`,children:`This will stop the Cloudflare tunnel and relay connection. Your bot will only be accessible via your private network.`}),He&&(0,W.jsx)(`p`,{className:`text-amber-400/50 text-[12px] mt-1.5`,children:`Your handle will be preserved and can be re-activated later.`})]})]})}),(0,W.jsxs)(`div`,{children:[(0,W.jsxs)(`label`,{className:`text-[12px] text-white/40 font-medium mb-1.5 block`,children:[`Type `,(0,W.jsx)(`span`,{className:`font-mono text-white/60`,children:`I confirm`}),` to proceed`]}),(0,W.jsx)(`input`,{type:`text`,value:ct,onChange:e=>lt(e.target.value),placeholder:`I confirm`,spellCheck:!1,autoFocus:!0,className:Wn})]}),N&&(0,W.jsx)(`p`,{className:`text-red-400/70 text-[12px]`,children:N}),(0,W.jsxs)(`div`,{className:`flex gap-2`,children:[(0,W.jsx)(`button`,{onClick:async()=>{if(!(!r||ct.trim().toLowerCase()!==`i confirm`)){dt(!0),P(``);try{await r(`off`),Fe(`off`),st(!1)}catch(e){P(e.message||`Failed to switch`)}finally{dt(!1)}}},disabled:ut||ct.trim().toLowerCase()!==`i confirm`||!r,className:`flex-1 py-2.5 bg-amber-600 hover:bg-amber-500 text-white text-[13px] font-semibold rounded-full transition-colors flex items-center justify-center gap-2 disabled:opacity-40`,children:ut?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(fe,{className:`h-4 w-4 animate-spin`}),`Switching...`]}):`Confirm Switch`}),(0,W.jsx)(`button`,{onClick:()=>{st(!1),lt(``),P(``)},disabled:ut,className:`px-5 py-2.5 bg-white/[0.04] hover:bg-white/[0.08] border border-white/[0.08] text-white/60 text-[13px] font-medium rounded-full transition-colors`,children:`Cancel`})]})]})]})]}),a===3&&(0,W.jsx)(`div`,{children:(0,W.jsxs)(ol,{mode:`wait`,children:[pn===`password`&&(0,W.jsxs)(Yu.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},transition:{duration:.15},children:[(0,W.jsx)(`h1`,{className:`text-xl font-bold text-white tracking-tight`,children:`Set a password`}),(0,W.jsx)(`p`,{className:`text-white/40 text-[13px] mt-1.5 leading-relaxed`,children:`You'll need this password to access your agent's chat. Keep it safe — anyone with your URL will need it to log in.`}),Tt&&(0,W.jsx)(`div`,{className:`mt-4 bg-white/[0.02] border border-white/[0.06] rounded-xl px-4 py-2.5`,children:(0,W.jsx)(`p`,{className:`text-white/40 text-[12px]`,children:`Password already set. Leave fields empty to keep your current password, or enter your current password to change it.`})}),Tt&&(0,W.jsxs)(`div`,{className:`mt-5`,children:[(0,W.jsx)(`label`,{className:`text-[12px] text-white/40 font-medium mb-1.5 block`,children:`Current password`}),(0,W.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,W.jsx)(`input`,{type:`password`,value:kt,onChange:e=>{At(e.target.value),Mt(``),Pt(!1)},placeholder:`Enter current password to change it`,autoComplete:`current-password`,autoFocus:!0,className:Un+` flex-1`}),kt.length>0&&!Nt&&(0,W.jsx)(`button`,{onClick:async()=>{It(!0),Mt(``);try{(await(await fetch(`/api/portal/verify-password`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({password:kt})})).json()).valid?Pt(!0):Mt(`Incorrect password`)}catch{Mt(`Could not verify`)}finally{It(!1)}},disabled:Ft,className:`shrink-0 px-4 py-3 bg-white/[0.06] hover:bg-white/[0.1] text-white/60 text-[13px] font-medium rounded-xl transition-colors disabled:opacity-40`,children:Ft?(0,W.jsx)(fe,{className:`h-4 w-4 animate-spin`}):`Verify`}),Nt&&(0,W.jsx)(`div`,{className:`shrink-0 w-10 h-10 flex items-center justify-center`,children:(0,W.jsx)(oe,{className:`h-4 w-4 text-emerald-400`})})]}),jt&&(0,W.jsx)(`p`,{className:`text-red-400/70 text-[11px] mt-1`,children:jt})]}),(!Tt||Nt)&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`div`,{className:Tt?`mt-3`:`mt-5`,children:[(0,W.jsx)(`label`,{className:`text-[12px] text-white/40 font-medium mb-1.5 block`,children:Tt?`New password`:`Password`}),(0,W.jsx)(`input`,{type:`password`,value:yt,onChange:e=>bt(e.target.value),placeholder:`••••••••`,autoComplete:`new-password`,autoFocus:!Tt,onKeyDown:Vn,className:Un}),yt.length>0&&yt.length<6&&(0,W.jsx)(`p`,{className:`text-amber-400/70 text-[11px] mt-1`,children:`At least 6 characters`})]}),(0,W.jsxs)(`div`,{className:`mt-3`,children:[(0,W.jsx)(`label`,{className:`text-[12px] text-white/40 font-medium mb-1.5 block`,children:Tt?`Confirm new password`:`Confirm password`}),(0,W.jsx)(`input`,{type:`password`,value:xt,onChange:e=>St(e.target.value),placeholder:`••••••••`,autoComplete:`new-password`,onKeyDown:Vn,className:Un}),xt.length>0&&!Fn&&(0,W.jsx)(`p`,{className:`text-red-400/70 text-[11px] mt-1`,children:`Passwords don't match`})]})]}),(0,W.jsxs)(`div`,{className:`mt-5 border border-white/[0.06] rounded-xl overflow-hidden`,children:[(0,W.jsxs)(`button`,{onClick:async()=>{if(Bt&&Yt){sn(!0);return}if(Bt)Vt(!1),Wt(``),Ut(``),Kt(``);else if(Vt(!0),en(``),Jt(``),L)mn(`totp-setup`);else try{let e=await fetch(`/api/portal/totp/setup`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({password:Tt?kt:yt})}),t=await e.json();e.ok?(Ut(t.secret),Wt(t.qrDataUri),Kt(t.otpauthUri),mn(`totp-setup`)):(en(t.error||`Setup failed`),Vt(!1))}catch{en(`Could not reach server`),Vt(!1)}},type:`button`,className:`w-full flex items-center gap-3 px-4 py-3 text-left`,children:[(0,W.jsx)(`div`,{className:`w-9 h-9 rounded-lg flex items-center justify-center shrink-0 ${Bt&&Yt?`bg-emerald-500/10`:`bg-white/[0.04]`}`,children:Bt&&Yt?(0,W.jsx)(me,{className:`h-[18px] w-[18px] text-emerald-400`}):(0,W.jsx)(he,{className:`h-[18px] w-[18px] text-white/30`})}),(0,W.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,W.jsx)(`span`,{className:`text-[13px] font-medium text-white block`,children:`Two-Factor Auth`}),(0,W.jsx)(`p`,{className:`text-[11px] text-white/30 mt-0.5`,children:Bt&&Yt?(0,W.jsx)(`span`,{className:`text-emerald-400/70`,children:`Active — authenticator app required`}):Pe===`quick`||Pe===`named`?(0,W.jsx)(`span`,{children:`Recommended for public bots`}):(0,W.jsx)(`span`,{children:`Extra security with an authenticator app`})})]}),(0,W.jsx)(`div`,{className:`w-10 h-6 rounded-full transition-colors relative shrink-0 ${Bt?`bg-emerald-500`:`bg-white/10`}`,children:(0,W.jsx)(`div`,{className:`absolute top-1 w-4 h-4 rounded-full bg-white shadow transition-transform ${Bt?`translate-x-5`:`translate-x-1`}`})})]}),on&&(0,W.jsxs)(`div`,{className:`px-4 pb-3 border-t border-white/[0.06]`,children:[(0,W.jsx)(`p`,{className:`text-[12px] text-white/40 mt-3 mb-2`,children:`Enter your current TOTP code to disable 2FA:`}),(0,W.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,W.jsx)(`input`,{type:`text`,inputMode:`numeric`,autoComplete:`one-time-code`,maxLength:6,value:cn,onChange:e=>{ln(e.target.value.replace(/\D/g,``)),un(``)},placeholder:`000000`,className:Wn+` flex-1 tracking-[0.3em] text-center font-mono`}),(0,W.jsx)(`button`,{onClick:async()=>{if(cn.length===6)try{let e=await fetch(`/api/portal/totp/disable`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({password:Tt?kt:yt,code:cn})}),t=await e.json();e.ok?(Vt(!1),Xt(!1),Ut(``),Wt(``),Kt(``),sn(!1),ln(``),nn([]),an(!1)):un(t.error||`Failed to disable`)}catch{un(`Could not reach server`)}},disabled:cn.length!==6,className:`shrink-0 px-4 py-2.5 bg-red-500/10 hover:bg-red-500/20 text-red-400 text-[13px] font-medium rounded-xl transition-colors disabled:opacity-40`,children:`Disable`})]}),R&&(0,W.jsx)(`p`,{className:`text-red-400/70 text-[11px] mt-1`,children:R}),(0,W.jsx)(`button`,{onClick:()=>{sn(!1),ln(``),un(``)},className:`text-[11px] text-white/30 hover:text-white/50 mt-2`,children:`Cancel`})]}),$t&&pn===`password`&&(0,W.jsx)(`div`,{className:`mx-4 mb-3 bg-red-500/8 border border-red-500/15 rounded-xl px-3 py-2`,children:(0,W.jsx)(`p`,{className:`text-red-400/90 text-[11px]`,children:$t})})]}),(0,W.jsxs)(`button`,{onClick:zn,disabled:!Rn,className:`w-full mt-5 py-3 bg-gradient-brand hover:opacity-90 text-white text-[14px] font-semibold rounded-full transition-colors flex items-center justify-center gap-2 disabled:opacity-40`,children:[`Continue`,(0,W.jsx)(ae,{className:`h-4 w-4`})]})]},`password`),pn===`totp-setup`&&(0,W.jsxs)(Yu.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:20},transition:{duration:.15},children:[(0,W.jsxs)(`div`,{className:`flex items-center gap-3 mb-1`,children:[(0,W.jsx)(`button`,{onClick:()=>{Vt(!1),Wt(``),Ut(``),Kt(``),Jt(``),en(``),mn(`password`),Sn()},className:`w-7 h-7 rounded-full bg-white/[0.04] flex items-center justify-center text-white/40 hover:text-white/70 transition-colors shrink-0`,children:(0,W.jsx)(ie,{className:`h-4 w-4`})}),(0,W.jsx)(`h1`,{className:`text-xl font-bold text-white tracking-tight`,children:`Set up 2FA`})]}),$t&&(0,W.jsx)(`div`,{className:`mt-3 bg-red-500/8 border border-red-500/15 rounded-xl px-3 py-2`,children:(0,W.jsx)(`p`,{className:`text-red-400/90 text-[11px]`,children:$t})}),L&&(0,W.jsxs)(W.Fragment,{children:[dn?(0,W.jsxs)(`div`,{className:`mt-4`,children:[(0,W.jsx)(`p`,{className:`text-white/40 text-[13px] leading-relaxed mb-4`,children:`Add Fluxy to your authenticator app, then enter the 6-digit code below to confirm.`}),(0,W.jsx)(`button`,{onClick:()=>{navigator.clipboard.writeText(Ht),gn(!0),setTimeout(()=>gn(!1),3e3)},className:`w-full py-3 text-[14px] font-medium rounded-xl transition-colors flex items-center justify-center gap-2 ${hn?`bg-emerald-500/10 text-emerald-400 border border-emerald-500/20`:`bg-white/[0.05] text-white/70 hover:bg-white/[0.08] border border-white/[0.08]`}`,children:hn?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(oe,{className:`h-4 w-4`}),`Secret key copied`]}):(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(D,{className:`h-4 w-4`}),`Copy secret key`]})}),(0,W.jsx)(`p`,{className:`text-[11px] text-white/20 text-center mt-2`,children:`Paste it in your authenticator app → Add account → Enter key`}),(0,W.jsxs)(`a`,{href:Gt,onClick:()=>bn(),className:`w-full mt-3 py-2.5 text-[13px] text-white/30 hover:text-white/50 flex items-center justify-center gap-1.5 transition-colors`,children:[(0,W.jsx)(ge,{className:`h-3.5 w-3.5`}),`Or open directly in authenticator`]})]}):(0,W.jsxs)(`div`,{className:`mt-4 flex gap-4 items-start`,children:[(0,W.jsx)(`div`,{className:`shrink-0`,children:(0,W.jsx)(`div`,{className:`bg-white rounded-xl p-1.5`,children:(0,W.jsx)(`img`,{src:L,alt:`TOTP QR Code`,className:`w-[140px] h-[140px]`})})}),(0,W.jsxs)(`div`,{className:`flex-1 min-w-0 pt-1`,children:[(0,W.jsx)(`p`,{className:`text-white/40 text-[13px] leading-relaxed`,children:`Scan this QR code with your authenticator app.`}),(0,W.jsx)(`p`,{className:`text-white/25 text-[11px] mt-2 leading-relaxed`,children:`Google Authenticator, Authy, 1Password, or any TOTP app.`}),(0,W.jsxs)(`button`,{onClick:()=>{navigator.clipboard.writeText(Ht)},className:`mt-3 text-[11px] text-white/25 hover:text-white/40 flex items-center gap-1 transition-colors`,children:[(0,W.jsx)(D,{className:`h-3 w-3`}),`Copy secret key`]})]})]}),(0,W.jsxs)(`div`,{className:`mt-5`,children:[(0,W.jsx)(`label`,{className:`text-[12px] text-white/40 font-medium mb-1.5 block`,children:`Enter the 6-digit code from your app`}),(0,W.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,W.jsx)(`input`,{type:`text`,inputMode:`numeric`,autoComplete:`one-time-code`,maxLength:6,value:qt,onChange:e=>{Jt(e.target.value.replace(/\D/g,``)),en(``)},placeholder:`000000`,autoFocus:!0,className:Un+` tracking-[0.3em] text-center font-mono flex-1`}),(0,W.jsx)(`button`,{onClick:async()=>{if(qt.length===6){Qt(!0),en(``);try{let e=await fetch(`/api/portal/totp/verify-setup`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({code:qt,password:Tt?kt:yt})}),t=await e.json();e.ok&&t.success?(Xt(!0),nn(t.recoveryCodes||[]),mn(`recovery`),Sn()):en(t.error||`Verification failed`)}catch{en(`Could not reach server`)}finally{Qt(!1)}}},disabled:qt.length!==6||Zt,className:`shrink-0 px-5 py-3 bg-gradient-brand hover:opacity-90 text-white text-[14px] font-semibold rounded-xl transition-colors flex items-center gap-2 disabled:opacity-40`,children:Zt?(0,W.jsx)(fe,{className:`h-4 w-4 animate-spin`}):`Verify`})]})]})]})]},`totp-setup`),pn===`recovery`&&(0,W.jsxs)(Yu.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:20},transition:{duration:.15},children:[(0,W.jsxs)(`div`,{className:`flex items-center gap-3 mb-1`,children:[(0,W.jsx)(`div`,{className:`w-9 h-9 rounded-xl bg-emerald-500/10 flex items-center justify-center shrink-0`,children:(0,W.jsx)(me,{className:`h-[18px] w-[18px] text-emerald-400`})}),(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`h1`,{className:`text-xl font-bold text-white tracking-tight`,children:`2FA enabled`}),(0,W.jsx)(`p`,{className:`text-emerald-400/70 text-[12px]`,children:`Save your recovery codes`})]})]}),(0,W.jsx)(`p`,{className:`text-white/35 text-[13px] mt-3 leading-relaxed`,children:`If you lose your authenticator app, you can use one of these codes to sign in. Each code works once. Store them somewhere safe.`}),(0,W.jsx)(`div`,{className:`mt-4 grid grid-cols-2 gap-1.5`,children:tn.map((e,t)=>(0,W.jsx)(`div`,{className:`bg-white/[0.03] border border-white/[0.06] rounded-lg px-3 py-2 text-center`,children:(0,W.jsx)(`code`,{className:`text-[13px] text-white/60 font-mono tracking-wider`,children:e})},t))}),(0,W.jsx)(`button`,{onClick:()=>{navigator.clipboard.writeText(tn.join(`
|
|
18
|
-
`)),an(!0)},className:`w-full mt-4 py-3 text-[14px] font-semibold rounded-full transition-colors flex items-center justify-center gap-2 ${rn?`bg-emerald-500/10 text-emerald-400 border border-emerald-500/20`:`bg-white/[0.05] text-white/60 hover:bg-white/[0.08] border border-white/[0.08]`}`,children:rn?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(oe,{className:`h-4 w-4`}),`Copied`]}):(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(D,{className:`h-4 w-4`}),`Copy recovery codes`]})}),(0,W.jsxs)(`button`,{onClick:()=>{nn([]),mn(`password`),Sn()},disabled:!rn,className:`w-full mt-3 py-3 bg-gradient-brand hover:opacity-90 text-white text-[14px] font-semibold rounded-full transition-colors flex items-center justify-center gap-2 disabled:opacity-40`,children:[`Done`,(0,W.jsx)(ae,{className:`h-4 w-4`})]})]},`recovery`)]})}),a===4&&(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`h1`,{className:`text-xl font-bold text-white tracking-tight`,children:`Choose your AI provider`}),(0,W.jsx)(`p`,{className:`text-white/40 text-[13px] mt-1.5 leading-relaxed`,children:`Pick one provider to power your bot, authenticate, and select a model.`}),(0,W.jsx)(`div`,{className:`flex gap-2.5 mt-4`,children:$u.map(e=>(0,W.jsxs)(`button`,{onClick:()=>Dn(e.id),className:`flex-1 relative rounded-xl border transition-all duration-200 p-3 text-left ${l===e.id?`bg-white/[0.04] border-[#AF27E3]/40`:`bg-transparent border-white/[0.06] hover:border-white/10 hover:bg-white/[0.02]`}`,children:[(0,W.jsxs)(`div`,{className:`flex flex-col items-center gap-1.5 py-0.5`,children:[e.icon?(0,W.jsx)(`img`,{src:e.icon,alt:e.name,className:`w-8 h-8 rounded-lg`}):(0,W.jsx)(`div`,{className:`w-8 h-8 rounded-lg bg-white/[0.06] flex items-center justify-center text-white/50 text-sm font-bold`,children:`O`}),(0,W.jsxs)(`div`,{className:`text-center`,children:[(0,W.jsx)(`div`,{className:`text-[13px] font-medium text-white`,children:e.name}),(0,W.jsx)(`div`,{className:`text-[10px] text-white/30`,children:e.subtitle})]})]}),h[e.id]===`connected`?(0,W.jsx)(`div`,{className:`absolute top-2 right-2 w-4 h-4 rounded-full bg-emerald-500/15 flex items-center justify-center`,children:(0,W.jsx)(oe,{className:`h-2.5 w-2.5 text-emerald-400`})}):l===e.id?(0,W.jsx)(`div`,{className:`absolute top-2 right-2 w-2 h-2 rounded-full bg-gradient-brand`}):null]},e.id))}),(0,W.jsx)(`div`,{className:`border-t border-white/[0.06] mt-4 mb-3`}),l===`anthropic`&&(0,W.jsxs)(`div`,{className:`space-y-2.5`,children:[vn&&(0,W.jsxs)(`div`,{className:`space-y-2.5`,children:[(0,W.jsx)(`div`,{className:`bg-emerald-500/8 border border-emerald-500/15 rounded-lg px-3.5 py-2.5`,children:(0,W.jsx)(`p`,{className:`text-emerald-400/90 text-[12px]`,children:`Connected — Anthropic subscription is active.`})}),(0,W.jsxs)(`button`,{onClick:()=>{g(e=>({...e,anthropic:`idle`})),v(!1),b(``),w(``)},className:`w-full py-1.5 text-white/25 text-[11px] hover:text-white/40 transition-colors flex items-center justify-center gap-1.5`,children:[(0,W.jsx)(k,{className:`h-3 w-3`}),`Re-authenticate`]})]}),!vn&&(0,W.jsxs)(W.Fragment,{children:[C&&(0,W.jsx)(`div`,{className:`bg-red-500/8 border border-red-500/15 rounded-lg px-3.5 py-2.5`,children:(0,W.jsx)(`p`,{className:`text-red-400/90 text-[12px]`,children:C})}),(0,W.jsx)(`div`,{className:`space-y-1.5`,children:[`Click the button below to open Anthropic's login page`,`Sign in with your Anthropic account — a code will be generated`,`Copy the code and paste it in the field below`].map((e,t)=>(0,W.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,W.jsx)(`span`,{className:`flex-shrink-0 w-[18px] h-[18px] rounded-full bg-white/[0.06] text-white/30 text-[10px] font-medium flex items-center justify-center mt-px`,children:t+1}),(0,W.jsx)(`p`,{className:`text-white/40 text-[12px] leading-relaxed`,children:e})]},t))}),(0,W.jsx)(`button`,{onClick:kn,className:`w-full py-2.5 px-4 bg-gradient-brand hover:opacity-90 text-white text-[13px] font-medium rounded-xl transition-colors flex items-center justify-center gap-2`,children:_?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(O,{className:`h-3.5 w-3.5 opacity-60`}),`Open authentication page again`]}):(0,W.jsxs)(W.Fragment,{children:[`Authenticate with Anthropic`,(0,W.jsx)(ae,{className:`h-3.5 w-3.5 opacity-60`})]})}),(0,W.jsxs)(`div`,{className:`relative`,children:[(0,W.jsx)(`input`,{type:`text`,value:y,onChange:e=>b(e.target.value),onKeyDown:e=>e.key===`Enter`&&An(),placeholder:`Paste your code here...`,className:Wn+` pr-10 font-mono`}),(0,W.jsx)(`button`,{onClick:jn,className:`absolute right-3 top-1/2 -translate-y-1/2 text-white/20 hover:text-white/50 transition-colors`,children:(0,W.jsx)(ce,{className:`h-3.5 w-3.5`})})]}),(0,W.jsx)(`button`,{onClick:An,disabled:!y.trim()||x,className:`w-full py-2.5 px-4 bg-gradient-brand hover:opacity-90 text-white text-[13px] font-medium rounded-xl transition-colors flex items-center justify-center gap-2 disabled:opacity-40`,children:x?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(fe,{className:`h-3.5 w-3.5 animate-spin`}),`Verifying...`]}):`Connect`}),(0,W.jsxs)(`button`,{onClick:Mn,disabled:ee,className:`w-full py-1.5 text-white/25 text-[11px] hover:text-white/40 transition-colors flex items-center justify-center gap-1.5 disabled:opacity-50`,children:[ee?(0,W.jsx)(fe,{className:`h-3 w-3 animate-spin`}):(0,W.jsx)(k,{className:`h-3 w-3`}),ee?`Checking...`:`I'm already authenticated`]})]})]}),l===`openai`&&(0,W.jsxs)(`div`,{className:`space-y-2.5`,children:[vn&&(0,W.jsxs)(`div`,{className:`space-y-2.5`,children:[(0,W.jsx)(`div`,{className:`bg-emerald-500/8 border border-emerald-500/15 rounded-lg px-3.5 py-2.5`,children:(0,W.jsx)(`p`,{className:`text-emerald-400/90 text-[12px]`,children:`Connected — ChatGPT subscription is active.`})}),(0,W.jsxs)(`button`,{onClick:()=>{g(e=>({...e,openai:`idle`})),se(``)},className:`w-full py-1.5 text-white/25 text-[11px] hover:text-white/40 transition-colors flex items-center justify-center gap-1.5`,children:[(0,W.jsx)(k,{className:`h-3 w-3`}),`Re-authenticate`]})]}),!vn&&(0,W.jsxs)(W.Fragment,{children:[E&&(0,W.jsx)(`div`,{className:`bg-red-500/8 border border-red-500/15 rounded-lg px-3.5 py-2.5`,children:(0,W.jsx)(`p`,{className:`text-red-400/90 text-[12px]`,children:E})}),(0,W.jsx)(`div`,{className:`space-y-1.5`,children:[`Click the button below — your browser will open for ChatGPT sign-in`,`Sign in with your ChatGPT Plus or Pro account`,`Authentication completes automatically — no code to copy`].map((e,t)=>(0,W.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,W.jsx)(`span`,{className:`flex-shrink-0 w-[18px] h-[18px] rounded-full bg-white/[0.06] text-white/30 text-[10px] font-medium flex items-center justify-center mt-px`,children:t+1}),(0,W.jsx)(`p`,{className:`text-white/40 text-[12px] leading-relaxed`,children:e})]},t))}),(0,W.jsx)(`button`,{onClick:Nn,disabled:ne,className:`w-full py-2.5 px-4 bg-white/[0.06] hover:bg-white/[0.09] text-white text-[13px] font-medium rounded-xl transition-colors flex items-center justify-center gap-2 disabled:opacity-60`,children:ne?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(fe,{className:`h-3.5 w-3.5 animate-spin opacity-60`}),`Waiting for sign-in...`]}):(0,W.jsxs)(W.Fragment,{children:[`Authenticate with ChatGPT`,(0,W.jsx)(ae,{className:`h-3.5 w-3.5 opacity-60`})]})}),ne&&(0,W.jsx)(`button`,{onClick:Pn,className:`w-full py-1.5 text-white/25 text-[11px] hover:text-white/40 transition-colors`,children:`Cancel`})]})]}),vn&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`div`,{className:`border-t border-white/[0.06] mt-4 mb-3`}),(0,W.jsx)(`label`,{className:`text-[12px] text-white/40 font-medium mb-1.5 block`,children:`Select a model`}),(0,W.jsx)(td,{models:ed[l]||[],value:d,onChange:f})]}),vn&&(0,W.jsxs)(`button`,{onClick:zn,disabled:!Rn,className:`w-full mt-4 py-3 bg-gradient-brand hover:opacity-90 text-white text-[14px] font-semibold rounded-full transition-colors flex items-center justify-center gap-2 disabled:opacity-40`,children:[`Continue`,(0,W.jsx)(ae,{className:`h-4 w-4`})]})]}),a===5&&(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`h1`,{className:`text-xl font-bold text-white tracking-tight mb-1`,children:`Voice Messages`}),(0,W.jsx)(`p`,{className:`text-white/40 text-[13px] mt-1 leading-relaxed`,children:`Voice input works out of the box using your browser's built-in speech recognition. For better accuracy, you can optionally enable OpenAI Whisper.`}),(0,W.jsx)(`div`,{className:`w-full mt-5 rounded-xl border border-emerald-500/20 bg-emerald-500/[0.04] p-4`,children:(0,W.jsxs)(`div`,{className:`flex items-center gap-3.5`,children:[(0,W.jsx)(`div`,{className:`w-10 h-10 rounded-xl bg-emerald-500/10 flex items-center justify-center shrink-0`,children:(0,W.jsx)(pe,{className:`h-5 w-5 text-emerald-400`})}),(0,W.jsxs)(`div`,{className:`flex-1`,children:[(0,W.jsx)(`div`,{className:`text-[14px] font-medium text-white`,children:`Browser Speech Recognition`}),(0,W.jsx)(`div`,{className:`text-[12px] text-white/35 mt-0.5 leading-relaxed`,children:`Built-in voice input — no setup needed. Works in Chrome, Edge, and Safari.`})]}),(0,W.jsx)(`div`,{className:`flex items-center justify-center w-6 h-6 rounded-full bg-emerald-500/20 shrink-0`,children:(0,W.jsx)(oe,{className:`h-3.5 w-3.5 text-emerald-400`})})]})}),(0,W.jsx)(`button`,{onClick:()=>Rt(e=>!e),className:`w-full mt-3 rounded-xl border transition-all duration-200 p-4 text-left ${Lt?`bg-white/[0.04] border-[#AF27E3]/40`:`bg-transparent border-white/[0.06] hover:border-white/10 hover:bg-white/[0.02]`}`,children:(0,W.jsxs)(`div`,{className:`flex items-center gap-3.5`,children:[(0,W.jsx)(`img`,{src:`/icons/openai.svg`,alt:`OpenAI`,className:`w-10 h-10 rounded-xl bg-white/[0.04] p-1.5`}),(0,W.jsxs)(`div`,{className:`flex-1`,children:[(0,W.jsx)(`div`,{className:`text-[14px] font-medium text-white`,children:`OpenAI Whisper`}),(0,W.jsx)(`div`,{className:`text-[12px] text-white/35 mt-0.5 leading-relaxed`,children:`Upgrade to more accurate transcription that works in all browsers including Firefox.`})]}),(0,W.jsx)(`div`,{className:`w-10 h-[22px] rounded-full transition-colors duration-200 flex items-center px-0.5 shrink-0 ${Lt?`bg-gradient-brand`:`bg-white/[0.08]`}`,children:(0,W.jsx)(`div`,{className:`w-[18px] h-[18px] rounded-full bg-white shadow-sm transition-transform duration-200 ${Lt?`translate-x-[18px]`:`translate-x-0`}`})})]})}),Lt&&(0,W.jsxs)(`div`,{className:`mt-3`,children:[(0,W.jsx)(`label`,{className:`text-[12px] text-white/40 font-medium mb-1.5 block`,children:`OpenAI API Key`}),(0,W.jsx)(`input`,{type:`password`,value:zt,onChange:e=>I(e.target.value.trim()),placeholder:`sk-...`,autoComplete:`off`,className:Un+` font-mono text-[13px]`}),zt.length>0&&!zt.startsWith(`sk-`)&&(0,W.jsx)(`p`,{className:`text-amber-400/70 text-[11px] mt-1`,children:`Key should start with sk-`}),zt.length>0&&zt.startsWith(`sk-`)&&zt.length<20&&(0,W.jsx)(`p`,{className:`text-amber-400/70 text-[11px] mt-1`,children:`Key looks too short`}),(0,W.jsxs)(`div`,{className:`flex items-start gap-2.5 mt-3 bg-white/[0.02] border border-white/[0.06] rounded-xl px-4 py-3`,children:[(0,W.jsx)(pe,{className:`h-4 w-4 text-[#AF27E3]/60 mt-0.5 shrink-0`}),(0,W.jsx)(`p`,{className:`text-white/35 text-[12px] leading-relaxed`,children:`Whisper provides more accurate transcription and works in all browsers including Firefox.`})]})]}),(0,W.jsx)(`button`,{onClick:Hn,disabled:p||Lt&&(!zt.startsWith(`sk-`)||zt.length<20),className:`w-full mt-5 py-3 bg-gradient-brand hover:opacity-90 text-white text-[14px] font-semibold rounded-full transition-colors flex items-center justify-center gap-2 disabled:opacity-40`,children:p?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(fe,{className:`h-4 w-4 animate-spin`}),`Setting up...`]}):(0,W.jsxs)(W.Fragment,{children:[`Complete Setup`,(0,W.jsx)(ae,{className:`h-4 w-4`})]})}),!Lt&&(0,W.jsx)(`p`,{className:`text-center text-white/20 text-[11px] mt-2.5`,children:`Voice input is active using your browser's built-in speech recognition.`})]}),a===6&&t&&(()=>{let e=Pe===`off`,t=e?window.location.origin:Pe===`named`?`https://${Ie}`:Be===`relay`&&M?M:Re||`http://localhost:3000`,n=t.startsWith(`http`)?t:`https://${t}`;return(0,W.jsxs)(`div`,{className:`flex flex-col items-center text-center`,children:[(0,W.jsx)(`div`,{className:`w-16 h-16 rounded-full bg-emerald-500/10 border border-emerald-500/20 flex items-center justify-center mb-5`,children:(0,W.jsx)(oe,{className:`h-8 w-8 text-emerald-400`})}),(0,W.jsx)(`h1`,{className:`text-2xl font-bold text-white tracking-tight`,children:`All Set!`}),(0,W.jsx)(`p`,{className:`text-white/40 text-[13px] mt-2 leading-relaxed max-w-[340px]`,children:e?`Your agent is running on your private network. Access it from any device on your local network or VPN.`:Pe===`named`?`Access your agent at your custom domain.`:Be===`relay`&&M?`Your agent is live and ready. From now on, access it using your custom URL below.`:`Your agent is live and ready. Your tunnel URL is shown below. Note: this URL changes on restart.`}),(0,W.jsxs)(`div`,{className:`w-full mt-6 flex items-center gap-2 bg-white/[0.03] border border-white/[0.06] rounded-xl px-4 py-3`,children:[(0,W.jsx)(`span`,{className:`font-mono text-[13px] text-white/70 truncate flex-1 text-left`,children:t}),(0,W.jsx)(`button`,{onClick:()=>{navigator.clipboard.writeText(n),wt(!0),setTimeout(()=>wt(!1),2e3)},className:`shrink-0 text-white/30 hover:text-white/60 transition-colors`,children:Ct?(0,W.jsx)(oe,{className:`h-4 w-4 text-emerald-400`}):(0,W.jsxs)(`svg`,{className:`h-4 w-4`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2,children:[(0,W.jsx)(`rect`,{x:`9`,y:`9`,width:`13`,height:`13`,rx:`2`}),(0,W.jsx)(`path`,{d:`M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1`})]})})]}),(0,W.jsxs)(`div`,{className:`w-full mt-3`,children:[(0,W.jsx)(`label`,{className:`text-[12px] text-white/40 font-medium mb-1.5 block text-left`,children:`Your password`}),(0,W.jsxs)(`div`,{className:`flex items-center gap-2 bg-white/[0.03] border border-white/[0.06] rounded-xl px-4 py-3`,children:[(0,W.jsx)(`span`,{className:`font-mono text-[13px] text-white/70 truncate flex-1 text-left`,children:Dt?yt:`•`.repeat(Math.max(yt.length,8))}),(0,W.jsx)(`button`,{onClick:()=>Ot(e=>!e),className:`shrink-0 text-white/30 hover:text-white/60 transition-colors`,children:Dt?(0,W.jsx)(le,{className:`h-4 w-4`}):(0,W.jsx)(ue,{className:`h-4 w-4`})})]})]}),(0,W.jsxs)(`button`,{onClick:()=>{e?(window.top||window).location.href=`/`:(window.top||window).location.href=n},className:`w-full mt-6 py-3 bg-gradient-brand hover:opacity-90 text-white text-[14px] font-semibold rounded-full transition-colors flex items-center justify-center gap-2`,children:[e?`Go to dashboard`:`Go to your agent`,(0,W.jsx)(O,{className:`h-4 w-4`})]}),(0,W.jsx)(`p`,{className:`text-white/20 text-[11px] mt-3 leading-relaxed`,children:e?`Access from any device on your network using the URL above.`:`You'll be redirected to your ${Pe===`named`?`custom domain`:Be===`relay`?`custom URL`:`tunnel URL`}.`})]})})()]},a)}),a>0&&a<i-1&&!(a===6&&t)&&(0,W.jsx)(`div`,{className:`px-8 pb-5 -mt-3`,children:(0,W.jsx)(`button`,{onClick:Bn,className:`text-white/25 hover:text-white/50 text-[12px] transition-colors`,children:`← Back`})})]})]})}export{u as _,he as a,D as c,ie as d,E as f,c as g,s as h,be as i,oe as l,p as m,Yu as n,pe as o,y as p,ol as r,fe as s,nd as t,ae as u};
|
|
18
|
+
`)),an(!0)},className:`w-full mt-4 py-3 text-[14px] font-semibold rounded-full transition-colors flex items-center justify-center gap-2 ${rn?`bg-emerald-500/10 text-emerald-400 border border-emerald-500/20`:`bg-white/[0.05] text-white/60 hover:bg-white/[0.08] border border-white/[0.08]`}`,children:rn?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(oe,{className:`h-4 w-4`}),`Copied`]}):(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(D,{className:`h-4 w-4`}),`Copy recovery codes`]})}),(0,W.jsxs)(`button`,{onClick:()=>{nn([]),mn(`password`),Sn()},disabled:!rn,className:`w-full mt-3 py-3 bg-gradient-brand hover:opacity-90 text-white text-[14px] font-semibold rounded-full transition-colors flex items-center justify-center gap-2 disabled:opacity-40`,children:[`Done`,(0,W.jsx)(ae,{className:`h-4 w-4`})]})]},`recovery`)]})}),a===4&&(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`h1`,{className:`text-xl font-bold text-white tracking-tight`,children:`Choose your AI provider`}),(0,W.jsx)(`p`,{className:`text-white/40 text-[13px] mt-1.5 leading-relaxed`,children:`Pick one provider to power your bot, authenticate, and select a model.`}),(0,W.jsx)(`div`,{className:`flex gap-2.5 mt-4`,children:$u.map(e=>(0,W.jsxs)(`button`,{onClick:()=>Dn(e.id),className:`flex-1 relative rounded-xl border transition-all duration-200 p-3 text-left ${l===e.id?`bg-white/[0.04] border-[#AF27E3]/40`:`bg-transparent border-white/[0.06] hover:border-white/10 hover:bg-white/[0.02]`}`,children:[(0,W.jsxs)(`div`,{className:`flex flex-col items-center gap-1.5 py-0.5`,children:[e.icon?(0,W.jsx)(`img`,{src:e.icon,alt:e.name,className:`w-8 h-8 rounded-lg`}):(0,W.jsx)(`div`,{className:`w-8 h-8 rounded-lg bg-white/[0.06] flex items-center justify-center text-white/50 text-sm font-bold`,children:`O`}),(0,W.jsxs)(`div`,{className:`text-center`,children:[(0,W.jsx)(`div`,{className:`text-[13px] font-medium text-white`,children:e.name}),(0,W.jsx)(`div`,{className:`text-[10px] text-white/30`,children:e.subtitle})]})]}),h[e.id]===`connected`?(0,W.jsx)(`div`,{className:`absolute top-2 right-2 w-4 h-4 rounded-full bg-emerald-500/15 flex items-center justify-center`,children:(0,W.jsx)(oe,{className:`h-2.5 w-2.5 text-emerald-400`})}):l===e.id?(0,W.jsx)(`div`,{className:`absolute top-2 right-2 w-2 h-2 rounded-full bg-gradient-brand`}):null]},e.id))}),(0,W.jsx)(`div`,{className:`border-t border-white/[0.06] mt-4 mb-3`}),l===`anthropic`&&(0,W.jsxs)(`div`,{className:`space-y-2.5`,children:[vn&&(0,W.jsxs)(`div`,{className:`space-y-2.5`,children:[(0,W.jsx)(`div`,{className:`bg-emerald-500/8 border border-emerald-500/15 rounded-lg px-3.5 py-2.5`,children:(0,W.jsx)(`p`,{className:`text-emerald-400/90 text-[12px]`,children:`Connected — Anthropic subscription is active.`})}),(0,W.jsxs)(`button`,{onClick:()=>{g(e=>({...e,anthropic:`idle`})),v(!1),b(``),w(``)},className:`w-full py-1.5 text-white/25 text-[11px] hover:text-white/40 transition-colors flex items-center justify-center gap-1.5`,children:[(0,W.jsx)(k,{className:`h-3 w-3`}),`Re-authenticate`]})]}),!vn&&(0,W.jsxs)(W.Fragment,{children:[C&&(0,W.jsx)(`div`,{className:`bg-red-500/8 border border-red-500/15 rounded-lg px-3.5 py-2.5`,children:(0,W.jsx)(`p`,{className:`text-red-400/90 text-[12px]`,children:C})}),(0,W.jsx)(`div`,{className:`space-y-1.5`,children:[`Click the button below to open Anthropic's login page`,`Sign in with your Anthropic account — a code will be generated`,`Copy the code and paste it in the field below`].map((e,t)=>(0,W.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,W.jsx)(`span`,{className:`flex-shrink-0 w-[18px] h-[18px] rounded-full bg-white/[0.06] text-white/30 text-[10px] font-medium flex items-center justify-center mt-px`,children:t+1}),(0,W.jsx)(`p`,{className:`text-white/40 text-[12px] leading-relaxed`,children:e})]},t))}),(0,W.jsx)(`button`,{onClick:kn,className:`w-full py-2.5 px-4 bg-gradient-brand hover:opacity-90 text-white text-[13px] font-medium rounded-xl transition-colors flex items-center justify-center gap-2`,children:_?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(O,{className:`h-3.5 w-3.5 opacity-60`}),`Open authentication page again`]}):(0,W.jsxs)(W.Fragment,{children:[`Authenticate with Anthropic`,(0,W.jsx)(ae,{className:`h-3.5 w-3.5 opacity-60`})]})}),(0,W.jsxs)(`div`,{className:`relative`,children:[(0,W.jsx)(`input`,{type:`text`,value:y,onChange:e=>b(e.target.value),onKeyDown:e=>e.key===`Enter`&&An(),placeholder:`Paste your code here...`,className:Wn+` pr-10 font-mono`}),(0,W.jsx)(`button`,{onClick:jn,className:`absolute right-3 top-1/2 -translate-y-1/2 text-white/20 hover:text-white/50 transition-colors`,children:(0,W.jsx)(ce,{className:`h-3.5 w-3.5`})})]}),(0,W.jsx)(`button`,{onClick:An,disabled:!y.trim()||x,className:`w-full py-2.5 px-4 bg-gradient-brand hover:opacity-90 text-white text-[13px] font-medium rounded-xl transition-colors flex items-center justify-center gap-2 disabled:opacity-40`,children:x?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(fe,{className:`h-3.5 w-3.5 animate-spin`}),`Verifying...`]}):`Connect`}),(0,W.jsxs)(`button`,{onClick:Mn,disabled:ee,className:`w-full py-1.5 text-white/25 text-[11px] hover:text-white/40 transition-colors flex items-center justify-center gap-1.5 disabled:opacity-50`,children:[ee?(0,W.jsx)(fe,{className:`h-3 w-3 animate-spin`}):(0,W.jsx)(k,{className:`h-3 w-3`}),ee?`Checking...`:`I'm already authenticated`]})]})]}),l===`openai`&&(0,W.jsxs)(`div`,{className:`space-y-2.5`,children:[vn&&(0,W.jsxs)(`div`,{className:`space-y-2.5`,children:[(0,W.jsx)(`div`,{className:`bg-emerald-500/8 border border-emerald-500/15 rounded-lg px-3.5 py-2.5`,children:(0,W.jsx)(`p`,{className:`text-emerald-400/90 text-[12px]`,children:`Connected — ChatGPT subscription is active.`})}),(0,W.jsxs)(`button`,{onClick:()=>{g(e=>({...e,openai:`idle`})),se(``)},className:`w-full py-1.5 text-white/25 text-[11px] hover:text-white/40 transition-colors flex items-center justify-center gap-1.5`,children:[(0,W.jsx)(k,{className:`h-3 w-3`}),`Re-authenticate`]})]}),!vn&&(0,W.jsxs)(W.Fragment,{children:[E&&(0,W.jsx)(`div`,{className:`bg-red-500/8 border border-red-500/15 rounded-lg px-3.5 py-2.5`,children:(0,W.jsx)(`p`,{className:`text-red-400/90 text-[12px]`,children:E})}),(0,W.jsx)(`div`,{className:`space-y-1.5`,children:[`Click the button below — your browser will open for ChatGPT sign-in`,`Sign in with your ChatGPT Plus or Pro account`,`Authentication completes automatically — no code to copy`].map((e,t)=>(0,W.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,W.jsx)(`span`,{className:`flex-shrink-0 w-[18px] h-[18px] rounded-full bg-white/[0.06] text-white/30 text-[10px] font-medium flex items-center justify-center mt-px`,children:t+1}),(0,W.jsx)(`p`,{className:`text-white/40 text-[12px] leading-relaxed`,children:e})]},t))}),(0,W.jsx)(`button`,{onClick:Nn,disabled:ne,className:`w-full py-2.5 px-4 bg-white/[0.06] hover:bg-white/[0.09] text-white text-[13px] font-medium rounded-xl transition-colors flex items-center justify-center gap-2 disabled:opacity-60`,children:ne?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(fe,{className:`h-3.5 w-3.5 animate-spin opacity-60`}),`Waiting for sign-in...`]}):(0,W.jsxs)(W.Fragment,{children:[`Authenticate with ChatGPT`,(0,W.jsx)(ae,{className:`h-3.5 w-3.5 opacity-60`})]})}),ne&&(0,W.jsx)(`button`,{onClick:Pn,className:`w-full py-1.5 text-white/25 text-[11px] hover:text-white/40 transition-colors`,children:`Cancel`})]})]}),vn&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`div`,{className:`border-t border-white/[0.06] mt-4 mb-3`}),(0,W.jsx)(`label`,{className:`text-[12px] text-white/40 font-medium mb-1.5 block`,children:`Select a model`}),(0,W.jsx)(td,{models:ed[l]||[],value:d,onChange:f})]}),vn&&(0,W.jsxs)(`button`,{onClick:zn,disabled:!Rn,className:`w-full mt-4 py-3 bg-gradient-brand hover:opacity-90 text-white text-[14px] font-semibold rounded-full transition-colors flex items-center justify-center gap-2 disabled:opacity-40`,children:[`Continue`,(0,W.jsx)(ae,{className:`h-4 w-4`})]})]}),a===5&&(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`h1`,{className:`text-xl font-bold text-white tracking-tight mb-1`,children:`Voice Messages`}),(0,W.jsx)(`p`,{className:`text-white/40 text-[13px] mt-1 leading-relaxed`,children:`Voice input works out of the box using your browser's built-in speech recognition. For better accuracy, you can optionally enable OpenAI Whisper.`}),(0,W.jsx)(`div`,{className:`w-full mt-5 rounded-xl border border-emerald-500/20 bg-emerald-500/[0.04] p-4`,children:(0,W.jsxs)(`div`,{className:`flex items-center gap-3.5`,children:[(0,W.jsx)(`div`,{className:`w-10 h-10 rounded-xl bg-emerald-500/10 flex items-center justify-center shrink-0`,children:(0,W.jsx)(pe,{className:`h-5 w-5 text-emerald-400`})}),(0,W.jsxs)(`div`,{className:`flex-1`,children:[(0,W.jsx)(`div`,{className:`text-[14px] font-medium text-white`,children:`Browser Speech Recognition`}),(0,W.jsx)(`div`,{className:`text-[12px] text-white/35 mt-0.5 leading-relaxed`,children:`Built-in voice input — no setup needed. Works in Chrome, Edge, and Safari.`})]}),(0,W.jsx)(`div`,{className:`flex items-center justify-center w-6 h-6 rounded-full bg-emerald-500/20 shrink-0`,children:(0,W.jsx)(oe,{className:`h-3.5 w-3.5 text-emerald-400`})})]})}),(0,W.jsx)(`button`,{onClick:()=>Rt(e=>!e),className:`w-full mt-3 rounded-xl border transition-all duration-200 p-4 text-left ${Lt?`bg-white/[0.04] border-[#AF27E3]/40`:`bg-transparent border-white/[0.06] hover:border-white/10 hover:bg-white/[0.02]`}`,children:(0,W.jsxs)(`div`,{className:`flex items-center gap-3.5`,children:[(0,W.jsx)(`img`,{src:`/icons/openai.svg`,alt:`OpenAI`,className:`w-10 h-10 rounded-xl bg-white/[0.04] p-1.5`}),(0,W.jsxs)(`div`,{className:`flex-1`,children:[(0,W.jsx)(`div`,{className:`text-[14px] font-medium text-white`,children:`OpenAI Whisper`}),(0,W.jsx)(`div`,{className:`text-[12px] text-white/35 mt-0.5 leading-relaxed`,children:`Upgrade to more accurate transcription that works in all browsers including Firefox.`})]}),(0,W.jsx)(`div`,{className:`w-10 h-[22px] rounded-full transition-colors duration-200 flex items-center px-0.5 shrink-0 ${Lt?`bg-gradient-brand`:`bg-white/[0.08]`}`,children:(0,W.jsx)(`div`,{className:`w-[18px] h-[18px] rounded-full bg-white shadow-sm transition-transform duration-200 ${Lt?`translate-x-[18px]`:`translate-x-0`}`})})]})}),Lt&&(0,W.jsxs)(`div`,{className:`mt-3`,children:[(0,W.jsx)(`label`,{className:`text-[12px] text-white/40 font-medium mb-1.5 block`,children:`OpenAI API Key`}),(0,W.jsx)(`input`,{type:`password`,value:zt,onChange:e=>I(e.target.value.trim()),placeholder:`sk-...`,autoComplete:`off`,className:Un+` font-mono text-[13px]`}),zt.length>0&&!zt.startsWith(`sk-`)&&(0,W.jsx)(`p`,{className:`text-amber-400/70 text-[11px] mt-1`,children:`Key should start with sk-`}),zt.length>0&&zt.startsWith(`sk-`)&&zt.length<20&&(0,W.jsx)(`p`,{className:`text-amber-400/70 text-[11px] mt-1`,children:`Key looks too short`}),(0,W.jsxs)(`div`,{className:`flex items-start gap-2.5 mt-3 bg-white/[0.02] border border-white/[0.06] rounded-xl px-4 py-3`,children:[(0,W.jsx)(pe,{className:`h-4 w-4 text-[#AF27E3]/60 mt-0.5 shrink-0`}),(0,W.jsx)(`p`,{className:`text-white/35 text-[12px] leading-relaxed`,children:`Whisper provides more accurate transcription and works in all browsers including Firefox.`})]})]}),(0,W.jsx)(`button`,{onClick:Hn,disabled:p||Lt&&(!zt.startsWith(`sk-`)||zt.length<20),className:`w-full mt-5 py-3 bg-gradient-brand hover:opacity-90 text-white text-[14px] font-semibold rounded-full transition-colors flex items-center justify-center gap-2 disabled:opacity-40`,children:p?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(fe,{className:`h-4 w-4 animate-spin`}),`Setting up...`]}):(0,W.jsxs)(W.Fragment,{children:[`Complete Setup`,(0,W.jsx)(ae,{className:`h-4 w-4`})]})}),!Lt&&(0,W.jsx)(`p`,{className:`text-center text-white/20 text-[11px] mt-2.5`,children:`Voice input is active using your browser's built-in speech recognition.`})]}),a===6&&t&&(()=>{let e=Pe===`off`,t=e?window.location.origin:Pe===`named`?`https://${Ie}`:Be===`relay`&&M?M:Re||`http://localhost:3000`,n=t.startsWith(`http`)?t:`https://${t}`;return(0,W.jsxs)(`div`,{className:`flex flex-col items-center text-center`,children:[(0,W.jsx)(`div`,{className:`w-16 h-16 rounded-full bg-emerald-500/10 border border-emerald-500/20 flex items-center justify-center mb-5`,children:(0,W.jsx)(oe,{className:`h-8 w-8 text-emerald-400`})}),(0,W.jsx)(`h1`,{className:`text-2xl font-bold text-white tracking-tight`,children:`All Set!`}),(0,W.jsx)(`p`,{className:`text-white/40 text-[13px] mt-2 leading-relaxed max-w-[340px]`,children:e?`Your agent is running on your private network. Access it from any device on your local network or VPN.`:Pe===`named`?`Access your agent at your custom domain.`:Be===`relay`&&M?`Your agent is live and ready. From now on, access it using your custom URL below.`:`Your agent is live and ready. Your tunnel URL is shown below. Note: this URL changes on restart.`}),(0,W.jsxs)(`div`,{className:`w-full mt-6 flex items-center gap-2 bg-white/[0.03] border border-white/[0.06] rounded-xl px-4 py-3`,children:[(0,W.jsx)(`span`,{className:`font-mono text-[13px] text-white/70 truncate flex-1 text-left`,children:t}),(0,W.jsx)(`button`,{onClick:()=>{navigator.clipboard.writeText(n),wt(!0),setTimeout(()=>wt(!1),2e3)},className:`shrink-0 text-white/30 hover:text-white/60 transition-colors`,children:Ct?(0,W.jsx)(oe,{className:`h-4 w-4 text-emerald-400`}):(0,W.jsxs)(`svg`,{className:`h-4 w-4`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2,children:[(0,W.jsx)(`rect`,{x:`9`,y:`9`,width:`13`,height:`13`,rx:`2`}),(0,W.jsx)(`path`,{d:`M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1`})]})})]}),(0,W.jsxs)(`div`,{className:`w-full mt-3`,children:[(0,W.jsx)(`label`,{className:`text-[12px] text-white/40 font-medium mb-1.5 block text-left`,children:`Your password`}),(0,W.jsxs)(`div`,{className:`flex items-center gap-2 bg-white/[0.03] border border-white/[0.06] rounded-xl px-4 py-3`,children:[(0,W.jsx)(`span`,{className:`font-mono text-[13px] text-white/70 truncate flex-1 text-left`,children:Dt?yt:`•`.repeat(Math.max(yt.length,8))}),(0,W.jsx)(`button`,{onClick:()=>Ot(e=>!e),className:`shrink-0 text-white/30 hover:text-white/60 transition-colors`,children:Dt?(0,W.jsx)(le,{className:`h-4 w-4`}):(0,W.jsx)(ue,{className:`h-4 w-4`})})]})]}),(0,W.jsxs)(`button`,{onClick:()=>{e?(window.top||window).location.href=`/`:(window.top||window).location.href=n},className:`w-full mt-6 py-3 bg-gradient-brand hover:opacity-90 text-white text-[14px] font-semibold rounded-full transition-colors flex items-center justify-center gap-2`,children:[e?`Go to dashboard`:`Go to your agent`,(0,W.jsx)(O,{className:`h-4 w-4`})]}),(0,W.jsx)(`p`,{className:`text-white/20 text-[11px] mt-3 leading-relaxed`,children:e?`Access from any device on your network using the URL above.`:`You'll be redirected to your ${Pe===`named`?`custom domain`:Be===`relay`?`custom URL`:`tunnel URL`}.`})]})})()]},a)}),a>0&&a<i-1&&!(a===6&&t)&&(0,W.jsx)(`div`,{className:`px-8 pb-5 -mt-3`,children:(0,W.jsx)(`button`,{onClick:Bn,className:`text-white/25 hover:text-white/50 text-[12px] transition-colors`,children:`← Back`})})]})]})}export{c as _,he as a,O as c,ae as d,ie as f,s as g,p as h,be as i,D as l,y as m,Yu as n,pe as o,E as p,ol as r,fe as s,nd as t,oe as u,u as v};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as e,i as t,m as n,t as r,v as i}from"./globals-CdjENGUF.js";var a=i(e(),1),o=i(n(),1),s=t();function c(){return(0,s.jsx)(r,{onComplete:()=>{window.parent?.postMessage({type:`fluxy:onboard-complete`},`*`)},isInitialSetup:!0})}o.createRoot(document.getElementById(`root`)).render((0,s.jsx)(a.StrictMode,{children:(0,s.jsx)(c,{})}));
|
package/dist-fluxy/fluxy.html
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, interactive-widget=resizes-content" />
|
|
6
6
|
<title>Fluxy Chat</title>
|
|
7
|
-
<script type="module" crossorigin src="/fluxy/assets/fluxy-
|
|
8
|
-
<link rel="modulepreload" crossorigin href="/fluxy/assets/globals-
|
|
9
|
-
<link rel="stylesheet" crossorigin href="/fluxy/assets/globals-
|
|
7
|
+
<script type="module" crossorigin src="/fluxy/assets/fluxy-0tWF4Wwc.js"></script>
|
|
8
|
+
<link rel="modulepreload" crossorigin href="/fluxy/assets/globals-CdjENGUF.js">
|
|
9
|
+
<link rel="stylesheet" crossorigin href="/fluxy/assets/globals-CCAaaNDA.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body class="bg-background text-foreground">
|
|
12
12
|
<div id="root"></div>
|
package/dist-fluxy/onboard.html
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, interactive-widget=resizes-content" />
|
|
6
6
|
<title>Fluxy Setup</title>
|
|
7
|
-
<script type="module" crossorigin src="/fluxy/assets/onboard-
|
|
8
|
-
<link rel="modulepreload" crossorigin href="/fluxy/assets/globals-
|
|
9
|
-
<link rel="stylesheet" crossorigin href="/fluxy/assets/globals-
|
|
7
|
+
<script type="module" crossorigin src="/fluxy/assets/onboard-C43CX3tE.js"></script>
|
|
8
|
+
<link rel="modulepreload" crossorigin href="/fluxy/assets/globals-CdjENGUF.js">
|
|
9
|
+
<link rel="stylesheet" crossorigin href="/fluxy/assets/globals-CCAaaNDA.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body class="bg-background text-foreground">
|
|
12
12
|
<div id="root"></div>
|
package/package.json
CHANGED
|
@@ -26,6 +26,7 @@ import type { ChannelConfig, ChannelProvider, ChannelStatus, ChannelType, Inboun
|
|
|
26
26
|
|
|
27
27
|
const MAX_CONCURRENT_AGENTS = 5;
|
|
28
28
|
const MAX_BUFFER_MESSAGES = 30;
|
|
29
|
+
const DEBOUNCE_MS = 4000; // 4s — wait for the user to finish typing
|
|
29
30
|
|
|
30
31
|
interface ChannelManagerOpts {
|
|
31
32
|
broadcastFluxy: (type: string, data: any) => void;
|
|
@@ -44,6 +45,16 @@ interface BufferedMessage {
|
|
|
44
45
|
content: string;
|
|
45
46
|
}
|
|
46
47
|
|
|
48
|
+
interface DebounceEntry {
|
|
49
|
+
messages: string[];
|
|
50
|
+
timer: ReturnType<typeof setTimeout>;
|
|
51
|
+
channel: ChannelType;
|
|
52
|
+
sender: string;
|
|
53
|
+
senderName?: string;
|
|
54
|
+
fromMe: boolean;
|
|
55
|
+
isSelfChat: boolean;
|
|
56
|
+
}
|
|
57
|
+
|
|
47
58
|
export class ChannelManager {
|
|
48
59
|
private providers = new Map<ChannelType, ChannelProvider>();
|
|
49
60
|
private opts: ChannelManagerOpts;
|
|
@@ -52,6 +63,8 @@ export class ChannelManager {
|
|
|
52
63
|
private statusListeners: ((status: ChannelStatus) => void)[] = [];
|
|
53
64
|
/** In-memory conversation history per customer (keyed by "channel:phone") */
|
|
54
65
|
private customerBuffers = new Map<string, BufferedMessage[]>();
|
|
66
|
+
/** Debounce buffers per sender (keyed by "channel:sender") */
|
|
67
|
+
private debounceBuffers = new Map<string, DebounceEntry>();
|
|
55
68
|
|
|
56
69
|
constructor(opts: ChannelManagerOpts) {
|
|
57
70
|
this.opts = opts;
|
|
@@ -176,7 +189,7 @@ export class ChannelManager {
|
|
|
176
189
|
return config.channels?.[channel];
|
|
177
190
|
}
|
|
178
191
|
|
|
179
|
-
/** Handle an incoming message from any channel */
|
|
192
|
+
/** Handle an incoming message from any channel — debounces rapid messages from the same sender */
|
|
180
193
|
private async handleInboundMessage(
|
|
181
194
|
channel: ChannelType,
|
|
182
195
|
sender: string,
|
|
@@ -192,47 +205,72 @@ export class ChannelManager {
|
|
|
192
205
|
|
|
193
206
|
// ── Channel mode: ONLY respond to self-chat ──
|
|
194
207
|
if (mode === 'channel') {
|
|
195
|
-
if (!fromMe || !isSelfChat)
|
|
196
|
-
|
|
197
|
-
return;
|
|
198
|
-
}
|
|
208
|
+
if (!fromMe || !isSelfChat) return;
|
|
209
|
+
}
|
|
199
210
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
sender: sender.replace(/@.*/, ''),
|
|
203
|
-
senderName,
|
|
204
|
-
role: 'admin',
|
|
205
|
-
text,
|
|
206
|
-
rawSender: sender,
|
|
207
|
-
};
|
|
211
|
+
// ── Business mode: filter outgoing (except self-chat) ──
|
|
212
|
+
if (mode === 'business' && fromMe && !isSelfChat) return;
|
|
208
213
|
|
|
209
|
-
|
|
210
|
-
|
|
214
|
+
// Debounce: accumulate rapid messages from the same sender
|
|
215
|
+
const debounceKey = `${channel}:${sender}`;
|
|
216
|
+
const existing = this.debounceBuffers.get(debounceKey);
|
|
217
|
+
|
|
218
|
+
if (existing) {
|
|
219
|
+
// Another message from the same sender — reset timer, append text
|
|
220
|
+
clearTimeout(existing.timer);
|
|
221
|
+
existing.messages.push(text);
|
|
222
|
+
existing.senderName = senderName || existing.senderName;
|
|
223
|
+
existing.timer = setTimeout(() => this.flushDebounce(debounceKey), DEBOUNCE_MS);
|
|
224
|
+
log.info(`[channels] Debounce: buffered message ${existing.messages.length} from ${sender}`);
|
|
211
225
|
return;
|
|
212
226
|
}
|
|
213
227
|
|
|
214
|
-
//
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
228
|
+
// First message from this sender — start debounce timer
|
|
229
|
+
const entry: DebounceEntry = {
|
|
230
|
+
messages: [text],
|
|
231
|
+
channel,
|
|
232
|
+
sender,
|
|
233
|
+
senderName,
|
|
234
|
+
fromMe,
|
|
235
|
+
isSelfChat,
|
|
236
|
+
timer: setTimeout(() => this.flushDebounce(debounceKey), DEBOUNCE_MS),
|
|
237
|
+
};
|
|
238
|
+
this.debounceBuffers.set(debounceKey, entry);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
/** Flush debounced messages — combine and route to the appropriate handler */
|
|
242
|
+
private async flushDebounce(key: string) {
|
|
243
|
+
const entry = this.debounceBuffers.get(key);
|
|
244
|
+
if (!entry) return;
|
|
245
|
+
this.debounceBuffers.delete(key);
|
|
246
|
+
|
|
247
|
+
const { channel, sender, senderName, fromMe, isSelfChat, messages } = entry;
|
|
248
|
+
const combinedText = messages.join('\n');
|
|
249
|
+
|
|
250
|
+
const channelConfig = this.getChannelConfig(channel);
|
|
251
|
+
if (!channelConfig) return;
|
|
252
|
+
|
|
253
|
+
const mode = channelConfig.mode || 'channel';
|
|
220
254
|
|
|
221
|
-
|
|
255
|
+
// Route based on mode and role
|
|
256
|
+
if (mode === 'channel' || (mode === 'business' && fromMe && isSelfChat)) {
|
|
257
|
+
// Admin (self-chat in either mode)
|
|
222
258
|
const message: InboundMessage = {
|
|
223
259
|
channel,
|
|
224
260
|
sender: sender.replace(/@.*/, ''),
|
|
225
261
|
senderName,
|
|
226
262
|
role: 'admin',
|
|
227
|
-
text,
|
|
263
|
+
text: combinedText,
|
|
228
264
|
rawSender: sender,
|
|
229
265
|
};
|
|
230
266
|
|
|
231
|
-
|
|
267
|
+
const modeLabel = mode === 'channel' ? 'Channel mode | self-chat' : 'Business mode | self-chat | admin';
|
|
268
|
+
log.info(`[channels] ${modeLabel} | "${combinedText.slice(0, 60)}"`);
|
|
232
269
|
await this.handleAdminMessage(message);
|
|
233
270
|
return;
|
|
234
271
|
}
|
|
235
272
|
|
|
273
|
+
// Business mode — incoming message
|
|
236
274
|
const role = this.resolveBusinessRole(channelConfig, sender);
|
|
237
275
|
|
|
238
276
|
const message: InboundMessage = {
|
|
@@ -240,11 +278,11 @@ export class ChannelManager {
|
|
|
240
278
|
sender: sender.replace(/@.*/, ''),
|
|
241
279
|
senderName,
|
|
242
280
|
role,
|
|
243
|
-
text,
|
|
281
|
+
text: combinedText,
|
|
244
282
|
rawSender: sender,
|
|
245
283
|
};
|
|
246
284
|
|
|
247
|
-
log.info(`[channels] Business mode | ${message.sender} | role=${role} | "${
|
|
285
|
+
log.info(`[channels] Business mode | ${message.sender} | role=${role} | "${combinedText.slice(0, 60)}"`);
|
|
248
286
|
|
|
249
287
|
if (role === 'admin') {
|
|
250
288
|
await this.handleAdminMessage(message);
|