@wallavi/widget 1.11.0 → 1.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -32,7 +32,7 @@ function styleInject(css, { insertAt } = {}) {
32
32
  }
33
33
 
34
34
  // src/styles.css
35
- styleInject(".ww-pointer-events-none {\n pointer-events: none;\n}\n.ww-absolute {\n position: absolute;\n}\n.ww-relative {\n position: relative;\n}\n.ww-inset-0 {\n inset: 0px;\n}\n.ww-inset-4 {\n inset: 1rem;\n}\n.ww-inset-8 {\n inset: 2rem;\n}\n.ww-left-2\\.5 {\n left: 0.625rem;\n}\n.ww-top-1\\/2 {\n top: 50%;\n}\n.ww-z-50 {\n z-index: 50;\n}\n.ww-z-\\[100\\] {\n z-index: 100;\n}\n.ww-mx-0\\.5 {\n margin-left: 0.125rem;\n margin-right: 0.125rem;\n}\n.ww-mb-1 {\n margin-bottom: 0.25rem;\n}\n.ww-mb-12 {\n margin-bottom: 3rem;\n}\n.ww-mb-2 {\n margin-bottom: 0.5rem;\n}\n.ww-ml-0\\.5 {\n margin-left: 0.125rem;\n}\n.ww-ml-1 {\n margin-left: 0.25rem;\n}\n.ww-mt-0\\.5 {\n margin-top: 0.125rem;\n}\n.ww-mt-1 {\n margin-top: 0.25rem;\n}\n.ww-block {\n display: block;\n}\n.ww-inline-block {\n display: inline-block;\n}\n.ww-flex {\n display: flex;\n}\n.ww-inline-flex {\n display: inline-flex;\n}\n.ww-grid {\n display: grid;\n}\n.ww-hidden {\n display: none;\n}\n.ww-h-1\\.5 {\n height: 0.375rem;\n}\n.ww-h-10 {\n height: 2.5rem;\n}\n.ww-h-16 {\n height: 4rem;\n}\n.ww-h-2 {\n height: 0.5rem;\n}\n.ww-h-2\\.5 {\n height: 0.625rem;\n}\n.ww-h-20 {\n height: 5rem;\n}\n.ww-h-3 {\n height: 0.75rem;\n}\n.ww-h-3\\.5 {\n height: 0.875rem;\n}\n.ww-h-4 {\n height: 1rem;\n}\n.ww-h-40 {\n height: 10rem;\n}\n.ww-h-48 {\n height: 12rem;\n}\n.ww-h-6 {\n height: 1.5rem;\n}\n.ww-h-7 {\n height: 1.75rem;\n}\n.ww-h-8 {\n height: 2rem;\n}\n.ww-h-full {\n height: 100%;\n}\n.ww-max-h-32 {\n max-height: 8rem;\n}\n.ww-max-h-48 {\n max-height: 12rem;\n}\n.ww-max-h-\\[168px\\] {\n max-height: 168px;\n}\n.ww-max-h-\\[180px\\] {\n max-height: 180px;\n}\n.ww-w-0\\.5 {\n width: 0.125rem;\n}\n.ww-w-1\\.5 {\n width: 0.375rem;\n}\n.ww-w-10 {\n width: 2.5rem;\n}\n.ww-w-16 {\n width: 4rem;\n}\n.ww-w-2 {\n width: 0.5rem;\n}\n.ww-w-2\\.5 {\n width: 0.625rem;\n}\n.ww-w-20 {\n width: 5rem;\n}\n.ww-w-3 {\n width: 0.75rem;\n}\n.ww-w-3\\.5 {\n width: 0.875rem;\n}\n.ww-w-4 {\n width: 1rem;\n}\n.ww-w-48 {\n width: 12rem;\n}\n.ww-w-6 {\n width: 1.5rem;\n}\n.ww-w-7 {\n width: 1.75rem;\n}\n.ww-w-8 {\n width: 2rem;\n}\n.ww-w-fit {\n width: -moz-fit-content;\n width: fit-content;\n}\n.ww-w-full {\n width: 100%;\n}\n.ww-min-w-0 {\n min-width: 0px;\n}\n.ww-max-w-\\[120px\\] {\n max-width: 120px;\n}\n.ww-max-w-\\[200px\\] {\n max-width: 200px;\n}\n.ww-max-w-\\[78\\%\\] {\n max-width: 78%;\n}\n.ww-max-w-\\[82\\%\\] {\n max-width: 82%;\n}\n.ww-max-w-none {\n max-width: none;\n}\n.ww-flex-1 {\n flex: 1 1 0%;\n}\n.ww-shrink-0 {\n flex-shrink: 0;\n}\n.ww-rotate-180 {\n --tw-rotate: 180deg;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.ww-scale-100 {\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.ww-scale-105 {\n --tw-scale-x: 1.05;\n --tw-scale-y: 1.05;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.ww-scale-110 {\n --tw-scale-x: 1.1;\n --tw-scale-y: 1.1;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.ww-scale-90 {\n --tw-scale-x: .9;\n --tw-scale-y: .9;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n@keyframes ww-ping {\n 75%, 100% {\n transform: scale(2);\n opacity: 0;\n }\n}\n.ww-animate-ping {\n animation: ww-ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;\n}\n@keyframes ww-pulse {\n 50% {\n opacity: .5;\n }\n}\n.ww-animate-pulse {\n animation: ww-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;\n}\n@keyframes ww-spin {\n to {\n transform: rotate(360deg);\n }\n}\n.ww-animate-spin {\n animation: ww-spin 1s linear infinite;\n}\n.ww-cursor-default {\n cursor: default;\n}\n.ww-cursor-pointer {\n cursor: pointer;\n}\n.ww-touch-none {\n touch-action: none;\n}\n.ww-select-none {\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n}\n.ww-resize-none {\n resize: none;\n}\n.ww-grid-cols-2 {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n}\n.ww-flex-col {\n flex-direction: column;\n}\n.ww-flex-wrap {\n flex-wrap: wrap;\n}\n.ww-items-start {\n align-items: flex-start;\n}\n.ww-items-end {\n align-items: flex-end;\n}\n.ww-items-center {\n align-items: center;\n}\n.ww-justify-end {\n justify-content: flex-end;\n}\n.ww-justify-center {\n justify-content: center;\n}\n.ww-justify-between {\n justify-content: space-between;\n}\n.ww-gap-0\\.5 {\n gap: 0.125rem;\n}\n.ww-gap-1 {\n gap: 0.25rem;\n}\n.ww-gap-1\\.5 {\n gap: 0.375rem;\n}\n.ww-gap-2 {\n gap: 0.5rem;\n}\n.ww-gap-2\\.5 {\n gap: 0.625rem;\n}\n.ww-gap-4 {\n gap: 1rem;\n}\n.ww-gap-6 {\n gap: 1.5rem;\n}\n.ww-gap-8 {\n gap: 2rem;\n}\n.ww-divide-y > :not([hidden]) ~ :not([hidden]) {\n --tw-divide-y-reverse: 0;\n border-top-width: calc(1px * calc(1 - var(--tw-divide-y-reverse)));\n border-bottom-width: calc(1px * var(--tw-divide-y-reverse));\n}\n.ww-divide-border\\/40 > :not([hidden]) ~ :not([hidden]) {\n border-color: hsl(var(--border) / 0.4);\n}\n.ww-overflow-hidden {\n overflow: hidden;\n}\n.ww-overflow-y-auto {\n overflow-y: auto;\n}\n.ww-overscroll-contain {\n overscroll-behavior: contain;\n}\n.ww-overscroll-none {\n overscroll-behavior: none;\n}\n.ww-truncate {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.ww-whitespace-pre-wrap {\n white-space: pre-wrap;\n}\n.ww-rounded {\n border-radius: 0.25rem;\n}\n.ww-rounded-2xl {\n border-radius: 1rem;\n}\n.ww-rounded-full {\n border-radius: 9999px;\n}\n.ww-rounded-lg {\n border-radius: var(--radius);\n}\n.ww-rounded-md {\n border-radius: calc(var(--radius) - 2px);\n}\n.ww-rounded-xl {\n border-radius: 0.75rem;\n}\n.ww-rounded-tl-none {\n border-top-left-radius: 0px;\n}\n.ww-rounded-tl-sm {\n border-top-left-radius: calc(var(--radius) - 4px);\n}\n.ww-rounded-tr-sm {\n border-top-right-radius: calc(var(--radius) - 4px);\n}\n.ww-border {\n border-width: 1px;\n}\n.ww-border-2 {\n border-width: 2px;\n}\n.ww-border-b {\n border-bottom-width: 1px;\n}\n.ww-border-l-2 {\n border-left-width: 2px;\n}\n.ww-border-t {\n border-top-width: 1px;\n}\n.ww-border-background {\n border-color: hsl(var(--background));\n}\n.ww-border-black\\/10 {\n border-color: rgb(0 0 0 / 0.1);\n}\n.ww-border-border {\n border-color: hsl(var(--border));\n}\n.ww-border-border\\/30 {\n border-color: hsl(var(--border) / 0.3);\n}\n.ww-border-border\\/40 {\n border-color: hsl(var(--border) / 0.4);\n}\n.ww-border-border\\/50 {\n border-color: hsl(var(--border) / 0.5);\n}\n.ww-border-border\\/60 {\n border-color: hsl(var(--border) / 0.6);\n}\n.ww-border-border\\/80 {\n border-color: hsl(var(--border) / 0.8);\n}\n.ww-border-muted {\n border-color: hsl(var(--muted));\n}\n.ww-border-muted-foreground\\/30 {\n border-color: hsl(var(--muted-foreground) / 0.3);\n}\n.ww-border-primary\\/10 {\n border-color: hsl(var(--primary) / 0.1);\n}\n.ww-border-primary\\/20 {\n border-color: hsl(var(--primary) / 0.2);\n}\n.ww-border-red-200 {\n --tw-border-opacity: 1;\n border-color: rgb(254 202 202 / var(--tw-border-opacity, 1));\n}\n.ww-border-transparent {\n border-color: transparent;\n}\n.ww-border-white\\/20 {\n border-color: rgb(255 255 255 / 0.2);\n}\n.ww-bg-background {\n background-color: hsl(var(--background));\n}\n.ww-bg-background\\/20 {\n background-color: hsl(var(--background) / 0.2);\n}\n.ww-bg-background\\/90 {\n background-color: hsl(var(--background) / 0.9);\n}\n.ww-bg-background\\/95 {\n background-color: hsl(var(--background) / 0.95);\n}\n.ww-bg-black\\/10 {\n background-color: rgb(0 0 0 / 0.1);\n}\n.ww-bg-emerald-400 {\n --tw-bg-opacity: 1;\n background-color: rgb(52 211 153 / var(--tw-bg-opacity, 1));\n}\n.ww-bg-emerald-500 {\n --tw-bg-opacity: 1;\n background-color: rgb(16 185 129 / var(--tw-bg-opacity, 1));\n}\n.ww-bg-emerald-500\\/10 {\n background-color: rgb(16 185 129 / 0.1);\n}\n.ww-bg-emerald-500\\/20 {\n background-color: rgb(16 185 129 / 0.2);\n}\n.ww-bg-foreground\\/20 {\n background-color: hsl(var(--foreground) / 0.2);\n}\n.ww-bg-foreground\\/5 {\n background-color: hsl(var(--foreground) / 0.05);\n}\n.ww-bg-foreground\\/60 {\n background-color: hsl(var(--foreground) / 0.6);\n}\n.ww-bg-muted {\n background-color: hsl(var(--muted));\n}\n.ww-bg-muted-foreground\\/10 {\n background-color: hsl(var(--muted-foreground) / 0.1);\n}\n.ww-bg-muted\\/30 {\n background-color: hsl(var(--muted) / 0.3);\n}\n.ww-bg-muted\\/40 {\n background-color: hsl(var(--muted) / 0.4);\n}\n.ww-bg-muted\\/50 {\n background-color: hsl(var(--muted) / 0.5);\n}\n.ww-bg-muted\\/60 {\n background-color: hsl(var(--muted) / 0.6);\n}\n.ww-bg-primary {\n background-color: hsl(var(--primary));\n}\n.ww-bg-primary\\/10 {\n background-color: hsl(var(--primary) / 0.1);\n}\n.ww-bg-primary\\/5 {\n background-color: hsl(var(--primary) / 0.05);\n}\n.ww-bg-purple-500\\/20 {\n background-color: rgb(168 85 247 / 0.2);\n}\n.ww-bg-purple-500\\/30 {\n background-color: rgb(168 85 247 / 0.3);\n}\n.ww-bg-red-50 {\n --tw-bg-opacity: 1;\n background-color: rgb(254 242 242 / var(--tw-bg-opacity, 1));\n}\n.ww-bg-transparent {\n background-color: transparent;\n}\n.ww-bg-white\\/10 {\n background-color: rgb(255 255 255 / 0.1);\n}\n.ww-bg-white\\/15 {\n background-color: rgb(255 255 255 / 0.15);\n}\n.ww-fill-current {\n fill: currentColor;\n}\n.ww-object-cover {\n -o-object-fit: cover;\n object-fit: cover;\n}\n.ww-p-0\\.5 {\n padding: 0.125rem;\n}\n.ww-p-1\\.5 {\n padding: 0.375rem;\n}\n.ww-p-3 {\n padding: 0.75rem;\n}\n.ww-px-1 {\n padding-left: 0.25rem;\n padding-right: 0.25rem;\n}\n.ww-px-2 {\n padding-left: 0.5rem;\n padding-right: 0.5rem;\n}\n.ww-px-2\\.5 {\n padding-left: 0.625rem;\n padding-right: 0.625rem;\n}\n.ww-px-3 {\n padding-left: 0.75rem;\n padding-right: 0.75rem;\n}\n.ww-px-3\\.5 {\n padding-left: 0.875rem;\n padding-right: 0.875rem;\n}\n.ww-px-4 {\n padding-left: 1rem;\n padding-right: 1rem;\n}\n.ww-py-0\\.5 {\n padding-top: 0.125rem;\n padding-bottom: 0.125rem;\n}\n.ww-py-1 {\n padding-top: 0.25rem;\n padding-bottom: 0.25rem;\n}\n.ww-py-1\\.5 {\n padding-top: 0.375rem;\n padding-bottom: 0.375rem;\n}\n.ww-py-2 {\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n}\n.ww-py-2\\.5 {\n padding-top: 0.625rem;\n padding-bottom: 0.625rem;\n}\n.ww-py-3 {\n padding-top: 0.75rem;\n padding-bottom: 0.75rem;\n}\n.ww-py-4 {\n padding-top: 1rem;\n padding-bottom: 1rem;\n}\n.ww-pb-1\\.5 {\n padding-bottom: 0.375rem;\n}\n.ww-pb-2 {\n padding-bottom: 0.5rem;\n}\n.ww-pb-4 {\n padding-bottom: 1rem;\n}\n.ww-pl-2 {\n padding-left: 0.5rem;\n}\n.ww-pl-7 {\n padding-left: 1.75rem;\n}\n.ww-pr-0\\.5 {\n padding-right: 0.125rem;\n}\n.ww-pr-3 {\n padding-right: 0.75rem;\n}\n.ww-pt-2 {\n padding-top: 0.5rem;\n}\n.ww-pt-2\\.5 {\n padding-top: 0.625rem;\n}\n.ww-pt-5 {\n padding-top: 1.25rem;\n}\n.ww-text-left {\n text-align: left;\n}\n.ww-text-center {\n text-align: center;\n}\n.ww-align-middle {\n vertical-align: middle;\n}\n.ww-text-\\[10\\.5px\\] {\n font-size: 10.5px;\n}\n.ww-text-\\[10px\\] {\n font-size: 10px;\n}\n.ww-text-\\[11px\\] {\n font-size: 11px;\n}\n.ww-text-\\[12\\.5px\\] {\n font-size: 12.5px;\n}\n.ww-text-\\[13px\\] {\n font-size: 13px;\n}\n.ww-text-\\[8px\\] {\n font-size: 8px;\n}\n.ww-text-\\[9px\\] {\n font-size: 9px;\n}\n.ww-text-sm {\n font-size: 0.875rem;\n line-height: 1.25rem;\n}\n.ww-text-xs {\n font-size: 0.75rem;\n line-height: 1rem;\n}\n.ww-font-medium {\n font-weight: 500;\n}\n.ww-font-semibold {\n font-weight: 600;\n}\n.ww-uppercase {\n text-transform: uppercase;\n}\n.ww-leading-none {\n line-height: 1;\n}\n.ww-leading-relaxed {\n line-height: 1.625;\n}\n.ww-leading-snug {\n line-height: 1.375;\n}\n.ww-leading-tight {\n line-height: 1.25;\n}\n.ww-tracking-wide {\n letter-spacing: 0.025em;\n}\n.ww-tracking-wider {\n letter-spacing: 0.05em;\n}\n.ww-tracking-widest {\n letter-spacing: 0.1em;\n}\n.ww-text-black\\/40 {\n color: rgb(0 0 0 / 0.4);\n}\n.ww-text-black\\/60 {\n color: rgb(0 0 0 / 0.6);\n}\n.ww-text-destructive {\n color: hsl(var(--destructive));\n}\n.ww-text-destructive\\/70 {\n color: hsl(var(--destructive) / 0.7);\n}\n.ww-text-emerald-500 {\n --tw-text-opacity: 1;\n color: rgb(16 185 129 / var(--tw-text-opacity, 1));\n}\n.ww-text-foreground {\n color: hsl(var(--foreground));\n}\n.ww-text-foreground\\/60 {\n color: hsl(var(--foreground) / 0.6);\n}\n.ww-text-foreground\\/70 {\n color: hsl(var(--foreground) / 0.7);\n}\n.ww-text-foreground\\/80 {\n color: hsl(var(--foreground) / 0.8);\n}\n.ww-text-muted-foreground {\n color: hsl(var(--muted-foreground));\n}\n.ww-text-muted-foreground\\/40 {\n color: hsl(var(--muted-foreground) / 0.4);\n}\n.ww-text-muted-foreground\\/50 {\n color: hsl(var(--muted-foreground) / 0.5);\n}\n.ww-text-muted-foreground\\/70 {\n color: hsl(var(--muted-foreground) / 0.7);\n}\n.ww-text-muted-foreground\\/80 {\n color: hsl(var(--muted-foreground) / 0.8);\n}\n.ww-text-primary {\n color: hsl(var(--primary));\n}\n.ww-text-primary-foreground {\n color: hsl(var(--primary-foreground));\n}\n.ww-text-primary\\/70 {\n color: hsl(var(--primary) / 0.7);\n}\n.ww-text-primary\\/80 {\n color: hsl(var(--primary) / 0.8);\n}\n.ww-text-red-400 {\n --tw-text-opacity: 1;\n color: rgb(248 113 113 / var(--tw-text-opacity, 1));\n}\n.ww-text-red-500 {\n --tw-text-opacity: 1;\n color: rgb(239 68 68 / var(--tw-text-opacity, 1));\n}\n.ww-text-red-600 {\n --tw-text-opacity: 1;\n color: rgb(220 38 38 / var(--tw-text-opacity, 1));\n}\n.ww-text-white {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity, 1));\n}\n.ww-text-white\\/60 {\n color: rgb(255 255 255 / 0.6);\n}\n.ww-text-white\\/80 {\n color: rgb(255 255 255 / 0.8);\n}\n.ww-line-through {\n text-decoration-line: line-through;\n}\n.ww-no-underline {\n text-decoration-line: none;\n}\n.ww-decoration-foreground\\/20 {\n text-decoration-color: hsl(var(--foreground) / 0.2);\n}\n.ww-opacity-100 {\n opacity: 1;\n}\n.ww-opacity-25 {\n opacity: 0.25;\n}\n.ww-opacity-30 {\n opacity: 0.3;\n}\n.ww-opacity-40 {\n opacity: 0.4;\n}\n.ww-opacity-60 {\n opacity: 0.6;\n}\n.ww-opacity-70 {\n opacity: 0.7;\n}\n.ww-opacity-75 {\n opacity: 0.75;\n}\n.ww-opacity-80 {\n opacity: 0.8;\n}\n.ww-opacity-90 {\n opacity: 0.9;\n}\n.ww-shadow-2xl {\n --tw-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);\n --tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);\n box-shadow:\n var(--tw-ring-offset-shadow, 0 0 #0000),\n var(--tw-ring-shadow, 0 0 #0000),\n var(--tw-shadow);\n}\n.ww-shadow-lg {\n --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);\n --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);\n box-shadow:\n var(--tw-ring-offset-shadow, 0 0 #0000),\n var(--tw-ring-shadow, 0 0 #0000),\n var(--tw-shadow);\n}\n.ww-shadow-md {\n --tw-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);\n --tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);\n box-shadow:\n var(--tw-ring-offset-shadow, 0 0 #0000),\n var(--tw-ring-shadow, 0 0 #0000),\n var(--tw-shadow);\n}\n.ww-shadow-sm {\n --tw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);\n --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);\n box-shadow:\n var(--tw-ring-offset-shadow, 0 0 #0000),\n var(--tw-ring-shadow, 0 0 #0000),\n var(--tw-shadow);\n}\n.ww-shadow-xl {\n --tw-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);\n --tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);\n box-shadow:\n var(--tw-ring-offset-shadow, 0 0 #0000),\n var(--tw-ring-shadow, 0 0 #0000),\n var(--tw-shadow);\n}\n.ww-outline-none {\n outline: 2px solid transparent;\n outline-offset: 2px;\n}\n.ww-ring-2 {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow:\n var(--tw-ring-offset-shadow),\n var(--tw-ring-shadow),\n var(--tw-shadow, 0 0 #0000);\n}\n.ww-ring-inset {\n --tw-ring-inset: inset;\n}\n.ww-ring-primary\\/20 {\n --tw-ring-color: hsl(var(--primary) / 0.2);\n}\n.ww-ring-primary\\/60 {\n --tw-ring-color: hsl(var(--primary) / 0.6);\n}\n.ww-backdrop-blur-sm {\n --tw-backdrop-blur: blur(4px);\n 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);\n}\n.ww-backdrop-blur-xl {\n --tw-backdrop-blur: blur(24px);\n 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);\n}\n.ww-transition-all {\n transition-property: all;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.ww-transition-colors {\n transition-property:\n color,\n background-color,\n border-color,\n text-decoration-color,\n fill,\n stroke;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.ww-transition-opacity {\n transition-property: opacity;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.ww-transition-shadow {\n transition-property: box-shadow;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.ww-transition-transform {\n transition-property: transform;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.ww-duration-1000 {\n transition-duration: 1000ms;\n}\n.ww-duration-150 {\n transition-duration: 150ms;\n}\n.ww-duration-200 {\n transition-duration: 200ms;\n}\n.ww-duration-300 {\n transition-duration: 300ms;\n}\n.ww-duration-500 {\n transition-duration: 500ms;\n}\n.ww-duration-700 {\n transition-duration: 700ms;\n}\n@keyframes enter {\n from {\n opacity: var(--tw-enter-opacity, 1);\n transform: translate3d(var(--tw-enter-translate-x, 0), var(--tw-enter-translate-y, 0), 0) scale3d(var(--tw-enter-scale, 1), var(--tw-enter-scale, 1), var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0));\n }\n}\n@keyframes exit {\n to {\n opacity: var(--tw-exit-opacity, 1);\n transform: translate3d(var(--tw-exit-translate-x, 0), var(--tw-exit-translate-y, 0), 0) scale3d(var(--tw-exit-scale, 1), var(--tw-exit-scale, 1), var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0));\n }\n}\n.ww-animate-in {\n animation-name: enter;\n animation-duration: 150ms;\n --tw-enter-opacity: initial;\n --tw-enter-scale: initial;\n --tw-enter-rotate: initial;\n --tw-enter-translate-x: initial;\n --tw-enter-translate-y: initial;\n}\n.ww-fade-in {\n --tw-enter-opacity: 0;\n}\n.ww-slide-in-from-top-1 {\n --tw-enter-translate-y: -0.25rem;\n}\n.ww-duration-1000 {\n animation-duration: 1000ms;\n}\n.ww-duration-150 {\n animation-duration: 150ms;\n}\n.ww-duration-200 {\n animation-duration: 200ms;\n}\n.ww-duration-300 {\n animation-duration: 300ms;\n}\n.ww-duration-500 {\n animation-duration: 500ms;\n}\n.ww-duration-700 {\n animation-duration: 700ms;\n}\n.wallavi-widget *,\n.wallavi-widget *::before,\n.wallavi-widget *::after {\n box-sizing: border-box;\n border-width: 0;\n border-style: solid;\n}\n.wallavi-widget button {\n -moz-appearance: none;\n appearance: none;\n -webkit-appearance: none;\n background: transparent;\n border: none;\n cursor: pointer;\n}\n.wallavi-widget textarea,\n.wallavi-widget input,\n.wallavi-widget select {\n font-family: inherit;\n font-size: inherit;\n}\n.wallavi-widget img,\n.wallavi-widget video {\n max-width: 100%;\n height: auto;\n}\n.wallavi-widget .lk-control-bar {\n background: transparent !important;\n border: none !important;\n box-shadow: none !important;\n padding: 0 !important;\n gap: 1.5rem !important;\n justify-content: center !important;\n}\n.wallavi-widget .lk-button {\n background: rgba(25, 25, 28, 0.05) !important;\n border-radius: 9999px !important;\n padding: 1.25rem !important;\n color: var(--ww-fg, #19191c) !important;\n transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;\n border: 1px solid rgba(25, 25, 28, 0.1) !important;\n}\n.wallavi-widget .lk-button:hover {\n background: rgba(25, 25, 28, 0.1) !important;\n transform: scale(1.05) !important;\n}\n.wallavi-widget .lk-disconnect-button {\n background: #ef4444 !important;\n color: white !important;\n border: none !important;\n}\n.wallavi-widget .lk-disconnect-button:hover {\n background: #dc2626 !important;\n}\n.wallavi-widget .lk-device-menu {\n bottom: 100% !important;\n top: auto !important;\n margin-bottom: 1rem !important;\n max-width: 250px !important;\n width: -moz-max-content !important;\n width: max-content !important;\n left: 50% !important;\n transform: translateX(-50%) !important;\n background: #ffffff !important;\n border-radius: 16px !important;\n box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.15), 0 10px 20px -10px rgba(0, 0, 0, 0.1) !important;\n z-index: 1000 !important;\n overflow: hidden !important;\n border: 1px solid rgba(0, 0, 0, 0.05) !important;\n padding: 0.5rem !important;\n}\n.wallavi-widget .lk-device-menu > li {\n padding: 0.75rem 1rem !important;\n font-size: 0.875rem !important;\n color: #19191c !important;\n white-space: nowrap !important;\n overflow: hidden !important;\n text-overflow: ellipsis !important;\n border-radius: 8px !important;\n transition: background 0.15s !important;\n}\n.wallavi-widget .lk-device-menu > li:hover {\n background: rgba(0, 0, 0, 0.05) !important;\n}\n.wallavi-widget .lk-device-menu > li.lk-active {\n background: rgba(0, 0, 0, 0.08) !important;\n font-weight: 600 !important;\n}\n.placeholder\\:ww-text-muted-foreground\\/40::-moz-placeholder {\n color: hsl(var(--muted-foreground) / 0.4);\n}\n.placeholder\\:ww-text-muted-foreground\\/40::placeholder {\n color: hsl(var(--muted-foreground) / 0.4);\n}\n.placeholder\\:ww-text-muted-foreground\\/50::-moz-placeholder {\n color: hsl(var(--muted-foreground) / 0.5);\n}\n.placeholder\\:ww-text-muted-foreground\\/50::placeholder {\n color: hsl(var(--muted-foreground) / 0.5);\n}\n.focus-within\\:ww-ring-1:focus-within {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow:\n var(--tw-ring-offset-shadow),\n var(--tw-ring-shadow),\n var(--tw-shadow, 0 0 #0000);\n}\n.focus-within\\:ww-ring-ring\\/40:focus-within {\n --tw-ring-color: hsl(var(--ring) / 0.4);\n}\n.hover\\:-ww-translate-y-1:hover {\n --tw-translate-y: -0.25rem;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.hover\\:ww-border-primary\\/40:hover {\n border-color: hsl(var(--primary) / 0.4);\n}\n.hover\\:ww-bg-accent:hover {\n background-color: hsl(var(--accent));\n}\n.hover\\:ww-bg-foreground\\/10:hover {\n background-color: hsl(var(--foreground) / 0.1);\n}\n.hover\\:ww-bg-foreground\\/30:hover {\n background-color: hsl(var(--foreground) / 0.3);\n}\n.hover\\:ww-bg-muted:hover {\n background-color: hsl(var(--muted));\n}\n.hover\\:ww-bg-white\\/10:hover {\n background-color: rgb(255 255 255 / 0.1);\n}\n.hover\\:ww-text-accent-foreground:hover {\n color: hsl(var(--accent-foreground));\n}\n.hover\\:ww-text-foreground:hover {\n color: hsl(var(--foreground));\n}\n.hover\\:ww-text-primary:hover {\n color: hsl(var(--primary));\n}\n.hover\\:ww-opacity-80:hover {\n opacity: 0.8;\n}\n.hover\\:ww-opacity-85:hover {\n opacity: 0.85;\n}\n.hover\\:ww-shadow-sm:hover {\n --tw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);\n --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);\n box-shadow:\n var(--tw-ring-offset-shadow, 0 0 #0000),\n var(--tw-ring-shadow, 0 0 #0000),\n var(--tw-shadow);\n}\n.hover\\:ww-shadow-xl:hover {\n --tw-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);\n --tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);\n box-shadow:\n var(--tw-ring-offset-shadow, 0 0 #0000),\n var(--tw-ring-shadow, 0 0 #0000),\n var(--tw-shadow);\n}\n.focus\\:ww-ring-1:focus {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow:\n var(--tw-ring-offset-shadow),\n var(--tw-ring-shadow),\n var(--tw-shadow, 0 0 #0000);\n}\n.focus\\:ww-ring-ring\\/40:focus {\n --tw-ring-color: hsl(var(--ring) / 0.4);\n}\n.active\\:ww-scale-\\[0\\.98\\]:active {\n --tw-scale-x: 0.98;\n --tw-scale-y: 0.98;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.disabled\\:ww-pointer-events-none:disabled {\n pointer-events: none;\n}\n.disabled\\:ww-opacity-40:disabled {\n opacity: 0.4;\n}\n.disabled\\:ww-opacity-50:disabled {\n opacity: 0.5;\n}\n.dark\\:ww-border-red-800:is(.ww-dark *) {\n --tw-border-opacity: 1;\n border-color: rgb(153 27 27 / var(--tw-border-opacity, 1));\n}\n.dark\\:ww-bg-red-950:is(.ww-dark *) {\n --tw-bg-opacity: 1;\n background-color: rgb(69 10 10 / var(--tw-bg-opacity, 1));\n}\n.dark\\:ww-text-red-400:is(.ww-dark *) {\n --tw-text-opacity: 1;\n color: rgb(248 113 113 / var(--tw-text-opacity, 1));\n}\n");
35
+ styleInject('.ww-pointer-events-none {\n pointer-events: none;\n}\n.ww-absolute {\n position: absolute;\n}\n.ww-relative {\n position: relative;\n}\n.ww-inset-0 {\n inset: 0px;\n}\n.ww-inset-4 {\n inset: 1rem;\n}\n.ww-inset-8 {\n inset: 2rem;\n}\n.ww-left-2\\.5 {\n left: 0.625rem;\n}\n.ww-top-1\\/2 {\n top: 50%;\n}\n.ww-z-50 {\n z-index: 50;\n}\n.ww-z-\\[100\\] {\n z-index: 100;\n}\n.ww-mx-0\\.5 {\n margin-left: 0.125rem;\n margin-right: 0.125rem;\n}\n.ww-mb-1 {\n margin-bottom: 0.25rem;\n}\n.ww-mb-12 {\n margin-bottom: 3rem;\n}\n.ww-mb-2 {\n margin-bottom: 0.5rem;\n}\n.ww-mb-2\\.5 {\n margin-bottom: 0.625rem;\n}\n.ww-ml-0\\.5 {\n margin-left: 0.125rem;\n}\n.ww-ml-1 {\n margin-left: 0.25rem;\n}\n.ww-mt-0\\.5 {\n margin-top: 0.125rem;\n}\n.ww-mt-1 {\n margin-top: 0.25rem;\n}\n.ww-mt-1\\.5 {\n margin-top: 0.375rem;\n}\n.ww-line-clamp-1 {\n overflow: hidden;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 1;\n}\n.ww-line-clamp-2 {\n overflow: hidden;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n}\n.ww-block {\n display: block;\n}\n.ww-inline-block {\n display: inline-block;\n}\n.ww-flex {\n display: flex;\n}\n.ww-inline-flex {\n display: inline-flex;\n}\n.ww-grid {\n display: grid;\n}\n.ww-hidden {\n display: none;\n}\n.ww-h-1\\.5 {\n height: 0.375rem;\n}\n.ww-h-10 {\n height: 2.5rem;\n}\n.ww-h-16 {\n height: 4rem;\n}\n.ww-h-2 {\n height: 0.5rem;\n}\n.ww-h-2\\.5 {\n height: 0.625rem;\n}\n.ww-h-20 {\n height: 5rem;\n}\n.ww-h-3 {\n height: 0.75rem;\n}\n.ww-h-3\\.5 {\n height: 0.875rem;\n}\n.ww-h-4 {\n height: 1rem;\n}\n.ww-h-40 {\n height: 10rem;\n}\n.ww-h-48 {\n height: 12rem;\n}\n.ww-h-6 {\n height: 1.5rem;\n}\n.ww-h-7 {\n height: 1.75rem;\n}\n.ww-h-8 {\n height: 2rem;\n}\n.ww-h-full {\n height: 100%;\n}\n.ww-max-h-32 {\n max-height: 8rem;\n}\n.ww-max-h-48 {\n max-height: 12rem;\n}\n.ww-max-h-\\[168px\\] {\n max-height: 168px;\n}\n.ww-max-h-\\[180px\\] {\n max-height: 180px;\n}\n.ww-min-h-\\[22px\\] {\n min-height: 22px;\n}\n.ww-w-0\\.5 {\n width: 0.125rem;\n}\n.ww-w-1\\.5 {\n width: 0.375rem;\n}\n.ww-w-10 {\n width: 2.5rem;\n}\n.ww-w-16 {\n width: 4rem;\n}\n.ww-w-2 {\n width: 0.5rem;\n}\n.ww-w-2\\.5 {\n width: 0.625rem;\n}\n.ww-w-20 {\n width: 5rem;\n}\n.ww-w-3 {\n width: 0.75rem;\n}\n.ww-w-3\\.5 {\n width: 0.875rem;\n}\n.ww-w-4 {\n width: 1rem;\n}\n.ww-w-48 {\n width: 12rem;\n}\n.ww-w-6 {\n width: 1.5rem;\n}\n.ww-w-7 {\n width: 1.75rem;\n}\n.ww-w-8 {\n width: 2rem;\n}\n.ww-w-\\[300px\\] {\n width: 300px;\n}\n.ww-w-fit {\n width: -moz-fit-content;\n width: fit-content;\n}\n.ww-w-full {\n width: 100%;\n}\n.ww-min-w-0 {\n min-width: 0px;\n}\n.ww-max-w-\\[120px\\] {\n max-width: 120px;\n}\n.ww-max-w-\\[170px\\] {\n max-width: 170px;\n}\n.ww-max-w-\\[200px\\] {\n max-width: 200px;\n}\n.ww-max-w-\\[78\\%\\] {\n max-width: 78%;\n}\n.ww-max-w-\\[82\\%\\] {\n max-width: 82%;\n}\n.ww-max-w-none {\n max-width: none;\n}\n.ww-flex-1 {\n flex: 1 1 0%;\n}\n.ww-shrink-0 {\n flex-shrink: 0;\n}\n.ww-translate-x-\\[-4px\\] {\n --tw-translate-x: -4px;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.ww-rotate-180 {\n --tw-rotate: 180deg;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.ww-scale-100 {\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.ww-scale-105 {\n --tw-scale-x: 1.05;\n --tw-scale-y: 1.05;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.ww-scale-110 {\n --tw-scale-x: 1.1;\n --tw-scale-y: 1.1;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.ww-scale-90 {\n --tw-scale-x: .9;\n --tw-scale-y: .9;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n@keyframes ww-ping {\n 75%, 100% {\n transform: scale(2);\n opacity: 0;\n }\n}\n.ww-animate-ping {\n animation: ww-ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;\n}\n@keyframes ww-pulse {\n 50% {\n opacity: .5;\n }\n}\n.ww-animate-pulse {\n animation: ww-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;\n}\n@keyframes ww-spin {\n to {\n transform: rotate(360deg);\n }\n}\n.ww-animate-spin {\n animation: ww-spin 1s linear infinite;\n}\n.ww-cursor-default {\n cursor: default;\n}\n.ww-cursor-pointer {\n cursor: pointer;\n}\n.ww-touch-none {\n touch-action: none;\n}\n.ww-select-none {\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n}\n.ww-select-all {\n -webkit-user-select: all;\n -moz-user-select: all;\n user-select: all;\n}\n.ww-grid-cols-2 {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n}\n.ww-flex-row {\n flex-direction: row;\n}\n.ww-flex-col {\n flex-direction: column;\n}\n.ww-flex-wrap {\n flex-wrap: wrap;\n}\n.ww-items-start {\n align-items: flex-start;\n}\n.ww-items-end {\n align-items: flex-end;\n}\n.ww-items-center {\n align-items: center;\n}\n.ww-justify-end {\n justify-content: flex-end;\n}\n.ww-justify-center {\n justify-content: center;\n}\n.ww-justify-between {\n justify-content: space-between;\n}\n.ww-gap-0\\.5 {\n gap: 0.125rem;\n}\n.ww-gap-1 {\n gap: 0.25rem;\n}\n.ww-gap-1\\.5 {\n gap: 0.375rem;\n}\n.ww-gap-2 {\n gap: 0.5rem;\n}\n.ww-gap-2\\.5 {\n gap: 0.625rem;\n}\n.ww-gap-3\\.5 {\n gap: 0.875rem;\n}\n.ww-gap-4 {\n gap: 1rem;\n}\n.ww-gap-5 {\n gap: 1.25rem;\n}\n.ww-gap-6 {\n gap: 1.5rem;\n}\n.ww-gap-8 {\n gap: 2rem;\n}\n.ww-divide-y > :not([hidden]) ~ :not([hidden]) {\n --tw-divide-y-reverse: 0;\n border-top-width: calc(1px * calc(1 - var(--tw-divide-y-reverse)));\n border-bottom-width: calc(1px * var(--tw-divide-y-reverse));\n}\n.ww-divide-border\\/40 > :not([hidden]) ~ :not([hidden]) {\n border-color: hsl(var(--border) / 0.4);\n}\n.ww-overflow-hidden {\n overflow: hidden;\n}\n.ww-overflow-y-auto {\n overflow-y: auto;\n}\n.ww-overscroll-contain {\n overscroll-behavior: contain;\n}\n.ww-overscroll-none {\n overscroll-behavior: none;\n}\n.ww-truncate {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.ww-whitespace-pre-wrap {\n white-space: pre-wrap;\n}\n.\\!ww-rounded-full {\n border-radius: 9999px !important;\n}\n.ww-rounded {\n border-radius: 0.25rem;\n}\n.ww-rounded-2xl {\n border-radius: 1rem;\n}\n.ww-rounded-full {\n border-radius: 9999px;\n}\n.ww-rounded-lg {\n border-radius: var(--radius);\n}\n.ww-rounded-md {\n border-radius: calc(var(--radius) - 2px);\n}\n.ww-rounded-xl {\n border-radius: 0.75rem;\n}\n.ww-rounded-br-2xl {\n border-bottom-right-radius: 1rem;\n}\n.ww-rounded-tl-none {\n border-top-left-radius: 0px;\n}\n.ww-rounded-tl-sm {\n border-top-left-radius: calc(var(--radius) - 4px);\n}\n.ww-rounded-tr-sm {\n border-top-right-radius: calc(var(--radius) - 4px);\n}\n.ww-border {\n border-width: 1px;\n}\n.ww-border-2 {\n border-width: 2px;\n}\n.ww-border-b {\n border-bottom-width: 1px;\n}\n.ww-border-l {\n border-left-width: 1px;\n}\n.ww-border-l-2 {\n border-left-width: 2px;\n}\n.ww-border-t {\n border-top-width: 1px;\n}\n.ww-border-background {\n border-color: hsl(var(--background));\n}\n.ww-border-black\\/10 {\n border-color: rgb(0 0 0 / 0.1);\n}\n.ww-border-border {\n border-color: hsl(var(--border));\n}\n.ww-border-border\\/30 {\n border-color: hsl(var(--border) / 0.3);\n}\n.ww-border-border\\/40 {\n border-color: hsl(var(--border) / 0.4);\n}\n.ww-border-border\\/50 {\n border-color: hsl(var(--border) / 0.5);\n}\n.ww-border-border\\/60 {\n border-color: hsl(var(--border) / 0.6);\n}\n.ww-border-border\\/80 {\n border-color: hsl(var(--border) / 0.8);\n}\n.ww-border-muted {\n border-color: hsl(var(--muted));\n}\n.ww-border-muted-foreground\\/30 {\n border-color: hsl(var(--muted-foreground) / 0.3);\n}\n.ww-border-primary\\/10 {\n border-color: hsl(var(--primary) / 0.1);\n}\n.ww-border-primary\\/15 {\n border-color: hsl(var(--primary) / 0.15);\n}\n.ww-border-primary\\/20 {\n border-color: hsl(var(--primary) / 0.2);\n}\n.ww-border-red-200 {\n --tw-border-opacity: 1;\n border-color: rgb(254 202 202 / var(--tw-border-opacity, 1));\n}\n.ww-border-transparent {\n border-color: transparent;\n}\n.ww-border-white\\/20 {\n border-color: rgb(255 255 255 / 0.2);\n}\n.ww-border-white\\/30 {\n border-color: rgb(255 255 255 / 0.3);\n}\n.ww-bg-background {\n background-color: hsl(var(--background));\n}\n.ww-bg-background\\/20 {\n background-color: hsl(var(--background) / 0.2);\n}\n.ww-bg-background\\/90 {\n background-color: hsl(var(--background) / 0.9);\n}\n.ww-bg-background\\/95 {\n background-color: hsl(var(--background) / 0.95);\n}\n.ww-bg-black\\/10 {\n background-color: rgb(0 0 0 / 0.1);\n}\n.ww-bg-emerald-400 {\n --tw-bg-opacity: 1;\n background-color: rgb(52 211 153 / var(--tw-bg-opacity, 1));\n}\n.ww-bg-emerald-500 {\n --tw-bg-opacity: 1;\n background-color: rgb(16 185 129 / var(--tw-bg-opacity, 1));\n}\n.ww-bg-emerald-500\\/10 {\n background-color: rgb(16 185 129 / 0.1);\n}\n.ww-bg-emerald-500\\/20 {\n background-color: rgb(16 185 129 / 0.2);\n}\n.ww-bg-foreground\\/20 {\n background-color: hsl(var(--foreground) / 0.2);\n}\n.ww-bg-foreground\\/5 {\n background-color: hsl(var(--foreground) / 0.05);\n}\n.ww-bg-foreground\\/60 {\n background-color: hsl(var(--foreground) / 0.6);\n}\n.ww-bg-indigo-500\\/10 {\n background-color: rgb(99 102 241 / 0.1);\n}\n.ww-bg-muted {\n background-color: hsl(var(--muted));\n}\n.ww-bg-muted-foreground\\/10 {\n background-color: hsl(var(--muted-foreground) / 0.1);\n}\n.ww-bg-muted\\/10 {\n background-color: hsl(var(--muted) / 0.1);\n}\n.ww-bg-muted\\/30 {\n background-color: hsl(var(--muted) / 0.3);\n}\n.ww-bg-muted\\/40 {\n background-color: hsl(var(--muted) / 0.4);\n}\n.ww-bg-muted\\/50 {\n background-color: hsl(var(--muted) / 0.5);\n}\n.ww-bg-muted\\/60 {\n background-color: hsl(var(--muted) / 0.6);\n}\n.ww-bg-primary {\n background-color: hsl(var(--primary));\n}\n.ww-bg-primary\\/10 {\n background-color: hsl(var(--primary) / 0.1);\n}\n.ww-bg-primary\\/5 {\n background-color: hsl(var(--primary) / 0.05);\n}\n.ww-bg-purple-500\\/20 {\n background-color: rgb(168 85 247 / 0.2);\n}\n.ww-bg-purple-500\\/30 {\n background-color: rgb(168 85 247 / 0.3);\n}\n.ww-bg-red-50 {\n --tw-bg-opacity: 1;\n background-color: rgb(254 242 242 / var(--tw-bg-opacity, 1));\n}\n.ww-bg-transparent {\n background-color: transparent;\n}\n.ww-bg-white {\n --tw-bg-opacity: 1;\n background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));\n}\n.ww-bg-white\\/10 {\n background-color: rgb(255 255 255 / 0.1);\n}\n.ww-bg-white\\/15 {\n background-color: rgb(255 255 255 / 0.15);\n}\n.ww-bg-white\\/20 {\n background-color: rgb(255 255 255 / 0.2);\n}\n.ww-fill-current {\n fill: currentColor;\n}\n.ww-object-cover {\n -o-object-fit: cover;\n object-fit: cover;\n}\n.ww-p-0\\.5 {\n padding: 0.125rem;\n}\n.ww-p-1\\.5 {\n padding: 0.375rem;\n}\n.ww-p-3 {\n padding: 0.75rem;\n}\n.ww-p-3\\.5 {\n padding: 0.875rem;\n}\n.ww-px-1 {\n padding-left: 0.25rem;\n padding-right: 0.25rem;\n}\n.ww-px-1\\.5 {\n padding-left: 0.375rem;\n padding-right: 0.375rem;\n}\n.ww-px-2 {\n padding-left: 0.5rem;\n padding-right: 0.5rem;\n}\n.ww-px-2\\.5 {\n padding-left: 0.625rem;\n padding-right: 0.625rem;\n}\n.ww-px-3 {\n padding-left: 0.75rem;\n padding-right: 0.75rem;\n}\n.ww-px-3\\.5 {\n padding-left: 0.875rem;\n padding-right: 0.875rem;\n}\n.ww-px-4 {\n padding-left: 1rem;\n padding-right: 1rem;\n}\n.ww-py-0\\.5 {\n padding-top: 0.125rem;\n padding-bottom: 0.125rem;\n}\n.ww-py-1 {\n padding-top: 0.25rem;\n padding-bottom: 0.25rem;\n}\n.ww-py-1\\.5 {\n padding-top: 0.375rem;\n padding-bottom: 0.375rem;\n}\n.ww-py-2 {\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n}\n.ww-py-2\\.5 {\n padding-top: 0.625rem;\n padding-bottom: 0.625rem;\n}\n.ww-py-3 {\n padding-top: 0.75rem;\n padding-bottom: 0.75rem;\n}\n.ww-py-4 {\n padding-top: 1rem;\n padding-bottom: 1rem;\n}\n.ww-pb-1\\.5 {\n padding-bottom: 0.375rem;\n}\n.ww-pb-2 {\n padding-bottom: 0.5rem;\n}\n.ww-pb-3 {\n padding-bottom: 0.75rem;\n}\n.ww-pb-4 {\n padding-bottom: 1rem;\n}\n.ww-pl-2 {\n padding-left: 0.5rem;\n}\n.ww-pl-7 {\n padding-left: 1.75rem;\n}\n.ww-pr-0\\.5 {\n padding-right: 0.125rem;\n}\n.ww-pr-3 {\n padding-right: 0.75rem;\n}\n.ww-pt-0\\.5 {\n padding-top: 0.125rem;\n}\n.ww-pt-2 {\n padding-top: 0.5rem;\n}\n.ww-pt-2\\.5 {\n padding-top: 0.625rem;\n}\n.ww-pt-4 {\n padding-top: 1rem;\n}\n.ww-pt-5 {\n padding-top: 1.25rem;\n}\n.ww-text-left {\n text-align: left;\n}\n.ww-text-center {\n text-align: center;\n}\n.ww-align-middle {\n vertical-align: middle;\n}\n.ww-font-mono {\n font-family:\n ui-monospace,\n SFMono-Regular,\n Menlo,\n Monaco,\n Consolas,\n "Liberation Mono",\n "Courier New",\n monospace;\n}\n.ww-text-\\[10\\.5px\\] {\n font-size: 10.5px;\n}\n.ww-text-\\[10px\\] {\n font-size: 10px;\n}\n.ww-text-\\[11px\\] {\n font-size: 11px;\n}\n.ww-text-\\[12\\.5px\\] {\n font-size: 12.5px;\n}\n.ww-text-\\[12px\\] {\n font-size: 12px;\n}\n.ww-text-\\[13px\\] {\n font-size: 13px;\n}\n.ww-text-\\[8px\\] {\n font-size: 8px;\n}\n.ww-text-\\[9px\\] {\n font-size: 9px;\n}\n.ww-text-sm {\n font-size: 0.875rem;\n line-height: 1.25rem;\n}\n.ww-text-xs {\n font-size: 0.75rem;\n line-height: 1rem;\n}\n.ww-font-bold {\n font-weight: 700;\n}\n.ww-font-medium {\n font-weight: 500;\n}\n.ww-font-semibold {\n font-weight: 600;\n}\n.ww-uppercase {\n text-transform: uppercase;\n}\n.ww-leading-none {\n line-height: 1;\n}\n.ww-leading-normal {\n line-height: 1.5;\n}\n.ww-leading-relaxed {\n line-height: 1.625;\n}\n.ww-leading-snug {\n line-height: 1.375;\n}\n.ww-leading-tight {\n line-height: 1.25;\n}\n.ww-tracking-\\[0\\.06em\\] {\n letter-spacing: 0.06em;\n}\n.ww-tracking-\\[0\\.12em\\] {\n letter-spacing: 0.12em;\n}\n.ww-tracking-wide {\n letter-spacing: 0.025em;\n}\n.ww-tracking-wider {\n letter-spacing: 0.05em;\n}\n.ww-tracking-widest {\n letter-spacing: 0.1em;\n}\n.ww-text-amber-500 {\n --tw-text-opacity: 1;\n color: rgb(245 158 11 / var(--tw-text-opacity, 1));\n}\n.ww-text-black\\/40 {\n color: rgb(0 0 0 / 0.4);\n}\n.ww-text-black\\/60 {\n color: rgb(0 0 0 / 0.6);\n}\n.ww-text-destructive {\n color: hsl(var(--destructive));\n}\n.ww-text-destructive\\/70 {\n color: hsl(var(--destructive) / 0.7);\n}\n.ww-text-emerald-500 {\n --tw-text-opacity: 1;\n color: rgb(16 185 129 / var(--tw-text-opacity, 1));\n}\n.ww-text-foreground {\n color: hsl(var(--foreground));\n}\n.ww-text-foreground\\/60 {\n color: hsl(var(--foreground) / 0.6);\n}\n.ww-text-foreground\\/70 {\n color: hsl(var(--foreground) / 0.7);\n}\n.ww-text-foreground\\/80 {\n color: hsl(var(--foreground) / 0.8);\n}\n.ww-text-indigo-500 {\n --tw-text-opacity: 1;\n color: rgb(99 102 241 / var(--tw-text-opacity, 1));\n}\n.ww-text-inherit {\n color: inherit;\n}\n.ww-text-muted-foreground {\n color: hsl(var(--muted-foreground));\n}\n.ww-text-muted-foreground\\/40 {\n color: hsl(var(--muted-foreground) / 0.4);\n}\n.ww-text-muted-foreground\\/45 {\n color: hsl(var(--muted-foreground) / 0.45);\n}\n.ww-text-muted-foreground\\/50 {\n color: hsl(var(--muted-foreground) / 0.5);\n}\n.ww-text-muted-foreground\\/60 {\n color: hsl(var(--muted-foreground) / 0.6);\n}\n.ww-text-muted-foreground\\/70 {\n color: hsl(var(--muted-foreground) / 0.7);\n}\n.ww-text-muted-foreground\\/80 {\n color: hsl(var(--muted-foreground) / 0.8);\n}\n.ww-text-primary {\n color: hsl(var(--primary));\n}\n.ww-text-primary-foreground {\n color: hsl(var(--primary-foreground));\n}\n.ww-text-primary\\/60 {\n color: hsl(var(--primary) / 0.6);\n}\n.ww-text-primary\\/70 {\n color: hsl(var(--primary) / 0.7);\n}\n.ww-text-primary\\/80 {\n color: hsl(var(--primary) / 0.8);\n}\n.ww-text-red-400 {\n --tw-text-opacity: 1;\n color: rgb(248 113 113 / var(--tw-text-opacity, 1));\n}\n.ww-text-red-500 {\n --tw-text-opacity: 1;\n color: rgb(239 68 68 / var(--tw-text-opacity, 1));\n}\n.ww-text-red-600 {\n --tw-text-opacity: 1;\n color: rgb(220 38 38 / var(--tw-text-opacity, 1));\n}\n.ww-text-white {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity, 1));\n}\n.ww-text-white\\/60 {\n color: rgb(255 255 255 / 0.6);\n}\n.ww-text-white\\/80 {\n color: rgb(255 255 255 / 0.8);\n}\n.ww-underline {\n text-decoration-line: underline;\n}\n.ww-line-through {\n text-decoration-line: line-through;\n}\n.ww-no-underline {\n text-decoration-line: none;\n}\n.ww-decoration-foreground\\/20 {\n text-decoration-color: hsl(var(--foreground) / 0.2);\n}\n.ww-opacity-0 {\n opacity: 0;\n}\n.ww-opacity-100 {\n opacity: 1;\n}\n.ww-opacity-25 {\n opacity: 0.25;\n}\n.ww-opacity-30 {\n opacity: 0.3;\n}\n.ww-opacity-40 {\n opacity: 0.4;\n}\n.ww-opacity-55 {\n opacity: 0.55;\n}\n.ww-opacity-60 {\n opacity: 0.6;\n}\n.ww-opacity-70 {\n opacity: 0.7;\n}\n.ww-opacity-75 {\n opacity: 0.75;\n}\n.ww-opacity-80 {\n opacity: 0.8;\n}\n.ww-opacity-90 {\n opacity: 0.9;\n}\n.ww-shadow-2xl {\n --tw-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);\n --tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);\n box-shadow:\n var(--tw-ring-offset-shadow, 0 0 #0000),\n var(--tw-ring-shadow, 0 0 #0000),\n var(--tw-shadow);\n}\n.ww-shadow-\\[0_1px_2px_rgba\\(0\\,0\\,0\\,0\\.03\\)\\] {\n --tw-shadow: 0 1px 2px rgba(0,0,0,0.03);\n --tw-shadow-colored: 0 1px 2px var(--tw-shadow-color);\n box-shadow:\n var(--tw-ring-offset-shadow, 0 0 #0000),\n var(--tw-ring-shadow, 0 0 #0000),\n var(--tw-shadow);\n}\n.ww-shadow-lg {\n --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);\n --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);\n box-shadow:\n var(--tw-ring-offset-shadow, 0 0 #0000),\n var(--tw-ring-shadow, 0 0 #0000),\n var(--tw-shadow);\n}\n.ww-shadow-md {\n --tw-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);\n --tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);\n box-shadow:\n var(--tw-ring-offset-shadow, 0 0 #0000),\n var(--tw-ring-shadow, 0 0 #0000),\n var(--tw-shadow);\n}\n.ww-shadow-sm {\n --tw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);\n --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);\n box-shadow:\n var(--tw-ring-offset-shadow, 0 0 #0000),\n var(--tw-ring-shadow, 0 0 #0000),\n var(--tw-shadow);\n}\n.ww-shadow-xl {\n --tw-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);\n --tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);\n box-shadow:\n var(--tw-ring-offset-shadow, 0 0 #0000),\n var(--tw-ring-shadow, 0 0 #0000),\n var(--tw-shadow);\n}\n.ww-outline-none {\n outline: 2px solid transparent;\n outline-offset: 2px;\n}\n.ww-ring-2 {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow:\n var(--tw-ring-offset-shadow),\n var(--tw-ring-shadow),\n var(--tw-shadow, 0 0 #0000);\n}\n.ww-ring-inset {\n --tw-ring-inset: inset;\n}\n.ww-ring-primary\\/20 {\n --tw-ring-color: hsl(var(--primary) / 0.2);\n}\n.ww-ring-primary\\/60 {\n --tw-ring-color: hsl(var(--primary) / 0.6);\n}\n.ww-backdrop-blur-sm {\n --tw-backdrop-blur: blur(4px);\n 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);\n}\n.ww-backdrop-blur-xl {\n --tw-backdrop-blur: blur(24px);\n 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);\n}\n.ww-transition-all {\n transition-property: all;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.ww-transition-colors {\n transition-property:\n color,\n background-color,\n border-color,\n text-decoration-color,\n fill,\n stroke;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.ww-transition-opacity {\n transition-property: opacity;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.ww-transition-shadow {\n transition-property: box-shadow;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.ww-transition-transform {\n transition-property: transform;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.ww-duration-1000 {\n transition-duration: 1000ms;\n}\n.ww-duration-200 {\n transition-duration: 200ms;\n}\n.ww-duration-300 {\n transition-duration: 300ms;\n}\n.ww-duration-500 {\n transition-duration: 500ms;\n}\n.ww-duration-700 {\n transition-duration: 700ms;\n}\n@keyframes enter {\n from {\n opacity: var(--tw-enter-opacity, 1);\n transform: translate3d(var(--tw-enter-translate-x, 0), var(--tw-enter-translate-y, 0), 0) scale3d(var(--tw-enter-scale, 1), var(--tw-enter-scale, 1), var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0));\n }\n}\n@keyframes exit {\n to {\n opacity: var(--tw-exit-opacity, 1);\n transform: translate3d(var(--tw-exit-translate-x, 0), var(--tw-exit-translate-y, 0), 0) scale3d(var(--tw-exit-scale, 1), var(--tw-exit-scale, 1), var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0));\n }\n}\n.ww-animate-in {\n animation-name: enter;\n animation-duration: 150ms;\n --tw-enter-opacity: initial;\n --tw-enter-scale: initial;\n --tw-enter-rotate: initial;\n --tw-enter-translate-x: initial;\n --tw-enter-translate-y: initial;\n}\n.ww-fade-in {\n --tw-enter-opacity: 0;\n}\n.ww-slide-in-from-bottom-1 {\n --tw-enter-translate-y: 0.25rem;\n}\n.ww-slide-in-from-bottom-2 {\n --tw-enter-translate-y: 0.5rem;\n}\n.ww-slide-in-from-right-2 {\n --tw-enter-translate-x: 0.5rem;\n}\n.ww-duration-1000 {\n animation-duration: 1000ms;\n}\n.ww-duration-200 {\n animation-duration: 200ms;\n}\n.ww-duration-300 {\n animation-duration: 300ms;\n}\n.ww-duration-500 {\n animation-duration: 500ms;\n}\n.ww-duration-700 {\n animation-duration: 700ms;\n}\n.wallavi-widget *,\n.wallavi-widget *::before,\n.wallavi-widget *::after {\n box-sizing: border-box;\n border-width: 0;\n border-style: solid;\n}\n.wallavi-widget button {\n -moz-appearance: none;\n appearance: none;\n -webkit-appearance: none;\n background: transparent;\n border: none;\n cursor: pointer;\n}\n.wallavi-widget textarea,\n.wallavi-widget input,\n.wallavi-widget select {\n font-family: inherit;\n font-size: inherit;\n}\n.wallavi-widget img,\n.wallavi-widget video {\n max-width: 100%;\n height: auto;\n}\n.wallavi-widget .lk-control-bar {\n background: transparent !important;\n border: none !important;\n box-shadow: none !important;\n padding: 0 !important;\n gap: 1.5rem !important;\n justify-content: center !important;\n}\n.wallavi-widget .lk-button {\n background: rgba(25, 25, 28, 0.05) !important;\n border-radius: 9999px !important;\n padding: 1.25rem !important;\n color: var(--ww-fg, #19191c) !important;\n transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;\n border: 1px solid rgba(25, 25, 28, 0.1) !important;\n}\n.wallavi-widget .lk-button:hover {\n background: rgba(25, 25, 28, 0.1) !important;\n transform: scale(1.05) !important;\n}\n.wallavi-widget .lk-disconnect-button {\n background: #ef4444 !important;\n color: white !important;\n border: none !important;\n}\n.wallavi-widget .lk-disconnect-button:hover {\n background: #dc2626 !important;\n}\n.wallavi-widget .lk-device-menu {\n bottom: 100% !important;\n top: auto !important;\n margin-bottom: 1rem !important;\n max-width: 250px !important;\n width: -moz-max-content !important;\n width: max-content !important;\n left: 50% !important;\n transform: translateX(-50%) !important;\n background: #ffffff !important;\n border-radius: 16px !important;\n box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.15), 0 10px 20px -10px rgba(0, 0, 0, 0.1) !important;\n z-index: 1000 !important;\n overflow: hidden !important;\n border: 1px solid rgba(0, 0, 0, 0.05) !important;\n padding: 0.5rem !important;\n}\n.wallavi-widget .lk-device-menu > li {\n padding: 0.75rem 1rem !important;\n font-size: 0.875rem !important;\n color: #19191c !important;\n white-space: nowrap !important;\n overflow: hidden !important;\n text-overflow: ellipsis !important;\n border-radius: 8px !important;\n transition: background 0.15s !important;\n}\n.wallavi-widget .lk-device-menu > li:hover {\n background: rgba(0, 0, 0, 0.05) !important;\n}\n.wallavi-widget .lk-device-menu > li.lk-active {\n background: rgba(0, 0, 0, 0.08) !important;\n font-weight: 600 !important;\n}\n.placeholder\\:ww-text-muted-foreground\\/40::-moz-placeholder {\n color: hsl(var(--muted-foreground) / 0.4);\n}\n.placeholder\\:ww-text-muted-foreground\\/40::placeholder {\n color: hsl(var(--muted-foreground) / 0.4);\n}\n.focus-within\\:ww-ring-1:focus-within {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow:\n var(--tw-ring-offset-shadow),\n var(--tw-ring-shadow),\n var(--tw-shadow, 0 0 #0000);\n}\n.focus-within\\:ww-ring-ring\\/40:focus-within {\n --tw-ring-color: hsl(var(--ring) / 0.4);\n}\n.hover\\:-ww-translate-y-1:hover {\n --tw-translate-y: -0.25rem;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.hover\\:ww-scale-110:hover {\n --tw-scale-x: 1.1;\n --tw-scale-y: 1.1;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.hover\\:ww-border-border\\/80:hover {\n border-color: hsl(var(--border) / 0.8);\n}\n.hover\\:ww-border-primary\\/40:hover {\n border-color: hsl(var(--primary) / 0.4);\n}\n.hover\\:ww-bg-accent:hover {\n background-color: hsl(var(--accent));\n}\n.hover\\:ww-bg-foreground\\/10:hover {\n background-color: hsl(var(--foreground) / 0.1);\n}\n.hover\\:ww-bg-foreground\\/30:hover {\n background-color: hsl(var(--foreground) / 0.3);\n}\n.hover\\:ww-bg-muted:hover {\n background-color: hsl(var(--muted));\n}\n.hover\\:ww-bg-muted\\/20:hover {\n background-color: hsl(var(--muted) / 0.2);\n}\n.hover\\:ww-bg-primary\\/10:hover {\n background-color: hsl(var(--primary) / 0.1);\n}\n.hover\\:ww-bg-white\\/10:hover {\n background-color: rgb(255 255 255 / 0.1);\n}\n.hover\\:ww-text-accent-foreground:hover {\n color: hsl(var(--accent-foreground));\n}\n.hover\\:ww-text-foreground:hover {\n color: hsl(var(--foreground));\n}\n.hover\\:ww-text-primary:hover {\n color: hsl(var(--primary));\n}\n.hover\\:ww-opacity-80:hover {\n opacity: 0.8;\n}\n.hover\\:ww-opacity-85:hover {\n opacity: 0.85;\n}\n.hover\\:ww-shadow-md:hover {\n --tw-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);\n --tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);\n box-shadow:\n var(--tw-ring-offset-shadow, 0 0 #0000),\n var(--tw-ring-shadow, 0 0 #0000),\n var(--tw-shadow);\n}\n.hover\\:ww-shadow-sm:hover {\n --tw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);\n --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);\n box-shadow:\n var(--tw-ring-offset-shadow, 0 0 #0000),\n var(--tw-ring-shadow, 0 0 #0000),\n var(--tw-shadow);\n}\n.hover\\:ww-shadow-xl:hover {\n --tw-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);\n --tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);\n box-shadow:\n var(--tw-ring-offset-shadow, 0 0 #0000),\n var(--tw-ring-shadow, 0 0 #0000),\n var(--tw-shadow);\n}\n.focus\\:ww-ring-1:focus {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow:\n var(--tw-ring-offset-shadow),\n var(--tw-ring-shadow),\n var(--tw-shadow, 0 0 #0000);\n}\n.focus\\:ww-ring-ring\\/40:focus {\n --tw-ring-color: hsl(var(--ring) / 0.4);\n}\n.focus-visible\\:ww-outline-none:focus-visible {\n outline: 2px solid transparent;\n outline-offset: 2px;\n}\n.focus-visible\\:ww-ring-2:focus-visible {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow:\n var(--tw-ring-offset-shadow),\n var(--tw-ring-shadow),\n var(--tw-shadow, 0 0 #0000);\n}\n.focus-visible\\:ww-ring-ring\\/40:focus-visible {\n --tw-ring-color: hsl(var(--ring) / 0.4);\n}\n.active\\:ww-scale-\\[0\\.98\\]:active {\n --tw-scale-x: 0.98;\n --tw-scale-y: 0.98;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.disabled\\:ww-pointer-events-none:disabled {\n pointer-events: none;\n}\n.disabled\\:ww-opacity-40:disabled {\n opacity: 0.4;\n}\n.disabled\\:ww-opacity-50:disabled {\n opacity: 0.5;\n}\n.ww-group:hover .group-hover\\:ww-translate-x-0 {\n --tw-translate-x: 0px;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.ww-group:hover .group-hover\\:ww-rotate-12 {\n --tw-rotate: 12deg;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.ww-group:hover .group-hover\\:ww-scale-105 {\n --tw-scale-x: 1.05;\n --tw-scale-y: 1.05;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.ww-group:hover .group-hover\\:ww-scale-110 {\n --tw-scale-x: 1.1;\n --tw-scale-y: 1.1;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.ww-group:hover .group-hover\\:ww-opacity-100 {\n opacity: 1;\n}\n.dark\\:ww-border-red-800:is(.ww-dark *) {\n --tw-border-opacity: 1;\n border-color: rgb(153 27 27 / var(--tw-border-opacity, 1));\n}\n.dark\\:ww-bg-indigo-400\\/10:is(.ww-dark *) {\n background-color: rgb(129 140 248 / 0.1);\n}\n.dark\\:ww-bg-red-950:is(.ww-dark *) {\n --tw-bg-opacity: 1;\n background-color: rgb(69 10 10 / var(--tw-bg-opacity, 1));\n}\n.dark\\:ww-text-indigo-400:is(.ww-dark *) {\n --tw-text-opacity: 1;\n color: rgb(129 140 248 / var(--tw-text-opacity, 1));\n}\n.dark\\:ww-text-red-400:is(.ww-dark *) {\n --tw-text-opacity: 1;\n color: rgb(248 113 113 / var(--tw-text-opacity, 1));\n}\n');
36
36
  var twMerge = extendTailwindMerge({ prefix: "ww-" });
37
37
  var cn = (...inputs) => twMerge(clsx(inputs));
38
38
  async function getFreshClerkToken() {
@@ -340,9 +340,12 @@ function useChat({
340
340
  });
341
341
  const streamingMsgIdRef = useRef(null);
342
342
  const [debugTraces, setDebugTraces] = useState([]);
343
- const [selectedContext, setSelectedContext] = useState(null);
343
+ const [selectedContext, setSelectedContext] = useState(
344
+ null
345
+ );
344
346
  useEffect(() => {
345
- if (typeof window === "undefined" || typeof document === "undefined") return;
347
+ if (typeof window === "undefined" || typeof document === "undefined")
348
+ return;
346
349
  const handleContextSelected = (event) => {
347
350
  const customEvent = event;
348
351
  if (customEvent.detail && customEvent.detail.id) {
@@ -351,7 +354,9 @@ function useChat({
351
354
  };
352
355
  const handleGlobalClick = (e) => {
353
356
  if (e.metaKey || e.ctrlKey) {
354
- const target = e.target.closest("[data-wallavi-id]");
357
+ const target = e.target.closest(
358
+ "[data-wallavi-id]"
359
+ );
355
360
  if (target) {
356
361
  e.preventDefault();
357
362
  e.stopPropagation();
@@ -388,7 +393,10 @@ function useChat({
388
393
  window.addEventListener("wallavi:context-selected", handleContextSelected);
389
394
  document.addEventListener("click", handleGlobalClick, true);
390
395
  return () => {
391
- window.removeEventListener("wallavi:context-selected", handleContextSelected);
396
+ window.removeEventListener(
397
+ "wallavi:context-selected",
398
+ handleContextSelected
399
+ );
392
400
  document.removeEventListener("click", handleGlobalClick, true);
393
401
  };
394
402
  }, []);
@@ -1112,6 +1120,118 @@ function MinimizeIcon() {
1112
1120
  }
1113
1121
  ) });
1114
1122
  }
1123
+
1124
+ // src/lib/translations.ts
1125
+ var WIDGET_TRANSLATIONS = {
1126
+ en: {
1127
+ quickActions: "Quick Actions",
1128
+ documentation: "Documentation",
1129
+ askAbout: "Ask about",
1130
+ poweredBy: "Powered by",
1131
+ sendMessage: "Send a message\u2026",
1132
+ search: "Search\u2026",
1133
+ generalContext: "General Context",
1134
+ defaultGreeting: "Hello! How can I help you today?",
1135
+ connecting: "Connecting...",
1136
+ listening: "Listening...",
1137
+ speaking: "Speaking...",
1138
+ ready: "Ready",
1139
+ aiAssistant: "AI Assistant",
1140
+ minimize: "Minimize",
1141
+ expand: "Expand",
1142
+ voiceCall: "Voice Call",
1143
+ newConversation: "New conversation",
1144
+ close: "Close",
1145
+ dropFiles: "Drop files to attach",
1146
+ talkingToAgent: "Talking to an agent",
1147
+ muteMic: "Mute microphone",
1148
+ unmuteMic: "Unmute microphone",
1149
+ disconnect: "Disconnect",
1150
+ calling: "Calling",
1151
+ called: "Called",
1152
+ failed: "Failed",
1153
+ reasoning: "Reasoning",
1154
+ noResults: "No results",
1155
+ proceed: "Proceed",
1156
+ proceedMessage: "yes, proceed",
1157
+ cancel: "Cancel",
1158
+ cancelMessage: "cancel",
1159
+ regenerateResponse: "Regenerate response",
1160
+ removeContext: "Remove context",
1161
+ stopRecording: "Stop recording",
1162
+ recordVoiceMessage: "Record voice message",
1163
+ attachFile: "Attach file (CSV, image\u2026)",
1164
+ requestHuman: "Talk to an agent",
1165
+ requestHumanSublabel: "We'll connect you with an available agent",
1166
+ returnToAi: "Return to AI chat",
1167
+ returnToAiSublabel: "Instant response with artificial intelligence",
1168
+ filesCount: "{count} file(s)",
1169
+ tellMeAbout: "Tell me about {name}",
1170
+ tellMeMoreAbout: "Tell me more about: {name}",
1171
+ whatDoYouKnowAbout: "What do you know about {name}?",
1172
+ uploadFailed: "Upload failed",
1173
+ remove: "Remove"
1174
+ },
1175
+ es: {
1176
+ quickActions: "Acciones r\xE1pidas",
1177
+ documentation: "Documentaci\xF3n",
1178
+ askAbout: "Preguntas frecuentes",
1179
+ poweredBy: "Powered by",
1180
+ sendMessage: "Enviar un mensaje...",
1181
+ search: "Buscar...",
1182
+ generalContext: "Contexto general",
1183
+ defaultGreeting: "\xA1Hola! \xBFC\xF3mo puedo ayudarte hoy?",
1184
+ connecting: "Conectando...",
1185
+ listening: "Escuchando...",
1186
+ speaking: "Hablando...",
1187
+ ready: "Listo",
1188
+ aiAssistant: "Asistente de IA",
1189
+ minimize: "Minimizar",
1190
+ expand: "Expandir",
1191
+ voiceCall: "Llamada de voz",
1192
+ newConversation: "Nueva conversaci\xF3n",
1193
+ close: "Cerrar",
1194
+ dropFiles: "Arrastra archivos para adjuntar",
1195
+ talkingToAgent: "Hablando con un agente",
1196
+ muteMic: "Silenciar micr\xF3fono",
1197
+ unmuteMic: "Activar micr\xF3fono",
1198
+ disconnect: "Desconectar",
1199
+ calling: "Llamando",
1200
+ called: "Llamado",
1201
+ failed: "Fall\xF3",
1202
+ reasoning: "Razonamiento",
1203
+ noResults: "Sin resultados",
1204
+ proceed: "Proceder",
1205
+ proceedMessage: "s\xED, proceder",
1206
+ cancel: "Cancelar",
1207
+ cancelMessage: "cancelar",
1208
+ regenerateResponse: "Regenerar respuesta",
1209
+ removeContext: "Eliminar contexto",
1210
+ stopRecording: "Detener grabaci\xF3n",
1211
+ recordVoiceMessage: "Grabar mensaje de voz",
1212
+ attachFile: "Adjuntar archivo (CSV, imagen...)",
1213
+ requestHuman: "Hablar con un agente",
1214
+ requestHumanSublabel: "Te conectamos con un agente disponible",
1215
+ returnToAi: "Volver a chatear con la IA",
1216
+ returnToAiSublabel: "Respuesta instant\xE1nea con inteligencia artificial",
1217
+ filesCount: "{count} archivo(s)",
1218
+ tellMeAbout: "H\xE1blame de {name}",
1219
+ tellMeMoreAbout: "Cu\xE9ntame m\xE1s sobre: {name}",
1220
+ whatDoYouKnowAbout: "\xBFQu\xE9 sabes sobre {name}?",
1221
+ uploadFailed: "Error al subir",
1222
+ remove: "Quitar"
1223
+ }
1224
+ };
1225
+ function getWidgetTranslation(key, locale, replacements) {
1226
+ const lang = locale === "es" ? "es" : "en";
1227
+ let text = WIDGET_TRANSLATIONS[lang][key];
1228
+ if (replacements) {
1229
+ Object.entries(replacements).forEach(([k, v]) => {
1230
+ text = text.replace(`{${k}}`, v);
1231
+ });
1232
+ }
1233
+ return text;
1234
+ }
1115
1235
  var Avatar = ({
1116
1236
  style,
1117
1237
  ...p
@@ -1174,7 +1294,8 @@ function ChatHeader({
1174
1294
  onExpand,
1175
1295
  expanded,
1176
1296
  onCall,
1177
- isCallLoading
1297
+ isCallLoading,
1298
+ locale
1178
1299
  }) {
1179
1300
  return /* @__PURE__ */ jsxs(
1180
1301
  "header",
@@ -1207,7 +1328,7 @@ function ChatHeader({
1207
1328
  ),
1208
1329
  /* @__PURE__ */ jsxs("div", { className: "ww-min-w-0", children: [
1209
1330
  /* @__PURE__ */ jsx("p", { className: "ww-font-semibold ww-text-sm ww-truncate ww-leading-tight", children: title }),
1210
- /* @__PURE__ */ jsx("p", { className: "ww-text-[10px] ww-opacity-70 ww-leading-tight", children: "AI Assistant" })
1331
+ /* @__PURE__ */ jsx("p", { className: "ww-text-[10px] ww-opacity-70 ww-leading-tight", children: getWidgetTranslation("aiAssistant", locale) })
1211
1332
  ] })
1212
1333
  ] }),
1213
1334
  /* @__PURE__ */ jsxs("div", { className: "ww-flex ww-items-center ww-gap-1", children: [
@@ -1216,7 +1337,7 @@ function ChatHeader({
1216
1337
  {
1217
1338
  onClick: onExpand,
1218
1339
  className: "ww-rounded-full ww-p-1.5 ww-transition-colors hover:ww-bg-white/10",
1219
- title: expanded ? "Minimize" : "Expand",
1340
+ title: expanded ? getWidgetTranslation("minimize", locale) : getWidgetTranslation("expand", locale),
1220
1341
  children: expanded ? /* @__PURE__ */ jsx(MinimizeIcon, {}) : /* @__PURE__ */ jsx(ExpandIcon, {})
1221
1342
  }
1222
1343
  ),
@@ -1226,7 +1347,7 @@ function ChatHeader({
1226
1347
  onClick: onCall,
1227
1348
  disabled: isCallLoading,
1228
1349
  className: "ww-rounded-full ww-p-1.5 ww-transition-colors hover:ww-bg-white/10 disabled:ww-opacity-50",
1229
- title: "Voice Call",
1350
+ title: getWidgetTranslation("voiceCall", locale),
1230
1351
  children: isCallLoading ? /* @__PURE__ */ jsxs(
1231
1352
  "svg",
1232
1353
  {
@@ -1270,7 +1391,7 @@ function ChatHeader({
1270
1391
  {
1271
1392
  onClick: onReset,
1272
1393
  className: "ww-rounded-full ww-p-1.5 ww-transition-colors hover:ww-bg-white/10",
1273
- title: "New conversation",
1394
+ title: getWidgetTranslation("newConversation", locale),
1274
1395
  children: /* @__PURE__ */ jsx(
1275
1396
  RotateCcw,
1276
1397
  {
@@ -1285,7 +1406,7 @@ function ChatHeader({
1285
1406
  {
1286
1407
  onClick: onClose,
1287
1408
  className: "ww-rounded-full ww-p-1.5 ww-transition-colors hover:ww-bg-white/10",
1288
- title: "Close",
1409
+ title: getWidgetTranslation("close", locale),
1289
1410
  children: /* @__PURE__ */ jsx(X, { className: "ww-h-3.5 ww-w-3.5", style: { color: headerText } })
1290
1411
  }
1291
1412
  )
@@ -1327,7 +1448,8 @@ function ChipLeading({ a }) {
1327
1448
  }
1328
1449
  function AttachmentChips({
1329
1450
  attachments,
1330
- onRemove
1451
+ onRemove,
1452
+ locale
1331
1453
  }) {
1332
1454
  if (attachments.length === 0) return null;
1333
1455
  return /* @__PURE__ */ jsx("div", { className: "ww-flex ww-flex-wrap ww-gap-1.5 ww-px-1 ww-pb-1.5", children: attachments.map((a) => /* @__PURE__ */ jsxs(
@@ -1339,7 +1461,7 @@ function AttachmentChips({
1339
1461
  ),
1340
1462
  children: [
1341
1463
  /* @__PURE__ */ jsx(ChipLeading, { a }),
1342
- /* @__PURE__ */ jsx("span", { className: "ww-truncate ww-leading-tight", children: a.status === "error" ? a.errorMessage ?? "Upload failed" : a.name }),
1464
+ /* @__PURE__ */ jsx("span", { className: "ww-truncate ww-leading-tight", children: a.status === "error" ? a.errorMessage ?? getWidgetTranslation("uploadFailed", locale) : a.name }),
1343
1465
  a.status === "ready" && /* @__PURE__ */ jsx("span", { className: "ww-shrink-0 ww-text-muted-foreground/50", children: formatBytes(a.sizeBytes) }),
1344
1466
  /* @__PURE__ */ jsx(
1345
1467
  "button",
@@ -1347,7 +1469,7 @@ function AttachmentChips({
1347
1469
  type: "button",
1348
1470
  onClick: () => onRemove(a.id),
1349
1471
  className: "ww-shrink-0 ww-rounded-full ww-p-0.5 hover:ww-bg-foreground/10 ww-transition-colors ww-ml-0.5",
1350
- title: "Remove",
1472
+ title: getWidgetTranslation("remove", locale),
1351
1473
  children: /* @__PURE__ */ jsx(X, { className: "ww-h-2.5 ww-w-2.5" })
1352
1474
  }
1353
1475
  )
@@ -1427,7 +1549,8 @@ function PlanStepIcon({ status }) {
1427
1549
  function PlanCard({
1428
1550
  part,
1429
1551
  onSend,
1430
- disabled
1552
+ disabled,
1553
+ locale
1431
1554
  }) {
1432
1555
  const successCount = part.steps.filter((s) => s.status === "success").length;
1433
1556
  const hasExecuting = part.steps.some((s) => s.status === "executing");
@@ -1479,7 +1602,7 @@ function PlanCard({
1479
1602
  /* @__PURE__ */ jsxs(
1480
1603
  "button",
1481
1604
  {
1482
- onClick: () => onSend("s\xED, proceder"),
1605
+ onClick: () => onSend(getWidgetTranslation("proceedMessage", locale)),
1483
1606
  disabled,
1484
1607
  className: "ww-flex-1 ww-flex ww-items-center ww-justify-center ww-gap-1.5 ww-rounded-lg ww-py-1.5 ww-text-xs ww-font-semibold ww-transition-opacity hover:ww-opacity-85 active:ww-scale-[0.98] disabled:ww-opacity-50 disabled:ww-pointer-events-none",
1485
1608
  style: {
@@ -1488,19 +1611,19 @@ function PlanCard({
1488
1611
  },
1489
1612
  children: [
1490
1613
  /* @__PURE__ */ jsx(Check, { className: "ww-h-3 ww-w-3 ww-shrink-0" }),
1491
- "Proceder"
1614
+ getWidgetTranslation("proceed", locale)
1492
1615
  ]
1493
1616
  }
1494
1617
  ),
1495
1618
  /* @__PURE__ */ jsxs(
1496
1619
  "button",
1497
1620
  {
1498
- onClick: () => onSend("cancelar"),
1621
+ onClick: () => onSend(getWidgetTranslation("cancelMessage", locale)),
1499
1622
  disabled,
1500
1623
  className: "ww-flex ww-items-center ww-justify-center ww-gap-1.5 ww-rounded-lg ww-px-3 ww-py-1.5 ww-text-xs ww-font-medium ww-bg-muted ww-text-muted-foreground ww-transition-opacity hover:ww-opacity-80 active:ww-scale-[0.98] disabled:ww-opacity-50 disabled:ww-pointer-events-none",
1501
1624
  children: [
1502
1625
  /* @__PURE__ */ jsx(X, { className: "ww-h-3 ww-w-3 ww-shrink-0" }),
1503
- "Cancelar"
1626
+ getWidgetTranslation("cancel", locale)
1504
1627
  ]
1505
1628
  }
1506
1629
  )
@@ -1544,19 +1667,25 @@ function ThinkingDots() {
1544
1667
  )
1545
1668
  ] });
1546
1669
  }
1547
- function ToolCallBadge({ part }) {
1670
+ function ToolCallBadge({
1671
+ part,
1672
+ locale
1673
+ }) {
1548
1674
  return /* @__PURE__ */ jsxs("div", { className: "ww-flex ww-items-center ww-gap-1.5 ww-text-xs ww-text-muted-foreground ww-bg-muted/60 ww-border ww-rounded-full ww-px-3 ww-py-1 ww-w-fit", children: [
1549
1675
  part.status === "running" && /* @__PURE__ */ jsx(Loader2, { className: "ww-h-3 ww-w-3 ww-animate-spin" }),
1550
1676
  part.status === "done" && /* @__PURE__ */ jsx(CheckCircle2, { className: "ww-h-3 ww-w-3 ww-text-emerald-500" }),
1551
1677
  part.status === "error" && /* @__PURE__ */ jsx(AlertCircle, { className: "ww-h-3 ww-w-3 ww-text-destructive" }),
1552
1678
  /* @__PURE__ */ jsxs("span", { children: [
1553
- part.status === "running" ? "Calling" : part.status === "done" ? "Called" : "Failed",
1679
+ part.status === "running" ? getWidgetTranslation("calling", locale) : part.status === "done" ? getWidgetTranslation("called", locale) : getWidgetTranslation("failed", locale),
1554
1680
  " ",
1555
1681
  /* @__PURE__ */ jsx("span", { className: "ww-font-medium ww-text-foreground", children: formatToolName(part.toolName) })
1556
1682
  ] })
1557
1683
  ] });
1558
1684
  }
1559
- function ReasoningBlock({ text }) {
1685
+ function ReasoningBlock({
1686
+ text,
1687
+ locale
1688
+ }) {
1560
1689
  const [open, setOpen] = useState(false);
1561
1690
  return /* @__PURE__ */ jsxs("div", { className: "ww-mb-1", children: [
1562
1691
  /* @__PURE__ */ jsxs(
@@ -1566,7 +1695,7 @@ function ReasoningBlock({ text }) {
1566
1695
  className: "ww-flex ww-items-center ww-gap-1 ww-text-xs ww-text-muted-foreground hover:ww-text-foreground ww-transition-colors",
1567
1696
  children: [
1568
1697
  /* @__PURE__ */ jsx(Zap, { className: "ww-h-3 ww-w-3" }),
1569
- /* @__PURE__ */ jsx("span", { children: "Reasoning" }),
1698
+ /* @__PURE__ */ jsx("span", { children: getWidgetTranslation("reasoning", locale) }),
1570
1699
  /* @__PURE__ */ jsx(
1571
1700
  ChevronDown,
1572
1701
  {
@@ -1585,7 +1714,8 @@ function ReasoningBlock({ text }) {
1585
1714
  function PickerSelector({
1586
1715
  part,
1587
1716
  disabled,
1588
- onSelect
1717
+ onSelect,
1718
+ locale
1589
1719
  }) {
1590
1720
  const count = part.options.length;
1591
1721
  const mode = count <= 6 ? "pills" : count <= 20 ? "grid" : "list";
@@ -1617,7 +1747,7 @@ function PickerSelector({
1617
1747
  type: "text",
1618
1748
  value: query,
1619
1749
  onChange: (e) => setQuery(e.target.value),
1620
- placeholder: "Search\u2026",
1750
+ placeholder: getWidgetTranslation("search", locale),
1621
1751
  disabled: disabled || isConsumed,
1622
1752
  className: "ww-w-full ww-rounded-lg ww-border ww-bg-background ww-pl-7 ww-pr-3 ww-py-1.5 ww-text-xs ww-outline-none focus:ww-ring-1 focus:ww-ring-ring/40 placeholder:ww-text-muted-foreground/40 disabled:ww-opacity-50"
1623
1753
  }
@@ -1666,7 +1796,7 @@ function PickerSelector({
1666
1796
  );
1667
1797
  }) }),
1668
1798
  mode === "list" && /* @__PURE__ */ jsxs("div", { className: "ww-flex ww-flex-col ww-gap-0.5 ww-max-h-[180px] ww-overflow-y-auto ww-pr-0.5", children: [
1669
- filtered.length === 0 && /* @__PURE__ */ jsx("p", { className: "ww-py-3 ww-text-center ww-text-xs ww-text-muted-foreground/50", children: "No results" }),
1799
+ filtered.length === 0 && /* @__PURE__ */ jsx("p", { className: "ww-py-3 ww-text-center ww-text-xs ww-text-muted-foreground/50", children: getWidgetTranslation("noResults", locale) }),
1670
1800
  filtered.map((opt, i) => {
1671
1801
  const sel = part.selectedValue === opt.value;
1672
1802
  const faded = isConsumed && !sel;
@@ -1703,7 +1833,10 @@ function PickerSelector({
1703
1833
  );
1704
1834
  }
1705
1835
  var ReactMarkdown = ReactMarkdownLib;
1706
- function MarkdownContent({ text }) {
1836
+ function MarkdownContent({
1837
+ text,
1838
+ isUser
1839
+ }) {
1707
1840
  return /* @__PURE__ */ jsx(
1708
1841
  ReactMarkdown,
1709
1842
  {
@@ -1791,10 +1924,15 @@ function MarkdownContent({ text }) {
1791
1924
  return /* @__PURE__ */ jsxs(
1792
1925
  "span",
1793
1926
  {
1794
- className: "ww-inline-flex ww-items-center ww-gap-1.5 ww-bg-primary/10 ww-border ww-border-primary/20 ww-text-primary ww-text-[11px] ww-font-semibold ww-px-2 ww-py-0.5 ww-rounded-md ww-mx-0.5 ww-shadow-3xs",
1927
+ className: `ww-inline-flex ww-items-center ww-gap-1.5 ww-text-[11px] ww-font-semibold ww-px-2 ww-py-0.5 ww-rounded-md ww-mx-0.5 ww-shadow-3xs ${isUser ? "ww-bg-white/20 ww-border ww-border-white/30 ww-text-white" : "ww-bg-primary/10 ww-border ww-border-primary/20 ww-text-primary"}`,
1795
1928
  title: `${type}: ${id}`,
1796
1929
  children: [
1797
- /* @__PURE__ */ jsx("span", { className: "ww-h-1.5 ww-w-1.5 ww-rounded-full ww-bg-primary" }),
1930
+ /* @__PURE__ */ jsx(
1931
+ "span",
1932
+ {
1933
+ className: `ww-h-1.5 ww-w-1.5 ww-rounded-full ${isUser ? "ww-bg-white" : "ww-bg-primary"}`
1934
+ }
1935
+ ),
1798
1936
  /* @__PURE__ */ jsxs("span", { className: "ww-opacity-70 ww-uppercase ww-text-[8px] ww-tracking-wider", children: [
1799
1937
  type,
1800
1938
  ":"
@@ -1810,7 +1948,7 @@ function MarkdownContent({ text }) {
1810
1948
  href,
1811
1949
  target: "_blank",
1812
1950
  rel: "noopener noreferrer",
1813
- style: { textDecoration: "underline", opacity: 0.75 },
1951
+ className: isUser ? "ww-text-inherit ww-underline ww-opacity-90" : "ww-underline ww-opacity-75",
1814
1952
  children
1815
1953
  }
1816
1954
  );
@@ -1915,10 +2053,11 @@ function MessageBubble({
1915
2053
  userColor,
1916
2054
  agentName,
1917
2055
  profilePicture,
1918
- isStreaming,
2056
+ isStreaming = false,
1919
2057
  showThinking = true,
1920
2058
  onPickerSelect,
1921
- onSend
2059
+ onSend,
2060
+ locale
1922
2061
  }) {
1923
2062
  const isUser = message.role === "user";
1924
2063
  const textPart = message.parts.find((p) => p.type === "text");
@@ -1947,7 +2086,7 @@ function MessageBubble({
1947
2086
  contrastColor
1948
2087
  }
1949
2088
  ),
1950
- textPart?.text && /* @__PURE__ */ jsx("span", { children: textPart.text })
2089
+ textPart?.text && /* @__PURE__ */ jsx("div", { className: "ww-prose ww-prose-sm ww-max-w-none ww-text-inherit prose-p:ww-my-0.5", children: /* @__PURE__ */ jsx(MarkdownContent, { text: textPart.text, isUser: true }) })
1951
2090
  ]
1952
2091
  }
1953
2092
  ) });
@@ -1979,24 +2118,26 @@ function MessageBubble({
1979
2118
  }
1980
2119
  ),
1981
2120
  /* @__PURE__ */ jsxs("div", { className: "ww-flex ww-flex-col ww-gap-1.5 ww-min-w-0 ww-max-w-[82%]", children: [
1982
- showThinking && reasoningPart && /* @__PURE__ */ jsx(ReasoningBlock, { text: reasoningPart.text }),
2121
+ showThinking && reasoningPart && /* @__PURE__ */ jsx(ReasoningBlock, { text: reasoningPart.text, locale }),
1983
2122
  planParts.map((p) => /* @__PURE__ */ jsx(
1984
2123
  PlanCard,
1985
2124
  {
1986
2125
  part: p,
1987
2126
  onSend,
1988
- disabled: isStreaming
2127
+ disabled: isStreaming,
2128
+ locale
1989
2129
  },
1990
2130
  p.planId
1991
2131
  )),
1992
- visibleToolParts.map((t) => /* @__PURE__ */ jsx(ToolCallBadge, { part: t }, t.toolCallId)),
2132
+ visibleToolParts.map((t) => /* @__PURE__ */ jsx(ToolCallBadge, { part: t, locale }, t.toolCallId)),
1993
2133
  pickerParts.map((p) => /* @__PURE__ */ jsx(
1994
2134
  PickerSelector,
1995
2135
  {
1996
2136
  part: p,
1997
2137
  disabled: isStreaming ?? false,
1998
2138
  onSelect: onPickerSelect ?? (() => {
1999
- })
2139
+ }),
2140
+ locale
2000
2141
  },
2001
2142
  p.pickerId
2002
2143
  )),
@@ -2044,7 +2185,9 @@ function ChatMessages({
2044
2185
  suggestedMessages = [],
2045
2186
  showThinking = true,
2046
2187
  onSuggest,
2047
- onPickerSelect
2188
+ onPickerSelect,
2189
+ commandPanel,
2190
+ locale
2048
2191
  }) {
2049
2192
  const bottomRef = useRef(null);
2050
2193
  const greetText = initialMessages[0];
@@ -2057,6 +2200,7 @@ function ChatMessages({
2057
2200
  /* @__PURE__ */ jsx(Avatar3, { className: "ww-h-7 ww-w-7 ww-shrink-0 ww-mt-0.5 ww-border", children: profilePicture ? /* @__PURE__ */ jsx(AvatarImage3, { src: profilePicture, alt: agentName }) : /* @__PURE__ */ jsx(AvatarFallback3, { className: "ww-text-[10px] ww-font-semibold ww-bg-primary ww-text-primary-foreground", children: agentName.slice(0, 2).toUpperCase() }) }),
2058
2201
  /* @__PURE__ */ jsx("div", { className: "ww-rounded-2xl ww-rounded-tl-sm ww-bg-muted ww-px-4 ww-py-2.5 ww-text-sm ww-leading-relaxed ww-max-w-[82%]", children: greetText })
2059
2202
  ] }),
2203
+ showGreeting && commandPanel,
2060
2204
  showGreeting && /* @__PURE__ */ jsx("div", { className: "ww-flex-1" }),
2061
2205
  /* @__PURE__ */ jsx("div", { className: "ww-flex ww-flex-col ww-gap-4 ww-px-4 ww-py-4", children: messages.map((msg, i) => /* @__PURE__ */ jsx(
2062
2206
  MessageBubble,
@@ -2068,7 +2212,8 @@ function ChatMessages({
2068
2212
  isStreaming: streaming && i === messages.length - 1 && msg.role === "assistant",
2069
2213
  showThinking,
2070
2214
  onPickerSelect,
2071
- onSend: i === messages.length - 1 ? onSuggest : void 0
2215
+ onSend: i === messages.length - 1 ? onSuggest : void 0,
2216
+ locale
2072
2217
  },
2073
2218
  msg.id
2074
2219
  )) }),
@@ -2122,6 +2267,88 @@ function ChatMessages({
2122
2267
  ] });
2123
2268
  }
2124
2269
  var cn3 = (...inputs) => twMerge$1(clsx(inputs));
2270
+ var serializeNode = (node) => {
2271
+ if (node.nodeType === Node.TEXT_NODE) {
2272
+ return node.nodeValue || "";
2273
+ }
2274
+ if (node.nodeType === Node.ELEMENT_NODE) {
2275
+ const el = node;
2276
+ if (el.tagName === "SPAN" && el.getAttribute("data-wlv-context-id")) {
2277
+ const id = el.getAttribute("data-wlv-context-id");
2278
+ const type = el.getAttribute("data-wlv-context-type");
2279
+ const name = el.getAttribute("data-wlv-context-name");
2280
+ return `[${name}](wallavi://${type}/${id})`;
2281
+ }
2282
+ if (el.tagName === "BR") {
2283
+ return "\n";
2284
+ }
2285
+ let childText = "";
2286
+ for (const child of Array.from(el.childNodes)) {
2287
+ childText += serializeNode(child);
2288
+ }
2289
+ const isBlock = ["DIV", "P", "TR", "LI"].includes(el.tagName);
2290
+ return isBlock ? `
2291
+ ${childText}` : childText;
2292
+ }
2293
+ return "";
2294
+ };
2295
+ var serializeEditor = (editor) => {
2296
+ let text = "";
2297
+ for (const child of Array.from(editor.childNodes)) {
2298
+ text += serializeNode(child);
2299
+ }
2300
+ return text.replace(/^\n+/, "").replace(/\n+$/, "");
2301
+ };
2302
+ var createChipElement = (name, type, id, accentColor) => {
2303
+ const span = document.createElement("span");
2304
+ span.setAttribute("contenteditable", "false");
2305
+ span.className = "ww-inline-flex ww-items-center ww-gap-1.5 ww-bg-primary/8 ww-border ww-border-primary/15 ww-text-primary ww-text-xs ww-font-semibold ww-px-2.5 ww-py-0.5 ww-rounded-lg ww-mx-0.5 ww-align-middle ww-shadow-2xs ww-select-all ww-backdrop-blur-sm";
2306
+ span.style.setProperty("--primary", accentColor);
2307
+ span.setAttribute("data-wlv-context-id", id);
2308
+ span.setAttribute("data-wlv-context-type", type);
2309
+ span.setAttribute("data-wlv-context-name", name);
2310
+ const icon = document.createElementNS("http://www.w3.org/2000/svg", "svg");
2311
+ icon.setAttribute("viewBox", "0 0 24 24");
2312
+ icon.setAttribute("fill", "none");
2313
+ icon.setAttribute("stroke", "currentColor");
2314
+ icon.setAttribute("stroke-width", "2");
2315
+ icon.setAttribute("stroke-linecap", "round");
2316
+ icon.setAttribute("stroke-linejoin", "round");
2317
+ icon.classList.add("ww-w-3", "ww-h-3", "ww-shrink-0", "ww-opacity-70");
2318
+ const c1 = document.createElementNS("http://www.w3.org/2000/svg", "circle");
2319
+ c1.setAttribute("cx", "12");
2320
+ c1.setAttribute("cy", "12");
2321
+ c1.setAttribute("r", "10");
2322
+ const c2 = document.createElementNS("http://www.w3.org/2000/svg", "circle");
2323
+ c2.setAttribute("cx", "12");
2324
+ c2.setAttribute("cy", "12");
2325
+ c2.setAttribute("r", "6");
2326
+ const c3 = document.createElementNS("http://www.w3.org/2000/svg", "circle");
2327
+ c3.setAttribute("cx", "12");
2328
+ c3.setAttribute("cy", "12");
2329
+ c3.setAttribute("r", "2");
2330
+ icon.appendChild(c1);
2331
+ icon.appendChild(c2);
2332
+ icon.appendChild(c3);
2333
+ span.appendChild(icon);
2334
+ const typeSpan = document.createElement("span");
2335
+ typeSpan.className = "ww-opacity-60 ww-uppercase ww-text-[8px] ww-tracking-[0.06em] ww-font-bold";
2336
+ typeSpan.textContent = `${type}:`;
2337
+ span.appendChild(typeSpan);
2338
+ const nameSpan = document.createElement("span");
2339
+ nameSpan.textContent = name;
2340
+ span.appendChild(nameSpan);
2341
+ const button = document.createElement("button");
2342
+ button.type = "button";
2343
+ button.className = "ww-ml-1 ww-text-primary/60 hover:ww-text-primary hover:ww-scale-110 ww-transition-all ww-font-bold ww-rounded-full hover:ww-bg-primary/10 ww-w-3.5 ww-h-3.5 ww-flex ww-items-center ww-justify-center ww-text-[10px]";
2344
+ button.textContent = "\xD7";
2345
+ button.onclick = () => {
2346
+ span.remove();
2347
+ window.dispatchEvent(new CustomEvent("wallavi:editor-change"));
2348
+ };
2349
+ span.appendChild(button);
2350
+ return span;
2351
+ };
2125
2352
  function ChatInput({
2126
2353
  input,
2127
2354
  setInput,
@@ -2139,38 +2366,73 @@ function ChatInput({
2139
2366
  onRemoveAttachment,
2140
2367
  isUploading = false,
2141
2368
  selectedContext,
2142
- onClearContext
2369
+ onClearContext,
2370
+ locale
2143
2371
  }) {
2144
2372
  const hasVoice = onVoiceStart !== void 0;
2145
2373
  const hasAttachments = onAttach !== void 0;
2146
2374
  const fileInputRef = useRef(null);
2147
2375
  const textareaRef = useRef(null);
2376
+ const insertNodeAtCursor = (node) => {
2377
+ const sel = window.getSelection();
2378
+ if (sel && sel.rangeCount > 0) {
2379
+ const range = sel.getRangeAt(0);
2380
+ const editor = textareaRef.current;
2381
+ if (editor && editor.contains(range.commonAncestorContainer)) {
2382
+ range.deleteContents();
2383
+ const frag = document.createDocumentFragment();
2384
+ frag.appendChild(node);
2385
+ const spaceNode = document.createTextNode(" ");
2386
+ frag.appendChild(spaceNode);
2387
+ range.insertNode(frag);
2388
+ const newRange = range.cloneRange();
2389
+ newRange.setStartAfter(spaceNode);
2390
+ newRange.collapse(true);
2391
+ sel.removeAllRanges();
2392
+ sel.addRange(newRange);
2393
+ return;
2394
+ }
2395
+ }
2396
+ if (textareaRef.current) {
2397
+ textareaRef.current.appendChild(node);
2398
+ textareaRef.current.appendChild(document.createTextNode(" "));
2399
+ }
2400
+ };
2148
2401
  useEffect(() => {
2149
- if (!input && textareaRef.current) {
2150
- textareaRef.current.style.height = "auto";
2402
+ if (!input && textareaRef.current && textareaRef.current.innerHTML !== "") {
2403
+ textareaRef.current.innerHTML = "";
2151
2404
  }
2152
2405
  }, [input]);
2406
+ const handleInput = () => {
2407
+ if (textareaRef.current) {
2408
+ setInput(serializeEditor(textareaRef.current));
2409
+ }
2410
+ };
2153
2411
  useEffect(() => {
2154
2412
  if (selectedContext && textareaRef.current) {
2155
- const textarea = textareaRef.current;
2156
- const startPos = textarea.selectionStart;
2157
- const endPos = textarea.selectionEnd;
2158
- const text = textarea.value;
2159
- const inlineTag = `[${selectedContext.name}](wallavi://${selectedContext.type}/${selectedContext.id})`;
2160
- const newText = text.substring(0, startPos) + inlineTag + text.substring(endPos);
2161
- setInput(newText);
2413
+ const chipEl = createChipElement(
2414
+ selectedContext.name,
2415
+ selectedContext.type,
2416
+ selectedContext.id,
2417
+ accentColor
2418
+ );
2419
+ textareaRef.current.focus();
2420
+ insertNodeAtCursor(chipEl);
2421
+ setInput(serializeEditor(textareaRef.current));
2162
2422
  if (onClearContext) {
2163
2423
  onClearContext();
2164
2424
  }
2165
- setTimeout(() => {
2166
- textarea.focus();
2167
- const newPos = startPos + inlineTag.length;
2168
- textarea.setSelectionRange(newPos, newPos);
2169
- textarea.style.height = "auto";
2170
- textarea.style.height = `${Math.min(textarea.scrollHeight, 128)}px`;
2171
- }, 50);
2172
- }
2173
- }, [selectedContext, onClearContext, setInput]);
2425
+ }
2426
+ }, [selectedContext, onClearContext, setInput, accentColor]);
2427
+ useEffect(() => {
2428
+ const handleEditorChange = () => {
2429
+ if (textareaRef.current) {
2430
+ setInput(serializeEditor(textareaRef.current));
2431
+ }
2432
+ };
2433
+ window.addEventListener("wallavi:editor-change", handleEditorChange);
2434
+ return () => window.removeEventListener("wallavi:editor-change", handleEditorChange);
2435
+ }, [setInput]);
2174
2436
  useEffect(() => {
2175
2437
  if (!streaming) {
2176
2438
  textareaRef.current?.focus();
@@ -2182,8 +2444,40 @@ function ChatInput({
2182
2444
  onSend();
2183
2445
  }
2184
2446
  };
2447
+ const handlePaste = (e) => {
2448
+ if (hasAttachments && onAttach) {
2449
+ const files = Array.from(e.clipboardData?.files ?? []).filter(
2450
+ (f) => f.type.startsWith("image/")
2451
+ );
2452
+ if (files.length > 0) {
2453
+ e.preventDefault();
2454
+ const dt = new DataTransfer();
2455
+ files.forEach((f) => dt.items.add(f));
2456
+ onAttach(dt.files);
2457
+ return;
2458
+ }
2459
+ }
2460
+ e.preventDefault();
2461
+ const text = e.clipboardData?.getData("text/plain") || "";
2462
+ const selection = window.getSelection();
2463
+ if (!selection || selection.rangeCount === 0) return;
2464
+ const range = selection.getRangeAt(0);
2465
+ range.deleteContents();
2466
+ range.insertNode(document.createTextNode(text));
2467
+ range.collapse(false);
2468
+ if (textareaRef.current) {
2469
+ setInput(serializeEditor(textareaRef.current));
2470
+ }
2471
+ };
2185
2472
  const hasText = input.trim().length > 0;
2186
2473
  return /* @__PURE__ */ jsxs("div", { className: "ww-shrink-0 ww-border-t ww-bg-background ww-px-3 ww-py-2.5", children: [
2474
+ /* @__PURE__ */ jsx("style", { children: `
2475
+ #wallavi-chat-input:empty::before {
2476
+ content: attr(placeholder);
2477
+ color: rgba(120, 120, 120, 0.45);
2478
+ pointer-events: none;
2479
+ }
2480
+ ` }),
2187
2481
  canRegenerate && onRegenerate && /* @__PURE__ */ jsxs(
2188
2482
  "button",
2189
2483
  {
@@ -2192,25 +2486,41 @@ function ChatInput({
2192
2486
  className: "ww-flex ww-items-center ww-gap-1 ww-text-[11px] ww-text-muted-foreground hover:ww-text-foreground ww-transition-colors ww-mb-2 disabled:ww-opacity-40",
2193
2487
  children: [
2194
2488
  /* @__PURE__ */ jsx(RotateCcw, { className: "ww-h-3 ww-w-3" }),
2195
- "Regenerate response"
2489
+ getWidgetTranslation("regenerateResponse", locale)
2196
2490
  ]
2197
2491
  }
2198
2492
  ),
2199
2493
  /* @__PURE__ */ jsxs("div", { className: "ww-flex ww-flex-col ww-rounded-2xl ww-border ww-bg-background ww-shadow-sm focus-within:ww-ring-1 focus-within:ww-ring-ring/40 ww-transition-shadow", children: [
2200
- selectedContext && /* @__PURE__ */ jsx("div", { className: "ww-px-3 ww-pt-2.5 ww-flex ww-items-center", children: /* @__PURE__ */ jsxs("div", { className: "ww-flex ww-items-center ww-gap-1.5 ww-bg-primary/5 ww-border ww-border-primary/10 ww-text-primary ww-text-xs ww-font-semibold ww-px-2.5 ww-py-1 ww-rounded-lg ww-shadow-2xs ww-animate-in ww-fade-in ww-slide-in-from-top-1 ww-duration-150", children: [
2201
- /* @__PURE__ */ jsx("span", { className: "ww-h-1.5 ww-w-1.5 ww-rounded-full ww-bg-primary ww-animate-pulse" }),
2202
- /* @__PURE__ */ jsxs("span", { className: "ww-opacity-70 ww-uppercase ww-text-[9px] ww-tracking-wider", children: [
2494
+ selectedContext && /* @__PURE__ */ jsx("div", { className: "ww-px-3 ww-pt-2.5 ww-flex ww-items-center", children: /* @__PURE__ */ jsxs("div", { className: "ww-flex ww-items-center ww-gap-2 ww-bg-primary/5 ww-border ww-border-primary/10 ww-text-primary ww-text-xs ww-font-semibold ww-px-3 ww-py-1.5 ww-rounded-xl ww-shadow-2xs ww-backdrop-blur-sm ww-animate-in ww-fade-in ww-slide-in-from-bottom-2 ww-duration-200", children: [
2495
+ /* @__PURE__ */ jsxs(
2496
+ "svg",
2497
+ {
2498
+ className: "ww-w-3.5 ww-h-3.5 ww-shrink-0 ww-opacity-60",
2499
+ viewBox: "0 0 24 24",
2500
+ fill: "none",
2501
+ stroke: "currentColor",
2502
+ strokeWidth: "2",
2503
+ strokeLinecap: "round",
2504
+ strokeLinejoin: "round",
2505
+ children: [
2506
+ /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10" }),
2507
+ /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "6" }),
2508
+ /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "2" })
2509
+ ]
2510
+ }
2511
+ ),
2512
+ /* @__PURE__ */ jsxs("span", { className: "ww-opacity-55 ww-uppercase ww-text-[9px] ww-tracking-[0.06em] ww-font-bold", children: [
2203
2513
  selectedContext.type,
2204
2514
  ":"
2205
2515
  ] }),
2206
- /* @__PURE__ */ jsx("span", { children: selectedContext.name }),
2516
+ /* @__PURE__ */ jsx("span", { className: "ww-font-semibold", children: selectedContext.name }),
2207
2517
  /* @__PURE__ */ jsx(
2208
2518
  "button",
2209
2519
  {
2210
2520
  type: "button",
2211
2521
  onClick: onClearContext,
2212
- className: "ww-ml-1 ww-text-muted-foreground hover:ww-text-foreground ww-transition-colors",
2213
- title: "Remove context",
2522
+ className: "ww-ml-0.5 ww-text-muted-foreground hover:ww-text-foreground ww-transition-all ww-rounded-full hover:ww-bg-primary/10 ww-w-4 ww-h-4 ww-flex ww-items-center ww-justify-center",
2523
+ title: getWidgetTranslation("removeContext", locale),
2214
2524
  children: /* @__PURE__ */ jsxs(
2215
2525
  "svg",
2216
2526
  {
@@ -2234,7 +2544,8 @@ function ChatInput({
2234
2544
  AttachmentChips,
2235
2545
  {
2236
2546
  attachments,
2237
- onRemove: (id) => onRemoveAttachment?.(id)
2547
+ onRemove: (id) => onRemoveAttachment?.(id),
2548
+ locale
2238
2549
  }
2239
2550
  ) }),
2240
2551
  hasAttachments && /* @__PURE__ */ jsx(
@@ -2255,34 +2566,19 @@ function ChatInput({
2255
2566
  ),
2256
2567
  /* @__PURE__ */ jsxs("div", { className: "ww-flex ww-items-end ww-gap-2 ww-px-3 ww-py-2", children: [
2257
2568
  /* @__PURE__ */ jsx(
2258
- "textarea",
2569
+ "div",
2259
2570
  {
2260
2571
  id: "wallavi-chat-input",
2261
2572
  ref: textareaRef,
2262
- rows: 1,
2263
- className: "ww-flex-1 ww-resize-none ww-bg-transparent ww-text-sm ww-outline-none placeholder:ww-text-muted-foreground/50 ww-leading-relaxed ww-max-h-32 ww-overflow-y-auto ww-py-0.5",
2264
- placeholder: placeholder ?? "Send a message\u2026",
2265
- value: input,
2266
- onChange: (e) => {
2267
- setInput(e.target.value);
2268
- e.target.style.height = "auto";
2269
- e.target.style.height = `${Math.min(e.target.scrollHeight, 128)}px`;
2573
+ contentEditable: !streaming && voiceState !== "recording" && voiceState !== "transcribing",
2574
+ className: "ww-flex-1 ww-min-h-[22px] ww-max-h-32 ww-overflow-y-auto ww-py-1 ww-outline-none ww-text-sm ww-leading-relaxed ww-bg-transparent",
2575
+ ...{
2576
+ placeholder: placeholder || getWidgetTranslation("sendMessage", locale)
2270
2577
  },
2271
2578
  onKeyDown: handleKeyDown,
2272
- onPaste: (e) => {
2273
- if (!hasAttachments || !onAttach) return;
2274
- const files = Array.from(e.clipboardData?.files ?? []).filter(
2275
- (f) => f.type.startsWith("image/")
2276
- );
2277
- if (files.length > 0) {
2278
- e.preventDefault();
2279
- const dt = new DataTransfer();
2280
- files.forEach((f) => dt.items.add(f));
2281
- onAttach(dt.files);
2282
- }
2283
- },
2284
- disabled: streaming || voiceState === "recording" || voiceState === "transcribing",
2285
- autoFocus: true
2579
+ onInput: handleInput,
2580
+ onPaste: handlePaste,
2581
+ style: { wordBreak: "break-word" }
2286
2582
  }
2287
2583
  ),
2288
2584
  hasVoice && /* @__PURE__ */ jsx(
@@ -2291,7 +2587,7 @@ function ChatInput({
2291
2587
  type: "button",
2292
2588
  onClick: voiceState === "recording" ? onVoiceStop : onVoiceStart,
2293
2589
  disabled: streaming || voiceState === "transcribing",
2294
- title: voiceState === "recording" ? "Stop recording" : "Record voice message",
2590
+ title: voiceState === "recording" ? getWidgetTranslation("stopRecording", locale) : getWidgetTranslation("recordVoiceMessage", locale),
2295
2591
  className: cn3(
2296
2592
  "ww-h-7 ww-w-7 ww-shrink-0 ww-rounded-xl ww-flex ww-items-center ww-justify-center ww-transition-all ww-duration-200",
2297
2593
  voiceState === "recording" && "ww-animate-pulse",
@@ -2308,7 +2604,7 @@ function ChatInput({
2308
2604
  type: "button",
2309
2605
  onClick: () => fileInputRef.current?.click(),
2310
2606
  disabled: streaming || isUploading,
2311
- title: "Attach file (CSV, image\u2026)",
2607
+ title: getWidgetTranslation("attachFile", locale),
2312
2608
  className: cn3(
2313
2609
  "ww-h-7 ww-w-7 ww-shrink-0 ww-rounded-xl ww-flex ww-items-center ww-justify-center ww-transition-all ww-duration-200",
2314
2610
  "ww-text-muted-foreground hover:ww-text-foreground",
@@ -2337,7 +2633,10 @@ function ChatInput({
2337
2633
  ] })
2338
2634
  ] });
2339
2635
  }
2340
- function CustomControlBar({ onClose }) {
2636
+ function CustomControlBar({
2637
+ onClose,
2638
+ locale
2639
+ }) {
2341
2640
  const { localParticipant, isMicrophoneEnabled } = useLocalParticipant();
2342
2641
  const room = useRoomContext();
2343
2642
  const toggleMic = async () => {
@@ -2357,7 +2656,7 @@ function CustomControlBar({ onClose }) {
2357
2656
  {
2358
2657
  onClick: toggleMic,
2359
2658
  className: `ww-flex ww-items-center ww-justify-center ww-h-16 ww-w-16 ww-rounded-full ww-transition-all ww-duration-300 ${isMicrophoneEnabled ? "ww-bg-foreground/5 hover:ww-bg-foreground/10 ww-text-foreground" : "ww-bg-foreground/20 hover:ww-bg-foreground/30 ww-text-foreground"}`,
2360
- title: isMicrophoneEnabled ? "Silenciar micr\xF3fono" : "Activar micr\xF3fono",
2659
+ title: isMicrophoneEnabled ? getWidgetTranslation("muteMic", locale) : getWidgetTranslation("unmuteMic", locale),
2361
2660
  children: isMicrophoneEnabled ? /* @__PURE__ */ jsx(Mic, { className: "ww-w-6 ww-h-6" }) : /* @__PURE__ */ jsx(MicOff, { className: "ww-w-6 ww-h-6" })
2362
2661
  }
2363
2662
  ),
@@ -2367,7 +2666,7 @@ function CustomControlBar({ onClose }) {
2367
2666
  onClick: disconnect,
2368
2667
  className: "ww-flex ww-items-center ww-justify-center ww-h-16 ww-w-16 ww-rounded-full ww-text-white ww-transition-all ww-duration-300 ww-shadow-lg hover:ww-shadow-xl hover:-ww-translate-y-1",
2369
2668
  style: { backgroundColor: "#ef4444" },
2370
- title: "Desconectar",
2669
+ title: getWidgetTranslation("disconnect", locale),
2371
2670
  children: /* @__PURE__ */ jsx(PhoneOff, { className: "ww-w-6 ww-h-6" })
2372
2671
  }
2373
2672
  )
@@ -2430,17 +2729,25 @@ function ChatGPTOrb() {
2430
2729
  )
2431
2730
  ] });
2432
2731
  }
2433
- function AssistantVisualizer({ onClose }) {
2732
+ function AssistantVisualizer({
2733
+ onClose,
2734
+ locale
2735
+ }) {
2434
2736
  const { state } = useVoiceAssistant();
2435
2737
  return /* @__PURE__ */ jsxs("div", { className: "ww-flex ww-flex-col ww-items-center ww-justify-center ww-h-full ww-w-full", children: [
2436
2738
  /* @__PURE__ */ jsx("div", { className: "ww-flex-1 ww-flex ww-items-center ww-justify-center", children: /* @__PURE__ */ jsx(ChatGPTOrb, {}) }),
2437
2739
  /* @__PURE__ */ jsxs("div", { className: "ww-h-40 ww-flex ww-flex-col ww-items-center ww-justify-center ww-gap-8 ww-mb-12", children: [
2438
- /* @__PURE__ */ jsx("div", { className: "ww-text-sm ww-font-medium ww-tracking-wide ww-text-foreground/60 ww-uppercase", children: state === "connecting" || state === "initializing" ? "Conectando..." : state === "listening" ? "Escuchando..." : state === "speaking" ? "Hablando..." : "Listo" }),
2439
- /* @__PURE__ */ jsx(CustomControlBar, { onClose })
2740
+ /* @__PURE__ */ jsx("div", { className: "ww-text-sm ww-font-medium ww-tracking-wide ww-text-foreground/60 ww-uppercase", children: state === "connecting" || state === "initializing" ? getWidgetTranslation("connecting", locale) : state === "listening" ? getWidgetTranslation("listening", locale) : state === "speaking" ? getWidgetTranslation("speaking", locale) : getWidgetTranslation("ready", locale) }),
2741
+ /* @__PURE__ */ jsx(CustomControlBar, { onClose, locale })
2440
2742
  ] })
2441
2743
  ] });
2442
2744
  }
2443
- function VoiceOverlay({ token, serverUrl, onClose }) {
2745
+ function VoiceOverlay({
2746
+ token,
2747
+ serverUrl,
2748
+ onClose,
2749
+ locale
2750
+ }) {
2444
2751
  return /* @__PURE__ */ jsx("div", { className: "ww-absolute ww-inset-0 ww-z-[100] ww-flex ww-flex-col ww-bg-background/95 ww-backdrop-blur-xl", children: /* @__PURE__ */ jsxs(
2445
2752
  LiveKitRoom,
2446
2753
  {
@@ -2452,11 +2759,395 @@ function VoiceOverlay({ token, serverUrl, onClose }) {
2452
2759
  className: "ww-flex-1",
2453
2760
  children: [
2454
2761
  /* @__PURE__ */ jsx(RoomAudioRenderer, {}),
2455
- /* @__PURE__ */ jsx(AssistantVisualizer, { onClose })
2762
+ /* @__PURE__ */ jsx(AssistantVisualizer, { onClose, locale })
2456
2763
  ]
2457
2764
  }
2458
2765
  ) });
2459
2766
  }
2767
+ function SvgIcon({
2768
+ className,
2769
+ strokeWidth = "1.8",
2770
+ children
2771
+ }) {
2772
+ return /* @__PURE__ */ jsx(
2773
+ "svg",
2774
+ {
2775
+ className,
2776
+ viewBox: "0 0 24 24",
2777
+ fill: "none",
2778
+ stroke: "currentColor",
2779
+ strokeWidth,
2780
+ strokeLinecap: "round",
2781
+ strokeLinejoin: "round",
2782
+ children
2783
+ }
2784
+ );
2785
+ }
2786
+ function IconBolt({ className }) {
2787
+ return /* @__PURE__ */ jsx(SvgIcon, { className, children: /* @__PURE__ */ jsx("path", { d: "M13 2L3 14h9l-1 8 10-12h-9l1-8z" }) });
2788
+ }
2789
+ function IconDocument({ className }) {
2790
+ return /* @__PURE__ */ jsxs(SvgIcon, { className, children: [
2791
+ /* @__PURE__ */ jsx("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }),
2792
+ /* @__PURE__ */ jsx("polyline", { points: "14 2 14 8 20 8" }),
2793
+ /* @__PURE__ */ jsx("line", { x1: "16", y1: "13", x2: "8", y2: "13" }),
2794
+ /* @__PURE__ */ jsx("line", { x1: "16", y1: "17", x2: "8", y2: "17" }),
2795
+ /* @__PURE__ */ jsx("polyline", { points: "10 9 9 9 8 9" })
2796
+ ] });
2797
+ }
2798
+ function IconSparkle({ className }) {
2799
+ return /* @__PURE__ */ jsx(SvgIcon, { className, children: /* @__PURE__ */ jsx("path", { d: "m12 3-1.912 5.813a2 2 0 0 1-1.275 1.275L3 12l5.813 1.912a2 2 0 0 1 1.275 1.275L12 21l1.912-5.813a2 2 0 0 1 1.275-1.275L21 12l-5.813-1.912a2 2 0 0 1-1.275-1.275L12 3Z" }) });
2800
+ }
2801
+ function IconTarget({ className }) {
2802
+ return /* @__PURE__ */ jsxs(SvgIcon, { className, children: [
2803
+ /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10" }),
2804
+ /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "6" }),
2805
+ /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "2" })
2806
+ ] });
2807
+ }
2808
+ function IconArrowRight({ className }) {
2809
+ return /* @__PURE__ */ jsxs(SvgIcon, { className, strokeWidth: "2", children: [
2810
+ /* @__PURE__ */ jsx("path", { d: "M5 12h14" }),
2811
+ /* @__PURE__ */ jsx("path", { d: "m12 5 7 7-7 7" })
2812
+ ] });
2813
+ }
2814
+ function LiveDot({ size = "sm" }) {
2815
+ const px = size === "md" ? "ww-h-2 ww-w-2" : "ww-h-1.5 ww-w-1.5";
2816
+ return /* @__PURE__ */ jsxs("span", { className: `ww-relative ww-flex ${px} ww-shrink-0`, children: [
2817
+ /* @__PURE__ */ jsx(
2818
+ "span",
2819
+ {
2820
+ className: `ww-animate-ping ww-absolute ww-inline-flex ww-h-full ww-w-full ww-rounded-full ww-bg-emerald-400 ww-opacity-75`
2821
+ }
2822
+ ),
2823
+ /* @__PURE__ */ jsx(
2824
+ "span",
2825
+ {
2826
+ className: `ww-relative ww-inline-flex ww-rounded-full ${px} ww-bg-emerald-500`
2827
+ }
2828
+ )
2829
+ ] });
2830
+ }
2831
+ function urlRelevance(docUrl, pageUrl) {
2832
+ if (!docUrl || !pageUrl) return 0;
2833
+ const docClean = docUrl.toLowerCase().replace(/https?:\/\//, "");
2834
+ const pageClean = pageUrl.toLowerCase().replace(/https?:\/\//, "");
2835
+ if (docClean === pageClean) return 100;
2836
+ if (docClean.startsWith(pageClean) || pageClean.startsWith(docClean))
2837
+ return 50;
2838
+ const docParts = docClean.split(/[/?#]/).filter(Boolean);
2839
+ const pageParts = pageClean.split(/[/?#]/).filter(Boolean);
2840
+ let score = 0;
2841
+ for (const part of pageParts) {
2842
+ if (docParts.includes(part)) score += 10;
2843
+ }
2844
+ return score;
2845
+ }
2846
+ function topicToQuestion(topic, locale) {
2847
+ const name = topic.name.trim();
2848
+ if (name.endsWith("?")) return name;
2849
+ return getWidgetTranslation("tellMeAbout", locale, { name });
2850
+ }
2851
+ var STAGGER_MS = 50;
2852
+ var cardBase = "ww-group ww-w-full ww-rounded-xl ww-border ww-border-border ww-bg-background ww-text-left ww-shadow-[0_1px_2px_rgba(0,0,0,0.03)] hover:ww-bg-muted/20 hover:ww-border-border/80 hover:ww-shadow-md active:ww-scale-[0.98] ww-transition-all ww-duration-200 ww-animate-in ww-fade-in ww-slide-in-from-bottom-1 focus-visible:ww-ring-2 focus-visible:ww-ring-ring/40 focus-visible:ww-outline-none";
2853
+ function SectionLabel({ children }) {
2854
+ return /* @__PURE__ */ jsx("h4", { className: "ww-text-[10px] ww-font-semibold ww-uppercase ww-tracking-[0.12em] ww-mb-2.5 ww-text-muted-foreground/80", children });
2855
+ }
2856
+ function PageBadge({
2857
+ pageTitle,
2858
+ pageUrl,
2859
+ locale
2860
+ }) {
2861
+ return /* @__PURE__ */ jsx("div", { className: "ww-px-4 ww-pt-4 ww-pb-2", children: /* @__PURE__ */ jsxs("div", { className: "ww-flex ww-items-center ww-justify-between ww-px-3 ww-py-2 ww-rounded-xl ww-bg-muted/40 ww-border ww-border-border/60", children: [
2862
+ /* @__PURE__ */ jsxs("div", { className: "ww-flex ww-items-center ww-gap-2.5 ww-min-w-0", children: [
2863
+ /* @__PURE__ */ jsx("div", { className: "ww-w-2 ww-h-2 ww-rounded-full ww-bg-emerald-500 ww-animate-pulse ww-shrink-0" }),
2864
+ /* @__PURE__ */ jsx("span", { className: "ww-text-[11px] ww-font-medium ww-text-foreground ww-truncate ww-max-w-[170px]", children: pageTitle || pageUrl || getWidgetTranslation("generalContext", locale) })
2865
+ ] }),
2866
+ /* @__PURE__ */ jsx("span", { className: "ww-text-[9px] ww-font-mono ww-bg-background ww-border ww-border-border ww-text-muted-foreground ww-px-1.5 ww-py-0.5 ww-rounded-md", children: "LIVE" })
2867
+ ] }) });
2868
+ }
2869
+ function ActionCard({
2870
+ action,
2871
+ index,
2872
+ accentColor,
2873
+ onExecute
2874
+ }) {
2875
+ return /* @__PURE__ */ jsxs(
2876
+ "button",
2877
+ {
2878
+ onClick: onExecute,
2879
+ className: `${cardBase} ww-flex ww-items-start ww-gap-3.5 ww-p-3.5`,
2880
+ style: {
2881
+ animationDelay: `${index * STAGGER_MS}ms`,
2882
+ animationFillMode: "both"
2883
+ },
2884
+ children: [
2885
+ /* @__PURE__ */ jsx(
2886
+ "div",
2887
+ {
2888
+ className: "ww-shrink-0 ww-w-8 ww-h-8 ww-rounded-lg ww-flex ww-items-center ww-justify-center ww-transition-transform ww-duration-200 group-hover:ww-scale-105",
2889
+ style: { backgroundColor: `${accentColor}12`, color: accentColor },
2890
+ children: /* @__PURE__ */ jsx(IconBolt, { className: "ww-w-4 ww-h-4" })
2891
+ }
2892
+ ),
2893
+ /* @__PURE__ */ jsxs("div", { className: "ww-flex-1 ww-min-w-0 ww-pt-0.5", children: [
2894
+ /* @__PURE__ */ jsx("span", { className: "ww-text-[13px] ww-font-medium ww-block ww-truncate ww-text-foreground", children: action.name }),
2895
+ action.description && /* @__PURE__ */ jsx("span", { className: "ww-text-[11px] ww-mt-0.5 ww-block ww-line-clamp-2 ww-text-muted-foreground ww-leading-normal", children: action.description })
2896
+ ] }),
2897
+ /* @__PURE__ */ jsx(IconArrowRight, { className: "ww-w-3.5 ww-h-3.5 ww-shrink-0 ww-mt-1.5 ww-text-muted-foreground/60 ww-opacity-0 group-hover:ww-opacity-100 ww-transition-all ww-duration-200 ww-translate-x-[-4px] group-hover:ww-translate-x-0" })
2898
+ ]
2899
+ }
2900
+ );
2901
+ }
2902
+ function ActionCardCompact({
2903
+ action,
2904
+ index,
2905
+ accentColor,
2906
+ onExecute
2907
+ }) {
2908
+ return /* @__PURE__ */ jsxs(
2909
+ "button",
2910
+ {
2911
+ onClick: onExecute,
2912
+ className: `${cardBase} ww-flex ww-flex-col ww-items-start ww-gap-2.5 ww-p-3.5`,
2913
+ style: {
2914
+ animationDelay: `${index * STAGGER_MS}ms`,
2915
+ animationFillMode: "both"
2916
+ },
2917
+ children: [
2918
+ /* @__PURE__ */ jsx(
2919
+ "div",
2920
+ {
2921
+ className: "ww-w-8 ww-h-8 ww-rounded-lg ww-flex ww-items-center ww-justify-center ww-transition-transform ww-duration-200 group-hover:ww-scale-105",
2922
+ style: { backgroundColor: `${accentColor}12`, color: accentColor },
2923
+ children: /* @__PURE__ */ jsx(IconBolt, { className: "ww-w-4 ww-h-4" })
2924
+ }
2925
+ ),
2926
+ /* @__PURE__ */ jsxs("div", { className: "ww-min-w-0 ww-w-full", children: [
2927
+ /* @__PURE__ */ jsx("span", { className: "ww-text-[12px] ww-font-medium ww-block ww-truncate ww-text-foreground", children: action.name }),
2928
+ action.description && /* @__PURE__ */ jsx("span", { className: "ww-text-[10px] ww-mt-0.5 ww-block ww-line-clamp-1 ww-text-muted-foreground ww-leading-normal", children: action.description })
2929
+ ] })
2930
+ ]
2931
+ }
2932
+ );
2933
+ }
2934
+ function DocCard({
2935
+ doc,
2936
+ index,
2937
+ onSend,
2938
+ locale
2939
+ }) {
2940
+ return /* @__PURE__ */ jsxs(
2941
+ "button",
2942
+ {
2943
+ onClick: () => onSend(
2944
+ doc.summary ? getWidgetTranslation("tellMeMoreAbout", locale, {
2945
+ name: doc.name
2946
+ }) : getWidgetTranslation("whatDoYouKnowAbout", locale, {
2947
+ name: doc.name
2948
+ })
2949
+ ),
2950
+ className: `${cardBase} ww-flex ww-items-start ww-gap-3.5 ww-p-3.5`,
2951
+ style: {
2952
+ animationDelay: `${index * STAGGER_MS}ms`,
2953
+ animationFillMode: "both"
2954
+ },
2955
+ children: [
2956
+ /* @__PURE__ */ jsx("div", { className: "ww-shrink-0 ww-w-8 ww-h-8 ww-rounded-lg ww-flex ww-items-center ww-justify-center ww-bg-indigo-500/10 ww-text-indigo-500 dark:ww-bg-indigo-400/10 dark:ww-text-indigo-400 ww-transition-transform ww-duration-200 group-hover:ww-scale-105", children: /* @__PURE__ */ jsx(IconDocument, { className: "ww-w-4 ww-h-4" }) }),
2957
+ /* @__PURE__ */ jsxs("div", { className: "ww-flex-1 ww-min-w-0 ww-pt-0.5", children: [
2958
+ /* @__PURE__ */ jsx("span", { className: "ww-text-[13px] ww-font-medium ww-block ww-truncate ww-text-foreground", children: doc.name }),
2959
+ doc.summary && /* @__PURE__ */ jsx("span", { className: "ww-text-[11px] ww-mt-0.5 ww-block ww-line-clamp-2 ww-text-muted-foreground ww-leading-normal", children: doc.summary })
2960
+ ] }),
2961
+ /* @__PURE__ */ jsx(IconArrowRight, { className: "ww-w-3.5 ww-h-3.5 ww-shrink-0 ww-mt-1.5 ww-text-muted-foreground/60 ww-opacity-0 group-hover:ww-opacity-100 ww-transition-all ww-duration-200 ww-translate-x-[-4px] group-hover:ww-translate-x-0" })
2962
+ ]
2963
+ }
2964
+ );
2965
+ }
2966
+ function TopicChip({
2967
+ topic,
2968
+ index,
2969
+ compact = false,
2970
+ onSend
2971
+ }) {
2972
+ const cls = compact ? `${cardBase} ww-flex ww-items-center ww-gap-1.5 !ww-rounded-full ww-px-3 ww-py-1.5` : `${cardBase} ww-flex ww-items-center ww-gap-2.5 ww-px-3.5 ww-py-2.5 !ww-rounded-full`;
2973
+ return /* @__PURE__ */ jsxs(
2974
+ "button",
2975
+ {
2976
+ onClick: () => onSend(topic.question),
2977
+ className: cls,
2978
+ style: {
2979
+ animationDelay: `${index * STAGGER_MS}ms`,
2980
+ animationFillMode: "both"
2981
+ },
2982
+ children: [
2983
+ /* @__PURE__ */ jsx(
2984
+ IconSparkle,
2985
+ {
2986
+ className: `${compact ? "ww-w-3 ww-h-3" : "ww-w-3.5 ww-h-3.5"} ww-shrink-0 ww-text-amber-500 ww-transition-transform ww-duration-200 group-hover:ww-scale-110 group-hover:ww-rotate-12`
2987
+ }
2988
+ ),
2989
+ /* @__PURE__ */ jsx(
2990
+ "span",
2991
+ {
2992
+ className: `${compact ? "ww-text-[11px]" : "ww-text-[12px]"} ww-font-medium ww-text-foreground ww-flex-1 ww-text-left`,
2993
+ children: topic.question
2994
+ }
2995
+ ),
2996
+ !compact && /* @__PURE__ */ jsx(IconArrowRight, { className: "ww-w-3.5 ww-h-3.5 ww-shrink-0 ww-text-muted-foreground/60 ww-opacity-0 group-hover:ww-opacity-100 ww-transition-all ww-duration-200 ww-translate-x-[-4px] group-hover:ww-translate-x-0" })
2997
+ ]
2998
+ }
2999
+ );
3000
+ }
3001
+ function CommandPanel({
3002
+ mode,
3003
+ pageUrl = "",
3004
+ pageTitle,
3005
+ clientActions = [],
3006
+ ragTopics = [],
3007
+ ragDocuments = [],
3008
+ onSend,
3009
+ onExecuteAction,
3010
+ accentColor = "#3b82f6",
3011
+ watermark = false,
3012
+ watermarkLogoUrl = "/wallavi.svg",
3013
+ footer,
3014
+ locale
3015
+ }) {
3016
+ const relevantDocs = useMemo(() => {
3017
+ if (!pageUrl && ragDocuments.length > 0) return ragDocuments.slice(0, 5);
3018
+ return ragDocuments.map((doc) => ({ ...doc, score: urlRelevance(doc.url, pageUrl) })).sort((a, b) => b.score - a.score).slice(0, 5);
3019
+ }, [ragDocuments, pageUrl]);
3020
+ const topicQuestions = useMemo(
3021
+ () => ragTopics.slice(0, 5).map((t) => ({
3022
+ ...t,
3023
+ question: topicToQuestion(t, locale)
3024
+ })),
3025
+ [ragTopics, locale]
3026
+ );
3027
+ const hasActions = clientActions.length > 0;
3028
+ const hasDocs = relevantDocs.length > 0;
3029
+ const hasTopics = topicQuestions.length > 0;
3030
+ const hasContent = hasActions || hasDocs || hasTopics;
3031
+ if (!hasContent) return null;
3032
+ const isSidebar = mode === "sidebar";
3033
+ const handleExecute = (steps) => onExecuteAction?.(steps);
3034
+ if (isSidebar) {
3035
+ return /* @__PURE__ */ jsxs("div", { className: "ww-w-[300px] ww-shrink-0 ww-border-l ww-border-border ww-bg-muted/50 ww-flex ww-flex-col ww-h-full ww-overflow-hidden ww-animate-in ww-fade-in ww-slide-in-from-right-2 ww-duration-300", children: [
3036
+ /* @__PURE__ */ jsx(PageBadge, { pageTitle, pageUrl, locale }),
3037
+ /* @__PURE__ */ jsxs("div", { className: "ww-flex-1 ww-overflow-y-auto ww-px-4 ww-pb-4 ww-flex ww-flex-col ww-gap-5", children: [
3038
+ hasActions && /* @__PURE__ */ jsxs("section", { children: [
3039
+ /* @__PURE__ */ jsx(SectionLabel, { children: getWidgetTranslation("quickActions", locale) }),
3040
+ /* @__PURE__ */ jsx("div", { className: "ww-flex ww-flex-col ww-gap-2", children: clientActions.map((action, i) => /* @__PURE__ */ jsx(
3041
+ ActionCard,
3042
+ {
3043
+ action,
3044
+ index: i,
3045
+ accentColor,
3046
+ onExecute: () => handleExecute(action.steps)
3047
+ },
3048
+ action.name
3049
+ )) })
3050
+ ] }),
3051
+ hasDocs && /* @__PURE__ */ jsxs("section", { children: [
3052
+ /* @__PURE__ */ jsx(SectionLabel, { children: getWidgetTranslation("documentation", locale) }),
3053
+ /* @__PURE__ */ jsx("div", { className: "ww-flex ww-flex-col ww-gap-2", children: relevantDocs.map((doc, i) => /* @__PURE__ */ jsx(
3054
+ DocCard,
3055
+ {
3056
+ doc,
3057
+ index: i,
3058
+ onSend,
3059
+ locale
3060
+ },
3061
+ `${doc.name}-${doc.url ?? i}`
3062
+ )) })
3063
+ ] }),
3064
+ hasTopics && /* @__PURE__ */ jsxs("section", { children: [
3065
+ /* @__PURE__ */ jsx(SectionLabel, { children: getWidgetTranslation("askAbout", locale) }),
3066
+ /* @__PURE__ */ jsx("div", { className: "ww-flex ww-flex-col ww-gap-1.5", children: topicQuestions.map((topic, i) => /* @__PURE__ */ jsx(
3067
+ TopicChip,
3068
+ {
3069
+ topic,
3070
+ index: i,
3071
+ onSend
3072
+ },
3073
+ topic.name
3074
+ )) })
3075
+ ] })
3076
+ ] }),
3077
+ watermark && /* @__PURE__ */ jsxs("footer", { className: "ww-shrink-0 ww-flex ww-items-center ww-justify-center ww-gap-1.5 ww-py-2.5 ww-border-t ww-border-border/40 ww-touch-none ww-bg-muted/10", children: [
3078
+ /* @__PURE__ */ jsxs(
3079
+ "a",
3080
+ {
3081
+ href: "https://wallavi.com",
3082
+ target: "_blank",
3083
+ rel: "noopener noreferrer",
3084
+ className: "ww-flex ww-items-center ww-gap-1 ww-text-[10px] ww-text-muted-foreground hover:ww-text-foreground ww-transition-colors",
3085
+ children: [
3086
+ /* @__PURE__ */ jsx(
3087
+ "img",
3088
+ {
3089
+ src: watermarkLogoUrl,
3090
+ alt: "Wallavi",
3091
+ width: 11,
3092
+ height: 11
3093
+ }
3094
+ ),
3095
+ /* @__PURE__ */ jsxs("span", { children: [
3096
+ getWidgetTranslation("poweredBy", locale),
3097
+ " Wallavi"
3098
+ ] })
3099
+ ]
3100
+ }
3101
+ ),
3102
+ footer && /* @__PURE__ */ jsxs(Fragment, { children: [
3103
+ /* @__PURE__ */ jsx("span", { className: "ww-text-muted-foreground/45 ww-text-[10px]", children: "\xB7" }),
3104
+ /* @__PURE__ */ jsx("span", { className: "ww-text-[10px] ww-text-muted-foreground ww-truncate ww-max-w-[120px]", children: footer })
3105
+ ] })
3106
+ ] })
3107
+ ] });
3108
+ }
3109
+ return /* @__PURE__ */ jsxs("div", { className: "ww-px-4 ww-pt-2 ww-pb-3 ww-flex ww-flex-col ww-gap-4 ww-animate-in ww-fade-in ww-duration-300", children: [
3110
+ hasActions && /* @__PURE__ */ jsxs("section", { children: [
3111
+ /* @__PURE__ */ jsx(SectionLabel, { children: getWidgetTranslation("quickActions", locale) }),
3112
+ /* @__PURE__ */ jsx("div", { className: "ww-grid ww-grid-cols-2 ww-gap-2", children: clientActions.slice(0, 4).map((action, i) => /* @__PURE__ */ jsx(
3113
+ ActionCardCompact,
3114
+ {
3115
+ action,
3116
+ index: i,
3117
+ accentColor,
3118
+ onExecute: () => handleExecute(action.steps)
3119
+ },
3120
+ action.name
3121
+ )) })
3122
+ ] }),
3123
+ hasDocs && /* @__PURE__ */ jsxs("section", { children: [
3124
+ /* @__PURE__ */ jsx(SectionLabel, { children: getWidgetTranslation("documentation", locale) }),
3125
+ /* @__PURE__ */ jsx("div", { className: "ww-flex ww-flex-col ww-gap-2", children: relevantDocs.slice(0, 3).map((doc, i) => /* @__PURE__ */ jsx(
3126
+ DocCard,
3127
+ {
3128
+ doc,
3129
+ index: i,
3130
+ onSend,
3131
+ locale
3132
+ },
3133
+ `${doc.name}-${doc.url ?? i}`
3134
+ )) })
3135
+ ] }),
3136
+ hasTopics && /* @__PURE__ */ jsxs("section", { children: [
3137
+ /* @__PURE__ */ jsx(SectionLabel, { children: getWidgetTranslation("askAbout", locale) }),
3138
+ /* @__PURE__ */ jsx("div", { className: "ww-flex ww-flex-wrap ww-gap-1.5", children: topicQuestions.slice(0, 4).map((topic, i) => /* @__PURE__ */ jsx(
3139
+ TopicChip,
3140
+ {
3141
+ topic,
3142
+ index: i,
3143
+ compact: true,
3144
+ onSend
3145
+ },
3146
+ topic.name
3147
+ )) })
3148
+ ] })
3149
+ ] });
3150
+ }
2460
3151
  function ChatWidget({
2461
3152
  agentId,
2462
3153
  workspaceId,
@@ -2464,7 +3155,7 @@ function ChatWidget({
2464
3155
  displayName,
2465
3156
  profilePicture,
2466
3157
  userMessageColor = "#19191c",
2467
- initialMessages = ["Hello! How can I help you today?"],
3158
+ initialMessages,
2468
3159
  suggestedMessages = [],
2469
3160
  messagePlaceholder,
2470
3161
  watermark = true,
@@ -2490,8 +3181,25 @@ function ChatWidget({
2490
3181
  expanded,
2491
3182
  embedded = false,
2492
3183
  envId,
2493
- onDebugTrace
3184
+ onDebugTrace,
3185
+ widgetLayout,
3186
+ showCommandPanel = true,
3187
+ showRagTopics = true,
3188
+ showRagDocuments = true,
3189
+ showQuickActions = true,
3190
+ locale = "en",
3191
+ clientActions = [],
3192
+ ragTopics = [],
3193
+ ragDocuments = []
2494
3194
  }) {
3195
+ const [isDesktop, setIsDesktop] = useState(false);
3196
+ useEffect(() => {
3197
+ if (typeof window === "undefined") return;
3198
+ const checkSize = () => setIsDesktop(window.innerWidth >= 768);
3199
+ checkSize();
3200
+ window.addEventListener("resize", checkSize);
3201
+ return () => window.removeEventListener("resize", checkSize);
3202
+ }, []);
2495
3203
  const chat = useChat({
2496
3204
  agentId,
2497
3205
  workspaceId,
@@ -2571,10 +3279,24 @@ function ChatWidget({
2571
3279
  chat.reset();
2572
3280
  onReset?.();
2573
3281
  };
2574
- const isDark = theme === "dark";
3282
+ const [resolvedTheme, setResolvedTheme] = useState("light");
3283
+ useEffect(() => {
3284
+ if (theme === "system") {
3285
+ const media = window.matchMedia("(prefers-color-scheme: dark)");
3286
+ setResolvedTheme(media.matches ? "dark" : "light");
3287
+ const listener = (e) => {
3288
+ setResolvedTheme(e.matches ? "dark" : "light");
3289
+ };
3290
+ media.addEventListener("change", listener);
3291
+ return () => media.removeEventListener("change", listener);
3292
+ } else {
3293
+ setResolvedTheme(theme || "light");
3294
+ }
3295
+ }, [theme]);
3296
+ const isDark = resolvedTheme === "dark";
2575
3297
  const cssVars = {
2576
3298
  fontFamily: 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',
2577
- colorScheme: theme,
3299
+ colorScheme: resolvedTheme,
2578
3300
  // Inline style has higher specificity than any host-site stylesheet,
2579
3301
  // so background-color set here cannot be overridden by host CSS.
2580
3302
  backgroundColor: isDark ? "hsl(240 10% 3.9%)" : "hsl(0 0% 100%)",
@@ -2592,6 +3314,31 @@ function ChatWidget({
2592
3314
  ["--ring"]: isDark ? "240 4.9% 83.9%" : "240 10% 3.9%",
2593
3315
  ["--radius"]: "0.5rem"
2594
3316
  };
3317
+ const defaultEnglishGreeting = "Hello! How can I help you today?";
3318
+ const isDefaultGreeting = !initialMessages || initialMessages.length === 0 || initialMessages.length === 1 && initialMessages[0] === defaultEnglishGreeting;
3319
+ const messagesList = isDefaultGreeting ? [getWidgetTranslation("defaultGreeting", locale)] : initialMessages;
3320
+ const showSidebar = showCommandPanel && widgetLayout === "center" && isDesktop;
3321
+ const showInlineCommandPanel = showCommandPanel && !showSidebar && chat.messages.length === 0 && (showQuickActions && clientActions.length > 0 || showRagTopics && ragTopics.length > 0 || showRagDocuments && ragDocuments.length > 0);
3322
+ const handleExecuteAction = useCallback(
3323
+ (steps) => {
3324
+ executeDeclarativeSteps(steps, onNavigate);
3325
+ },
3326
+ [onNavigate]
3327
+ );
3328
+ const commandPanelProps = {
3329
+ pageUrl: userContext?.pageContext?.url,
3330
+ pageTitle: userContext?.pageContext?.title,
3331
+ clientActions: showQuickActions ? clientActions : [],
3332
+ ragTopics: showRagTopics ? ragTopics : [],
3333
+ ragDocuments: showRagDocuments ? ragDocuments : [],
3334
+ onSend: (text) => chat.send(text),
3335
+ onExecuteAction: handleExecuteAction,
3336
+ accentColor: userMessageColor,
3337
+ watermark,
3338
+ watermarkLogoUrl,
3339
+ footer,
3340
+ locale
3341
+ };
2595
3342
  return /* @__PURE__ */ jsxs(
2596
3343
  "div",
2597
3344
  {
@@ -2607,11 +3354,6 @@ function ChatWidget({
2607
3354
  onDragLeave: handleDragLeave,
2608
3355
  onDrop: handleDrop,
2609
3356
  children: [
2610
- isDragOver && enableAttachments && /* @__PURE__ */ jsxs("div", { className: "ww-absolute ww-inset-0 ww-z-50 ww-flex ww-flex-col ww-items-center ww-justify-center ww-gap-2 ww-rounded-2xl ww-bg-background/90 ww-backdrop-blur-sm ww-pointer-events-none", children: [
2611
- /* @__PURE__ */ jsx(UploadCloud, { className: "ww-h-8 ww-w-8 ww-text-primary/70" }),
2612
- /* @__PURE__ */ jsx("span", { className: "ww-text-sm ww-font-medium ww-text-foreground/70", children: "Drop files to attach" }),
2613
- /* @__PURE__ */ jsx("span", { className: "ww-text-xs ww-text-muted-foreground", children: "CSV, TXT, PDF, JPG, PNG, WebP" })
2614
- ] }),
2615
3357
  /* @__PURE__ */ jsx(
2616
3358
  ChatHeader,
2617
3359
  {
@@ -2624,167 +3366,197 @@ function ChatWidget({
2624
3366
  onExpand,
2625
3367
  expanded,
2626
3368
  onCall: enableVoice && chat.voiceCall ? () => chat.voiceCall?.start() : void 0,
2627
- isCallLoading: chat.voiceCall?.loading
3369
+ isCallLoading: chat.voiceCall?.loading,
3370
+ locale
2628
3371
  }
2629
3372
  ),
2630
- chat.voiceCall?.active && chat.voiceCall.token && chat.voiceCall.serverUrl && /* @__PURE__ */ jsx(
2631
- VoiceOverlay,
2632
- {
2633
- token: chat.voiceCall.token,
2634
- serverUrl: chat.voiceCall.serverUrl,
2635
- onClose: chat.voiceCall.stop,
2636
- accentColor: userMessageColor
2637
- }
2638
- ),
2639
- customBackend?.mode === "human" && /* @__PURE__ */ jsxs(
3373
+ /* @__PURE__ */ jsxs(
2640
3374
  "div",
2641
3375
  {
2642
- className: "ww-shrink-0 ww-flex ww-items-center ww-gap-2 ww-px-4 ww-py-1.5 ww-border-b",
2643
- style: { backgroundColor: `${userMessageColor}0d` },
2644
- children: [
2645
- /* @__PURE__ */ jsxs("span", { className: "ww-relative ww-flex ww-h-2 ww-w-2 ww-shrink-0", children: [
2646
- /* @__PURE__ */ jsx("span", { className: "ww-animate-ping ww-absolute ww-inline-flex ww-h-full ww-w-full ww-rounded-full ww-bg-emerald-400 ww-opacity-75" }),
2647
- /* @__PURE__ */ jsx("span", { className: "ww-relative ww-inline-flex ww-rounded-full ww-h-2 ww-w-2 ww-bg-emerald-500" })
2648
- ] }),
2649
- /* @__PURE__ */ jsx("span", { className: "ww-text-xs ww-font-medium ww-text-foreground/60", children: "Hablando con un agente" })
2650
- ]
2651
- }
2652
- ),
2653
- /* @__PURE__ */ jsx(
2654
- ChatMessages,
2655
- {
2656
- messages: chat.messages,
2657
- streaming: chat.streaming,
2658
- agentName,
2659
- profilePicture,
2660
- userColor: userMessageColor,
2661
- initialMessages,
2662
- suggestedMessages,
2663
- showThinking,
2664
- onSuggest: (msg) => chat.send(msg),
2665
- onPickerSelect: chat.selectPickerOption
2666
- }
2667
- ),
2668
- customBackend?.footerAction && /* @__PURE__ */ jsx("div", { className: "ww-shrink-0 ww-px-3 ww-py-1.5 ww-border-t ww-bg-background", children: /* @__PURE__ */ jsxs(
2669
- "button",
2670
- {
2671
- onClick: () => void customBackend.footerAction.onClick(),
2672
- disabled: customBackend.footerAction.loading,
2673
- style: customBackend.footerAction.icon === "human" ? {
2674
- backgroundColor: userMessageColor,
2675
- color: "#ffffff",
2676
- boxShadow: `0 2px 12px ${userMessageColor}55`
2677
- } : {
2678
- borderColor: `${userMessageColor}35`,
2679
- backgroundColor: `${userMessageColor}0d`,
2680
- color: userMessageColor
2681
- },
2682
- className: [
2683
- "ww-w-full ww-flex ww-items-center ww-gap-2 ww-rounded-full ww-px-3.5 ww-py-1.5 ww-text-xs ww-font-semibold ww-transition-all",
2684
- "hover:ww-opacity-85 active:ww-scale-[0.98] disabled:ww-opacity-50 disabled:ww-pointer-events-none",
2685
- customBackend.footerAction.icon === "human" ? "" : "ww-border"
2686
- ].join(" "),
3376
+ className: cn(
3377
+ "ww-flex ww-flex-row ww-flex-1 ww-w-full ww-overflow-hidden",
3378
+ showSidebar && "ww-bg-muted/50"
3379
+ ),
2687
3380
  children: [
2688
- customBackend.footerAction.loading ? /* @__PURE__ */ jsxs(
2689
- "svg",
3381
+ /* @__PURE__ */ jsxs(
3382
+ "div",
2690
3383
  {
2691
- className: "ww-animate-spin ww-w-3.5 ww-h-3.5 ww-shrink-0",
2692
- viewBox: "0 0 24 24",
2693
- fill: "none",
3384
+ className: cn(
3385
+ "ww-flex ww-flex-col ww-flex-1 ww-h-full ww-overflow-hidden ww-relative ww-bg-background",
3386
+ showSidebar && "ww-rounded-br-2xl"
3387
+ ),
2694
3388
  children: [
3389
+ isDragOver && enableAttachments && /* @__PURE__ */ jsxs("div", { className: "ww-absolute ww-inset-0 ww-z-50 ww-flex ww-flex-col ww-items-center ww-justify-center ww-gap-2 ww-rounded-2xl ww-bg-background/90 ww-backdrop-blur-sm ww-pointer-events-none", children: [
3390
+ /* @__PURE__ */ jsx(UploadCloud, { className: "ww-h-8 ww-w-8 ww-text-primary/70" }),
3391
+ /* @__PURE__ */ jsx("span", { className: "ww-text-sm ww-font-medium ww-text-foreground/70", children: getWidgetTranslation("dropFiles", locale) }),
3392
+ /* @__PURE__ */ jsx("span", { className: "ww-text-xs ww-text-muted-foreground", children: "CSV, TXT, PDF, JPG, PNG, WebP" })
3393
+ ] }),
3394
+ chat.voiceCall?.active && chat.voiceCall.token && chat.voiceCall.serverUrl && /* @__PURE__ */ jsx(
3395
+ VoiceOverlay,
3396
+ {
3397
+ token: chat.voiceCall.token,
3398
+ serverUrl: chat.voiceCall.serverUrl,
3399
+ onClose: chat.voiceCall.stop,
3400
+ accentColor: userMessageColor,
3401
+ locale
3402
+ }
3403
+ ),
3404
+ customBackend?.mode === "human" && /* @__PURE__ */ jsxs(
3405
+ "div",
3406
+ {
3407
+ className: "ww-shrink-0 ww-flex ww-items-center ww-gap-2 ww-px-4 ww-py-1.5 ww-border-b",
3408
+ style: { backgroundColor: `${userMessageColor}0d` },
3409
+ children: [
3410
+ /* @__PURE__ */ jsx(LiveDot, { size: "md" }),
3411
+ /* @__PURE__ */ jsx("span", { className: "ww-text-xs ww-font-medium ww-text-foreground/60", children: getWidgetTranslation("talkingToAgent", locale) })
3412
+ ]
3413
+ }
3414
+ ),
2695
3415
  /* @__PURE__ */ jsx(
2696
- "circle",
3416
+ ChatMessages,
2697
3417
  {
2698
- className: "ww-opacity-25",
2699
- cx: "12",
2700
- cy: "12",
2701
- r: "10",
2702
- stroke: "currentColor",
2703
- strokeWidth: "3"
3418
+ messages: chat.messages,
3419
+ streaming: chat.streaming,
3420
+ agentName,
3421
+ profilePicture,
3422
+ userColor: userMessageColor,
3423
+ initialMessages: messagesList,
3424
+ suggestedMessages,
3425
+ showThinking,
3426
+ onSuggest: (msg) => chat.send(msg),
3427
+ onPickerSelect: chat.selectPickerOption,
3428
+ locale,
3429
+ commandPanel: showInlineCommandPanel ? /* @__PURE__ */ jsx(CommandPanel, { mode: "inline", ...commandPanelProps }) : void 0
2704
3430
  }
2705
3431
  ),
3432
+ customBackend?.footerAction && /* @__PURE__ */ jsx("div", { className: "ww-shrink-0 ww-px-3 ww-py-1.5 ww-border-t ww-bg-background", children: /* @__PURE__ */ jsxs(
3433
+ "button",
3434
+ {
3435
+ onClick: () => void customBackend.footerAction.onClick(),
3436
+ disabled: customBackend.footerAction.loading,
3437
+ style: customBackend.footerAction.icon === "human" ? {
3438
+ backgroundColor: userMessageColor,
3439
+ color: "#ffffff",
3440
+ boxShadow: `0 2px 12px ${userMessageColor}55`
3441
+ } : {
3442
+ borderColor: `${userMessageColor}35`,
3443
+ backgroundColor: `${userMessageColor}0d`,
3444
+ color: userMessageColor
3445
+ },
3446
+ className: [
3447
+ "ww-w-full ww-flex ww-items-center ww-gap-2 ww-rounded-full ww-px-3.5 ww-py-1.5 ww-text-xs ww-font-semibold ww-transition-all",
3448
+ "hover:ww-opacity-85 active:ww-scale-[0.98] disabled:ww-opacity-50 disabled:ww-pointer-events-none",
3449
+ customBackend.footerAction.icon === "human" ? "" : "ww-border"
3450
+ ].join(" "),
3451
+ children: [
3452
+ customBackend.footerAction.loading ? /* @__PURE__ */ jsxs(
3453
+ "svg",
3454
+ {
3455
+ className: "ww-animate-spin ww-w-3.5 ww-h-3.5 ww-shrink-0",
3456
+ viewBox: "0 0 24 24",
3457
+ fill: "none",
3458
+ children: [
3459
+ /* @__PURE__ */ jsx(
3460
+ "circle",
3461
+ {
3462
+ className: "ww-opacity-25",
3463
+ cx: "12",
3464
+ cy: "12",
3465
+ r: "10",
3466
+ stroke: "currentColor",
3467
+ strokeWidth: "3"
3468
+ }
3469
+ ),
3470
+ /* @__PURE__ */ jsx(
3471
+ "path",
3472
+ {
3473
+ className: "ww-opacity-75",
3474
+ fill: "currentColor",
3475
+ d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"
3476
+ }
3477
+ )
3478
+ ]
3479
+ }
3480
+ ) : customBackend.footerAction.icon === "ai" ? /* @__PURE__ */ jsx(
3481
+ "svg",
3482
+ {
3483
+ className: "ww-w-3.5 ww-h-3.5 ww-shrink-0",
3484
+ viewBox: "0 0 24 24",
3485
+ fill: "none",
3486
+ stroke: "currentColor",
3487
+ strokeWidth: "2",
3488
+ strokeLinecap: "round",
3489
+ strokeLinejoin: "round",
3490
+ children: /* @__PURE__ */ jsx("path", { d: "m12 3-1.912 5.813a2 2 0 0 1-1.275 1.275L3 12l5.813 1.912a2 2 0 0 1 1.275 1.275L12 21l1.912-5.813a2 2 0 0 1 1.275-1.275L21 12l-5.813-1.912a2 2 0 0 1-1.275-1.275L12 3Z" })
3491
+ }
3492
+ ) : /* @__PURE__ */ jsxs(
3493
+ "svg",
3494
+ {
3495
+ className: "ww-w-3.5 ww-h-3.5 ww-shrink-0",
3496
+ viewBox: "0 0 24 24",
3497
+ fill: "none",
3498
+ stroke: "currentColor",
3499
+ strokeWidth: "2",
3500
+ strokeLinecap: "round",
3501
+ strokeLinejoin: "round",
3502
+ children: [
3503
+ /* @__PURE__ */ jsx("path", { d: "M3 18v-6a9 9 0 0 1 18 0v6" }),
3504
+ /* @__PURE__ */ jsx("path", { d: "M21 19a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3zM3 19a2 2 0 0 0 2 2h1a2 2 0 0 0 2-2v-3a2 2 0 0 0-2-2H3z" })
3505
+ ]
3506
+ }
3507
+ ),
3508
+ /* @__PURE__ */ jsx("span", { className: "ww-flex-1 ww-text-left ww-truncate", children: customBackend.footerAction.label }),
3509
+ /* @__PURE__ */ jsx(
3510
+ "svg",
3511
+ {
3512
+ className: "ww-shrink-0 ww-w-3 ww-h-3 ww-opacity-60",
3513
+ viewBox: "0 0 24 24",
3514
+ fill: "none",
3515
+ stroke: "currentColor",
3516
+ strokeWidth: "2.5",
3517
+ strokeLinecap: "round",
3518
+ strokeLinejoin: "round",
3519
+ children: /* @__PURE__ */ jsx("path", { d: "M9 18l6-6-6-6" })
3520
+ }
3521
+ )
3522
+ ]
3523
+ }
3524
+ ) }),
2706
3525
  /* @__PURE__ */ jsx(
2707
- "path",
3526
+ ChatInput,
2708
3527
  {
2709
- className: "ww-opacity-75",
2710
- fill: "currentColor",
2711
- d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"
3528
+ input: chat.input,
3529
+ setInput: chat.setInput,
3530
+ onSend: handleSend,
3531
+ streaming: chat.streaming,
3532
+ placeholder: messagePlaceholder,
3533
+ accentColor: userMessageColor,
3534
+ locale,
3535
+ canRegenerate: !!canRegenerate,
3536
+ onRegenerate: () => void chat.regenerate(),
3537
+ selectedContext: chat.selectedContext,
3538
+ onClearContext: () => chat.setSelectedContext(null),
3539
+ ...enableVoice && voice.isSupported ? {
3540
+ voiceState: voice.voiceState,
3541
+ onVoiceStart: () => void voice.start(),
3542
+ onVoiceStop: voice.stop
3543
+ } : {},
3544
+ ...enableAttachments ? {
3545
+ attachments: attachmentHook.attachments,
3546
+ onAttach: attachmentHook.attach,
3547
+ onRemoveAttachment: attachmentHook.remove,
3548
+ isUploading: attachmentHook.isUploading
3549
+ } : {}
2712
3550
  }
2713
3551
  )
2714
3552
  ]
2715
3553
  }
2716
- ) : customBackend.footerAction.icon === "ai" ? /* @__PURE__ */ jsx(
2717
- "svg",
2718
- {
2719
- className: "ww-w-3.5 ww-h-3.5 ww-shrink-0",
2720
- viewBox: "0 0 24 24",
2721
- fill: "none",
2722
- stroke: "currentColor",
2723
- strokeWidth: "2",
2724
- strokeLinecap: "round",
2725
- strokeLinejoin: "round",
2726
- children: /* @__PURE__ */ jsx("path", { d: "m12 3-1.912 5.813a2 2 0 0 1-1.275 1.275L3 12l5.813 1.912a2 2 0 0 1 1.275 1.275L12 21l1.912-5.813a2 2 0 0 1 1.275-1.275L21 12l-5.813-1.912a2 2 0 0 1-1.275-1.275L12 3Z" })
2727
- }
2728
- ) : /* @__PURE__ */ jsxs(
2729
- "svg",
2730
- {
2731
- className: "ww-w-3.5 ww-h-3.5 ww-shrink-0",
2732
- viewBox: "0 0 24 24",
2733
- fill: "none",
2734
- stroke: "currentColor",
2735
- strokeWidth: "2",
2736
- strokeLinecap: "round",
2737
- strokeLinejoin: "round",
2738
- children: [
2739
- /* @__PURE__ */ jsx("path", { d: "M3 18v-6a9 9 0 0 1 18 0v6" }),
2740
- /* @__PURE__ */ jsx("path", { d: "M21 19a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3zM3 19a2 2 0 0 0 2 2h1a2 2 0 0 0 2-2v-3a2 2 0 0 0-2-2H3z" })
2741
- ]
2742
- }
2743
3554
  ),
2744
- /* @__PURE__ */ jsx("span", { className: "ww-flex-1 ww-text-left ww-truncate", children: customBackend.footerAction.label }),
2745
- /* @__PURE__ */ jsx(
2746
- "svg",
2747
- {
2748
- className: "ww-shrink-0 ww-w-3 ww-h-3 ww-opacity-60",
2749
- viewBox: "0 0 24 24",
2750
- fill: "none",
2751
- stroke: "currentColor",
2752
- strokeWidth: "2.5",
2753
- strokeLinecap: "round",
2754
- strokeLinejoin: "round",
2755
- children: /* @__PURE__ */ jsx("path", { d: "M9 18l6-6-6-6" })
2756
- }
2757
- )
3555
+ showSidebar && /* @__PURE__ */ jsx(CommandPanel, { mode: "sidebar", ...commandPanelProps })
2758
3556
  ]
2759
3557
  }
2760
- ) }),
2761
- /* @__PURE__ */ jsx(
2762
- ChatInput,
2763
- {
2764
- input: chat.input,
2765
- setInput: chat.setInput,
2766
- onSend: handleSend,
2767
- streaming: chat.streaming,
2768
- placeholder: messagePlaceholder,
2769
- accentColor: userMessageColor,
2770
- canRegenerate: !!canRegenerate,
2771
- onRegenerate: () => void chat.regenerate(),
2772
- selectedContext: chat.selectedContext,
2773
- onClearContext: () => chat.setSelectedContext(null),
2774
- ...enableVoice && voice.isSupported ? {
2775
- voiceState: voice.voiceState,
2776
- onVoiceStart: () => void voice.start(),
2777
- onVoiceStop: voice.stop
2778
- } : {},
2779
- ...enableAttachments ? {
2780
- attachments: attachmentHook.attachments,
2781
- onAttach: attachmentHook.attach,
2782
- onRemoveAttachment: attachmentHook.remove,
2783
- isUploading: attachmentHook.isUploading
2784
- } : {}
2785
- }
2786
3558
  ),
2787
- watermark && /* @__PURE__ */ jsxs("footer", { className: "ww-shrink-0 ww-flex ww-items-center ww-justify-center ww-gap-1.5 ww-bg-muted/50 ww-py-1.5 ww-border-t ww-touch-none", children: [
3559
+ watermark && !showSidebar && /* @__PURE__ */ jsxs("footer", { className: "ww-shrink-0 ww-flex ww-items-center ww-justify-center ww-gap-1.5 ww-bg-muted/50 ww-py-1.5 ww-border-t ww-touch-none", children: [
2788
3560
  /* @__PURE__ */ jsxs(
2789
3561
  "a",
2790
3562
  {
@@ -2794,7 +3566,10 @@ function ChatWidget({
2794
3566
  className: "ww-flex ww-items-center ww-gap-1 ww-text-[10px] ww-text-muted-foreground hover:ww-text-foreground ww-transition-colors",
2795
3567
  children: [
2796
3568
  /* @__PURE__ */ jsx("img", { src: watermarkLogoUrl, alt: "Wallavi", width: 12, height: 12 }),
2797
- /* @__PURE__ */ jsx("span", { children: "Powered by Wallavi" })
3569
+ /* @__PURE__ */ jsxs("span", { children: [
3570
+ getWidgetTranslation("poweredBy", locale),
3571
+ " Wallavi"
3572
+ ] })
2798
3573
  ]
2799
3574
  }
2800
3575
  ),
@@ -2815,6 +3590,7 @@ var EMPTY = {
2815
3590
  keyboardShortcut: false,
2816
3591
  position: "bottom-right",
2817
3592
  widgetLayout: "bubble",
3593
+ clientActions: [],
2818
3594
  bubbleSize: 52,
2819
3595
  panelWidth: 360,
2820
3596
  panelHeight: 580,
@@ -2858,6 +3634,12 @@ function useAutoConfig(agentId, enabled) {
2858
3634
  remote.widgetLayout = cfg.widgetLayout;
2859
3635
  if (cfg.enableVoice != null)
2860
3636
  remote.enableVoice = cfg.enableVoice;
3637
+ if (cfg.clientActions)
3638
+ remote.clientActions = cfg.clientActions;
3639
+ if (Array.isArray(cfg.ragTopics))
3640
+ remote.ragTopics = cfg.ragTopics;
3641
+ if (Array.isArray(cfg.ragDocuments))
3642
+ remote.ragDocuments = cfg.ragDocuments;
2861
3643
  setResult({
2862
3644
  remoteConfig: remote,
2863
3645
  bubbleIconUrl: cfg.chatIcon || cfg.profilePicture || void 0,
@@ -2865,6 +3647,7 @@ function useAutoConfig(agentId, enabled) {
2865
3647
  keyboardShortcut: Boolean(cfg.keyboardShortcut),
2866
3648
  position: cfg.alignChatBubbleButton === "left" ? "bottom-left" : "bottom-right",
2867
3649
  widgetLayout: cfg.widgetLayout === "center" ? "center" : "bubble",
3650
+ clientActions: Array.isArray(cfg.clientActions) ? cfg.clientActions : [],
2868
3651
  bubbleSize: typeof cfg.bubbleSize === "number" ? cfg.bubbleSize : 52,
2869
3652
  panelWidth: typeof cfg.panelWidth === "number" ? cfg.panelWidth : 360,
2870
3653
  panelHeight: typeof cfg.panelHeight === "number" ? cfg.panelHeight : 580,
@@ -2891,8 +3674,11 @@ function useSupportChat({
2891
3674
  inboxToken,
2892
3675
  apiBase = "https://app.wallavi.com",
2893
3676
  requestHumanLabel = "Hablar con un agente",
2894
- returnToAiLabel
3677
+ returnToAiLabel,
3678
+ locale
2895
3679
  }) {
3680
+ const resolvedRequestHumanLabel = requestHumanLabel && requestHumanLabel !== "Hablar con un agente" ? requestHumanLabel : getWidgetTranslation("requestHuman", locale);
3681
+ const resolvedReturnToAiLabel = returnToAiLabel && returnToAiLabel !== "Volver a chatear con la IA" ? returnToAiLabel : returnToAiLabel ? getWidgetTranslation("returnToAi", locale) : void 0;
2896
3682
  const enabled = Boolean(inboxToken) && inboxToken !== "__disabled__";
2897
3683
  const STORAGE_KEY = `wlv_support_${inboxToken}`;
2898
3684
  const base = apiBase.replace(/\/$/, "");
@@ -3033,7 +3819,9 @@ function useSupportChat({
3033
3819
  {
3034
3820
  id: `tmp_${Date.now()}`,
3035
3821
  role: "customer",
3036
- content: text || `[${attachments?.length ?? 0} archivo(s)]`,
3822
+ content: text || `[${getWidgetTranslation("filesCount", locale, {
3823
+ count: String(attachments?.length ?? 0)
3824
+ })}]`,
3037
3825
  createdAt: (/* @__PURE__ */ new Date()).toISOString(),
3038
3826
  metadata: attachments?.length ? { attachments } : void 0
3039
3827
  }
@@ -3044,7 +3832,9 @@ function useSupportChat({
3044
3832
  headers: { "Content-Type": "application/json" },
3045
3833
  body: JSON.stringify({
3046
3834
  inboxToken,
3047
- message: text || `[${attachments.length} archivo(s)]`,
3835
+ message: text || `[${getWidgetTranslation("filesCount", locale, {
3836
+ count: String(attachments.length)
3837
+ })}]`,
3048
3838
  attachments
3049
3839
  })
3050
3840
  });
@@ -3073,7 +3863,9 @@ function useSupportChat({
3073
3863
  {
3074
3864
  id: `tmp_${Date.now()}`,
3075
3865
  role: "customer",
3076
- content: text || `[${attachments.length} archivo(s)]`,
3866
+ content: text || `[${getWidgetTranslation("filesCount", locale, {
3867
+ count: String(attachments.length)
3868
+ })}]`,
3077
3869
  createdAt: (/* @__PURE__ */ new Date()).toISOString(),
3078
3870
  metadata: attachments?.length ? { attachments } : void 0
3079
3871
  }
@@ -3193,17 +3985,17 @@ function useSupportChat({
3193
3985
  const footerAction = useMemo(() => {
3194
3986
  if (isAiMode) {
3195
3987
  return {
3196
- label: requestHumanLabel,
3197
- sublabel: "Te conectamos con un agente disponible",
3988
+ label: resolvedRequestHumanLabel,
3989
+ sublabel: getWidgetTranslation("requestHumanSublabel", locale),
3198
3990
  icon: "human",
3199
3991
  onClick: requestHuman,
3200
3992
  loading: requestingHuman
3201
3993
  };
3202
3994
  }
3203
- if (!isAiMode && session && returnToAiLabel) {
3995
+ if (session && resolvedReturnToAiLabel) {
3204
3996
  return {
3205
- label: returnToAiLabel,
3206
- sublabel: "Respuesta instant\xE1nea con inteligencia artificial",
3997
+ label: resolvedReturnToAiLabel,
3998
+ sublabel: getWidgetTranslation("returnToAiSublabel", locale),
3207
3999
  icon: "ai",
3208
4000
  onClick: returnToAi,
3209
4001
  loading: returningToAi
@@ -3213,12 +4005,13 @@ function useSupportChat({
3213
4005
  }, [
3214
4006
  isAiMode,
3215
4007
  session,
3216
- requestHumanLabel,
4008
+ resolvedRequestHumanLabel,
4009
+ resolvedReturnToAiLabel,
3217
4010
  requestHuman,
3218
4011
  requestingHuman,
3219
- returnToAiLabel,
3220
4012
  returnToAi,
3221
- returningToAi
4013
+ returningToAi,
4014
+ locale
3222
4015
  ]);
3223
4016
  return useMemo(
3224
4017
  () => ({
@@ -3281,14 +4074,6 @@ function BubbleWidget({
3281
4074
  onOpenChange,
3282
4075
  ...chatProps
3283
4076
  }) {
3284
- const supportBackend = useSupportChat(
3285
- inboxToken ? {
3286
- inboxToken,
3287
- apiBase: supportApiBase,
3288
- requestHumanLabel,
3289
- returnToAiLabel
3290
- } : { inboxToken: "__disabled__", apiBase: supportApiBase }
3291
- );
3292
4077
  const isControlled = isOpenProp !== void 0;
3293
4078
  const [internalOpen, setInternalOpen] = useState(false);
3294
4079
  const open = isControlled ? isOpenProp : internalOpen;
@@ -3340,6 +4125,15 @@ function BubbleWidget({
3340
4125
  agentName: remote.remoteConfig.agentName ?? chatProps.agentName ?? "Asistente",
3341
4126
  source: chatProps.source ?? remote.remoteConfig.source ?? "web"
3342
4127
  };
4128
+ const supportBackend = useSupportChat(
4129
+ inboxToken ? {
4130
+ inboxToken,
4131
+ apiBase: supportApiBase,
4132
+ requestHumanLabel,
4133
+ returnToAiLabel,
4134
+ locale: mergedConfig.locale
4135
+ } : { inboxToken: "__disabled__", apiBase: supportApiBase }
4136
+ );
3343
4137
  const setOpenRef = useRef(setOpen);
3344
4138
  useEffect(() => {
3345
4139
  setOpenRef.current = setOpen;
@@ -3495,4 +4289,4 @@ function BubbleWidget({
3495
4289
  ] });
3496
4290
  }
3497
4291
 
3498
- export { BubbleWidget, ChatWidget, PlanCard, ReasoningBlock, ToolCallBadge, formatToolName, getContrastColor, useAttachments, useChat, useSupportChat, useVoice };
4292
+ export { BubbleWidget, ChatWidget, CommandPanel, IconTarget, LiveDot, PlanCard, ReasoningBlock, ToolCallBadge, formatToolName, getContrastColor, useAttachments, useChat, useSupportChat, useVoice };