shopify-chatbot-widget 0.2.6 → 0.2.7

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.
@@ -1 +1 @@
1
- .jaweb-chatbot-container{position:fixed;bottom:20px;right:20px;z-index:9999}.scrollbar-hide::-webkit-scrollbar{display:none}.scrollbar-hide{-ms-overflow-style:none;scrollbar-width:none}.chatbot-box{position:fixed;bottom:5%;right:10px;width:28%;top:2%;z-index:9999;height:86%;background:#fff;color:#000;border-radius:12px;overflow:hidden;display:flex;flex-direction:column;box-shadow:0 8px 24px #0003;font-family:Inter,sans-serif}.chatbot-header{background:#f7f7f7;padding:16px;display:flex;align-items:center;height:8%;gap:12px;font-size:16px;font-weight:700;border-bottom:1px solid #e0e0e0}.chatbot-title{flex-grow:1}.chatbot-close{cursor:pointer;font-size:16px;color:#888}.chatbot-messages{flex:1;padding:16px;overflow-y:auto;display:flex;flex-direction:column;height:70%;gap:12px;background-color:#fafafa;min-height:70%;scrollbar-width:none;-ms-overflow-style:none}.chatbot-messages::-webkit-scrollbar{display:none}.chat-msg{max-width:85%;padding:10px 14px;border-radius:16px;font-size:14px;line-height:1.4;word-break:break-word}.chat-msg.assistant{background:#f0f0f0;align-self:flex-start;color:#000}.chat-msg.user{background:#7f28f8;align-self:flex-end;color:#fff}.chatbot-input-area{width:100%;display:flex;flex-direction:column;height:22%;align-items:center;background:#fff;border-top:1px solid #e0e0e0}.typing-animation span{display:inline-block;animation:blink 1.2s infinite;font-size:18px;margin:0 2px}@media (max-width: 600px){.chatbot-box{position:fixed;width:100%;height:100%;right:0;bottom:0;top:0}.chat-launcher.chatbot-open{display:none}}.jawebcss-powered-container{display:inline-flex;margin-top:10px;align-items:center;gap:6px;font-family:Arial,sans-serif;font-size:14px;color:#555;padding:4px 8px;border-radius:6px;box-shadow:0 1px 2px #0000000d}.jawebcss-powered-label{font-weight:400}.jawebcss-powered-link{color:#7f28f8;font-weight:600;text-decoration:none;transition:color .2s ease}.jawebcss-powered-link:hover{color:#5e1dc3;text-decoration:underline}.typing-animation span{display:inline-block;animation:blink 1.4s infinite;font-size:20px;margin:0 2px;color:#555}.typing-animation span:nth-child(2){animation-delay:.2s}.typing-animation span:nth-child(3){animation-delay:.4s}@keyframes blink{0%{opacity:.2}20%{opacity:1}to{opacity:.2}}.product-card{background-color:#fff;box-shadow:0 4px 12px #0000000f;border-radius:16px;padding:16px;display:flex;flex-direction:column;gap:16px}@media (min-width: 640px){.product-card{flex-direction:row;align-items:flex-start}}.product-image-container{width:128px;height:128px}@media (min-width: 640px){.product-image-container{width:160px;height:160px}}.product-image{width:100%;height:100%;object-fit:cover;border-radius:12px;cursor:pointer}.product-details{flex:1;display:flex;flex-direction:column;gap:12px}.product-name{font-size:1.125rem;font-weight:600;color:#111827;text-decoration:none}.product-price{font-size:1rem;font-weight:500;color:#374151}.label{font-size:.875rem;font-weight:500;color:#6b7280}.color-options,.size-options{display:flex;flex-wrap:wrap;gap:8px;margin-top:4px}.color-button,.size-button{padding:4px 12px;font-size:.875rem;border-radius:9999px;border:1px solid #d1d5db;background-color:#f3f4f6;color:#1f2937;cursor:pointer}.color-button.disabled,.size-button.disabled{opacity:.4;cursor:not-allowed}.color-button.active,.size-button.active{color:#fff}.cart-controls{display:inline-flex;align-items:center;gap:12px;margin-top:12px}.cart-button{padding:4px 12px;border:1px solid #d1d5db;border-radius:8px;background:none;cursor:pointer}.cart-count{min-width:20px;text-align:center;font-weight:500}.increment{background-color:#7f28f8;color:#fff}.chat-image-wrapper{padding:4px 12px}.jawebcss-notification{position:fixed;top:1.25rem;right:1rem;background-color:#9ca3af;color:#fff;padding:.5rem 1rem;border-radius:.5rem;box-shadow:0 2px 8px #0003;z-index:9999;font-family:Segoe UI,sans-serif;font-size:14px;max-width:90%;word-break:break-word;transition:opacity .3s ease-in-out}.jawebchatbotcss-cart-widget{position:relative;display:inline-block}.jawebchatbotcss-cart-button{display:flex;align-items:center;gap:6px;padding:6px 12px;border:none;background:none;cursor:pointer;border-radius:6px;transition:background .2s ease-in-out}.jawebchatbotcss-cart-button:hover{background-color:#f1f1f1}.jawebchatbotcss-cart-icon{font-size:18px}.jawebchatbotcss-cart-label{font-weight:600}.jawebchatbotcss-cart-dropdown{position:absolute;right:0;margin-top:16px;width:320px;background-color:#fff;border:1px solid #e5e7eb;border-radius:8px;box-shadow:0 8px 20px #00000014;z-index:999}.jawebchatbotcss-cart-header{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;border-bottom:1px solid #f3f4f6}.jawebchatbotcss-cart-title{font-size:16px;font-weight:500}.jawebchatbotcss-refresh-button{font-size:14px;color:#2563eb;background:none;border:none;cursor:pointer}.jawebchatbotcss-refresh-button:disabled{opacity:.5;cursor:not-allowed}.jawebchatbotcss-cart-empty{padding:16px;text-align:center;color:#6b7280}.jawebchatbotcss-cart-list{max-height:240px;overflow-y:auto;margin:0;padding:0;list-style:none}.jawebchatbotcss-cart-item{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;border-bottom:1px solid #f9fafb}.jawebchatbotcss-item-name{width:160px;font-size:14px;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.jawebchatbotcss-item-controls{display:flex;align-items:center;gap:8px}.jawebchatbotcss-item-qty{font-size:14px;color:#374151}.jawebchatbotcss-remove-icon{color:#ef4444;cursor:pointer}.jawebchatbotcss-remove-icon:hover{color:#b91c1c}.jawebchatbotcss-cart-footer{padding:16px;border-top:1px solid #f3f4f6}html,body{width:100%;height:100%}input::-ms-clear,input::-ms-reveal{display:none}*,*:before,*:after{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:rgba(0,0,0,0)}@-ms-viewport{width:device-width}body{margin:0}[tabindex="-1"]:focus{outline:none}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5em;font-weight:500}p{margin-top:0;margin-bottom:1em}abbr[title],abbr[data-original-title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted;border-bottom:0;cursor:help}address{margin-bottom:1em;font-style:normal;line-height:inherit}input[type=text],input[type=password],input[type=number],textarea{-webkit-appearance:none}ol,ul,dl{margin-top:0;margin-bottom:1em}ol ol,ul ul,ol ul,ul ol{margin-bottom:0}dt{font-weight:500}dd{margin-bottom:.5em;margin-left:0}blockquote{margin:0 0 1em}dfn{font-style:italic}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}pre,code,kbd,samp{font-size:1em;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace}pre{margin-top:0;margin-bottom:1em;overflow:auto}figure{margin:0 0 1em}img{vertical-align:middle;border-style:none}a,area,button,[role=button],input:not([type=range]),label,select,summary,textarea{touch-action:manipulation}table{border-collapse:collapse}caption{padding-top:.75em;padding-bottom:.3em;text-align:left;caption-side:bottom}input,button,select,optgroup,textarea{margin:0;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}button,html [type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{padding:0;border-style:none}input[type=radio],input[type=checkbox]{box-sizing:border-box;padding:0}input[type=date],input[type=time],input[type=datetime-local],input[type=month]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;margin:0;padding:0;border:0}legend{display:block;width:100%;max-width:100%;margin-bottom:.5em;padding:0;color:inherit;font-size:1.5em;line-height:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item}template{display:none}[hidden]{display:none!important}mark{padding:.2em;background-color:#feffe6}/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-border-style:solid;--tw-font-weight:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-ease:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-green-400:oklch(79.2% .209 151.711);--color-indigo-600:oklch(51.1% .262 276.966);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-900:oklch(21% .034 264.665);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--font-weight-medium:500;--font-weight-semibold:600;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--ease-in:cubic-bezier(.4,0,1,1);--ease-out:cubic-bezier(0,0,.2,1);--ease-in-out:cubic-bezier(.4,0,.2,1);--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.collapse{visibility:collapse}.visible{visibility:visible}.visible\!{visibility:visible!important}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.z-50{z-index:50}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.container\!{width:100%!important}@media (min-width:40rem){.container\!{max-width:40rem!important}}@media (min-width:48rem){.container\!{max-width:48rem!important}}@media (min-width:64rem){.container\!{max-width:64rem!important}}@media (min-width:80rem){.container\!{max-width:80rem!important}}@media (min-width:96rem){.container\!{max-width:96rem!important}}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-3{margin-top:calc(var(--spacing)*3)}.mt-4{margin-top:calc(var(--spacing)*4)}.mr-2{margin-right:calc(var(--spacing)*2)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.table-cell{display:table-cell}.h-1{height:calc(var(--spacing)*1)}.h-12{height:calc(var(--spacing)*12)}.h-32{height:calc(var(--spacing)*32)}.h-full{height:100%}.w-12{width:calc(var(--spacing)*12)}.w-32{width:calc(var(--spacing)*32)}.w-full{width:100%}.max-w-xs{max-width:var(--container-xs)}.flex-1{flex:1}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.cursor-pointer{cursor:pointer}.resize{resize:both}.flex-col{flex-direction:column}.items-center{align-items:center}.items-end{align-items:flex-end}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-2{gap:calc(var(--spacing)*2)}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*2)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-x-reverse)))}:where(.space-x-4>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*4)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-x-reverse)))}.overflow-hidden{overflow:hidden}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-gray-300{border-color:var(--color-gray-300)}.border-green-400{border-color:var(--color-green-400)}.bg-gray-100{background-color:var(--color-gray-100)}.bg-gray-200{background-color:var(--color-gray-200)}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.object-cover{object-fit:cover}.p-4{padding:calc(var(--spacing)*4)}.p-6{padding:calc(var(--spacing)*6)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.py-1{padding-block:calc(var(--spacing)*1)}.py-2{padding-block:calc(var(--spacing)*2)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.break-words{overflow-wrap:break-word}.whitespace-pre-wrap{white-space:pre-wrap}.text-gray-500{color:var(--color-gray-500)}.text-gray-700{color:var(--color-gray-700)}.text-gray-900{color:var(--color-gray-900)}.text-indigo-600{color:var(--color-indigo-600)}.text-white{color:var(--color-white)}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.italic{font-style:italic}.ordinal{--tw-ordinal:ordinal;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.line-through{text-decoration-line:line-through}.underline{text-decoration-line:underline}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.drop-shadow{--tw-drop-shadow-size:drop-shadow(0 1px 2px var(--tw-drop-shadow-color,#0000001a))drop-shadow(0 1px 1px var(--tw-drop-shadow-color,#0000000f));--tw-drop-shadow:drop-shadow(0 1px 2px #0000001a)drop-shadow(0 1px 1px #0000000f);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.grayscale{--tw-grayscale:grayscale(100%);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,visibility,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.ease-in{--tw-ease:var(--ease-in);transition-timing-function:var(--ease-in)}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}@media (hover:hover){.hover\:border-black:hover{border-color:var(--color-black)}.hover\:opacity-90:hover{opacity:.9}}@media (min-width:40rem){.sm\:h-40{height:calc(var(--spacing)*40)}.sm\:w-40{width:calc(var(--spacing)*40)}}}.jaweb-reset input[type=submit],.jaweb-reset input[type=button],.jaweb-reset button{all:initial;color:#fff;font:inherit;background:#7f28f8;border:none;border-radius:5px;padding:10px 16px}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}
1
+ .jaweb-chatbot-container{position:fixed;bottom:20px;right:20px;z-index:9999}.scrollbar-hide::-webkit-scrollbar{display:none}.scrollbar-hide{-ms-overflow-style:none;scrollbar-width:none}.chatbot-box{position:fixed;bottom:5%;right:10px;width:28%;top:2%;z-index:9999;height:86%;background:#fff;color:#000;border-radius:12px;overflow:hidden;display:flex;flex-direction:column;box-shadow:0 8px 24px #0003;font-family:Inter,sans-serif}.chatbot-header{background:#f7f7f7;padding:16px;display:flex;align-items:center;height:8%;gap:12px;font-size:16px;font-weight:700;border-bottom:1px solid #e0e0e0}.chatbot-title{flex-grow:1}.chatbot-close{cursor:pointer;font-size:16px;color:#888}.chatbot-messages{flex:1;padding:16px;overflow-y:auto;display:flex;flex-direction:column;height:70%;gap:12px;background-color:#fafafa;min-height:70%;scrollbar-width:none;-ms-overflow-style:none}.chatbot-messages::-webkit-scrollbar{display:none}.chat-msg{max-width:85%;padding:10px 14px;border-radius:16px;font-size:14px;line-height:1.4;word-break:break-word}.chat-msg.assistant{background:#f0f0f0;align-self:flex-start;color:#000}.chat-msg.user{background:#7f28f8;align-self:flex-end;color:#fff}.chatbot-input-area{width:100%;display:flex;flex-direction:column;height:22%;align-items:center;background:#fff;border-top:1px solid #e0e0e0}.typing-animation span{display:inline-block;animation:blink 1.2s infinite;font-size:18px;margin:0 2px}@media (max-width: 600px){.chatbot-box{position:fixed;width:100%;height:100%;right:0;bottom:0;top:0}.chat-launcher.chatbot-open{display:none}}.jawebcss-powered-container{display:inline-flex;margin-top:10px;align-items:center;gap:6px;font-family:Arial,sans-serif;font-size:14px;color:#555;padding:4px 8px;border-radius:6px;box-shadow:0 1px 2px #0000000d}.jawebcss-powered-label{font-weight:400}.jawebcss-powered-link{color:#7f28f8;font-weight:600;text-decoration:none;transition:color .2s ease}.jawebcss-powered-link:hover{color:#5e1dc3;text-decoration:underline}.typing-animation span{display:inline-block;animation:blink 1.4s infinite;font-size:20px;margin:0 2px;color:#555}.typing-animation span:nth-child(2){animation-delay:.2s}.typing-animation span:nth-child(3){animation-delay:.4s}@keyframes blink{0%{opacity:.2}20%{opacity:1}to{opacity:.2}}.product-card{background-color:#fff;box-shadow:0 4px 12px #0000000f;border-radius:16px;padding:16px;display:flex;flex-direction:column;gap:16px}@media (min-width: 640px){.product-card{flex-direction:row;align-items:flex-start}}.product-image-container{width:128px;height:128px}@media (min-width: 640px){.product-image-container{width:160px;height:160px}}.product-image{width:100%;height:100%;object-fit:cover;border-radius:12px;cursor:pointer}.product-details{flex:1;display:flex;flex-direction:column;gap:12px}.product-name{font-size:1.125rem;font-weight:600;color:#111827;text-decoration:none}.product-price{font-size:1rem;font-weight:500;color:#374151}.label{font-size:.875rem;font-weight:500;color:#6b7280}.color-options,.size-options{display:flex;flex-wrap:wrap;gap:8px;margin-top:4px}.color-button,.size-button{padding:4px 12px;font-size:.875rem;border-radius:9999px;border:1px solid #d1d5db;background-color:#f3f4f6;color:#1f2937;cursor:pointer}.color-button.disabled,.size-button.disabled{opacity:.4;cursor:not-allowed}.color-button.active,.size-button.active{color:#fff}.cart-controls{display:inline-flex;align-items:center;gap:12px;margin-top:12px}.cart-button{padding:4px 12px;border:1px solid #d1d5db;border-radius:8px;background:none;cursor:pointer}.cart-count{min-width:20px;text-align:center;font-weight:500}.increment{background-color:#7f28f8;color:#fff}.chat-image-wrapper{padding:4px 12px}.jawebcss-notification{position:fixed;top:1.25rem;right:1rem;background-color:#9ca3af;color:#fff;padding:.5rem 1rem;border-radius:.5rem;box-shadow:0 2px 8px #0003;z-index:9999;font-family:Segoe UI,sans-serif;font-size:14px;max-width:90%;word-break:break-word;transition:opacity .3s ease-in-out}.jawebchatbotcss-cart-widget{position:relative;display:inline-block}.jawebchatbotcss-cart-button{display:flex;align-items:center;gap:6px;padding:6px 12px;border:none;background:none;cursor:pointer;border-radius:6px;transition:background .2s ease-in-out}.jawebchatbotcss-cart-button:hover{background-color:#f1f1f1}.jawebchatbotcss-cart-icon{font-size:18px}.jawebchatbotcss-cart-label{font-weight:600}.jawebchatbotcss-cart-dropdown{position:absolute;right:0;margin-top:16px;width:320px;background-color:#fff;border:1px solid #e5e7eb;border-radius:8px;box-shadow:0 8px 20px #00000014;z-index:999}.jawebchatbotcss-cart-header{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;border-bottom:1px solid #f3f4f6}.jawebchatbotcss-cart-title{font-size:16px;font-weight:500}.jawebchatbotcss-refresh-button{font-size:14px;color:#2563eb;background:none;border:none;cursor:pointer}.jawebchatbotcss-refresh-button:disabled{opacity:.5;cursor:not-allowed}.jawebchatbotcss-cart-empty{padding:16px;text-align:center;color:#6b7280}.jawebchatbotcss-cart-list{max-height:240px;overflow-y:auto;margin:0;padding:0;list-style:none}.jawebchatbotcss-cart-item{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;border-bottom:1px solid #f9fafb}.jawebchatbotcss-item-name{width:160px;font-size:14px;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.jawebchatbotcss-item-controls{display:flex;align-items:center;gap:8px}.jawebchatbotcss-item-qty{font-size:14px;color:#374151}.jawebchatbotcss-remove-icon{color:#ef4444;cursor:pointer}.jawebchatbotcss-remove-icon:hover{color:#b91c1c}.jawebchatbotcss-cart-footer{padding:16px;border-top:1px solid #f3f4f6}html,body{width:100%;height:100%}input::-ms-clear,input::-ms-reveal{display:none}*,*:before,*:after{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:rgba(0,0,0,0)}@-ms-viewport{width:device-width}body{margin:0}[tabindex="-1"]:focus{outline:none}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5em;font-weight:500}p{margin-top:0;margin-bottom:1em}abbr[title],abbr[data-original-title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted;border-bottom:0;cursor:help}address{margin-bottom:1em;font-style:normal;line-height:inherit}input[type=text],input[type=password],input[type=number],textarea{-webkit-appearance:none}ol,ul,dl{margin-top:0;margin-bottom:1em}ol ol,ul ul,ol ul,ul ol{margin-bottom:0}dt{font-weight:500}dd{margin-bottom:.5em;margin-left:0}blockquote{margin:0 0 1em}dfn{font-style:italic}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}pre,code,kbd,samp{font-size:1em;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace}pre{margin-top:0;margin-bottom:1em;overflow:auto}figure{margin:0 0 1em}img{vertical-align:middle;border-style:none}a,area,button,[role=button],input:not([type=range]),label,select,summary,textarea{touch-action:manipulation}table{border-collapse:collapse}caption{padding-top:.75em;padding-bottom:.3em;text-align:left;caption-side:bottom}input,button,select,optgroup,textarea{margin:0;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}button,html [type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{padding:0;border-style:none}input[type=radio],input[type=checkbox]{box-sizing:border-box;padding:0}input[type=date],input[type=time],input[type=datetime-local],input[type=month]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;margin:0;padding:0;border:0}legend{display:block;width:100%;max-width:100%;margin-bottom:.5em;padding:0;color:inherit;font-size:1.5em;line-height:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item}template{display:none}[hidden]{display:none!important}mark{padding:.2em;background-color:#feffe6}/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-border-style:solid;--tw-font-weight:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-ease:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-green-400:oklch(79.2% .209 151.711);--color-indigo-600:oklch(51.1% .262 276.966);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-900:oklch(21% .034 264.665);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--font-weight-medium:500;--font-weight-semibold:600;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--ease-in:cubic-bezier(.4,0,1,1);--ease-out:cubic-bezier(0,0,.2,1);--ease-in-out:cubic-bezier(.4,0,.2,1);--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.collapse{visibility:collapse}.visible{visibility:visible}.visible\!{visibility:visible!important}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.z-50{z-index:50}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.container\!{width:100%!important}@media (min-width:40rem){.container\!{max-width:40rem!important}}@media (min-width:48rem){.container\!{max-width:48rem!important}}@media (min-width:64rem){.container\!{max-width:64rem!important}}@media (min-width:80rem){.container\!{max-width:80rem!important}}@media (min-width:96rem){.container\!{max-width:96rem!important}}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-3{margin-top:calc(var(--spacing)*3)}.mt-4{margin-top:calc(var(--spacing)*4)}.mr-2{margin-right:calc(var(--spacing)*2)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.table-cell{display:table-cell}.h-1{height:calc(var(--spacing)*1)}.h-12{height:calc(var(--spacing)*12)}.h-32{height:calc(var(--spacing)*32)}.h-full{height:100%}.w-12{width:calc(var(--spacing)*12)}.w-32{width:calc(var(--spacing)*32)}.w-full{width:100%}.max-w-xs{max-width:var(--container-xs)}.flex-1{flex:1}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.cursor-pointer{cursor:pointer}.resize{resize:both}.flex-col{flex-direction:column}.items-center{align-items:center}.items-end{align-items:flex-end}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-2{gap:calc(var(--spacing)*2)}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*2)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-x-reverse)))}:where(.space-x-4>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*4)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-x-reverse)))}.overflow-hidden{overflow:hidden}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-gray-300{border-color:var(--color-gray-300)}.border-green-400{border-color:var(--color-green-400)}.bg-gray-100{background-color:var(--color-gray-100)}.bg-gray-200{background-color:var(--color-gray-200)}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.object-cover{object-fit:cover}.p-4{padding:calc(var(--spacing)*4)}.p-6{padding:calc(var(--spacing)*6)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.py-1{padding-block:calc(var(--spacing)*1)}.py-2{padding-block:calc(var(--spacing)*2)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.break-words{overflow-wrap:break-word}.whitespace-pre-wrap{white-space:pre-wrap}.text-gray-500{color:var(--color-gray-500)}.text-gray-700{color:var(--color-gray-700)}.text-gray-900{color:var(--color-gray-900)}.text-indigo-600{color:var(--color-indigo-600)}.text-white{color:var(--color-white)}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.italic{font-style:italic}.ordinal{--tw-ordinal:ordinal;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.line-through{text-decoration-line:line-through}.underline{text-decoration-line:underline}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.drop-shadow{--tw-drop-shadow-size:drop-shadow(0 1px 2px var(--tw-drop-shadow-color,#0000001a))drop-shadow(0 1px 1px var(--tw-drop-shadow-color,#0000000f));--tw-drop-shadow:drop-shadow(0 1px 2px #0000001a)drop-shadow(0 1px 1px #0000000f);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.grayscale{--tw-grayscale:grayscale(100%);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,visibility,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.ease-in{--tw-ease:var(--ease-in);transition-timing-function:var(--ease-in)}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}@media (hover:hover){.hover\:border-black:hover{border-color:var(--color-black)}.hover\:opacity-90:hover{opacity:.9}}@media (min-width:40rem){.sm\:h-40{height:calc(var(--spacing)*40)}.sm\:w-40{width:calc(var(--spacing)*40)}}}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}
@@ -641,7 +641,7 @@ html body {
641
641
  <div class="cursor" part="cursor"></div>
642
642
  </div>
643
643
  </div>
644
- `,[t,a]}setOptions(t){if(this.options.container!==t.container){const a=this.parentFromOptionsContainer(t.container);a.appendChild(this.container),this.parent=a}t.dragToSeek!==!0&&typeof this.options.dragToSeek!="object"||this.initDrag(),this.options=t,this.reRender()}getWrapper(){return this.wrapper}getWidth(){return this.scrollContainer.clientWidth}getScroll(){return this.scrollContainer.scrollLeft}setScroll(t){this.scrollContainer.scrollLeft=t}setScrollPercentage(t){const{scrollWidth:a}=this.scrollContainer,r=a*t;this.setScroll(r)}destroy(){var t,a;this.subscriptions.forEach(r=>r()),this.container.remove(),(t=this.resizeObserver)===null||t===void 0||t.disconnect(),(a=this.unsubscribeOnScroll)===null||a===void 0||a.forEach(r=>r()),this.unsubscribeOnScroll=[]}createDelay(t=10){let a,r;const l=()=>{a&&clearTimeout(a),r&&r()};return this.timeouts.push(l),()=>new Promise((c,f)=>{l(),r=f,a=setTimeout(()=>{a=void 0,r=void 0,c()},t)})}convertColorValues(t){if(!Array.isArray(t))return t||"";if(t.length<2)return t[0]||"";const a=document.createElement("canvas"),r=a.getContext("2d"),l=a.height*(window.devicePixelRatio||1),c=r.createLinearGradient(0,0,0,l),f=1/(t.length-1);return t.forEach((m,g)=>{const p=g*f;c.addColorStop(p,m)}),c}getPixelRatio(){return Math.max(1,window.devicePixelRatio||1)}renderBarWaveform(t,a,r,l){const c=t[0],f=t[1]||t[0],m=c.length,{width:g,height:p}=r.canvas,y=p/2,S=this.getPixelRatio(),E=a.barWidth?a.barWidth*S:1,T=a.barGap?a.barGap*S:a.barWidth?E/2:0,O=a.barRadius||0,M=g/(E+T)/m,A=O&&"roundRect"in r?"roundRect":"rect";r.beginPath();let D=0,_=0,z=0;for(let j=0;j<=m;j++){const $=Math.round(j*M);if($>D){const P=Math.round(_*y*l),q=P+Math.round(z*y*l)||1;let Y=y-P;a.barAlign==="top"?Y=0:a.barAlign==="bottom"&&(Y=p-q),r[A](D*(E+T),Y,E,q,O),D=$,_=0,z=0}const V=Math.abs(c[j]||0),H=Math.abs(f[j]||0);V>_&&(_=V),H>z&&(z=H)}r.fill(),r.closePath()}renderLineWaveform(t,a,r,l){const c=f=>{const m=t[f]||t[0],g=m.length,{height:p}=r.canvas,y=p/2,S=r.canvas.width/g;r.moveTo(0,y);let E=0,T=0;for(let O=0;O<=g;O++){const M=Math.round(O*S);if(M>E){const D=y+(Math.round(T*y*l)||1)*(f===0?-1:1);r.lineTo(E,D),E=M,T=0}const A=Math.abs(m[O]||0);A>T&&(T=A)}r.lineTo(E,y)};r.beginPath(),c(0),c(1),r.fill(),r.closePath()}renderWaveform(t,a,r){if(r.fillStyle=this.convertColorValues(a.waveColor),a.renderFunction)return void a.renderFunction(t,r);let l=a.barHeight||1;if(a.normalize){const c=Array.from(t[0]).reduce((f,m)=>Math.max(f,Math.abs(m)),0);l=c?1/c:1}a.barWidth||a.barGap||a.barAlign?this.renderBarWaveform(t,a,r,l):this.renderLineWaveform(t,a,r,l)}renderSingleCanvas(t,a,r,l,c,f,m){const g=this.getPixelRatio(),p=document.createElement("canvas");p.width=Math.round(r*g),p.height=Math.round(l*g),p.style.width=`${r}px`,p.style.height=`${l}px`,p.style.left=`${Math.round(c)}px`,f.appendChild(p);const y=p.getContext("2d");if(this.renderWaveform(t,a,y),p.width>0&&p.height>0){const S=p.cloneNode(),E=S.getContext("2d");E.drawImage(p,0,0),E.globalCompositeOperation="source-in",E.fillStyle=this.convertColorValues(a.progressColor),E.fillRect(0,0,p.width,p.height),m.appendChild(S)}}renderMultiCanvas(t,a,r,l,c,f){const m=this.getPixelRatio(),{clientWidth:g}=this.scrollContainer,p=r/m;let y=Math.min(Xm.MAX_CANVAS_WIDTH,g,p),S={};if(a.barWidth||a.barGap){const A=a.barWidth||.5,D=A+(a.barGap||A/2);y%D!=0&&(y=Math.floor(y/D)*D)}if(y===0)return;const E=A=>{if(A<0||A>=T||S[A])return;S[A]=!0;const D=A*y;let _=Math.min(p-D,y);if(a.barWidth||a.barGap){const j=a.barWidth||.5,$=j+(a.barGap||j/2);_=Math.floor(_/$)*$}if(_<=0)return;const z=t.map(j=>{const $=Math.floor(D/p*j.length),V=Math.floor((D+_)/p*j.length);return j.slice($,V)});this.renderSingleCanvas(z,a,_,l,D,c,f)},T=Math.ceil(p/y);if(!this.isScrollable){for(let A=0;A<T;A++)E(A);return}const O=this.scrollContainer.scrollLeft/p,M=Math.floor(O*T);if(E(M-1),E(M),E(M+1),T>1){const A=this.on("scroll",()=>{const{scrollLeft:D}=this.scrollContainer,_=Math.floor(D/p*T);Object.keys(S).length>Xm.MAX_NODES&&(c.innerHTML="",f.innerHTML="",S={}),E(_-1),E(_),E(_+1)});this.unsubscribeOnScroll.push(A)}}renderChannel(t,a,r,l){var{overlay:c}=a,f=function(y,S){var E={};for(var T in y)Object.prototype.hasOwnProperty.call(y,T)&&S.indexOf(T)<0&&(E[T]=y[T]);if(y!=null&&typeof Object.getOwnPropertySymbols=="function"){var O=0;for(T=Object.getOwnPropertySymbols(y);O<T.length;O++)S.indexOf(T[O])<0&&Object.prototype.propertyIsEnumerable.call(y,T[O])&&(E[T[O]]=y[T[O]])}return E}(a,["overlay"]);const m=document.createElement("div"),g=this.getHeight(f.height,f.splitChannels);m.style.height=`${g}px`,c&&l>0&&(m.style.marginTop=`-${g}px`),this.canvasWrapper.style.minHeight=`${g}px`,this.canvasWrapper.appendChild(m);const p=m.cloneNode();this.progressWrapper.appendChild(p),this.renderMultiCanvas(t,f,r,g,m,p)}render(t){return ri(this,void 0,void 0,function*(){var a;this.timeouts.forEach(g=>g()),this.timeouts=[],this.canvasWrapper.innerHTML="",this.progressWrapper.innerHTML="",this.options.width!=null&&(this.scrollContainer.style.width=typeof this.options.width=="number"?`${this.options.width}px`:this.options.width);const r=this.getPixelRatio(),l=this.scrollContainer.clientWidth,c=Math.ceil(t.duration*(this.options.minPxPerSec||0));this.isScrollable=c>l;const f=this.options.fillParent&&!this.isScrollable,m=(f?l:c)*r;if(this.wrapper.style.width=f?"100%":`${c}px`,this.scrollContainer.style.overflowX=this.isScrollable?"auto":"hidden",this.scrollContainer.classList.toggle("noScrollbar",!!this.options.hideScrollbar),this.cursor.style.backgroundColor=`${this.options.cursorColor||this.options.progressColor}`,this.cursor.style.width=`${this.options.cursorWidth}px`,this.audioData=t,this.emit("render"),this.options.splitChannels)for(let g=0;g<t.numberOfChannels;g++){const p=Object.assign(Object.assign({},this.options),(a=this.options.splitChannels)===null||a===void 0?void 0:a[g]);this.renderChannel([t.getChannelData(g)],p,m,g)}else{const g=[t.getChannelData(0)];t.numberOfChannels>1&&g.push(t.getChannelData(1)),this.renderChannel(g,this.options,m,0)}Promise.resolve().then(()=>this.emit("rendered"))})}reRender(){if(this.unsubscribeOnScroll.forEach(r=>r()),this.unsubscribeOnScroll=[],!this.audioData)return;const{scrollWidth:t}=this.scrollContainer,{right:a}=this.progressWrapper.getBoundingClientRect();if(this.render(this.audioData),this.isScrollable&&t!==this.scrollContainer.scrollWidth){const{right:r}=this.progressWrapper.getBoundingClientRect();let l=r-a;l*=2,l=l<0?Math.floor(l):Math.ceil(l),l/=2,this.scrollContainer.scrollLeft+=l}}zoom(t){this.options.minPxPerSec=t,this.reRender()}scrollIntoView(t,a=!1){const{scrollLeft:r,scrollWidth:l,clientWidth:c}=this.scrollContainer,f=t*l,m=r,g=r+c,p=c/2;if(this.isDragging)f+30>g?this.scrollContainer.scrollLeft+=30:f-30<m&&(this.scrollContainer.scrollLeft-=30);else{(f<m||f>g)&&(this.scrollContainer.scrollLeft=f-(this.options.autoCenter?p:0));const y=f-r-p;a&&this.options.autoCenter&&y>0&&(this.scrollContainer.scrollLeft+=Math.min(y,10))}{const y=this.scrollContainer.scrollLeft,S=y/l,E=(y+c)/l;this.emit("scroll",S,E,y,y+c)}}renderProgress(t,a){if(isNaN(t))return;const r=100*t;this.canvasWrapper.style.clipPath=`polygon(${r}% 0%, 100% 0%, 100% 100%, ${r}% 100%)`,this.progressWrapper.style.width=`${r}%`,this.cursor.style.left=`${r}%`,this.cursor.style.transform=`translateX(-${Math.round(r)===100?this.options.cursorWidth:0}px)`,this.isScrollable&&this.options.autoScroll&&this.scrollIntoView(t,a)}exportImage(t,a,r){return ri(this,void 0,void 0,function*(){const l=this.canvasWrapper.querySelectorAll("canvas");if(!l.length)throw new Error("No waveform data");if(r==="dataURL"){const c=Array.from(l).map(f=>f.toDataURL(t,a));return Promise.resolve(c)}return Promise.all(Array.from(l).map(c=>new Promise((f,m)=>{c.toBlob(g=>{g?f(g):m(new Error("Could not export image"))},t,a)})))})}}Xm.MAX_CANVAS_WIDTH=8e3,Xm.MAX_NODES=10;class GZ extends b0{constructor(){super(...arguments),this.unsubscribe=()=>{}}start(){this.unsubscribe=this.on("tick",()=>{requestAnimationFrame(()=>{this.emit("tick")})}),this.emit("tick")}stop(){this.unsubscribe()}destroy(){this.unsubscribe()}}class EO extends b0{constructor(t=new AudioContext){super(),this.bufferNode=null,this.playStartTime=0,this.playedDuration=0,this._muted=!1,this._playbackRate=1,this._duration=void 0,this.buffer=null,this.currentSrc="",this.paused=!0,this.crossOrigin=null,this.seeking=!1,this.autoplay=!1,this.addEventListener=this.on,this.removeEventListener=this.un,this.audioContext=t,this.gainNode=this.audioContext.createGain(),this.gainNode.connect(this.audioContext.destination)}load(){return ri(this,void 0,void 0,function*(){})}get src(){return this.currentSrc}set src(t){if(this.currentSrc=t,this._duration=void 0,!t)return this.buffer=null,void this.emit("emptied");fetch(t).then(a=>{if(a.status>=400)throw new Error(`Failed to fetch ${t}: ${a.status} (${a.statusText})`);return a.arrayBuffer()}).then(a=>this.currentSrc!==t?null:this.audioContext.decodeAudioData(a)).then(a=>{this.currentSrc===t&&(this.buffer=a,this.emit("loadedmetadata"),this.emit("canplay"),this.autoplay&&this.play())})}_play(){var t;if(!this.paused)return;this.paused=!1,(t=this.bufferNode)===null||t===void 0||t.disconnect(),this.bufferNode=this.audioContext.createBufferSource(),this.buffer&&(this.bufferNode.buffer=this.buffer),this.bufferNode.playbackRate.value=this._playbackRate,this.bufferNode.connect(this.gainNode);let a=this.playedDuration*this._playbackRate;(a>=this.duration||a<0)&&(a=0,this.playedDuration=0),this.bufferNode.start(this.audioContext.currentTime,a),this.playStartTime=this.audioContext.currentTime,this.bufferNode.onended=()=>{this.currentTime>=this.duration&&(this.pause(),this.emit("ended"))}}_pause(){var t;this.paused=!0,(t=this.bufferNode)===null||t===void 0||t.stop(),this.playedDuration+=this.audioContext.currentTime-this.playStartTime}play(){return ri(this,void 0,void 0,function*(){this.paused&&(this._play(),this.emit("play"))})}pause(){this.paused||(this._pause(),this.emit("pause"))}stopAt(t){const a=t-this.currentTime,r=this.bufferNode;r?.stop(this.audioContext.currentTime+a),r?.addEventListener("ended",()=>{r===this.bufferNode&&(this.bufferNode=null,this.pause())},{once:!0})}setSinkId(t){return ri(this,void 0,void 0,function*(){return this.audioContext.setSinkId(t)})}get playbackRate(){return this._playbackRate}set playbackRate(t){this._playbackRate=t,this.bufferNode&&(this.bufferNode.playbackRate.value=t)}get currentTime(){return(this.paused?this.playedDuration:this.playedDuration+(this.audioContext.currentTime-this.playStartTime))*this._playbackRate}set currentTime(t){const a=!this.paused;a&&this._pause(),this.playedDuration=t/this._playbackRate,a&&this._play(),this.emit("seeking"),this.emit("timeupdate")}get duration(){var t,a;return(t=this._duration)!==null&&t!==void 0?t:((a=this.buffer)===null||a===void 0?void 0:a.duration)||0}set duration(t){this._duration=t}get volume(){return this.gainNode.gain.value}set volume(t){this.gainNode.gain.value=t,this.emit("volumechange")}get muted(){return this._muted}set muted(t){this._muted!==t&&(this._muted=t,this._muted?this.gainNode.disconnect():this.gainNode.connect(this.audioContext.destination))}canPlayType(t){return/^(audio|video)\//.test(t)}getGainNode(){return this.gainNode}getChannelData(){const t=[];if(!this.buffer)return t;const a=this.buffer.numberOfChannels;for(let r=0;r<a;r++)t.push(this.buffer.getChannelData(r));return t}}const qZ={waveColor:"#999",progressColor:"#555",cursorWidth:1,minPxPerSec:0,fillParent:!0,interact:!0,dragToSeek:!1,autoScroll:!0,autoCenter:!0,sampleRate:8e3};class Wm extends kZ{static create(t){return new Wm(t)}constructor(t){const a=t.media||(t.backend==="WebAudio"?new EO:void 0);super({media:a,mediaControls:t.mediaControls,autoplay:t.autoplay,playbackRate:t.audioRate}),this.plugins=[],this.decodedData=null,this.stopAtPosition=null,this.subscriptions=[],this.mediaSubscriptions=[],this.abortController=null,this.options=Object.assign({},qZ,t),this.timer=new GZ;const r=a?void 0:this.getMediaElement();this.renderer=new Xm(this.options,r),this.initPlayerEvents(),this.initRendererEvents(),this.initTimerEvents(),this.initPlugins();const l=this.options.url||this.getSrc()||"";Promise.resolve().then(()=>{this.emit("init");const{peaks:c,duration:f}=this.options;(l||c&&f)&&this.load(l,c,f).catch(()=>null)})}updateProgress(t=this.getCurrentTime()){return this.renderer.renderProgress(t/this.getDuration(),this.isPlaying()),t}initTimerEvents(){this.subscriptions.push(this.timer.on("tick",()=>{if(!this.isSeeking()){const t=this.updateProgress();this.emit("timeupdate",t),this.emit("audioprocess",t),this.stopAtPosition!=null&&this.isPlaying()&&t>=this.stopAtPosition&&this.pause()}}))}initPlayerEvents(){this.isPlaying()&&(this.emit("play"),this.timer.start()),this.mediaSubscriptions.push(this.onMediaEvent("timeupdate",()=>{const t=this.updateProgress();this.emit("timeupdate",t)}),this.onMediaEvent("play",()=>{this.emit("play"),this.timer.start()}),this.onMediaEvent("pause",()=>{this.emit("pause"),this.timer.stop(),this.stopAtPosition=null}),this.onMediaEvent("emptied",()=>{this.timer.stop(),this.stopAtPosition=null}),this.onMediaEvent("ended",()=>{this.emit("timeupdate",this.getDuration()),this.emit("finish"),this.stopAtPosition=null}),this.onMediaEvent("seeking",()=>{this.emit("seeking",this.getCurrentTime())}),this.onMediaEvent("error",()=>{var t;this.emit("error",(t=this.getMediaElement().error)!==null&&t!==void 0?t:new Error("Media error")),this.stopAtPosition=null}))}initRendererEvents(){this.subscriptions.push(this.renderer.on("click",(t,a)=>{this.options.interact&&(this.seekTo(t),this.emit("interaction",t*this.getDuration()),this.emit("click",t,a))}),this.renderer.on("dblclick",(t,a)=>{this.emit("dblclick",t,a)}),this.renderer.on("scroll",(t,a,r,l)=>{const c=this.getDuration();this.emit("scroll",t*c,a*c,r,l)}),this.renderer.on("render",()=>{this.emit("redraw")}),this.renderer.on("rendered",()=>{this.emit("redrawcomplete")}),this.renderer.on("dragstart",t=>{this.emit("dragstart",t)}),this.renderer.on("dragend",t=>{this.emit("dragend",t)}));{let t;this.subscriptions.push(this.renderer.on("drag",a=>{if(!this.options.interact)return;let r;this.renderer.renderProgress(a),clearTimeout(t),this.isPlaying()?r=0:this.options.dragToSeek===!0?r=200:typeof this.options.dragToSeek=="object"&&this.options.dragToSeek!==void 0&&(r=this.options.dragToSeek.debounceTime),t=setTimeout(()=>{this.seekTo(a)},r),this.emit("interaction",a*this.getDuration()),this.emit("drag",a)}))}}initPlugins(){var t;!((t=this.options.plugins)===null||t===void 0)&&t.length&&this.options.plugins.forEach(a=>{this.registerPlugin(a)})}unsubscribePlayerEvents(){this.mediaSubscriptions.forEach(t=>t()),this.mediaSubscriptions=[]}setOptions(t){this.options=Object.assign({},this.options,t),t.duration&&!t.peaks&&(this.decodedData=tC.createBuffer(this.exportPeaks(),t.duration)),t.peaks&&t.duration&&(this.decodedData=tC.createBuffer(t.peaks,t.duration)),this.renderer.setOptions(this.options),t.audioRate&&this.setPlaybackRate(t.audioRate),t.mediaControls!=null&&(this.getMediaElement().controls=t.mediaControls)}registerPlugin(t){t._init(this),this.plugins.push(t);const a=t.once("destroy",()=>{this.plugins=this.plugins.filter(r=>r!==t),this.subscriptions=this.subscriptions.filter(r=>r!==a)});return this.subscriptions.push(a),t}getWrapper(){return this.renderer.getWrapper()}getWidth(){return this.renderer.getWidth()}getScroll(){return this.renderer.getScroll()}setScroll(t){return this.renderer.setScroll(t)}setScrollTime(t){const a=t/this.getDuration();this.renderer.setScrollPercentage(a)}getActivePlugins(){return this.plugins}loadAudio(t,a,r,l){return ri(this,void 0,void 0,function*(){var c;if(this.emit("load",t),!this.options.media&&this.isPlaying()&&this.pause(),this.decodedData=null,this.stopAtPosition=null,!a&&!r){const m=this.options.fetchParams||{};window.AbortController&&!m.signal&&(this.abortController=new AbortController,m.signal=(c=this.abortController)===null||c===void 0?void 0:c.signal);const g=y=>this.emit("loading",y);a=yield FZ.fetchBlob(t,g,m);const p=this.options.blobMimeType;p&&(a=new Blob([a],{type:p}))}this.setSrc(t,a);const f=yield new Promise(m=>{const g=l||this.getDuration();g?m(g):this.mediaSubscriptions.push(this.onMediaEvent("loadedmetadata",()=>m(this.getDuration()),{once:!0}))});if(!t&&!a){const m=this.getMediaElement();m instanceof EO&&(m.duration=f)}if(r)this.decodedData=tC.createBuffer(r,f||0);else if(a){const m=yield a.arrayBuffer();this.decodedData=yield tC.decode(m,this.options.sampleRate)}this.decodedData&&(this.emit("decode",this.getDuration()),this.renderer.render(this.decodedData)),this.emit("ready",this.getDuration())})}load(t,a,r){return ri(this,void 0,void 0,function*(){try{return yield this.loadAudio(t,void 0,a,r)}catch(l){throw this.emit("error",l),l}})}loadBlob(t,a,r){return ri(this,void 0,void 0,function*(){try{return yield this.loadAudio("",t,a,r)}catch(l){throw this.emit("error",l),l}})}zoom(t){if(!this.decodedData)throw new Error("No audio loaded");this.renderer.zoom(t),this.emit("zoom",t)}getDecodedData(){return this.decodedData}exportPeaks({channels:t=2,maxLength:a=8e3,precision:r=1e4}={}){if(!this.decodedData)throw new Error("The audio has not been decoded yet");const l=Math.min(t,this.decodedData.numberOfChannels),c=[];for(let f=0;f<l;f++){const m=this.decodedData.getChannelData(f),g=[],p=m.length/a;for(let y=0;y<a;y++){const S=m.slice(Math.floor(y*p),Math.ceil((y+1)*p));let E=0;for(let T=0;T<S.length;T++){const O=S[T];Math.abs(O)>Math.abs(E)&&(E=O)}g.push(Math.round(E*r)/r)}c.push(g)}return c}getDuration(){let t=super.getDuration()||0;return t!==0&&t!==1/0||!this.decodedData||(t=this.decodedData.duration),t}toggleInteraction(t){this.options.interact=t}setTime(t){this.stopAtPosition=null,super.setTime(t),this.updateProgress(t),this.emit("timeupdate",t)}seekTo(t){const a=this.getDuration()*t;this.setTime(a)}play(t,a){const r=Object.create(null,{play:{get:()=>super.play}});return ri(this,void 0,void 0,function*(){t!=null&&this.setTime(t);const l=yield r.play.call(this);return a!=null&&(this.media instanceof EO?this.media.stopAt(a):this.stopAtPosition=a),l})}playPause(){return ri(this,void 0,void 0,function*(){return this.isPlaying()?this.pause():this.play()})}stop(){this.pause(),this.setTime(0)}skip(t){this.setTime(this.getCurrentTime()+t)}empty(){this.load("",[[0]],.001)}setMediaElement(t){this.unsubscribePlayerEvents(),super.setMediaElement(t),this.initPlayerEvents()}exportImage(){return ri(this,arguments,void 0,function*(t="image/png",a=1,r="dataURL"){return this.renderer.exportImage(t,a,r)})}destroy(){var t;this.emit("destroy"),(t=this.abortController)===null||t===void 0||t.abort(),this.plugins.forEach(a=>a.destroy()),this.subscriptions.forEach(a=>a()),this.unsubscribePlayerEvents(),this.timer.destroy(),this.renderer.destroy(),super.destroy()}}Wm.BasePlugin=class extends b0{constructor(e){super(),this.subscriptions=[],this.options=e}onInit(){}_init(e){this.wavesurfer=e,this.onInit()}destroy(){this.emit("destroy"),this.subscriptions.forEach(e=>e())}},Wm.dom=IZ;const YZ=({userMessage:e,setUserMessage:t,handleSendMessage:a,handleSendImage:r,handleSendVoice:l,selectedImage:c,setSelectedImage:f,audioBlob:m,setAudioBlob:g,isSending:p})=>{const{t:y}=DZ(),[S,E]=C.useState(!1),[T,O]=C.useState(!1),M=C.useRef(null),A=C.useRef(null),D=C.useRef([]),_=C.useRef(null),z=C.useRef(null),j=q=>{const Y=q.target.files?.[0];Y&&f(Y)},$=()=>{f(null)},V=async()=>{if(!navigator.mediaDevices?.getUserMedia){alert(y("chatInput.voice.notSupported"));return}if(S)M.current?.stop();else try{const q=await navigator.mediaDevices.getUserMedia({audio:!0}),Y=MediaRecorder.isTypeSupported("audio/webm")?"audio/webm":"audio/mp4",te=new MediaRecorder(q,{mimeType:Y});M.current=te,D.current=[],te.ondataavailable=G=>{G.data.size>0&&D.current.push(G.data)},te.onstop=()=>{const G=new Blob(D.current,{type:Y});g(G),E(!1),q.getTracks().forEach(K=>K.stop())},te.start(),E(!0)}catch(q){console.error(q),alert(y("chatInput.voice.permissionError"))}};C.useEffect(()=>{if(m&&_.current){z.current?.destroy();const q=URL.createObjectURL(m);z.current=Wm.create({container:_.current,waveColor:"#ccc",progressColor:"#7F28F8",cursorWidth:0,barWidth:3,barHeight:1.5,barGap:2,height:40,interact:!0}),z.current.load(q),z.current.on("finish",()=>O(!1))}},[m]);const H=()=>{z.current&&(z.current.playPause(),O(q=>!q))},P=()=>{E(!1),g(null),z.current?.destroy()};return re.jsxs("div",{style:{display:"flex",alignItems:"center",backgroundColor:"white",border:"1px solid #d1d5db",borderRadius:"9999px",padding:"0.5rem 0.75rem",boxShadow:"0 1px 3px rgba(0,0,0,0.1)",width:"95%",height:"56px"},children:[re.jsx("button",{style:{color:"#6b7280",background:"none",border:"none",margin:"0 0.5rem",cursor:"pointer"},onClick:()=>A.current?.click(),children:c?re.jsxs("div",{style:{position:"relative"},children:[re.jsx("img",{src:URL.createObjectURL(c),alt:y("chatInput.image.selectedAlt"),style:{width:"2rem",height:"2rem",borderRadius:"9999px",objectFit:"cover"}}),re.jsx(c0,{style:{position:"absolute",top:"-0.5rem",right:"-0.5rem",fontSize:"14px",color:"#ef4444",background:"white",borderRadius:"9999px",cursor:"pointer"},onClick:q=>{q.stopPropagation(),$()}})]}):re.jsx(m4,{style:{fontSize:"20px"}})}),re.jsx("input",{disabled:p,type:"file",accept:"image/*",ref:A,onChange:j,style:{display:"none"}}),re.jsx(Nd,{title:S?"Stop Recording":"Send Audio",children:re.jsx("button",{onClick:V,style:{color:S?"#ef4444":"#6b7280",background:"none",border:"none",margin:"0 0.5rem",cursor:"pointer"},children:S?re.jsx(g4,{style:{fontSize:"20px"}}):re.jsx(c4,{style:{fontSize:"20px"}})})}),re.jsx("div",{style:{flex:1,margin:"0 0.5rem",minWidth:0,maxWidth:"100%",display:"flex",alignItems:"center"},children:m?re.jsxs("div",{style:{display:"flex",alignItems:"center",width:"100%",backgroundColor:"#f3f4f6",padding:"0.5rem 1rem",borderRadius:"0.5rem"},children:[re.jsx("button",{style:{background:"none",border:"none",marginRight:"0.75rem",color:"#7f28f8",cursor:"pointer"},onClick:H,children:T?re.jsx(GT,{style:{fontSize:"24px"}}):re.jsx(qT,{style:{fontSize:"24px"}})}),re.jsx("div",{ref:_,style:{width:"100%",height:"2rem"}}),re.jsx(c0,{style:{fontSize:"18px",color:"#ef4444",marginLeft:"0.75rem",cursor:"pointer"},onClick:P})]}):S?re.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"#f3f4f6",padding:"0.5rem 1rem",borderRadius:"0.5rem",animation:"pulse 2s infinite"},children:re.jsx("span",{children:"Recording"})}):re.jsx(Xu,{type:"text",value:e,onChange:q=>t(q.target.value),placeholder:"Message...",style:{width:"100%",border:"none",fontSize:"16px",margin:0,lineHeight:1.5,color:"#374151"},onKeyDown:q=>{q.key==="Enter"&&(q.preventDefault(),c?(r(c,e),$(),t("")):e.trim()&&(a(),t("")))}})}),re.jsx("button",{disabled:p,onClick:()=>{const q=!!c,Y=!!e.trim();q?(r(c,e),$(),t("")):!!m?(l(m),P()):Y&&a()},"aria-label":y("chatInput.send"),style:{color:"#6b7280",background:"none",border:"none",margin:"0 0.5rem",cursor:"pointer"},children:re.jsx(p4,{style:{fontSize:"20px"}})})]})};function XZ({suggestions:e,colorCode:t,sendMessageSuggestion:a}){return re.jsx("div",{style:{overflowX:"auto",overflowY:"hidden",whiteSpace:"nowrap",paddingTop:"4px",paddingBottom:"8px",width:"100%",boxSizing:"border-box",marginLeft:"4%",marginTop:"4px",marginBottom:"4px"},children:re.jsx("div",{style:{display:"inline-flex",gap:"0.5rem"},children:e?.map((r,l)=>re.jsx("button",{onClick:()=>a(r),style:{whiteSpace:"nowrap",padding:"0.5rem 1rem",border:`1px solid ${t}`,borderRadius:"9999px",backgroundColor:"white",cursor:"pointer",fontSize:"14px",color:t,flexShrink:0},onMouseEnter:c=>{c.currentTarget.style.backgroundColor="#f3f3f3"},onMouseLeave:c=>{c.currentTarget.style.backgroundColor="white"},children:r},l))})})}function WZ(){return re.jsxs("div",{className:"jawebcss-powered-container",children:[re.jsx("span",{className:"jawebcss-powered-label",children:"Powered by"}),re.jsx("a",{href:"https://jaweb.me/",target:"_blank",className:"jawebcss-powered-link",rel:"noopener noreferrer",children:"Jaweb"})]})}const ZZ=()=>re.jsxs("div",{className:"typing-animation",children:[re.jsx("span",{children:"."}),re.jsx("span",{children:"."}),re.jsx("span",{children:"."})]}),KZ=({message:e,colorCode:t,handleAddToCart:a,handleRemoveFromCart:r})=>{const[l,c]=C.useState({}),[f,m]=C.useState({}),g=T=>{const O=/(https?:\/\/[^\s]+)/g;return T?.split(O).map((M,A)=>O.test(M)?re.jsx("a",{href:M.trim(),style:{color:"#00b3bc"},target:"_blank",rel:"noopener noreferrer",className:"underline break-words",children:M},A):re.jsx("span",{children:M},A))},p=T=>{const O=T.trim();if(!O.includes("Name:")||!O.includes("VariantId"))return null;const M=O.match(/Name\s*[:\-]\s*(.+)/i),A=O.match(/Price\s*[:\-]\s*(.+)/i),D=O.match(/Link\s*[:\-]\s*(https?:\/\/[^\s]+)/i),_=O.match(/VariantId\s*[:\-]\s*(.+)/i),z=O.match(/variant_tag_name\s*[:\-]\s*(.+)/i),j=O.match(/^color\s*[:\-]\s*([^\r\n]*)$/im),$=O.match(/^size\s*[:\-]\s*([^\r\n]*)$/im);return!M||!A||!D||!_||!z?null:{name:M[1].trim(),price:A[1].trim(),link:D[1].trim(),image:"",variant_id:_[1].trim(),variant_tag_name:z[1].trim(),color:j?.[1]?.trim(),size:$?.[1]?.trim()}},y=C.useMemo(()=>{const T=e.split("|||").map(A=>A.trim()).filter(Boolean),O=[];let M=null;for(const A of T)if(A.startsWith("img - ")){const D=A.replace(/^img\s*[-:]\s*/,"").trim();if(M)M.image=D;else{const _=[...O].reverse().find(z=>z.type==="product");_&&(_.data.image=D)}}else if(A.includes("Name:")&&A.includes("VariantId")){const D=p(A);D&&(O.push({type:"product",data:D}),M=D)}else O.push({type:"text",data:A}),M=null;return O},[e]),S=C.useMemo(()=>{const T={};for(const O of y)if(O.type==="product"){const M=O.data;T[M.variant_tag_name]||(T[M.variant_tag_name]=[]),T[M.variant_tag_name].push(M)}return T},[y]),E=(T,O=22)=>T.length>O?T.slice(0,O)+"...":T;return re.jsx("div",{className:"space-y-6 mt-4",children:(()=>{const T=new Set;return y.map((O,M)=>{if(O.type==="text")return re.jsx("p",{className:"whitespace-pre-wrap break-words",children:g(O.data)},M);if(O.type==="product"){const D=O.data.variant_tag_name;if(T.has(D))return null;T.add(D);const _=S[D],z=f[D]||_[0].variant_id,j=_.find(G=>G.variant_id===z)||_[0],$=l[j.variant_id]||0,V=Array.from(new Set(_.map(G=>G.color?.trim()).filter(G=>G&&G.toLowerCase()!=="none"))),H=Array.from(new Set(_.map(G=>G.size?.trim()).filter(G=>G&&G.toLowerCase()!=="none"))),P=(G,K)=>_.some(J=>J.color===G&&J.size===K),q=(G,K)=>{const J=_.find(ie=>(!G||ie.color===G)&&(!K||ie.size===K));J&&m(ie=>({...ie,[D]:J.variant_id}))},Y=async()=>{const G=$+1;c(K=>({...K,[j.variant_id]:G})),await a(j.variant_id,j.name,1)},te=async()=>{if($===0)return;const G=$-1;c(K=>({...K,[j.variant_id]:G})),await r(j.variant_id,1)};return re.jsxs("div",{className:"product-card",children:[re.jsx("div",{className:"product-image-container",children:re.jsx("img",{src:j.image,alt:j.name,className:"product-image",onClick:()=>window.open(j.link,"_blank")})}),re.jsxs("div",{className:"product-details",children:[re.jsx("a",{href:j.link,target:"_blank",rel:"noopener noreferrer",className:"product-name",children:E(j.name)}),re.jsx("p",{className:"product-price",children:j.price}),V.length>0&&re.jsxs("div",{children:[re.jsx("p",{className:"label",children:"Color:"}),re.jsx("div",{className:"color-options",children:V.map(G=>{const K=!P(G,j.size),J=G===j.color;return re.jsx("button",{disabled:K,onClick:()=>q(G,j.size),className:`color-button ${J?"active":""} ${K?"disabled":""}`,style:J?{backgroundColor:t,color:"white"}:{},children:G==="None"?"One Color":G},G)})})]}),H.length>0&&re.jsxs("div",{children:[re.jsx("p",{className:"label",children:"Size:"}),re.jsx("div",{className:"size-options",children:H.map(G=>{const K=!P(j.color,G),J=G===j.size;return re.jsx("button",{disabled:K,onClick:()=>q(j.color,G),className:`size-button ${J?"active":""} ${K?"disabled":""}`,style:J?{backgroundColor:t,color:"white"}:{},children:G==="None"?"One size":G},G)})})]}),re.jsxs("div",{className:"cart-controls",children:[re.jsx("button",{onClick:te,className:"cart-button",children:"–"}),re.jsx("span",{className:"cart-count",children:$}),re.jsx("button",{onClick:Y,className:"cart-button increment",style:{backgroundColor:t,color:"#fff"},children:"+"})]})]})]},M)}return null})})()})},H6=({message:e})=>{const t=e.find(r=>r.type==="image_url")?.image_url?.url,a=e?.isBusiness;return re.jsx("div",{children:re.jsx("div",{children:t&&re.jsx("div",{className:"mb-2 bg-transparent text-white ",children:re.jsx("img",{src:t,alt:"Chat image",style:{width:200},className:`rounded-md bg-transparent mt-2 max-w-xs ${a?"border border-gray-300 shadow-sm":""}`})})})})},QZ=({message:e,colorCode:t})=>{const a=e.find(l=>l.type==="text")?.text,r=l=>{const c=/(https?:\/\/[^\s]+)/g;return l.split(c).map((f,m)=>c.test(f)?re.jsx("a",{href:f.trim(),style:{color:t},target:"_blank",rel:"noopener noreferrer",className:"underline break-words",children:f},m):re.jsx("span",{children:f},m))};return re.jsx(re.Fragment,{children:a&&re.jsx("div",{style:{color:"white",border:1,backgroundColor:t,paddingTop:10,paddingBottom:10,paddingInline:14,maxWidth:"85%",lineHeight:1.4,borderRadius:"16px",wordBreak:"break-word"},children:re.jsx("p",{children:r(a)})})})},JZ=({link:e,colorCode:t,transcription:a})=>{const r=C.useRef(null),l=C.useRef(null),[c,f]=C.useState(!1),[m,g]=C.useState(!1);C.useEffect(()=>{if(r.current)return l.current?.destroy(),l.current=Wm.create({container:r.current,waveColor:"white",progressColor:"white",cursorWidth:0,barWidth:3,barHeight:1.5,barGap:2,height:40,interact:!0}),l.current.load(e),l.current.on("finish",()=>f(!1)),()=>{l.current?.destroy()}},[e,t]);const p=()=>{l.current&&(l.current.playPause(),f(y=>!y))};return re.jsxs("div",{style:{backgroundColor:t,padding:"12px",borderRadius:"20px",color:"white",maxWidth:"350px",marginBottom:"16px"},children:[re.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[re.jsx("button",{onClick:p,style:{background:"transparent",border:"none",color:"white",marginRight:"12px",cursor:"pointer"},children:c?re.jsx(GT,{style:{fontSize:"24px"}}):re.jsx(qT,{style:{fontSize:"24px"}})}),re.jsx("div",{ref:r,style:{width:"130px",height:"40px",overflow:"hidden",color:"white"}})]}),a&&re.jsxs("div",{style:{marginTop:"12px",fontSize:"14px",color:"rgba(255,255,255,0.85)"},children:[re.jsx("button",{onClick:()=>g(!m),style:{background:"none",border:"none",color:"white",textDecoration:"underline",fontSize:"13px",cursor:"pointer",padding:0},children:m?"Hide transcript":"Show transcript"}),m&&re.jsx("p",{style:{marginTop:"6px",lineHeight:"1.4"},children:a})]})]})},eK=({status:e,user:t})=>{if(!e||!t)return null;let a=`${t} is ${e}`;return e==="typing"?a=`${t} is typing...`:a="",re.jsx(re.Fragment,{children:a&&re.jsx("div",{className:"flex justify-center mb-2",children:re.jsx("span",{className:"px-3 py-1 bg-gray-100 text-gray-500 text-sm rounded-full",children:a})})})},tK=({message:e,colorCode:t})=>{const a=l=>{const c=/(https?:\/\/[^\s]+)/g;return l?.split(c).map((f,m)=>c.test(f)?re.jsx("a",{href:f.trim(),style:{color:t},target:"_blank",rel:"noopener noreferrer",className:"underline break-words",children:f},m):re.jsx("span",{children:f},m))};if(e?.startsWith("Add this to cart for me")&&e?.includes("name:")){const c=e?.match(/name:([^,]+)/i)?.[1]?.trim()||"Product";return re.jsxs("div",{style:{backgroundColor:"#E8F5E9",border:"1px solid #C8E6C9",borderRadius:"12px",padding:"12px 16px",color:"#2E7D32",fontWeight:500,fontSize:"15px",maxWidth:"360px",margin:"0 auto",textAlign:"center"},children:["✅ ",re.jsx("strong",{children:c})," has been added to your cart."]})}return re.jsx("p",{children:a(e)})},wO=C.createContext({});function TO(e){const t=C.useRef(null);return t.current===null&&(t.current=e()),t.current}const OO=typeof window<"u",B6=OO?C.useLayoutEffect:C.useEffect,nC=C.createContext(null);function RO(e,t){e.indexOf(t)===-1&&e.push(t)}function AO(e,t){const a=e.indexOf(t);a>-1&&e.splice(a,1)}const Wu=(e,t,a)=>a>t?t:a<e?e:a;function MO(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}var nK={};let Zm=()=>{},Zu=()=>{};nK.NODE_ENV!=="production"&&(Zm=(e,t,a)=>{!e&&typeof console<"u"&&console.warn(MO(t,a))},Zu=(e,t,a)=>{if(!e)throw new Error(MO(t,a))});const Ku={},P6=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function U6(e){return typeof e=="object"&&e!==null}const I6=e=>/^0[^.\s]+$/u.test(e);function _O(e){let t;return()=>(t===void 0&&(t=e()),t)}const bl=e=>e,aK=(e,t)=>a=>t(e(a)),S0=(...e)=>e.reduce(aK),C0=(e,t,a)=>{const r=t-e;return r===0?1:(a-e)/r};class DO{constructor(){this.subscriptions=[]}add(t){return RO(this.subscriptions,t),()=>AO(this.subscriptions,t)}notify(t,a,r){const l=this.subscriptions.length;if(l)if(l===1)this.subscriptions[0](t,a,r);else for(let c=0;c<l;c++){const f=this.subscriptions[c];f&&f(t,a,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const is=e=>e*1e3,Qs=e=>e/1e3;function F6(e,t){return t?e*(1e3/t):0}const k6=new Set;function NO(e,t,a){e||k6.has(t)||(console.warn(MO(t,a)),k6.add(t))}const G6=(e,t,a)=>(((1-3*a+3*t)*e+(3*a-6*t))*e+3*t)*e,rK=1e-7,iK=12;function oK(e,t,a,r,l){let c,f,m=0;do f=t+(a-t)/2,c=G6(f,r,l)-e,c>0?a=f:t=f;while(Math.abs(c)>rK&&++m<iK);return f}function x0(e,t,a,r){if(e===t&&a===r)return bl;const l=c=>oK(c,0,1,e,a);return c=>c===0||c===1?c:G6(l(c),t,r)}const q6=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Y6=e=>t=>1-e(1-t),X6=x0(.33,1.53,.69,.99),$O=Y6(X6),W6=q6($O),Z6=e=>(e*=2)<1?.5*$O(e):.5*(2-Math.pow(2,-10*(e-1))),zO=e=>1-Math.sin(Math.acos(e)),K6=Y6(zO),Q6=q6(zO),lK=x0(.42,0,1,1),sK=x0(0,0,.58,1),J6=x0(.42,0,.58,1),uK=e=>Array.isArray(e)&&typeof e[0]!="number",ez=e=>Array.isArray(e)&&typeof e[0]=="number",tz={linear:bl,easeIn:lK,easeInOut:J6,easeOut:sK,circIn:zO,circInOut:Q6,circOut:K6,backIn:$O,backInOut:W6,backOut:X6,anticipate:Z6},cK=e=>typeof e=="string",nz=e=>{if(ez(e)){Zu(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,a,r,l]=e;return x0(t,a,r,l)}else if(cK(e))return Zu(tz[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),tz[e];return e},aC=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function fK(e,t){let a=new Set,r=new Set,l=!1,c=!1;const f=new WeakSet;let m={delta:0,timestamp:0,isProcessing:!1};function g(y){f.has(y)&&(p.schedule(y),e()),y(m)}const p={schedule:(y,S=!1,E=!1)=>{const O=E&&l?a:r;return S&&f.add(y),O.has(y)||O.add(y),y},cancel:y=>{r.delete(y),f.delete(y)},process:y=>{if(m=y,l){c=!0;return}l=!0,[a,r]=[r,a],a.forEach(g),a.clear(),l=!1,c&&(c=!1,p.process(y))}};return p}const dK=40;function az(e,t){let a=!1,r=!0;const l={delta:0,timestamp:0,isProcessing:!1},c=()=>a=!0,f=aC.reduce((z,j)=>(z[j]=fK(c),z),{}),{setup:m,read:g,resolveKeyframes:p,preUpdate:y,update:S,preRender:E,render:T,postRender:O}=f,M=()=>{const z=Ku.useManualTiming?l.timestamp:performance.now();a=!1,Ku.useManualTiming||(l.delta=r?1e3/60:Math.max(Math.min(z-l.timestamp,dK),1)),l.timestamp=z,l.isProcessing=!0,m.process(l),g.process(l),p.process(l),y.process(l),S.process(l),E.process(l),T.process(l),O.process(l),l.isProcessing=!1,a&&t&&(r=!1,e(M))},A=()=>{a=!0,r=!0,l.isProcessing||e(M)};return{schedule:aC.reduce((z,j)=>{const $=f[j];return z[j]=(V,H=!1,P=!1)=>(a||A(),$.schedule(V,H,P)),z},{}),cancel:z=>{for(let j=0;j<aC.length;j++)f[aC[j]].cancel(z)},state:l,steps:f}}const{schedule:Pa,cancel:af,state:ii,steps:jO}=az(typeof requestAnimationFrame<"u"?requestAnimationFrame:bl,!0);let rC;function hK(){rC=void 0}const vo={now:()=>(rC===void 0&&vo.set(ii.isProcessing||Ku.useManualTiming?ii.timestamp:performance.now()),rC),set:e=>{rC=e,queueMicrotask(hK)}},rz=e=>t=>typeof t=="string"&&t.startsWith(e),LO=rz("--"),mK=rz("var(--"),VO=e=>mK(e)?pK.test(e.split("/*")[0].trim()):!1,pK=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Km={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},E0={...Km,transform:e=>Wu(0,1,e)},iC={...Km,default:1},w0=e=>Math.round(e*1e5)/1e5,HO=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function gK(e){return e==null}const vK=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,BO=(e,t)=>a=>!!(typeof a=="string"&&vK.test(a)&&a.startsWith(e)||t&&!gK(a)&&Object.prototype.hasOwnProperty.call(a,t)),iz=(e,t,a)=>r=>{if(typeof r!="string")return r;const[l,c,f,m]=r.match(HO);return{[e]:parseFloat(l),[t]:parseFloat(c),[a]:parseFloat(f),alpha:m!==void 0?parseFloat(m):1}},yK=e=>Wu(0,255,e),PO={...Km,transform:e=>Math.round(yK(e))},Hd={test:BO("rgb","red"),parse:iz("red","green","blue"),transform:({red:e,green:t,blue:a,alpha:r=1})=>"rgba("+PO.transform(e)+", "+PO.transform(t)+", "+PO.transform(a)+", "+w0(E0.transform(r))+")"};function bK(e){let t="",a="",r="",l="";return e.length>5?(t=e.substring(1,3),a=e.substring(3,5),r=e.substring(5,7),l=e.substring(7,9)):(t=e.substring(1,2),a=e.substring(2,3),r=e.substring(3,4),l=e.substring(4,5),t+=t,a+=a,r+=r,l+=l),{red:parseInt(t,16),green:parseInt(a,16),blue:parseInt(r,16),alpha:l?parseInt(l,16)/255:1}}const UO={test:BO("#"),parse:bK,transform:Hd.transform},T0=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),rf=T0("deg"),Js=T0("%"),on=T0("px"),SK=T0("vh"),CK=T0("vw"),oz={...Js,parse:e=>Js.parse(e)/100,transform:e=>Js.transform(e*100)},Qm={test:BO("hsl","hue"),parse:iz("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:a,alpha:r=1})=>"hsla("+Math.round(e)+", "+Js.transform(w0(t))+", "+Js.transform(w0(a))+", "+w0(E0.transform(r))+")"},Cr={test:e=>Hd.test(e)||UO.test(e)||Qm.test(e),parse:e=>Hd.test(e)?Hd.parse(e):Qm.test(e)?Qm.parse(e):UO.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Hd.transform(e):Qm.transform(e),getAnimatableNone:e=>{const t=Cr.parse(e);return t.alpha=0,Cr.transform(t)}},xK=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function EK(e){return isNaN(e)&&typeof e=="string"&&(e.match(HO)?.length||0)+(e.match(xK)?.length||0)>0}const lz="number",sz="color",wK="var",TK="var(",uz="${}",OK=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function O0(e){const t=e.toString(),a=[],r={color:[],number:[],var:[]},l=[];let c=0;const m=t.replace(OK,g=>(Cr.test(g)?(r.color.push(c),l.push(sz),a.push(Cr.parse(g))):g.startsWith(TK)?(r.var.push(c),l.push(wK),a.push(g)):(r.number.push(c),l.push(lz),a.push(parseFloat(g))),++c,uz)).split(uz);return{values:a,split:m,indexes:r,types:l}}function cz(e){return O0(e).values}function fz(e){const{split:t,types:a}=O0(e),r=t.length;return l=>{let c="";for(let f=0;f<r;f++)if(c+=t[f],l[f]!==void 0){const m=a[f];m===lz?c+=w0(l[f]):m===sz?c+=Cr.transform(l[f]):c+=l[f]}return c}}const RK=e=>typeof e=="number"?0:Cr.test(e)?Cr.getAnimatableNone(e):e;function AK(e){const t=cz(e);return fz(e)(t.map(RK))}const of={test:EK,parse:cz,createTransformer:fz,getAnimatableNone:AK};function IO(e,t,a){return a<0&&(a+=1),a>1&&(a-=1),a<1/6?e+(t-e)*6*a:a<1/2?t:a<2/3?e+(t-e)*(2/3-a)*6:e}function MK({hue:e,saturation:t,lightness:a,alpha:r}){e/=360,t/=100,a/=100;let l=0,c=0,f=0;if(!t)l=c=f=a;else{const m=a<.5?a*(1+t):a+t-a*t,g=2*a-m;l=IO(g,m,e+1/3),c=IO(g,m,e),f=IO(g,m,e-1/3)}return{red:Math.round(l*255),green:Math.round(c*255),blue:Math.round(f*255),alpha:r}}function oC(e,t){return a=>a>0?t:e}const Za=(e,t,a)=>e+(t-e)*a,FO=(e,t,a)=>{const r=e*e,l=a*(t*t-r)+r;return l<0?0:Math.sqrt(l)},_K=[UO,Hd,Qm],DK=e=>_K.find(t=>t.test(e));function dz(e){const t=DK(e);if(Zm(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let a=t.parse(e);return t===Qm&&(a=MK(a)),a}const hz=(e,t)=>{const a=dz(e),r=dz(t);if(!a||!r)return oC(e,t);const l={...a};return c=>(l.red=FO(a.red,r.red,c),l.green=FO(a.green,r.green,c),l.blue=FO(a.blue,r.blue,c),l.alpha=Za(a.alpha,r.alpha,c),Hd.transform(l))},kO=new Set(["none","hidden"]);function NK(e,t){return kO.has(e)?a=>a<=0?e:t:a=>a>=1?t:e}function $K(e,t){return a=>Za(e,t,a)}function GO(e){return typeof e=="number"?$K:typeof e=="string"?VO(e)?oC:Cr.test(e)?hz:LK:Array.isArray(e)?mz:typeof e=="object"?Cr.test(e)?hz:zK:oC}function mz(e,t){const a=[...e],r=a.length,l=e.map((c,f)=>GO(c)(c,t[f]));return c=>{for(let f=0;f<r;f++)a[f]=l[f](c);return a}}function zK(e,t){const a={...e,...t},r={};for(const l in a)e[l]!==void 0&&t[l]!==void 0&&(r[l]=GO(e[l])(e[l],t[l]));return l=>{for(const c in r)a[c]=r[c](l);return a}}function jK(e,t){const a=[],r={color:0,var:0,number:0};for(let l=0;l<t.values.length;l++){const c=t.types[l],f=e.indexes[c][r[c]],m=e.values[f]??0;a[l]=m,r[c]++}return a}const LK=(e,t)=>{const a=of.createTransformer(t),r=O0(e),l=O0(t);return r.indexes.var.length===l.indexes.var.length&&r.indexes.color.length===l.indexes.color.length&&r.indexes.number.length>=l.indexes.number.length?kO.has(e)&&!l.values.length||kO.has(t)&&!r.values.length?NK(e,t):S0(mz(jK(r,l),l.values),a):(Zm(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),oC(e,t))};function pz(e,t,a){return typeof e=="number"&&typeof t=="number"&&typeof a=="number"?Za(e,t,a):GO(e)(e,t)}const VK=e=>{const t=({timestamp:a})=>e(a);return{start:(a=!0)=>Pa.update(t,a),stop:()=>af(t),now:()=>ii.isProcessing?ii.timestamp:vo.now()}},gz=(e,t,a=10)=>{let r="";const l=Math.max(Math.round(t/a),2);for(let c=0;c<l;c++)r+=Math.round(e(c/(l-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},lC=2e4;function qO(e){let t=0;const a=50;let r=e.next(t);for(;!r.done&&t<lC;)t+=a,r=e.next(t);return t>=lC?1/0:t}function HK(e,t=100,a){const r=a({...e,keyframes:[0,t]}),l=Math.min(qO(r),lC);return{type:"keyframes",ease:c=>r.next(l*c).value/t,duration:Qs(l)}}const BK=5;function vz(e,t,a){const r=Math.max(t-BK,0);return F6(a-e(r),t-r)}const Ka={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},YO=.001;function PK({duration:e=Ka.duration,bounce:t=Ka.bounce,velocity:a=Ka.velocity,mass:r=Ka.mass}){let l,c;Zm(e<=is(Ka.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let f=1-t;f=Wu(Ka.minDamping,Ka.maxDamping,f),e=Wu(Ka.minDuration,Ka.maxDuration,Qs(e)),f<1?(l=p=>{const y=p*f,S=y*e,E=y-a,T=XO(p,f),O=Math.exp(-S);return YO-E/T*O},c=p=>{const S=p*f*e,E=S*a+a,T=Math.pow(f,2)*Math.pow(p,2)*e,O=Math.exp(-S),M=XO(Math.pow(p,2),f);return(-l(p)+YO>0?-1:1)*((E-T)*O)/M}):(l=p=>{const y=Math.exp(-p*e),S=(p-a)*e+1;return-YO+y*S},c=p=>{const y=Math.exp(-p*e),S=(a-p)*(e*e);return y*S});const m=5/e,g=IK(l,c,m);if(e=is(e),isNaN(g))return{stiffness:Ka.stiffness,damping:Ka.damping,duration:e};{const p=Math.pow(g,2)*r;return{stiffness:p,damping:f*2*Math.sqrt(r*p),duration:e}}}const UK=12;function IK(e,t,a){let r=a;for(let l=1;l<UK;l++)r=r-e(r)/t(r);return r}function XO(e,t){return e*Math.sqrt(1-t*t)}const FK=["duration","bounce"],kK=["stiffness","damping","mass"];function yz(e,t){return t.some(a=>e[a]!==void 0)}function GK(e){let t={velocity:Ka.velocity,stiffness:Ka.stiffness,damping:Ka.damping,mass:Ka.mass,isResolvedFromDuration:!1,...e};if(!yz(e,kK)&&yz(e,FK))if(e.visualDuration){const a=e.visualDuration,r=2*Math.PI/(a*1.2),l=r*r,c=2*Wu(.05,1,1-(e.bounce||0))*Math.sqrt(l);t={...t,mass:Ka.mass,stiffness:l,damping:c}}else{const a=PK(e);t={...t,...a,mass:Ka.mass},t.isResolvedFromDuration=!0}return t}function sC(e=Ka.visualDuration,t=Ka.bounce){const a=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:l}=a;const c=a.keyframes[0],f=a.keyframes[a.keyframes.length-1],m={done:!1,value:c},{stiffness:g,damping:p,mass:y,duration:S,velocity:E,isResolvedFromDuration:T}=GK({...a,velocity:-Qs(a.velocity||0)}),O=E||0,M=p/(2*Math.sqrt(g*y)),A=f-c,D=Qs(Math.sqrt(g/y)),_=Math.abs(A)<5;r||(r=_?Ka.restSpeed.granular:Ka.restSpeed.default),l||(l=_?Ka.restDelta.granular:Ka.restDelta.default);let z;if(M<1){const $=XO(D,M);z=V=>{const H=Math.exp(-M*D*V);return f-H*((O+M*D*A)/$*Math.sin($*V)+A*Math.cos($*V))}}else if(M===1)z=$=>f-Math.exp(-D*$)*(A+(O+D*A)*$);else{const $=D*Math.sqrt(M*M-1);z=V=>{const H=Math.exp(-M*D*V),P=Math.min($*V,300);return f-H*((O+M*D*A)*Math.sinh(P)+$*A*Math.cosh(P))/$}}const j={calculatedDuration:T&&S||null,next:$=>{const V=z($);if(T)m.done=$>=S;else{let H=$===0?O:0;M<1&&(H=$===0?is(O):vz(z,$,V));const P=Math.abs(H)<=r,q=Math.abs(f-V)<=l;m.done=P&&q}return m.value=m.done?f:V,m},toString:()=>{const $=Math.min(qO(j),lC),V=gz(H=>j.next($*H).value,$,30);return $+"ms "+V},toTransition:()=>{}};return j}sC.applyToOptions=e=>{const t=HK(e,100,sC);return e.ease=t.ease,e.duration=is(t.duration),e.type="keyframes",e};function WO({keyframes:e,velocity:t=0,power:a=.8,timeConstant:r=325,bounceDamping:l=10,bounceStiffness:c=500,modifyTarget:f,min:m,max:g,restDelta:p=.5,restSpeed:y}){const S=e[0],E={done:!1,value:S},T=P=>m!==void 0&&P<m||g!==void 0&&P>g,O=P=>m===void 0?g:g===void 0||Math.abs(m-P)<Math.abs(g-P)?m:g;let M=a*t;const A=S+M,D=f===void 0?A:f(A);D!==A&&(M=D-S);const _=P=>-M*Math.exp(-P/r),z=P=>D+_(P),j=P=>{const q=_(P),Y=z(P);E.done=Math.abs(q)<=p,E.value=E.done?D:Y};let $,V;const H=P=>{T(E.value)&&($=P,V=sC({keyframes:[E.value,O(E.value)],velocity:vz(z,P,E.value),damping:l,stiffness:c,restDelta:p,restSpeed:y}))};return H(0),{calculatedDuration:null,next:P=>{let q=!1;return!V&&$===void 0&&(q=!0,j(P),H(P)),$!==void 0&&P>=$?V.next(P-$):(!q&&j(P),E)}}}function qK(e,t,a){const r=[],l=a||Ku.mix||pz,c=e.length-1;for(let f=0;f<c;f++){let m=l(e[f],e[f+1]);if(t){const g=Array.isArray(t)?t[f]||bl:t;m=S0(g,m)}r.push(m)}return r}function YK(e,t,{clamp:a=!0,ease:r,mixer:l}={}){const c=e.length;if(Zu(c===t.length,"Both input and output ranges must be the same length","range-length"),c===1)return()=>t[0];if(c===2&&t[0]===t[1])return()=>t[1];const f=e[0]===e[1];e[0]>e[c-1]&&(e=[...e].reverse(),t=[...t].reverse());const m=qK(t,r,l),g=m.length,p=y=>{if(f&&y<e[0])return t[0];let S=0;if(g>1)for(;S<e.length-2&&!(y<e[S+1]);S++);const E=C0(e[S],e[S+1],y);return m[S](E)};return a?y=>p(Wu(e[0],e[c-1],y)):p}function XK(e,t){const a=e[e.length-1];for(let r=1;r<=t;r++){const l=C0(0,t,r);e.push(Za(a,1,l))}}function WK(e){const t=[0];return XK(t,e.length-1),t}function ZK(e,t){return e.map(a=>a*t)}function KK(e,t){return e.map(()=>t||J6).splice(0,e.length-1)}function Jm({duration:e=300,keyframes:t,times:a,ease:r="easeInOut"}){const l=uK(r)?r.map(nz):nz(r),c={done:!1,value:t[0]},f=ZK(a&&a.length===t.length?a:WK(t),e),m=YK(f,t,{ease:Array.isArray(l)?l:KK(t,l)});return{calculatedDuration:e,next:g=>(c.value=m(g),c.done=g>=e,c)}}const QK=e=>e!==null;function ZO(e,{repeat:t,repeatType:a="loop"},r,l=1){const c=e.filter(QK),m=l<0||t&&a!=="loop"&&t%2===1?0:c.length-1;return!m||r===void 0?c[m]:r}const JK={decay:WO,inertia:WO,tween:Jm,keyframes:Jm,spring:sC};function bz(e){typeof e.type=="string"&&(e.type=JK[e.type])}class KO{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,a){return this.finished.then(t,a)}}var eQ={};const tQ=e=>e/100;class QO extends KO{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:a}=this.options;a&&a.updatedAt!==vo.now()&&this.tick(vo.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;bz(t);const{type:a=Jm,repeat:r=0,repeatDelay:l=0,repeatType:c,velocity:f=0}=t;let{keyframes:m}=t;const g=a||Jm;eQ.NODE_ENV!=="production"&&g!==Jm&&Zu(m.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${m}`,"spring-two-frames"),g!==Jm&&typeof m[0]!="number"&&(this.mixKeyframes=S0(tQ,pz(m[0],m[1])),m=[0,100]);const p=g({...t,keyframes:m});c==="mirror"&&(this.mirroredGenerator=g({...t,keyframes:[...m].reverse(),velocity:-f})),p.calculatedDuration===null&&(p.calculatedDuration=qO(p));const{calculatedDuration:y}=p;this.calculatedDuration=y,this.resolvedDuration=y+l,this.totalDuration=this.resolvedDuration*(r+1)-l,this.generator=p}updateTime(t){const a=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=a}tick(t,a=!1){const{generator:r,totalDuration:l,mixKeyframes:c,mirroredGenerator:f,resolvedDuration:m,calculatedDuration:g}=this;if(this.startTime===null)return r.next(0);const{delay:p=0,keyframes:y,repeat:S,repeatType:E,repeatDelay:T,type:O,onUpdate:M,finalKeyframe:A}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-l/this.speed,this.startTime)),a?this.currentTime=t:this.updateTime(t);const D=this.currentTime-p*(this.playbackSpeed>=0?1:-1),_=this.playbackSpeed>=0?D<0:D>l;this.currentTime=Math.max(D,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=l);let z=this.currentTime,j=r;if(S){const P=Math.min(this.currentTime,l)/m;let q=Math.floor(P),Y=P%1;!Y&&P>=1&&(Y=1),Y===1&&q--,q=Math.min(q,S+1),!!(q%2)&&(E==="reverse"?(Y=1-Y,T&&(Y-=T/m)):E==="mirror"&&(j=f)),z=Wu(0,1,Y)*m}const $=_?{done:!1,value:y[0]}:j.next(z);c&&($.value=c($.value));let{done:V}=$;!_&&g!==null&&(V=this.playbackSpeed>=0?this.currentTime>=l:this.currentTime<=0);const H=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&V);return H&&O!==WO&&($.value=ZO(y,this.options,A,this.speed)),M&&M($.value),H&&this.finish(),$}then(t,a){return this.finished.then(t,a)}get duration(){return Qs(this.calculatedDuration)}get time(){return Qs(this.currentTime)}set time(t){t=is(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(vo.now());const a=this.playbackSpeed!==t;this.playbackSpeed=t,a&&(this.time=Qs(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=VK,startTime:a}=this.options;this.driver||(this.driver=t(l=>this.tick(l))),this.options.onPlay?.();const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=a??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(vo.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function nQ(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Bd=e=>e*180/Math.PI,JO=e=>{const t=Bd(Math.atan2(e[1],e[0]));return eR(t)},aQ={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:JO,rotateZ:JO,skewX:e=>Bd(Math.atan(e[1])),skewY:e=>Bd(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},eR=e=>(e=e%360,e<0&&(e+=360),e),Sz=JO,Cz=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),xz=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),rQ={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Cz,scaleY:xz,scale:e=>(Cz(e)+xz(e))/2,rotateX:e=>eR(Bd(Math.atan2(e[6],e[5]))),rotateY:e=>eR(Bd(Math.atan2(-e[2],e[0]))),rotateZ:Sz,rotate:Sz,skewX:e=>Bd(Math.atan(e[4])),skewY:e=>Bd(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function tR(e){return e.includes("scale")?1:0}function nR(e,t){if(!e||e==="none")return tR(t);const a=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,l;if(a)r=rQ,l=a;else{const m=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=aQ,l=m}if(!l)return tR(t);const c=r[t],f=l[1].split(",").map(oQ);return typeof c=="function"?c(f):f[c]}const iQ=(e,t)=>{const{transform:a="none"}=getComputedStyle(e);return nR(a,t)};function oQ(e){return parseFloat(e.trim())}const ep=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],tp=new Set(ep),Ez=e=>e===Km||e===on,lQ=new Set(["x","y","z"]),sQ=ep.filter(e=>!lQ.has(e));function uQ(e){const t=[];return sQ.forEach(a=>{const r=e.getValue(a);r!==void 0&&(t.push([a,r.get()]),r.set(a.startsWith("scale")?1:0))}),t}const Pd={width:({x:e},{paddingLeft:t="0",paddingRight:a="0"})=>e.max-e.min-parseFloat(t)-parseFloat(a),height:({y:e},{paddingTop:t="0",paddingBottom:a="0"})=>e.max-e.min-parseFloat(t)-parseFloat(a),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>nR(t,"x"),y:(e,{transform:t})=>nR(t,"y")};Pd.translateX=Pd.x,Pd.translateY=Pd.y;const Ud=new Set;let aR=!1,rR=!1,iR=!1;function wz(){if(rR){const e=Array.from(Ud).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),a=new Map;t.forEach(r=>{const l=uQ(r);l.length&&(a.set(r,l),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const l=a.get(r);l&&l.forEach(([c,f])=>{r.getValue(c)?.set(f)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}rR=!1,aR=!1,Ud.forEach(e=>e.complete(iR)),Ud.clear()}function Tz(){Ud.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(rR=!0)})}function cQ(){iR=!0,Tz(),wz(),iR=!1}class oR{constructor(t,a,r,l,c,f=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=a,this.name=r,this.motionValue=l,this.element=c,this.isAsync=f}scheduleResolve(){this.state="scheduled",this.isAsync?(Ud.add(this),aR||(aR=!0,Pa.read(Tz),Pa.resolveKeyframes(wz))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:a,element:r,motionValue:l}=this;if(t[0]===null){const c=l?.get(),f=t[t.length-1];if(c!==void 0)t[0]=c;else if(r&&a){const m=r.readValue(a,f);m!=null&&(t[0]=m)}t[0]===void 0&&(t[0]=f),l&&c===void 0&&l.set(t[0])}nQ(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Ud.delete(this)}cancel(){this.state==="scheduled"&&(Ud.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const fQ=e=>e.startsWith("--");function dQ(e,t,a){fQ(t)?e.style.setProperty(t,a):e.style[t]=a}const hQ=_O(()=>window.ScrollTimeline!==void 0),mQ={};function pQ(e,t){const a=_O(e);return()=>mQ[t]??a()}const Oz=pQ(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),R0=([e,t,a,r])=>`cubic-bezier(${e}, ${t}, ${a}, ${r})`,Rz={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:R0([0,.65,.55,1]),circOut:R0([.55,0,1,.45]),backIn:R0([.31,.01,.66,-.59]),backOut:R0([.33,1.53,.69,.99])};function Az(e,t){if(e)return typeof e=="function"?Oz()?gz(e,t):"ease-out":ez(e)?R0(e):Array.isArray(e)?e.map(a=>Az(a,t)||Rz.easeOut):Rz[e]}function gQ(e,t,a,{delay:r=0,duration:l=300,repeat:c=0,repeatType:f="loop",ease:m="easeOut",times:g}={},p=void 0){const y={[t]:a};g&&(y.offset=g);const S=Az(m,l);Array.isArray(S)&&(y.easing=S);const E={delay:r,duration:l,easing:Array.isArray(S)?"linear":S,fill:"both",iterations:c+1,direction:f==="reverse"?"alternate":"normal"};return p&&(E.pseudoElement=p),e.animate(y,E)}function Mz(e){return typeof e=="function"&&"applyToOptions"in e}function vQ({type:e,...t}){return Mz(e)&&Oz()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class yQ extends KO{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:a,name:r,keyframes:l,pseudoElement:c,allowFlatten:f=!1,finalKeyframe:m,onComplete:g}=t;this.isPseudoElement=!!c,this.allowFlatten=f,this.options=t,Zu(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const p=vQ(t);this.animation=gQ(a,r,l,p,c),p.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!c){const y=ZO(l,this.options,m,this.speed);this.updateMotionValue?this.updateMotionValue(y):dQ(a,r,y),this.animation.cancel()}g?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return Qs(Number(t))}get time(){return Qs(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=is(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:a}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&hQ()?(this.animation.timeline=t,bl):a(this)}}const _z={anticipate:Z6,backInOut:W6,circInOut:Q6};function bQ(e){return e in _z}function SQ(e){typeof e.ease=="string"&&bQ(e.ease)&&(e.ease=_z[e.ease])}const Dz=10;class CQ extends yQ{constructor(t){SQ(t),bz(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:a,onUpdate:r,onComplete:l,element:c,...f}=this.options;if(!a)return;if(t!==void 0){a.set(t);return}const m=new QO({...f,autoplay:!1}),g=is(this.finishedTime??this.time);a.setWithVelocity(m.sample(g-Dz).value,m.sample(g).value,Dz),m.stop()}}const Nz=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(of.test(e)||e==="0")&&!e.startsWith("url("));function xQ(e){const t=e[0];if(e.length===1)return!0;for(let a=0;a<e.length;a++)if(e[a]!==t)return!0}function EQ(e,t,a,r){const l=e[0];if(l===null)return!1;if(t==="display"||t==="visibility")return!0;const c=e[e.length-1],f=Nz(l,t),m=Nz(c,t);return Zm(f===m,`You are trying to animate ${t} from "${l}" to "${c}". "${f?c:l}" is not an animatable value.`,"value-not-animatable"),!f||!m?!1:xQ(e)||(a==="spring"||Mz(a))&&r}const wQ=new Set(["opacity","clipPath","filter","transform"]),TQ=_O(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function OQ(e){const{motionValue:t,name:a,repeatDelay:r,repeatType:l,damping:c,type:f}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:g,transformTemplate:p}=t.owner.getProps();return TQ()&&a&&wQ.has(a)&&(a!=="transform"||!p)&&!g&&!r&&l!=="mirror"&&c!==0&&f!=="inertia"}const RQ=40;class AQ extends KO{constructor({autoplay:t=!0,delay:a=0,type:r="keyframes",repeat:l=0,repeatDelay:c=0,repeatType:f="loop",keyframes:m,name:g,motionValue:p,element:y,...S}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=vo.now();const E={autoplay:t,delay:a,type:r,repeat:l,repeatDelay:c,repeatType:f,name:g,motionValue:p,element:y,...S},T=y?.KeyframeResolver||oR;this.keyframeResolver=new T(m,(O,M,A)=>this.onKeyframesResolved(O,M,E,!A),g,p,y),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,a,r,l){this.keyframeResolver=void 0;const{name:c,type:f,velocity:m,delay:g,isHandoff:p,onUpdate:y}=r;this.resolvedAt=vo.now(),EQ(t,c,f,m)||((Ku.instantAnimations||!g)&&y?.(ZO(t,r,a)),t[0]=t[t.length-1],r.duration=0,r.repeat=0);const E={startTime:l?this.resolvedAt?this.resolvedAt-this.createdAt>RQ?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:a,...r,keyframes:t},T=!p&&OQ(E)?new CQ({...E,element:E.motionValue.owner.current}):new QO(E);T.finished.then(()=>this.notifyFinished()).catch(bl),this.pendingTimeline&&(this.stopTimeline=T.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=T}get finished(){return this._animation?this.animation.finished:this._finished}then(t,a){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),cQ()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const MQ=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function _Q(e){const t=MQ.exec(e);if(!t)return[,];const[,a,r,l]=t;return[`--${a??r}`,l]}const DQ=4;function $z(e,t,a=1){Zu(a<=DQ,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,l]=_Q(e);if(!r)return;const c=window.getComputedStyle(t).getPropertyValue(r);if(c){const f=c.trim();return P6(f)?parseFloat(f):f}return VO(l)?$z(l,t,a+1):l}function lR(e,t){return e?.[t]??e?.default??e}const zz=new Set(["width","height","top","left","right","bottom",...ep]),NQ={test:e=>e==="auto",parse:e=>e},jz=e=>t=>t.test(e),Lz=[Km,on,Js,rf,CK,SK,NQ],Vz=e=>Lz.find(jz(e));function $Q(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||I6(e):!0}const zQ=new Set(["brightness","contrast","saturate","opacity"]);function jQ(e){const[t,a]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=a.match(HO)||[];if(!r)return e;const l=a.replace(r,"");let c=zQ.has(t)?1:0;return r!==a&&(c*=100),t+"("+c+l+")"}const LQ=/\b([a-z-]*)\(.*?\)/gu,sR={...of,getAnimatableNone:e=>{const t=e.match(LQ);return t?t.map(jQ).join(" "):e}},Hz={...Km,transform:Math.round},uR={borderWidth:on,borderTopWidth:on,borderRightWidth:on,borderBottomWidth:on,borderLeftWidth:on,borderRadius:on,radius:on,borderTopLeftRadius:on,borderTopRightRadius:on,borderBottomRightRadius:on,borderBottomLeftRadius:on,width:on,maxWidth:on,height:on,maxHeight:on,top:on,right:on,bottom:on,left:on,padding:on,paddingTop:on,paddingRight:on,paddingBottom:on,paddingLeft:on,margin:on,marginTop:on,marginRight:on,marginBottom:on,marginLeft:on,backgroundPositionX:on,backgroundPositionY:on,...{rotate:rf,rotateX:rf,rotateY:rf,rotateZ:rf,scale:iC,scaleX:iC,scaleY:iC,scaleZ:iC,skew:rf,skewX:rf,skewY:rf,distance:on,translateX:on,translateY:on,translateZ:on,x:on,y:on,z:on,perspective:on,transformPerspective:on,opacity:E0,originX:oz,originY:oz,originZ:on},zIndex:Hz,fillOpacity:E0,strokeOpacity:E0,numOctaves:Hz},VQ={...uR,color:Cr,backgroundColor:Cr,outlineColor:Cr,fill:Cr,stroke:Cr,borderColor:Cr,borderTopColor:Cr,borderRightColor:Cr,borderBottomColor:Cr,borderLeftColor:Cr,filter:sR,WebkitFilter:sR},Bz=e=>VQ[e];function Pz(e,t){let a=Bz(e);return a!==sR&&(a=of),a.getAnimatableNone?a.getAnimatableNone(t):void 0}const HQ=new Set(["auto","none","0"]);function BQ(e,t,a){let r=0,l;for(;r<e.length&&!l;){const c=e[r];typeof c=="string"&&!HQ.has(c)&&O0(c).values.length&&(l=e[r]),r++}if(l&&a)for(const c of t)e[c]=Pz(a,l)}class PQ extends oR{constructor(t,a,r,l,c){super(t,a,r,l,c,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:a,name:r}=this;if(!a||!a.current)return;super.readKeyframes();for(let g=0;g<t.length;g++){let p=t[g];if(typeof p=="string"&&(p=p.trim(),VO(p))){const y=$z(p,a.current);y!==void 0&&(t[g]=y),g===t.length-1&&(this.finalKeyframe=p)}}if(this.resolveNoneKeyframes(),!zz.has(r)||t.length!==2)return;const[l,c]=t,f=Vz(l),m=Vz(c);if(f!==m)if(Ez(f)&&Ez(m))for(let g=0;g<t.length;g++){const p=t[g];typeof p=="string"&&(t[g]=parseFloat(p))}else Pd[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:a}=this,r=[];for(let l=0;l<t.length;l++)(t[l]===null||$Q(t[l]))&&r.push(l);r.length&&BQ(t,r,a)}measureInitialState(){const{element:t,unresolvedKeyframes:a,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Pd[r](t.measureViewportBox(),window.getComputedStyle(t.current)),a[0]=this.measuredOrigin;const l=a[a.length-1];l!==void 0&&t.getValue(r,l).jump(l,!1)}measureEndState(){const{element:t,name:a,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const l=t.getValue(a);l&&l.jump(this.measuredOrigin,!1);const c=r.length-1,f=r[c];r[c]=Pd[a](t.measureViewportBox(),window.getComputedStyle(t.current)),f!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=f),this.removedTransforms?.length&&this.removedTransforms.forEach(([m,g])=>{t.getValue(m).set(g)}),this.resolveNoneKeyframes()}}function UQ(e,t,a){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const l=a?.[e]??r.querySelectorAll(e);return l?Array.from(l):[]}return Array.from(e)}const Uz=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Iz(e){return U6(e)&&"offsetHeight"in e}var IQ={};const Fz=30,FQ=e=>!isNaN(parseFloat(e));class kQ{constructor(t,a={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,l=!0)=>{const c=vo.now();if(this.updatedAt!==c&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const f of this.dependents)f.dirty();l&&this.events.renderRequest?.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=a.owner}setCurrent(t){this.current=t,this.updatedAt=vo.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=FQ(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return IQ.NODE_ENV!=="production"&&NO(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,a){this.events[t]||(this.events[t]=new DO);const r=this.events[t].add(a);return t==="change"?()=>{r(),Pa.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,a){this.passiveEffect=t,this.stopPassiveEffect=a}set(t,a=!0){!a||!this.passiveEffect?this.updateAndNotify(t,a):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,a,r){this.set(a),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,a=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,a&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=vo.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Fz)return 0;const a=Math.min(this.updatedAt-this.prevUpdatedAt,Fz);return F6(parseFloat(this.current)-parseFloat(this.prevFrameValue),a)}start(t){return this.stop(),new Promise(a=>{this.hasAnimated=!0,this.animation=t(a),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function np(e,t){return new kQ(e,t)}const{schedule:cR}=az(queueMicrotask,!1),os={x:!1,y:!1};function kz(){return os.x||os.y}function GQ(e){return e==="x"||e==="y"?os[e]?null:(os[e]=!0,()=>{os[e]=!1}):os.x||os.y?null:(os.x=os.y=!0,()=>{os.x=os.y=!1})}function Gz(e,t){const a=UQ(e),r=new AbortController,l={passive:!0,...t,signal:r.signal};return[a,l,()=>r.abort()]}function qz(e){return!(e.pointerType==="touch"||kz())}function qQ(e,t,a={}){const[r,l,c]=Gz(e,a),f=m=>{if(!qz(m))return;const{target:g}=m,p=t(g,m);if(typeof p!="function"||!g)return;const y=S=>{qz(S)&&(p(S),g.removeEventListener("pointerleave",y))};g.addEventListener("pointerleave",y,l)};return r.forEach(m=>{m.addEventListener("pointerenter",f,l)}),c}const Yz=(e,t)=>t?e===t?!0:Yz(e,t.parentElement):!1,fR=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,YQ=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function XQ(e){return YQ.has(e.tagName)||e.tabIndex!==-1}const uC=new WeakSet;function Xz(e){return t=>{t.key==="Enter"&&e(t)}}function dR(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const WQ=(e,t)=>{const a=e.currentTarget;if(!a)return;const r=Xz(()=>{if(uC.has(a))return;dR(a,"down");const l=Xz(()=>{dR(a,"up")}),c=()=>dR(a,"cancel");a.addEventListener("keyup",l,t),a.addEventListener("blur",c,t)});a.addEventListener("keydown",r,t),a.addEventListener("blur",()=>a.removeEventListener("keydown",r),t)};function Wz(e){return fR(e)&&!kz()}function ZQ(e,t,a={}){const[r,l,c]=Gz(e,a),f=m=>{const g=m.currentTarget;if(!Wz(m))return;uC.add(g);const p=t(g,m),y=(T,O)=>{window.removeEventListener("pointerup",S),window.removeEventListener("pointercancel",E),uC.has(g)&&uC.delete(g),Wz(T)&&typeof p=="function"&&p(T,{success:O})},S=T=>{y(T,g===window||g===document||a.useGlobalTarget||Yz(g,T.target))},E=T=>{y(T,!1)};window.addEventListener("pointerup",S,l),window.addEventListener("pointercancel",E,l)};return r.forEach(m=>{(a.useGlobalTarget?window:m).addEventListener("pointerdown",f,l),Iz(m)&&(m.addEventListener("focus",p=>WQ(p,l)),!XQ(m)&&!m.hasAttribute("tabindex")&&(m.tabIndex=0))}),c}function Zz(e){return U6(e)&&"ownerSVGElement"in e}function KQ(e){return Zz(e)&&e.tagName==="svg"}const wi=e=>!!(e&&e.getVelocity),QQ=[...Lz,Cr,of],JQ=e=>QQ.find(jz(e)),hR=C.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class eJ extends C.Component{getSnapshotBeforeUpdate(t){const a=this.props.childRef.current;if(a&&t.isPresent&&!this.props.isPresent){const r=a.offsetParent,l=Iz(r)&&r.offsetWidth||0,c=this.props.sizeRef.current;c.height=a.offsetHeight||0,c.width=a.offsetWidth||0,c.top=a.offsetTop,c.left=a.offsetLeft,c.right=l-c.width-c.left}return null}componentDidUpdate(){}render(){return this.props.children}}function tJ({children:e,isPresent:t,anchorX:a,root:r}){const l=C.useId(),c=C.useRef(null),f=C.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:m}=C.useContext(hR);return C.useInsertionEffect(()=>{const{width:g,height:p,top:y,left:S,right:E}=f.current;if(t||!c.current||!g||!p)return;const T=a==="left"?`left: ${S}`:`right: ${E}`;c.current.dataset.motionPopId=l;const O=document.createElement("style");m&&(O.nonce=m);const M=r??document.head;return M.appendChild(O),O.sheet&&O.sheet.insertRule(`
644
+ `,[t,a]}setOptions(t){if(this.options.container!==t.container){const a=this.parentFromOptionsContainer(t.container);a.appendChild(this.container),this.parent=a}t.dragToSeek!==!0&&typeof this.options.dragToSeek!="object"||this.initDrag(),this.options=t,this.reRender()}getWrapper(){return this.wrapper}getWidth(){return this.scrollContainer.clientWidth}getScroll(){return this.scrollContainer.scrollLeft}setScroll(t){this.scrollContainer.scrollLeft=t}setScrollPercentage(t){const{scrollWidth:a}=this.scrollContainer,r=a*t;this.setScroll(r)}destroy(){var t,a;this.subscriptions.forEach(r=>r()),this.container.remove(),(t=this.resizeObserver)===null||t===void 0||t.disconnect(),(a=this.unsubscribeOnScroll)===null||a===void 0||a.forEach(r=>r()),this.unsubscribeOnScroll=[]}createDelay(t=10){let a,r;const l=()=>{a&&clearTimeout(a),r&&r()};return this.timeouts.push(l),()=>new Promise((c,f)=>{l(),r=f,a=setTimeout(()=>{a=void 0,r=void 0,c()},t)})}convertColorValues(t){if(!Array.isArray(t))return t||"";if(t.length<2)return t[0]||"";const a=document.createElement("canvas"),r=a.getContext("2d"),l=a.height*(window.devicePixelRatio||1),c=r.createLinearGradient(0,0,0,l),f=1/(t.length-1);return t.forEach((m,g)=>{const p=g*f;c.addColorStop(p,m)}),c}getPixelRatio(){return Math.max(1,window.devicePixelRatio||1)}renderBarWaveform(t,a,r,l){const c=t[0],f=t[1]||t[0],m=c.length,{width:g,height:p}=r.canvas,y=p/2,S=this.getPixelRatio(),E=a.barWidth?a.barWidth*S:1,T=a.barGap?a.barGap*S:a.barWidth?E/2:0,O=a.barRadius||0,M=g/(E+T)/m,A=O&&"roundRect"in r?"roundRect":"rect";r.beginPath();let D=0,_=0,z=0;for(let j=0;j<=m;j++){const $=Math.round(j*M);if($>D){const P=Math.round(_*y*l),q=P+Math.round(z*y*l)||1;let Y=y-P;a.barAlign==="top"?Y=0:a.barAlign==="bottom"&&(Y=p-q),r[A](D*(E+T),Y,E,q,O),D=$,_=0,z=0}const V=Math.abs(c[j]||0),H=Math.abs(f[j]||0);V>_&&(_=V),H>z&&(z=H)}r.fill(),r.closePath()}renderLineWaveform(t,a,r,l){const c=f=>{const m=t[f]||t[0],g=m.length,{height:p}=r.canvas,y=p/2,S=r.canvas.width/g;r.moveTo(0,y);let E=0,T=0;for(let O=0;O<=g;O++){const M=Math.round(O*S);if(M>E){const D=y+(Math.round(T*y*l)||1)*(f===0?-1:1);r.lineTo(E,D),E=M,T=0}const A=Math.abs(m[O]||0);A>T&&(T=A)}r.lineTo(E,y)};r.beginPath(),c(0),c(1),r.fill(),r.closePath()}renderWaveform(t,a,r){if(r.fillStyle=this.convertColorValues(a.waveColor),a.renderFunction)return void a.renderFunction(t,r);let l=a.barHeight||1;if(a.normalize){const c=Array.from(t[0]).reduce((f,m)=>Math.max(f,Math.abs(m)),0);l=c?1/c:1}a.barWidth||a.barGap||a.barAlign?this.renderBarWaveform(t,a,r,l):this.renderLineWaveform(t,a,r,l)}renderSingleCanvas(t,a,r,l,c,f,m){const g=this.getPixelRatio(),p=document.createElement("canvas");p.width=Math.round(r*g),p.height=Math.round(l*g),p.style.width=`${r}px`,p.style.height=`${l}px`,p.style.left=`${Math.round(c)}px`,f.appendChild(p);const y=p.getContext("2d");if(this.renderWaveform(t,a,y),p.width>0&&p.height>0){const S=p.cloneNode(),E=S.getContext("2d");E.drawImage(p,0,0),E.globalCompositeOperation="source-in",E.fillStyle=this.convertColorValues(a.progressColor),E.fillRect(0,0,p.width,p.height),m.appendChild(S)}}renderMultiCanvas(t,a,r,l,c,f){const m=this.getPixelRatio(),{clientWidth:g}=this.scrollContainer,p=r/m;let y=Math.min(Xm.MAX_CANVAS_WIDTH,g,p),S={};if(a.barWidth||a.barGap){const A=a.barWidth||.5,D=A+(a.barGap||A/2);y%D!=0&&(y=Math.floor(y/D)*D)}if(y===0)return;const E=A=>{if(A<0||A>=T||S[A])return;S[A]=!0;const D=A*y;let _=Math.min(p-D,y);if(a.barWidth||a.barGap){const j=a.barWidth||.5,$=j+(a.barGap||j/2);_=Math.floor(_/$)*$}if(_<=0)return;const z=t.map(j=>{const $=Math.floor(D/p*j.length),V=Math.floor((D+_)/p*j.length);return j.slice($,V)});this.renderSingleCanvas(z,a,_,l,D,c,f)},T=Math.ceil(p/y);if(!this.isScrollable){for(let A=0;A<T;A++)E(A);return}const O=this.scrollContainer.scrollLeft/p,M=Math.floor(O*T);if(E(M-1),E(M),E(M+1),T>1){const A=this.on("scroll",()=>{const{scrollLeft:D}=this.scrollContainer,_=Math.floor(D/p*T);Object.keys(S).length>Xm.MAX_NODES&&(c.innerHTML="",f.innerHTML="",S={}),E(_-1),E(_),E(_+1)});this.unsubscribeOnScroll.push(A)}}renderChannel(t,a,r,l){var{overlay:c}=a,f=function(y,S){var E={};for(var T in y)Object.prototype.hasOwnProperty.call(y,T)&&S.indexOf(T)<0&&(E[T]=y[T]);if(y!=null&&typeof Object.getOwnPropertySymbols=="function"){var O=0;for(T=Object.getOwnPropertySymbols(y);O<T.length;O++)S.indexOf(T[O])<0&&Object.prototype.propertyIsEnumerable.call(y,T[O])&&(E[T[O]]=y[T[O]])}return E}(a,["overlay"]);const m=document.createElement("div"),g=this.getHeight(f.height,f.splitChannels);m.style.height=`${g}px`,c&&l>0&&(m.style.marginTop=`-${g}px`),this.canvasWrapper.style.minHeight=`${g}px`,this.canvasWrapper.appendChild(m);const p=m.cloneNode();this.progressWrapper.appendChild(p),this.renderMultiCanvas(t,f,r,g,m,p)}render(t){return ri(this,void 0,void 0,function*(){var a;this.timeouts.forEach(g=>g()),this.timeouts=[],this.canvasWrapper.innerHTML="",this.progressWrapper.innerHTML="",this.options.width!=null&&(this.scrollContainer.style.width=typeof this.options.width=="number"?`${this.options.width}px`:this.options.width);const r=this.getPixelRatio(),l=this.scrollContainer.clientWidth,c=Math.ceil(t.duration*(this.options.minPxPerSec||0));this.isScrollable=c>l;const f=this.options.fillParent&&!this.isScrollable,m=(f?l:c)*r;if(this.wrapper.style.width=f?"100%":`${c}px`,this.scrollContainer.style.overflowX=this.isScrollable?"auto":"hidden",this.scrollContainer.classList.toggle("noScrollbar",!!this.options.hideScrollbar),this.cursor.style.backgroundColor=`${this.options.cursorColor||this.options.progressColor}`,this.cursor.style.width=`${this.options.cursorWidth}px`,this.audioData=t,this.emit("render"),this.options.splitChannels)for(let g=0;g<t.numberOfChannels;g++){const p=Object.assign(Object.assign({},this.options),(a=this.options.splitChannels)===null||a===void 0?void 0:a[g]);this.renderChannel([t.getChannelData(g)],p,m,g)}else{const g=[t.getChannelData(0)];t.numberOfChannels>1&&g.push(t.getChannelData(1)),this.renderChannel(g,this.options,m,0)}Promise.resolve().then(()=>this.emit("rendered"))})}reRender(){if(this.unsubscribeOnScroll.forEach(r=>r()),this.unsubscribeOnScroll=[],!this.audioData)return;const{scrollWidth:t}=this.scrollContainer,{right:a}=this.progressWrapper.getBoundingClientRect();if(this.render(this.audioData),this.isScrollable&&t!==this.scrollContainer.scrollWidth){const{right:r}=this.progressWrapper.getBoundingClientRect();let l=r-a;l*=2,l=l<0?Math.floor(l):Math.ceil(l),l/=2,this.scrollContainer.scrollLeft+=l}}zoom(t){this.options.minPxPerSec=t,this.reRender()}scrollIntoView(t,a=!1){const{scrollLeft:r,scrollWidth:l,clientWidth:c}=this.scrollContainer,f=t*l,m=r,g=r+c,p=c/2;if(this.isDragging)f+30>g?this.scrollContainer.scrollLeft+=30:f-30<m&&(this.scrollContainer.scrollLeft-=30);else{(f<m||f>g)&&(this.scrollContainer.scrollLeft=f-(this.options.autoCenter?p:0));const y=f-r-p;a&&this.options.autoCenter&&y>0&&(this.scrollContainer.scrollLeft+=Math.min(y,10))}{const y=this.scrollContainer.scrollLeft,S=y/l,E=(y+c)/l;this.emit("scroll",S,E,y,y+c)}}renderProgress(t,a){if(isNaN(t))return;const r=100*t;this.canvasWrapper.style.clipPath=`polygon(${r}% 0%, 100% 0%, 100% 100%, ${r}% 100%)`,this.progressWrapper.style.width=`${r}%`,this.cursor.style.left=`${r}%`,this.cursor.style.transform=`translateX(-${Math.round(r)===100?this.options.cursorWidth:0}px)`,this.isScrollable&&this.options.autoScroll&&this.scrollIntoView(t,a)}exportImage(t,a,r){return ri(this,void 0,void 0,function*(){const l=this.canvasWrapper.querySelectorAll("canvas");if(!l.length)throw new Error("No waveform data");if(r==="dataURL"){const c=Array.from(l).map(f=>f.toDataURL(t,a));return Promise.resolve(c)}return Promise.all(Array.from(l).map(c=>new Promise((f,m)=>{c.toBlob(g=>{g?f(g):m(new Error("Could not export image"))},t,a)})))})}}Xm.MAX_CANVAS_WIDTH=8e3,Xm.MAX_NODES=10;class GZ extends b0{constructor(){super(...arguments),this.unsubscribe=()=>{}}start(){this.unsubscribe=this.on("tick",()=>{requestAnimationFrame(()=>{this.emit("tick")})}),this.emit("tick")}stop(){this.unsubscribe()}destroy(){this.unsubscribe()}}class EO extends b0{constructor(t=new AudioContext){super(),this.bufferNode=null,this.playStartTime=0,this.playedDuration=0,this._muted=!1,this._playbackRate=1,this._duration=void 0,this.buffer=null,this.currentSrc="",this.paused=!0,this.crossOrigin=null,this.seeking=!1,this.autoplay=!1,this.addEventListener=this.on,this.removeEventListener=this.un,this.audioContext=t,this.gainNode=this.audioContext.createGain(),this.gainNode.connect(this.audioContext.destination)}load(){return ri(this,void 0,void 0,function*(){})}get src(){return this.currentSrc}set src(t){if(this.currentSrc=t,this._duration=void 0,!t)return this.buffer=null,void this.emit("emptied");fetch(t).then(a=>{if(a.status>=400)throw new Error(`Failed to fetch ${t}: ${a.status} (${a.statusText})`);return a.arrayBuffer()}).then(a=>this.currentSrc!==t?null:this.audioContext.decodeAudioData(a)).then(a=>{this.currentSrc===t&&(this.buffer=a,this.emit("loadedmetadata"),this.emit("canplay"),this.autoplay&&this.play())})}_play(){var t;if(!this.paused)return;this.paused=!1,(t=this.bufferNode)===null||t===void 0||t.disconnect(),this.bufferNode=this.audioContext.createBufferSource(),this.buffer&&(this.bufferNode.buffer=this.buffer),this.bufferNode.playbackRate.value=this._playbackRate,this.bufferNode.connect(this.gainNode);let a=this.playedDuration*this._playbackRate;(a>=this.duration||a<0)&&(a=0,this.playedDuration=0),this.bufferNode.start(this.audioContext.currentTime,a),this.playStartTime=this.audioContext.currentTime,this.bufferNode.onended=()=>{this.currentTime>=this.duration&&(this.pause(),this.emit("ended"))}}_pause(){var t;this.paused=!0,(t=this.bufferNode)===null||t===void 0||t.stop(),this.playedDuration+=this.audioContext.currentTime-this.playStartTime}play(){return ri(this,void 0,void 0,function*(){this.paused&&(this._play(),this.emit("play"))})}pause(){this.paused||(this._pause(),this.emit("pause"))}stopAt(t){const a=t-this.currentTime,r=this.bufferNode;r?.stop(this.audioContext.currentTime+a),r?.addEventListener("ended",()=>{r===this.bufferNode&&(this.bufferNode=null,this.pause())},{once:!0})}setSinkId(t){return ri(this,void 0,void 0,function*(){return this.audioContext.setSinkId(t)})}get playbackRate(){return this._playbackRate}set playbackRate(t){this._playbackRate=t,this.bufferNode&&(this.bufferNode.playbackRate.value=t)}get currentTime(){return(this.paused?this.playedDuration:this.playedDuration+(this.audioContext.currentTime-this.playStartTime))*this._playbackRate}set currentTime(t){const a=!this.paused;a&&this._pause(),this.playedDuration=t/this._playbackRate,a&&this._play(),this.emit("seeking"),this.emit("timeupdate")}get duration(){var t,a;return(t=this._duration)!==null&&t!==void 0?t:((a=this.buffer)===null||a===void 0?void 0:a.duration)||0}set duration(t){this._duration=t}get volume(){return this.gainNode.gain.value}set volume(t){this.gainNode.gain.value=t,this.emit("volumechange")}get muted(){return this._muted}set muted(t){this._muted!==t&&(this._muted=t,this._muted?this.gainNode.disconnect():this.gainNode.connect(this.audioContext.destination))}canPlayType(t){return/^(audio|video)\//.test(t)}getGainNode(){return this.gainNode}getChannelData(){const t=[];if(!this.buffer)return t;const a=this.buffer.numberOfChannels;for(let r=0;r<a;r++)t.push(this.buffer.getChannelData(r));return t}}const qZ={waveColor:"#999",progressColor:"#555",cursorWidth:1,minPxPerSec:0,fillParent:!0,interact:!0,dragToSeek:!1,autoScroll:!0,autoCenter:!0,sampleRate:8e3};class Wm extends kZ{static create(t){return new Wm(t)}constructor(t){const a=t.media||(t.backend==="WebAudio"?new EO:void 0);super({media:a,mediaControls:t.mediaControls,autoplay:t.autoplay,playbackRate:t.audioRate}),this.plugins=[],this.decodedData=null,this.stopAtPosition=null,this.subscriptions=[],this.mediaSubscriptions=[],this.abortController=null,this.options=Object.assign({},qZ,t),this.timer=new GZ;const r=a?void 0:this.getMediaElement();this.renderer=new Xm(this.options,r),this.initPlayerEvents(),this.initRendererEvents(),this.initTimerEvents(),this.initPlugins();const l=this.options.url||this.getSrc()||"";Promise.resolve().then(()=>{this.emit("init");const{peaks:c,duration:f}=this.options;(l||c&&f)&&this.load(l,c,f).catch(()=>null)})}updateProgress(t=this.getCurrentTime()){return this.renderer.renderProgress(t/this.getDuration(),this.isPlaying()),t}initTimerEvents(){this.subscriptions.push(this.timer.on("tick",()=>{if(!this.isSeeking()){const t=this.updateProgress();this.emit("timeupdate",t),this.emit("audioprocess",t),this.stopAtPosition!=null&&this.isPlaying()&&t>=this.stopAtPosition&&this.pause()}}))}initPlayerEvents(){this.isPlaying()&&(this.emit("play"),this.timer.start()),this.mediaSubscriptions.push(this.onMediaEvent("timeupdate",()=>{const t=this.updateProgress();this.emit("timeupdate",t)}),this.onMediaEvent("play",()=>{this.emit("play"),this.timer.start()}),this.onMediaEvent("pause",()=>{this.emit("pause"),this.timer.stop(),this.stopAtPosition=null}),this.onMediaEvent("emptied",()=>{this.timer.stop(),this.stopAtPosition=null}),this.onMediaEvent("ended",()=>{this.emit("timeupdate",this.getDuration()),this.emit("finish"),this.stopAtPosition=null}),this.onMediaEvent("seeking",()=>{this.emit("seeking",this.getCurrentTime())}),this.onMediaEvent("error",()=>{var t;this.emit("error",(t=this.getMediaElement().error)!==null&&t!==void 0?t:new Error("Media error")),this.stopAtPosition=null}))}initRendererEvents(){this.subscriptions.push(this.renderer.on("click",(t,a)=>{this.options.interact&&(this.seekTo(t),this.emit("interaction",t*this.getDuration()),this.emit("click",t,a))}),this.renderer.on("dblclick",(t,a)=>{this.emit("dblclick",t,a)}),this.renderer.on("scroll",(t,a,r,l)=>{const c=this.getDuration();this.emit("scroll",t*c,a*c,r,l)}),this.renderer.on("render",()=>{this.emit("redraw")}),this.renderer.on("rendered",()=>{this.emit("redrawcomplete")}),this.renderer.on("dragstart",t=>{this.emit("dragstart",t)}),this.renderer.on("dragend",t=>{this.emit("dragend",t)}));{let t;this.subscriptions.push(this.renderer.on("drag",a=>{if(!this.options.interact)return;let r;this.renderer.renderProgress(a),clearTimeout(t),this.isPlaying()?r=0:this.options.dragToSeek===!0?r=200:typeof this.options.dragToSeek=="object"&&this.options.dragToSeek!==void 0&&(r=this.options.dragToSeek.debounceTime),t=setTimeout(()=>{this.seekTo(a)},r),this.emit("interaction",a*this.getDuration()),this.emit("drag",a)}))}}initPlugins(){var t;!((t=this.options.plugins)===null||t===void 0)&&t.length&&this.options.plugins.forEach(a=>{this.registerPlugin(a)})}unsubscribePlayerEvents(){this.mediaSubscriptions.forEach(t=>t()),this.mediaSubscriptions=[]}setOptions(t){this.options=Object.assign({},this.options,t),t.duration&&!t.peaks&&(this.decodedData=tC.createBuffer(this.exportPeaks(),t.duration)),t.peaks&&t.duration&&(this.decodedData=tC.createBuffer(t.peaks,t.duration)),this.renderer.setOptions(this.options),t.audioRate&&this.setPlaybackRate(t.audioRate),t.mediaControls!=null&&(this.getMediaElement().controls=t.mediaControls)}registerPlugin(t){t._init(this),this.plugins.push(t);const a=t.once("destroy",()=>{this.plugins=this.plugins.filter(r=>r!==t),this.subscriptions=this.subscriptions.filter(r=>r!==a)});return this.subscriptions.push(a),t}getWrapper(){return this.renderer.getWrapper()}getWidth(){return this.renderer.getWidth()}getScroll(){return this.renderer.getScroll()}setScroll(t){return this.renderer.setScroll(t)}setScrollTime(t){const a=t/this.getDuration();this.renderer.setScrollPercentage(a)}getActivePlugins(){return this.plugins}loadAudio(t,a,r,l){return ri(this,void 0,void 0,function*(){var c;if(this.emit("load",t),!this.options.media&&this.isPlaying()&&this.pause(),this.decodedData=null,this.stopAtPosition=null,!a&&!r){const m=this.options.fetchParams||{};window.AbortController&&!m.signal&&(this.abortController=new AbortController,m.signal=(c=this.abortController)===null||c===void 0?void 0:c.signal);const g=y=>this.emit("loading",y);a=yield FZ.fetchBlob(t,g,m);const p=this.options.blobMimeType;p&&(a=new Blob([a],{type:p}))}this.setSrc(t,a);const f=yield new Promise(m=>{const g=l||this.getDuration();g?m(g):this.mediaSubscriptions.push(this.onMediaEvent("loadedmetadata",()=>m(this.getDuration()),{once:!0}))});if(!t&&!a){const m=this.getMediaElement();m instanceof EO&&(m.duration=f)}if(r)this.decodedData=tC.createBuffer(r,f||0);else if(a){const m=yield a.arrayBuffer();this.decodedData=yield tC.decode(m,this.options.sampleRate)}this.decodedData&&(this.emit("decode",this.getDuration()),this.renderer.render(this.decodedData)),this.emit("ready",this.getDuration())})}load(t,a,r){return ri(this,void 0,void 0,function*(){try{return yield this.loadAudio(t,void 0,a,r)}catch(l){throw this.emit("error",l),l}})}loadBlob(t,a,r){return ri(this,void 0,void 0,function*(){try{return yield this.loadAudio("",t,a,r)}catch(l){throw this.emit("error",l),l}})}zoom(t){if(!this.decodedData)throw new Error("No audio loaded");this.renderer.zoom(t),this.emit("zoom",t)}getDecodedData(){return this.decodedData}exportPeaks({channels:t=2,maxLength:a=8e3,precision:r=1e4}={}){if(!this.decodedData)throw new Error("The audio has not been decoded yet");const l=Math.min(t,this.decodedData.numberOfChannels),c=[];for(let f=0;f<l;f++){const m=this.decodedData.getChannelData(f),g=[],p=m.length/a;for(let y=0;y<a;y++){const S=m.slice(Math.floor(y*p),Math.ceil((y+1)*p));let E=0;for(let T=0;T<S.length;T++){const O=S[T];Math.abs(O)>Math.abs(E)&&(E=O)}g.push(Math.round(E*r)/r)}c.push(g)}return c}getDuration(){let t=super.getDuration()||0;return t!==0&&t!==1/0||!this.decodedData||(t=this.decodedData.duration),t}toggleInteraction(t){this.options.interact=t}setTime(t){this.stopAtPosition=null,super.setTime(t),this.updateProgress(t),this.emit("timeupdate",t)}seekTo(t){const a=this.getDuration()*t;this.setTime(a)}play(t,a){const r=Object.create(null,{play:{get:()=>super.play}});return ri(this,void 0,void 0,function*(){t!=null&&this.setTime(t);const l=yield r.play.call(this);return a!=null&&(this.media instanceof EO?this.media.stopAt(a):this.stopAtPosition=a),l})}playPause(){return ri(this,void 0,void 0,function*(){return this.isPlaying()?this.pause():this.play()})}stop(){this.pause(),this.setTime(0)}skip(t){this.setTime(this.getCurrentTime()+t)}empty(){this.load("",[[0]],.001)}setMediaElement(t){this.unsubscribePlayerEvents(),super.setMediaElement(t),this.initPlayerEvents()}exportImage(){return ri(this,arguments,void 0,function*(t="image/png",a=1,r="dataURL"){return this.renderer.exportImage(t,a,r)})}destroy(){var t;this.emit("destroy"),(t=this.abortController)===null||t===void 0||t.abort(),this.plugins.forEach(a=>a.destroy()),this.subscriptions.forEach(a=>a()),this.unsubscribePlayerEvents(),this.timer.destroy(),this.renderer.destroy(),super.destroy()}}Wm.BasePlugin=class extends b0{constructor(e){super(),this.subscriptions=[],this.options=e}onInit(){}_init(e){this.wavesurfer=e,this.onInit()}destroy(){this.emit("destroy"),this.subscriptions.forEach(e=>e())}},Wm.dom=IZ;const YZ=({userMessage:e,setUserMessage:t,handleSendMessage:a,handleSendImage:r,handleSendVoice:l,selectedImage:c,setSelectedImage:f,audioBlob:m,setAudioBlob:g,isSending:p})=>{const{t:y}=DZ(),[S,E]=C.useState(!1),[T,O]=C.useState(!1),M=C.useRef(null),A=C.useRef(null),D=C.useRef([]),_=C.useRef(null),z=C.useRef(null),j=q=>{const Y=q.target.files?.[0];Y&&f(Y)},$=()=>{f(null)},V=async()=>{if(!navigator.mediaDevices?.getUserMedia){alert(y("chatInput.voice.notSupported"));return}if(S)M.current?.stop();else try{const q=await navigator.mediaDevices.getUserMedia({audio:!0}),Y=MediaRecorder.isTypeSupported("audio/webm")?"audio/webm":"audio/mp4",te=new MediaRecorder(q,{mimeType:Y});M.current=te,D.current=[],te.ondataavailable=G=>{G.data.size>0&&D.current.push(G.data)},te.onstop=()=>{const G=new Blob(D.current,{type:Y});g(G),E(!1),q.getTracks().forEach(K=>K.stop())},te.start(),E(!0)}catch(q){console.error(q),alert(y("chatInput.voice.permissionError"))}};C.useEffect(()=>{if(m&&_.current){z.current?.destroy();const q=URL.createObjectURL(m);z.current=Wm.create({container:_.current,waveColor:"#ccc",progressColor:"#7F28F8",cursorWidth:0,barWidth:3,barHeight:1.5,barGap:2,height:40,interact:!0}),z.current.load(q),z.current.on("finish",()=>O(!1))}},[m]);const H=()=>{z.current&&(z.current.playPause(),O(q=>!q))},P=()=>{E(!1),g(null),z.current?.destroy()};return re.jsxs("div",{style:{display:"flex",alignItems:"center",backgroundColor:"white",border:"1px solid #d1d5db",borderRadius:"9999px",padding:"0.5rem 0.75rem",boxShadow:"0 1px 3px rgba(0,0,0,0.1)",width:"95%",height:"56px"},children:[re.jsx("button",{style:{color:"#6b7280",background:"none",border:"none",margin:"0 0.5rem",cursor:"pointer",padding:"0"},onClick:()=>A.current?.click(),children:c?re.jsxs("div",{style:{position:"relative"},children:[re.jsx("img",{src:URL.createObjectURL(c),alt:y("chatInput.image.selectedAlt"),style:{width:"2rem",height:"2rem",borderRadius:"9999px",objectFit:"cover",padding:"0"}}),re.jsx(c0,{style:{position:"absolute",top:"-0.5rem",right:"-0.5rem",fontSize:"14px",color:"#ef4444",background:"white",borderRadius:"9999px",cursor:"pointer"},onClick:q=>{q.stopPropagation(),$()}})]}):re.jsx(m4,{style:{fontSize:"20px"}})}),re.jsx("input",{disabled:p,type:"file",accept:"image/*",ref:A,onChange:j,style:{display:"none",padding:"0"}}),re.jsx(Nd,{title:S?"Stop Recording":"Send Audio",children:re.jsx("button",{onClick:V,style:{color:S?"#ef4444":"#6b7280",background:"none",border:"none",margin:"0 0.5rem",cursor:"pointer",padding:"0"},children:S?re.jsx(g4,{style:{fontSize:"20px"}}):re.jsx(c4,{style:{fontSize:"20px"}})})}),re.jsx("div",{style:{flex:1,margin:"0 0.5rem",minWidth:0,maxWidth:"100%",display:"flex",alignItems:"center"},children:m?re.jsxs("div",{style:{display:"flex",alignItems:"center",width:"100%",backgroundColor:"#f3f4f6",padding:"0.5rem 1rem",borderRadius:"0.5rem"},children:[re.jsx("button",{style:{background:"none",border:"none",marginRight:"0.75rem",color:"#7f28f8",cursor:"pointer",padding:"0"},onClick:H,children:T?re.jsx(GT,{style:{fontSize:"24px"}}):re.jsx(qT,{style:{fontSize:"24px"}})}),re.jsx("div",{ref:_,style:{width:"100%",height:"2rem"}}),re.jsx(c0,{style:{fontSize:"18px",color:"#ef4444",marginLeft:"0.75rem",cursor:"pointer"},onClick:P})]}):S?re.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"#f3f4f6",padding:"0.5rem 1rem",borderRadius:"0.5rem",animation:"pulse 2s infinite"},children:re.jsx("span",{children:"Recording"})}):re.jsx(Xu,{type:"text",value:e,onChange:q=>t(q.target.value),placeholder:"Message...",style:{width:"100%",border:"none",fontSize:"16px",margin:0,lineHeight:1.5,color:"#374151",padding:"0"},onKeyDown:q=>{q.key==="Enter"&&(q.preventDefault(),c?(r(c,e),$(),t("")):e.trim()&&(a(),t("")))}})}),re.jsx("button",{disabled:p,onClick:()=>{const q=!!c,Y=!!e.trim();q?(r(c,e),$(),t("")):!!m?(l(m),P()):Y&&a()},"aria-label":y("chatInput.send"),style:{color:"#6b7280",background:"none",border:"none",margin:"0 0.5rem",cursor:"pointer",padding:"0"},children:re.jsx(p4,{style:{fontSize:"20px"}})})]})};function XZ({suggestions:e,colorCode:t,sendMessageSuggestion:a}){return re.jsx("div",{style:{overflowX:"auto",overflowY:"hidden",whiteSpace:"nowrap",paddingTop:"4px",paddingBottom:"8px",width:"100%",boxSizing:"border-box",marginLeft:"4%",marginTop:"4px",marginBottom:"4px"},children:re.jsx("div",{style:{display:"inline-flex",gap:"0.5rem"},children:e?.map((r,l)=>re.jsx("button",{onClick:()=>a(r),style:{whiteSpace:"nowrap",padding:"0.5rem 1rem",border:`1px solid ${t}`,borderRadius:"9999px",backgroundColor:"white",cursor:"pointer",fontSize:"14px",color:t,flexShrink:0},onMouseEnter:c=>{c.currentTarget.style.backgroundColor="#f3f3f3"},onMouseLeave:c=>{c.currentTarget.style.backgroundColor="white"},children:r},l))})})}function WZ(){return re.jsxs("div",{className:"jawebcss-powered-container",children:[re.jsx("span",{className:"jawebcss-powered-label",children:"Powered by"}),re.jsx("a",{href:"https://jaweb.me/",target:"_blank",className:"jawebcss-powered-link",rel:"noopener noreferrer",children:"Jaweb"})]})}const ZZ=()=>re.jsxs("div",{className:"typing-animation",children:[re.jsx("span",{children:"."}),re.jsx("span",{children:"."}),re.jsx("span",{children:"."})]}),KZ=({message:e,colorCode:t,handleAddToCart:a,handleRemoveFromCart:r})=>{const[l,c]=C.useState({}),[f,m]=C.useState({}),g=T=>{const O=/(https?:\/\/[^\s]+)/g;return T?.split(O).map((M,A)=>O.test(M)?re.jsx("a",{href:M.trim(),style:{color:"#00b3bc"},target:"_blank",rel:"noopener noreferrer",className:"underline break-words",children:M},A):re.jsx("span",{children:M},A))},p=T=>{const O=T.trim();if(!O.includes("Name:")||!O.includes("VariantId"))return null;const M=O.match(/Name\s*[:\-]\s*(.+)/i),A=O.match(/Price\s*[:\-]\s*(.+)/i),D=O.match(/Link\s*[:\-]\s*(https?:\/\/[^\s]+)/i),_=O.match(/VariantId\s*[:\-]\s*(.+)/i),z=O.match(/variant_tag_name\s*[:\-]\s*(.+)/i),j=O.match(/^color\s*[:\-]\s*([^\r\n]*)$/im),$=O.match(/^size\s*[:\-]\s*([^\r\n]*)$/im);return!M||!A||!D||!_||!z?null:{name:M[1].trim(),price:A[1].trim(),link:D[1].trim(),image:"",variant_id:_[1].trim(),variant_tag_name:z[1].trim(),color:j?.[1]?.trim(),size:$?.[1]?.trim()}},y=C.useMemo(()=>{const T=e.split("|||").map(A=>A.trim()).filter(Boolean),O=[];let M=null;for(const A of T)if(A.startsWith("img - ")){const D=A.replace(/^img\s*[-:]\s*/,"").trim();if(M)M.image=D;else{const _=[...O].reverse().find(z=>z.type==="product");_&&(_.data.image=D)}}else if(A.includes("Name:")&&A.includes("VariantId")){const D=p(A);D&&(O.push({type:"product",data:D}),M=D)}else O.push({type:"text",data:A}),M=null;return O},[e]),S=C.useMemo(()=>{const T={};for(const O of y)if(O.type==="product"){const M=O.data;T[M.variant_tag_name]||(T[M.variant_tag_name]=[]),T[M.variant_tag_name].push(M)}return T},[y]),E=(T,O=22)=>T.length>O?T.slice(0,O)+"...":T;return re.jsx("div",{className:"space-y-6 mt-4",children:(()=>{const T=new Set;return y.map((O,M)=>{if(O.type==="text")return re.jsx("p",{className:"whitespace-pre-wrap break-words",children:g(O.data)},M);if(O.type==="product"){const D=O.data.variant_tag_name;if(T.has(D))return null;T.add(D);const _=S[D],z=f[D]||_[0].variant_id,j=_.find(G=>G.variant_id===z)||_[0],$=l[j.variant_id]||0,V=Array.from(new Set(_.map(G=>G.color?.trim()).filter(G=>G&&G.toLowerCase()!=="none"))),H=Array.from(new Set(_.map(G=>G.size?.trim()).filter(G=>G&&G.toLowerCase()!=="none"))),P=(G,K)=>_.some(J=>J.color===G&&J.size===K),q=(G,K)=>{const J=_.find(ie=>(!G||ie.color===G)&&(!K||ie.size===K));J&&m(ie=>({...ie,[D]:J.variant_id}))},Y=async()=>{const G=$+1;c(K=>({...K,[j.variant_id]:G})),await a(j.variant_id,j.name,1)},te=async()=>{if($===0)return;const G=$-1;c(K=>({...K,[j.variant_id]:G})),await r(j.variant_id,1)};return re.jsxs("div",{className:"product-card",children:[re.jsx("div",{className:"product-image-container",children:re.jsx("img",{src:j.image,alt:j.name,className:"product-image",onClick:()=>window.open(j.link,"_blank")})}),re.jsxs("div",{className:"product-details",children:[re.jsx("a",{href:j.link,target:"_blank",rel:"noopener noreferrer",className:"product-name",children:E(j.name)}),re.jsx("p",{className:"product-price",children:j.price}),V.length>0&&re.jsxs("div",{children:[re.jsx("p",{className:"label",children:"Color:"}),re.jsx("div",{className:"color-options",children:V.map(G=>{const K=!P(G,j.size),J=G===j.color;return re.jsx("button",{disabled:K,onClick:()=>q(G,j.size),className:`color-button ${J?"active":""} ${K?"disabled":""}`,style:J?{backgroundColor:t,color:"white"}:{},children:G==="None"?"One Color":G},G)})})]}),H.length>0&&re.jsxs("div",{children:[re.jsx("p",{className:"label",children:"Size:"}),re.jsx("div",{className:"size-options",children:H.map(G=>{const K=!P(j.color,G),J=G===j.size;return re.jsx("button",{disabled:K,onClick:()=>q(j.color,G),className:`size-button ${J?"active":""} ${K?"disabled":""}`,style:J?{backgroundColor:t,color:"white"}:{},children:G==="None"?"One size":G},G)})})]}),re.jsxs("div",{className:"cart-controls",children:[re.jsx("button",{onClick:te,className:"cart-button",children:"–"}),re.jsx("span",{className:"cart-count",children:$}),re.jsx("button",{onClick:Y,className:"cart-button increment",style:{backgroundColor:t,color:"#fff"},children:"+"})]})]})]},M)}return null})})()})},H6=({message:e})=>{const t=e.find(r=>r.type==="image_url")?.image_url?.url,a=e?.isBusiness;return re.jsx("div",{children:re.jsx("div",{children:t&&re.jsx("div",{className:"mb-2 bg-transparent text-white ",children:re.jsx("img",{src:t,alt:"Chat image",style:{width:200},className:`rounded-md bg-transparent mt-2 max-w-xs ${a?"border border-gray-300 shadow-sm":""}`})})})})},QZ=({message:e,colorCode:t})=>{const a=e.find(l=>l.type==="text")?.text,r=l=>{const c=/(https?:\/\/[^\s]+)/g;return l.split(c).map((f,m)=>c.test(f)?re.jsx("a",{href:f.trim(),style:{color:t},target:"_blank",rel:"noopener noreferrer",className:"underline break-words",children:f},m):re.jsx("span",{children:f},m))};return re.jsx(re.Fragment,{children:a&&re.jsx("div",{style:{color:"white",border:1,backgroundColor:t,paddingTop:10,paddingBottom:10,paddingInline:14,maxWidth:"85%",lineHeight:1.4,borderRadius:"16px",wordBreak:"break-word"},children:re.jsx("p",{children:r(a)})})})},JZ=({link:e,colorCode:t,transcription:a})=>{const r=C.useRef(null),l=C.useRef(null),[c,f]=C.useState(!1),[m,g]=C.useState(!1);C.useEffect(()=>{if(r.current)return l.current?.destroy(),l.current=Wm.create({container:r.current,waveColor:"white",progressColor:"white",cursorWidth:0,barWidth:3,barHeight:1.5,barGap:2,height:40,interact:!0}),l.current.load(e),l.current.on("finish",()=>f(!1)),()=>{l.current?.destroy()}},[e,t]);const p=()=>{l.current&&(l.current.playPause(),f(y=>!y))};return re.jsxs("div",{style:{backgroundColor:t,padding:"12px",borderRadius:"20px",color:"white",maxWidth:"350px",marginBottom:"16px"},children:[re.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[re.jsx("button",{onClick:p,style:{background:"transparent",border:"none",color:"white",marginRight:"12px",cursor:"pointer"},children:c?re.jsx(GT,{style:{fontSize:"24px"}}):re.jsx(qT,{style:{fontSize:"24px"}})}),re.jsx("div",{ref:r,style:{width:"130px",height:"40px",overflow:"hidden",color:"white"}})]}),a&&re.jsxs("div",{style:{marginTop:"12px",fontSize:"14px",color:"rgba(255,255,255,0.85)"},children:[re.jsx("button",{onClick:()=>g(!m),style:{background:"none",border:"none",color:"white",textDecoration:"underline",fontSize:"13px",cursor:"pointer",padding:0},children:m?"Hide transcript":"Show transcript"}),m&&re.jsx("p",{style:{marginTop:"6px",lineHeight:"1.4"},children:a})]})]})},eK=({status:e,user:t})=>{if(!e||!t)return null;let a=`${t} is ${e}`;return e==="typing"?a=`${t} is typing...`:a="",re.jsx(re.Fragment,{children:a&&re.jsx("div",{className:"flex justify-center mb-2",children:re.jsx("span",{className:"px-3 py-1 bg-gray-100 text-gray-500 text-sm rounded-full",children:a})})})},tK=({message:e,colorCode:t})=>{const a=l=>{const c=/(https?:\/\/[^\s]+)/g;return l?.split(c).map((f,m)=>c.test(f)?re.jsx("a",{href:f.trim(),style:{color:t},target:"_blank",rel:"noopener noreferrer",className:"underline break-words",children:f},m):re.jsx("span",{children:f},m))};if(e?.startsWith("Add this to cart for me")&&e?.includes("name:")){const c=e?.match(/name:([^,]+)/i)?.[1]?.trim()||"Product";return re.jsxs("div",{style:{backgroundColor:"#E8F5E9",border:"1px solid #C8E6C9",borderRadius:"12px",padding:"12px 16px",color:"#2E7D32",fontWeight:500,fontSize:"15px",maxWidth:"360px",margin:"0 auto",textAlign:"center"},children:["✅ ",re.jsx("strong",{children:c})," has been added to your cart."]})}return re.jsx("p",{children:a(e)})},wO=C.createContext({});function TO(e){const t=C.useRef(null);return t.current===null&&(t.current=e()),t.current}const OO=typeof window<"u",B6=OO?C.useLayoutEffect:C.useEffect,nC=C.createContext(null);function RO(e,t){e.indexOf(t)===-1&&e.push(t)}function AO(e,t){const a=e.indexOf(t);a>-1&&e.splice(a,1)}const Wu=(e,t,a)=>a>t?t:a<e?e:a;function MO(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}var nK={};let Zm=()=>{},Zu=()=>{};nK.NODE_ENV!=="production"&&(Zm=(e,t,a)=>{!e&&typeof console<"u"&&console.warn(MO(t,a))},Zu=(e,t,a)=>{if(!e)throw new Error(MO(t,a))});const Ku={},P6=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function U6(e){return typeof e=="object"&&e!==null}const I6=e=>/^0[^.\s]+$/u.test(e);function _O(e){let t;return()=>(t===void 0&&(t=e()),t)}const bl=e=>e,aK=(e,t)=>a=>t(e(a)),S0=(...e)=>e.reduce(aK),C0=(e,t,a)=>{const r=t-e;return r===0?1:(a-e)/r};class DO{constructor(){this.subscriptions=[]}add(t){return RO(this.subscriptions,t),()=>AO(this.subscriptions,t)}notify(t,a,r){const l=this.subscriptions.length;if(l)if(l===1)this.subscriptions[0](t,a,r);else for(let c=0;c<l;c++){const f=this.subscriptions[c];f&&f(t,a,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const is=e=>e*1e3,Qs=e=>e/1e3;function F6(e,t){return t?e*(1e3/t):0}const k6=new Set;function NO(e,t,a){e||k6.has(t)||(console.warn(MO(t,a)),k6.add(t))}const G6=(e,t,a)=>(((1-3*a+3*t)*e+(3*a-6*t))*e+3*t)*e,rK=1e-7,iK=12;function oK(e,t,a,r,l){let c,f,m=0;do f=t+(a-t)/2,c=G6(f,r,l)-e,c>0?a=f:t=f;while(Math.abs(c)>rK&&++m<iK);return f}function x0(e,t,a,r){if(e===t&&a===r)return bl;const l=c=>oK(c,0,1,e,a);return c=>c===0||c===1?c:G6(l(c),t,r)}const q6=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Y6=e=>t=>1-e(1-t),X6=x0(.33,1.53,.69,.99),$O=Y6(X6),W6=q6($O),Z6=e=>(e*=2)<1?.5*$O(e):.5*(2-Math.pow(2,-10*(e-1))),zO=e=>1-Math.sin(Math.acos(e)),K6=Y6(zO),Q6=q6(zO),lK=x0(.42,0,1,1),sK=x0(0,0,.58,1),J6=x0(.42,0,.58,1),uK=e=>Array.isArray(e)&&typeof e[0]!="number",ez=e=>Array.isArray(e)&&typeof e[0]=="number",tz={linear:bl,easeIn:lK,easeInOut:J6,easeOut:sK,circIn:zO,circInOut:Q6,circOut:K6,backIn:$O,backInOut:W6,backOut:X6,anticipate:Z6},cK=e=>typeof e=="string",nz=e=>{if(ez(e)){Zu(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,a,r,l]=e;return x0(t,a,r,l)}else if(cK(e))return Zu(tz[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),tz[e];return e},aC=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function fK(e,t){let a=new Set,r=new Set,l=!1,c=!1;const f=new WeakSet;let m={delta:0,timestamp:0,isProcessing:!1};function g(y){f.has(y)&&(p.schedule(y),e()),y(m)}const p={schedule:(y,S=!1,E=!1)=>{const O=E&&l?a:r;return S&&f.add(y),O.has(y)||O.add(y),y},cancel:y=>{r.delete(y),f.delete(y)},process:y=>{if(m=y,l){c=!0;return}l=!0,[a,r]=[r,a],a.forEach(g),a.clear(),l=!1,c&&(c=!1,p.process(y))}};return p}const dK=40;function az(e,t){let a=!1,r=!0;const l={delta:0,timestamp:0,isProcessing:!1},c=()=>a=!0,f=aC.reduce((z,j)=>(z[j]=fK(c),z),{}),{setup:m,read:g,resolveKeyframes:p,preUpdate:y,update:S,preRender:E,render:T,postRender:O}=f,M=()=>{const z=Ku.useManualTiming?l.timestamp:performance.now();a=!1,Ku.useManualTiming||(l.delta=r?1e3/60:Math.max(Math.min(z-l.timestamp,dK),1)),l.timestamp=z,l.isProcessing=!0,m.process(l),g.process(l),p.process(l),y.process(l),S.process(l),E.process(l),T.process(l),O.process(l),l.isProcessing=!1,a&&t&&(r=!1,e(M))},A=()=>{a=!0,r=!0,l.isProcessing||e(M)};return{schedule:aC.reduce((z,j)=>{const $=f[j];return z[j]=(V,H=!1,P=!1)=>(a||A(),$.schedule(V,H,P)),z},{}),cancel:z=>{for(let j=0;j<aC.length;j++)f[aC[j]].cancel(z)},state:l,steps:f}}const{schedule:Pa,cancel:af,state:ii,steps:jO}=az(typeof requestAnimationFrame<"u"?requestAnimationFrame:bl,!0);let rC;function hK(){rC=void 0}const vo={now:()=>(rC===void 0&&vo.set(ii.isProcessing||Ku.useManualTiming?ii.timestamp:performance.now()),rC),set:e=>{rC=e,queueMicrotask(hK)}},rz=e=>t=>typeof t=="string"&&t.startsWith(e),LO=rz("--"),mK=rz("var(--"),VO=e=>mK(e)?pK.test(e.split("/*")[0].trim()):!1,pK=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Km={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},E0={...Km,transform:e=>Wu(0,1,e)},iC={...Km,default:1},w0=e=>Math.round(e*1e5)/1e5,HO=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function gK(e){return e==null}const vK=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,BO=(e,t)=>a=>!!(typeof a=="string"&&vK.test(a)&&a.startsWith(e)||t&&!gK(a)&&Object.prototype.hasOwnProperty.call(a,t)),iz=(e,t,a)=>r=>{if(typeof r!="string")return r;const[l,c,f,m]=r.match(HO);return{[e]:parseFloat(l),[t]:parseFloat(c),[a]:parseFloat(f),alpha:m!==void 0?parseFloat(m):1}},yK=e=>Wu(0,255,e),PO={...Km,transform:e=>Math.round(yK(e))},Hd={test:BO("rgb","red"),parse:iz("red","green","blue"),transform:({red:e,green:t,blue:a,alpha:r=1})=>"rgba("+PO.transform(e)+", "+PO.transform(t)+", "+PO.transform(a)+", "+w0(E0.transform(r))+")"};function bK(e){let t="",a="",r="",l="";return e.length>5?(t=e.substring(1,3),a=e.substring(3,5),r=e.substring(5,7),l=e.substring(7,9)):(t=e.substring(1,2),a=e.substring(2,3),r=e.substring(3,4),l=e.substring(4,5),t+=t,a+=a,r+=r,l+=l),{red:parseInt(t,16),green:parseInt(a,16),blue:parseInt(r,16),alpha:l?parseInt(l,16)/255:1}}const UO={test:BO("#"),parse:bK,transform:Hd.transform},T0=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),rf=T0("deg"),Js=T0("%"),on=T0("px"),SK=T0("vh"),CK=T0("vw"),oz={...Js,parse:e=>Js.parse(e)/100,transform:e=>Js.transform(e*100)},Qm={test:BO("hsl","hue"),parse:iz("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:a,alpha:r=1})=>"hsla("+Math.round(e)+", "+Js.transform(w0(t))+", "+Js.transform(w0(a))+", "+w0(E0.transform(r))+")"},Cr={test:e=>Hd.test(e)||UO.test(e)||Qm.test(e),parse:e=>Hd.test(e)?Hd.parse(e):Qm.test(e)?Qm.parse(e):UO.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Hd.transform(e):Qm.transform(e),getAnimatableNone:e=>{const t=Cr.parse(e);return t.alpha=0,Cr.transform(t)}},xK=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function EK(e){return isNaN(e)&&typeof e=="string"&&(e.match(HO)?.length||0)+(e.match(xK)?.length||0)>0}const lz="number",sz="color",wK="var",TK="var(",uz="${}",OK=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function O0(e){const t=e.toString(),a=[],r={color:[],number:[],var:[]},l=[];let c=0;const m=t.replace(OK,g=>(Cr.test(g)?(r.color.push(c),l.push(sz),a.push(Cr.parse(g))):g.startsWith(TK)?(r.var.push(c),l.push(wK),a.push(g)):(r.number.push(c),l.push(lz),a.push(parseFloat(g))),++c,uz)).split(uz);return{values:a,split:m,indexes:r,types:l}}function cz(e){return O0(e).values}function fz(e){const{split:t,types:a}=O0(e),r=t.length;return l=>{let c="";for(let f=0;f<r;f++)if(c+=t[f],l[f]!==void 0){const m=a[f];m===lz?c+=w0(l[f]):m===sz?c+=Cr.transform(l[f]):c+=l[f]}return c}}const RK=e=>typeof e=="number"?0:Cr.test(e)?Cr.getAnimatableNone(e):e;function AK(e){const t=cz(e);return fz(e)(t.map(RK))}const of={test:EK,parse:cz,createTransformer:fz,getAnimatableNone:AK};function IO(e,t,a){return a<0&&(a+=1),a>1&&(a-=1),a<1/6?e+(t-e)*6*a:a<1/2?t:a<2/3?e+(t-e)*(2/3-a)*6:e}function MK({hue:e,saturation:t,lightness:a,alpha:r}){e/=360,t/=100,a/=100;let l=0,c=0,f=0;if(!t)l=c=f=a;else{const m=a<.5?a*(1+t):a+t-a*t,g=2*a-m;l=IO(g,m,e+1/3),c=IO(g,m,e),f=IO(g,m,e-1/3)}return{red:Math.round(l*255),green:Math.round(c*255),blue:Math.round(f*255),alpha:r}}function oC(e,t){return a=>a>0?t:e}const Za=(e,t,a)=>e+(t-e)*a,FO=(e,t,a)=>{const r=e*e,l=a*(t*t-r)+r;return l<0?0:Math.sqrt(l)},_K=[UO,Hd,Qm],DK=e=>_K.find(t=>t.test(e));function dz(e){const t=DK(e);if(Zm(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let a=t.parse(e);return t===Qm&&(a=MK(a)),a}const hz=(e,t)=>{const a=dz(e),r=dz(t);if(!a||!r)return oC(e,t);const l={...a};return c=>(l.red=FO(a.red,r.red,c),l.green=FO(a.green,r.green,c),l.blue=FO(a.blue,r.blue,c),l.alpha=Za(a.alpha,r.alpha,c),Hd.transform(l))},kO=new Set(["none","hidden"]);function NK(e,t){return kO.has(e)?a=>a<=0?e:t:a=>a>=1?t:e}function $K(e,t){return a=>Za(e,t,a)}function GO(e){return typeof e=="number"?$K:typeof e=="string"?VO(e)?oC:Cr.test(e)?hz:LK:Array.isArray(e)?mz:typeof e=="object"?Cr.test(e)?hz:zK:oC}function mz(e,t){const a=[...e],r=a.length,l=e.map((c,f)=>GO(c)(c,t[f]));return c=>{for(let f=0;f<r;f++)a[f]=l[f](c);return a}}function zK(e,t){const a={...e,...t},r={};for(const l in a)e[l]!==void 0&&t[l]!==void 0&&(r[l]=GO(e[l])(e[l],t[l]));return l=>{for(const c in r)a[c]=r[c](l);return a}}function jK(e,t){const a=[],r={color:0,var:0,number:0};for(let l=0;l<t.values.length;l++){const c=t.types[l],f=e.indexes[c][r[c]],m=e.values[f]??0;a[l]=m,r[c]++}return a}const LK=(e,t)=>{const a=of.createTransformer(t),r=O0(e),l=O0(t);return r.indexes.var.length===l.indexes.var.length&&r.indexes.color.length===l.indexes.color.length&&r.indexes.number.length>=l.indexes.number.length?kO.has(e)&&!l.values.length||kO.has(t)&&!r.values.length?NK(e,t):S0(mz(jK(r,l),l.values),a):(Zm(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),oC(e,t))};function pz(e,t,a){return typeof e=="number"&&typeof t=="number"&&typeof a=="number"?Za(e,t,a):GO(e)(e,t)}const VK=e=>{const t=({timestamp:a})=>e(a);return{start:(a=!0)=>Pa.update(t,a),stop:()=>af(t),now:()=>ii.isProcessing?ii.timestamp:vo.now()}},gz=(e,t,a=10)=>{let r="";const l=Math.max(Math.round(t/a),2);for(let c=0;c<l;c++)r+=Math.round(e(c/(l-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},lC=2e4;function qO(e){let t=0;const a=50;let r=e.next(t);for(;!r.done&&t<lC;)t+=a,r=e.next(t);return t>=lC?1/0:t}function HK(e,t=100,a){const r=a({...e,keyframes:[0,t]}),l=Math.min(qO(r),lC);return{type:"keyframes",ease:c=>r.next(l*c).value/t,duration:Qs(l)}}const BK=5;function vz(e,t,a){const r=Math.max(t-BK,0);return F6(a-e(r),t-r)}const Ka={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},YO=.001;function PK({duration:e=Ka.duration,bounce:t=Ka.bounce,velocity:a=Ka.velocity,mass:r=Ka.mass}){let l,c;Zm(e<=is(Ka.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let f=1-t;f=Wu(Ka.minDamping,Ka.maxDamping,f),e=Wu(Ka.minDuration,Ka.maxDuration,Qs(e)),f<1?(l=p=>{const y=p*f,S=y*e,E=y-a,T=XO(p,f),O=Math.exp(-S);return YO-E/T*O},c=p=>{const S=p*f*e,E=S*a+a,T=Math.pow(f,2)*Math.pow(p,2)*e,O=Math.exp(-S),M=XO(Math.pow(p,2),f);return(-l(p)+YO>0?-1:1)*((E-T)*O)/M}):(l=p=>{const y=Math.exp(-p*e),S=(p-a)*e+1;return-YO+y*S},c=p=>{const y=Math.exp(-p*e),S=(a-p)*(e*e);return y*S});const m=5/e,g=IK(l,c,m);if(e=is(e),isNaN(g))return{stiffness:Ka.stiffness,damping:Ka.damping,duration:e};{const p=Math.pow(g,2)*r;return{stiffness:p,damping:f*2*Math.sqrt(r*p),duration:e}}}const UK=12;function IK(e,t,a){let r=a;for(let l=1;l<UK;l++)r=r-e(r)/t(r);return r}function XO(e,t){return e*Math.sqrt(1-t*t)}const FK=["duration","bounce"],kK=["stiffness","damping","mass"];function yz(e,t){return t.some(a=>e[a]!==void 0)}function GK(e){let t={velocity:Ka.velocity,stiffness:Ka.stiffness,damping:Ka.damping,mass:Ka.mass,isResolvedFromDuration:!1,...e};if(!yz(e,kK)&&yz(e,FK))if(e.visualDuration){const a=e.visualDuration,r=2*Math.PI/(a*1.2),l=r*r,c=2*Wu(.05,1,1-(e.bounce||0))*Math.sqrt(l);t={...t,mass:Ka.mass,stiffness:l,damping:c}}else{const a=PK(e);t={...t,...a,mass:Ka.mass},t.isResolvedFromDuration=!0}return t}function sC(e=Ka.visualDuration,t=Ka.bounce){const a=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:l}=a;const c=a.keyframes[0],f=a.keyframes[a.keyframes.length-1],m={done:!1,value:c},{stiffness:g,damping:p,mass:y,duration:S,velocity:E,isResolvedFromDuration:T}=GK({...a,velocity:-Qs(a.velocity||0)}),O=E||0,M=p/(2*Math.sqrt(g*y)),A=f-c,D=Qs(Math.sqrt(g/y)),_=Math.abs(A)<5;r||(r=_?Ka.restSpeed.granular:Ka.restSpeed.default),l||(l=_?Ka.restDelta.granular:Ka.restDelta.default);let z;if(M<1){const $=XO(D,M);z=V=>{const H=Math.exp(-M*D*V);return f-H*((O+M*D*A)/$*Math.sin($*V)+A*Math.cos($*V))}}else if(M===1)z=$=>f-Math.exp(-D*$)*(A+(O+D*A)*$);else{const $=D*Math.sqrt(M*M-1);z=V=>{const H=Math.exp(-M*D*V),P=Math.min($*V,300);return f-H*((O+M*D*A)*Math.sinh(P)+$*A*Math.cosh(P))/$}}const j={calculatedDuration:T&&S||null,next:$=>{const V=z($);if(T)m.done=$>=S;else{let H=$===0?O:0;M<1&&(H=$===0?is(O):vz(z,$,V));const P=Math.abs(H)<=r,q=Math.abs(f-V)<=l;m.done=P&&q}return m.value=m.done?f:V,m},toString:()=>{const $=Math.min(qO(j),lC),V=gz(H=>j.next($*H).value,$,30);return $+"ms "+V},toTransition:()=>{}};return j}sC.applyToOptions=e=>{const t=HK(e,100,sC);return e.ease=t.ease,e.duration=is(t.duration),e.type="keyframes",e};function WO({keyframes:e,velocity:t=0,power:a=.8,timeConstant:r=325,bounceDamping:l=10,bounceStiffness:c=500,modifyTarget:f,min:m,max:g,restDelta:p=.5,restSpeed:y}){const S=e[0],E={done:!1,value:S},T=P=>m!==void 0&&P<m||g!==void 0&&P>g,O=P=>m===void 0?g:g===void 0||Math.abs(m-P)<Math.abs(g-P)?m:g;let M=a*t;const A=S+M,D=f===void 0?A:f(A);D!==A&&(M=D-S);const _=P=>-M*Math.exp(-P/r),z=P=>D+_(P),j=P=>{const q=_(P),Y=z(P);E.done=Math.abs(q)<=p,E.value=E.done?D:Y};let $,V;const H=P=>{T(E.value)&&($=P,V=sC({keyframes:[E.value,O(E.value)],velocity:vz(z,P,E.value),damping:l,stiffness:c,restDelta:p,restSpeed:y}))};return H(0),{calculatedDuration:null,next:P=>{let q=!1;return!V&&$===void 0&&(q=!0,j(P),H(P)),$!==void 0&&P>=$?V.next(P-$):(!q&&j(P),E)}}}function qK(e,t,a){const r=[],l=a||Ku.mix||pz,c=e.length-1;for(let f=0;f<c;f++){let m=l(e[f],e[f+1]);if(t){const g=Array.isArray(t)?t[f]||bl:t;m=S0(g,m)}r.push(m)}return r}function YK(e,t,{clamp:a=!0,ease:r,mixer:l}={}){const c=e.length;if(Zu(c===t.length,"Both input and output ranges must be the same length","range-length"),c===1)return()=>t[0];if(c===2&&t[0]===t[1])return()=>t[1];const f=e[0]===e[1];e[0]>e[c-1]&&(e=[...e].reverse(),t=[...t].reverse());const m=qK(t,r,l),g=m.length,p=y=>{if(f&&y<e[0])return t[0];let S=0;if(g>1)for(;S<e.length-2&&!(y<e[S+1]);S++);const E=C0(e[S],e[S+1],y);return m[S](E)};return a?y=>p(Wu(e[0],e[c-1],y)):p}function XK(e,t){const a=e[e.length-1];for(let r=1;r<=t;r++){const l=C0(0,t,r);e.push(Za(a,1,l))}}function WK(e){const t=[0];return XK(t,e.length-1),t}function ZK(e,t){return e.map(a=>a*t)}function KK(e,t){return e.map(()=>t||J6).splice(0,e.length-1)}function Jm({duration:e=300,keyframes:t,times:a,ease:r="easeInOut"}){const l=uK(r)?r.map(nz):nz(r),c={done:!1,value:t[0]},f=ZK(a&&a.length===t.length?a:WK(t),e),m=YK(f,t,{ease:Array.isArray(l)?l:KK(t,l)});return{calculatedDuration:e,next:g=>(c.value=m(g),c.done=g>=e,c)}}const QK=e=>e!==null;function ZO(e,{repeat:t,repeatType:a="loop"},r,l=1){const c=e.filter(QK),m=l<0||t&&a!=="loop"&&t%2===1?0:c.length-1;return!m||r===void 0?c[m]:r}const JK={decay:WO,inertia:WO,tween:Jm,keyframes:Jm,spring:sC};function bz(e){typeof e.type=="string"&&(e.type=JK[e.type])}class KO{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,a){return this.finished.then(t,a)}}var eQ={};const tQ=e=>e/100;class QO extends KO{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:a}=this.options;a&&a.updatedAt!==vo.now()&&this.tick(vo.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;bz(t);const{type:a=Jm,repeat:r=0,repeatDelay:l=0,repeatType:c,velocity:f=0}=t;let{keyframes:m}=t;const g=a||Jm;eQ.NODE_ENV!=="production"&&g!==Jm&&Zu(m.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${m}`,"spring-two-frames"),g!==Jm&&typeof m[0]!="number"&&(this.mixKeyframes=S0(tQ,pz(m[0],m[1])),m=[0,100]);const p=g({...t,keyframes:m});c==="mirror"&&(this.mirroredGenerator=g({...t,keyframes:[...m].reverse(),velocity:-f})),p.calculatedDuration===null&&(p.calculatedDuration=qO(p));const{calculatedDuration:y}=p;this.calculatedDuration=y,this.resolvedDuration=y+l,this.totalDuration=this.resolvedDuration*(r+1)-l,this.generator=p}updateTime(t){const a=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=a}tick(t,a=!1){const{generator:r,totalDuration:l,mixKeyframes:c,mirroredGenerator:f,resolvedDuration:m,calculatedDuration:g}=this;if(this.startTime===null)return r.next(0);const{delay:p=0,keyframes:y,repeat:S,repeatType:E,repeatDelay:T,type:O,onUpdate:M,finalKeyframe:A}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-l/this.speed,this.startTime)),a?this.currentTime=t:this.updateTime(t);const D=this.currentTime-p*(this.playbackSpeed>=0?1:-1),_=this.playbackSpeed>=0?D<0:D>l;this.currentTime=Math.max(D,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=l);let z=this.currentTime,j=r;if(S){const P=Math.min(this.currentTime,l)/m;let q=Math.floor(P),Y=P%1;!Y&&P>=1&&(Y=1),Y===1&&q--,q=Math.min(q,S+1),!!(q%2)&&(E==="reverse"?(Y=1-Y,T&&(Y-=T/m)):E==="mirror"&&(j=f)),z=Wu(0,1,Y)*m}const $=_?{done:!1,value:y[0]}:j.next(z);c&&($.value=c($.value));let{done:V}=$;!_&&g!==null&&(V=this.playbackSpeed>=0?this.currentTime>=l:this.currentTime<=0);const H=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&V);return H&&O!==WO&&($.value=ZO(y,this.options,A,this.speed)),M&&M($.value),H&&this.finish(),$}then(t,a){return this.finished.then(t,a)}get duration(){return Qs(this.calculatedDuration)}get time(){return Qs(this.currentTime)}set time(t){t=is(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(vo.now());const a=this.playbackSpeed!==t;this.playbackSpeed=t,a&&(this.time=Qs(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=VK,startTime:a}=this.options;this.driver||(this.driver=t(l=>this.tick(l))),this.options.onPlay?.();const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=a??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(vo.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function nQ(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Bd=e=>e*180/Math.PI,JO=e=>{const t=Bd(Math.atan2(e[1],e[0]));return eR(t)},aQ={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:JO,rotateZ:JO,skewX:e=>Bd(Math.atan(e[1])),skewY:e=>Bd(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},eR=e=>(e=e%360,e<0&&(e+=360),e),Sz=JO,Cz=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),xz=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),rQ={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Cz,scaleY:xz,scale:e=>(Cz(e)+xz(e))/2,rotateX:e=>eR(Bd(Math.atan2(e[6],e[5]))),rotateY:e=>eR(Bd(Math.atan2(-e[2],e[0]))),rotateZ:Sz,rotate:Sz,skewX:e=>Bd(Math.atan(e[4])),skewY:e=>Bd(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function tR(e){return e.includes("scale")?1:0}function nR(e,t){if(!e||e==="none")return tR(t);const a=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,l;if(a)r=rQ,l=a;else{const m=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=aQ,l=m}if(!l)return tR(t);const c=r[t],f=l[1].split(",").map(oQ);return typeof c=="function"?c(f):f[c]}const iQ=(e,t)=>{const{transform:a="none"}=getComputedStyle(e);return nR(a,t)};function oQ(e){return parseFloat(e.trim())}const ep=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],tp=new Set(ep),Ez=e=>e===Km||e===on,lQ=new Set(["x","y","z"]),sQ=ep.filter(e=>!lQ.has(e));function uQ(e){const t=[];return sQ.forEach(a=>{const r=e.getValue(a);r!==void 0&&(t.push([a,r.get()]),r.set(a.startsWith("scale")?1:0))}),t}const Pd={width:({x:e},{paddingLeft:t="0",paddingRight:a="0"})=>e.max-e.min-parseFloat(t)-parseFloat(a),height:({y:e},{paddingTop:t="0",paddingBottom:a="0"})=>e.max-e.min-parseFloat(t)-parseFloat(a),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>nR(t,"x"),y:(e,{transform:t})=>nR(t,"y")};Pd.translateX=Pd.x,Pd.translateY=Pd.y;const Ud=new Set;let aR=!1,rR=!1,iR=!1;function wz(){if(rR){const e=Array.from(Ud).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),a=new Map;t.forEach(r=>{const l=uQ(r);l.length&&(a.set(r,l),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const l=a.get(r);l&&l.forEach(([c,f])=>{r.getValue(c)?.set(f)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}rR=!1,aR=!1,Ud.forEach(e=>e.complete(iR)),Ud.clear()}function Tz(){Ud.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(rR=!0)})}function cQ(){iR=!0,Tz(),wz(),iR=!1}class oR{constructor(t,a,r,l,c,f=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=a,this.name=r,this.motionValue=l,this.element=c,this.isAsync=f}scheduleResolve(){this.state="scheduled",this.isAsync?(Ud.add(this),aR||(aR=!0,Pa.read(Tz),Pa.resolveKeyframes(wz))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:a,element:r,motionValue:l}=this;if(t[0]===null){const c=l?.get(),f=t[t.length-1];if(c!==void 0)t[0]=c;else if(r&&a){const m=r.readValue(a,f);m!=null&&(t[0]=m)}t[0]===void 0&&(t[0]=f),l&&c===void 0&&l.set(t[0])}nQ(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Ud.delete(this)}cancel(){this.state==="scheduled"&&(Ud.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const fQ=e=>e.startsWith("--");function dQ(e,t,a){fQ(t)?e.style.setProperty(t,a):e.style[t]=a}const hQ=_O(()=>window.ScrollTimeline!==void 0),mQ={};function pQ(e,t){const a=_O(e);return()=>mQ[t]??a()}const Oz=pQ(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),R0=([e,t,a,r])=>`cubic-bezier(${e}, ${t}, ${a}, ${r})`,Rz={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:R0([0,.65,.55,1]),circOut:R0([.55,0,1,.45]),backIn:R0([.31,.01,.66,-.59]),backOut:R0([.33,1.53,.69,.99])};function Az(e,t){if(e)return typeof e=="function"?Oz()?gz(e,t):"ease-out":ez(e)?R0(e):Array.isArray(e)?e.map(a=>Az(a,t)||Rz.easeOut):Rz[e]}function gQ(e,t,a,{delay:r=0,duration:l=300,repeat:c=0,repeatType:f="loop",ease:m="easeOut",times:g}={},p=void 0){const y={[t]:a};g&&(y.offset=g);const S=Az(m,l);Array.isArray(S)&&(y.easing=S);const E={delay:r,duration:l,easing:Array.isArray(S)?"linear":S,fill:"both",iterations:c+1,direction:f==="reverse"?"alternate":"normal"};return p&&(E.pseudoElement=p),e.animate(y,E)}function Mz(e){return typeof e=="function"&&"applyToOptions"in e}function vQ({type:e,...t}){return Mz(e)&&Oz()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class yQ extends KO{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:a,name:r,keyframes:l,pseudoElement:c,allowFlatten:f=!1,finalKeyframe:m,onComplete:g}=t;this.isPseudoElement=!!c,this.allowFlatten=f,this.options=t,Zu(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const p=vQ(t);this.animation=gQ(a,r,l,p,c),p.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!c){const y=ZO(l,this.options,m,this.speed);this.updateMotionValue?this.updateMotionValue(y):dQ(a,r,y),this.animation.cancel()}g?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return Qs(Number(t))}get time(){return Qs(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=is(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:a}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&hQ()?(this.animation.timeline=t,bl):a(this)}}const _z={anticipate:Z6,backInOut:W6,circInOut:Q6};function bQ(e){return e in _z}function SQ(e){typeof e.ease=="string"&&bQ(e.ease)&&(e.ease=_z[e.ease])}const Dz=10;class CQ extends yQ{constructor(t){SQ(t),bz(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:a,onUpdate:r,onComplete:l,element:c,...f}=this.options;if(!a)return;if(t!==void 0){a.set(t);return}const m=new QO({...f,autoplay:!1}),g=is(this.finishedTime??this.time);a.setWithVelocity(m.sample(g-Dz).value,m.sample(g).value,Dz),m.stop()}}const Nz=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(of.test(e)||e==="0")&&!e.startsWith("url("));function xQ(e){const t=e[0];if(e.length===1)return!0;for(let a=0;a<e.length;a++)if(e[a]!==t)return!0}function EQ(e,t,a,r){const l=e[0];if(l===null)return!1;if(t==="display"||t==="visibility")return!0;const c=e[e.length-1],f=Nz(l,t),m=Nz(c,t);return Zm(f===m,`You are trying to animate ${t} from "${l}" to "${c}". "${f?c:l}" is not an animatable value.`,"value-not-animatable"),!f||!m?!1:xQ(e)||(a==="spring"||Mz(a))&&r}const wQ=new Set(["opacity","clipPath","filter","transform"]),TQ=_O(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function OQ(e){const{motionValue:t,name:a,repeatDelay:r,repeatType:l,damping:c,type:f}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:g,transformTemplate:p}=t.owner.getProps();return TQ()&&a&&wQ.has(a)&&(a!=="transform"||!p)&&!g&&!r&&l!=="mirror"&&c!==0&&f!=="inertia"}const RQ=40;class AQ extends KO{constructor({autoplay:t=!0,delay:a=0,type:r="keyframes",repeat:l=0,repeatDelay:c=0,repeatType:f="loop",keyframes:m,name:g,motionValue:p,element:y,...S}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=vo.now();const E={autoplay:t,delay:a,type:r,repeat:l,repeatDelay:c,repeatType:f,name:g,motionValue:p,element:y,...S},T=y?.KeyframeResolver||oR;this.keyframeResolver=new T(m,(O,M,A)=>this.onKeyframesResolved(O,M,E,!A),g,p,y),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,a,r,l){this.keyframeResolver=void 0;const{name:c,type:f,velocity:m,delay:g,isHandoff:p,onUpdate:y}=r;this.resolvedAt=vo.now(),EQ(t,c,f,m)||((Ku.instantAnimations||!g)&&y?.(ZO(t,r,a)),t[0]=t[t.length-1],r.duration=0,r.repeat=0);const E={startTime:l?this.resolvedAt?this.resolvedAt-this.createdAt>RQ?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:a,...r,keyframes:t},T=!p&&OQ(E)?new CQ({...E,element:E.motionValue.owner.current}):new QO(E);T.finished.then(()=>this.notifyFinished()).catch(bl),this.pendingTimeline&&(this.stopTimeline=T.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=T}get finished(){return this._animation?this.animation.finished:this._finished}then(t,a){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),cQ()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const MQ=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function _Q(e){const t=MQ.exec(e);if(!t)return[,];const[,a,r,l]=t;return[`--${a??r}`,l]}const DQ=4;function $z(e,t,a=1){Zu(a<=DQ,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,l]=_Q(e);if(!r)return;const c=window.getComputedStyle(t).getPropertyValue(r);if(c){const f=c.trim();return P6(f)?parseFloat(f):f}return VO(l)?$z(l,t,a+1):l}function lR(e,t){return e?.[t]??e?.default??e}const zz=new Set(["width","height","top","left","right","bottom",...ep]),NQ={test:e=>e==="auto",parse:e=>e},jz=e=>t=>t.test(e),Lz=[Km,on,Js,rf,CK,SK,NQ],Vz=e=>Lz.find(jz(e));function $Q(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||I6(e):!0}const zQ=new Set(["brightness","contrast","saturate","opacity"]);function jQ(e){const[t,a]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=a.match(HO)||[];if(!r)return e;const l=a.replace(r,"");let c=zQ.has(t)?1:0;return r!==a&&(c*=100),t+"("+c+l+")"}const LQ=/\b([a-z-]*)\(.*?\)/gu,sR={...of,getAnimatableNone:e=>{const t=e.match(LQ);return t?t.map(jQ).join(" "):e}},Hz={...Km,transform:Math.round},uR={borderWidth:on,borderTopWidth:on,borderRightWidth:on,borderBottomWidth:on,borderLeftWidth:on,borderRadius:on,radius:on,borderTopLeftRadius:on,borderTopRightRadius:on,borderBottomRightRadius:on,borderBottomLeftRadius:on,width:on,maxWidth:on,height:on,maxHeight:on,top:on,right:on,bottom:on,left:on,padding:on,paddingTop:on,paddingRight:on,paddingBottom:on,paddingLeft:on,margin:on,marginTop:on,marginRight:on,marginBottom:on,marginLeft:on,backgroundPositionX:on,backgroundPositionY:on,...{rotate:rf,rotateX:rf,rotateY:rf,rotateZ:rf,scale:iC,scaleX:iC,scaleY:iC,scaleZ:iC,skew:rf,skewX:rf,skewY:rf,distance:on,translateX:on,translateY:on,translateZ:on,x:on,y:on,z:on,perspective:on,transformPerspective:on,opacity:E0,originX:oz,originY:oz,originZ:on},zIndex:Hz,fillOpacity:E0,strokeOpacity:E0,numOctaves:Hz},VQ={...uR,color:Cr,backgroundColor:Cr,outlineColor:Cr,fill:Cr,stroke:Cr,borderColor:Cr,borderTopColor:Cr,borderRightColor:Cr,borderBottomColor:Cr,borderLeftColor:Cr,filter:sR,WebkitFilter:sR},Bz=e=>VQ[e];function Pz(e,t){let a=Bz(e);return a!==sR&&(a=of),a.getAnimatableNone?a.getAnimatableNone(t):void 0}const HQ=new Set(["auto","none","0"]);function BQ(e,t,a){let r=0,l;for(;r<e.length&&!l;){const c=e[r];typeof c=="string"&&!HQ.has(c)&&O0(c).values.length&&(l=e[r]),r++}if(l&&a)for(const c of t)e[c]=Pz(a,l)}class PQ extends oR{constructor(t,a,r,l,c){super(t,a,r,l,c,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:a,name:r}=this;if(!a||!a.current)return;super.readKeyframes();for(let g=0;g<t.length;g++){let p=t[g];if(typeof p=="string"&&(p=p.trim(),VO(p))){const y=$z(p,a.current);y!==void 0&&(t[g]=y),g===t.length-1&&(this.finalKeyframe=p)}}if(this.resolveNoneKeyframes(),!zz.has(r)||t.length!==2)return;const[l,c]=t,f=Vz(l),m=Vz(c);if(f!==m)if(Ez(f)&&Ez(m))for(let g=0;g<t.length;g++){const p=t[g];typeof p=="string"&&(t[g]=parseFloat(p))}else Pd[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:a}=this,r=[];for(let l=0;l<t.length;l++)(t[l]===null||$Q(t[l]))&&r.push(l);r.length&&BQ(t,r,a)}measureInitialState(){const{element:t,unresolvedKeyframes:a,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Pd[r](t.measureViewportBox(),window.getComputedStyle(t.current)),a[0]=this.measuredOrigin;const l=a[a.length-1];l!==void 0&&t.getValue(r,l).jump(l,!1)}measureEndState(){const{element:t,name:a,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const l=t.getValue(a);l&&l.jump(this.measuredOrigin,!1);const c=r.length-1,f=r[c];r[c]=Pd[a](t.measureViewportBox(),window.getComputedStyle(t.current)),f!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=f),this.removedTransforms?.length&&this.removedTransforms.forEach(([m,g])=>{t.getValue(m).set(g)}),this.resolveNoneKeyframes()}}function UQ(e,t,a){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const l=a?.[e]??r.querySelectorAll(e);return l?Array.from(l):[]}return Array.from(e)}const Uz=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Iz(e){return U6(e)&&"offsetHeight"in e}var IQ={};const Fz=30,FQ=e=>!isNaN(parseFloat(e));class kQ{constructor(t,a={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,l=!0)=>{const c=vo.now();if(this.updatedAt!==c&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const f of this.dependents)f.dirty();l&&this.events.renderRequest?.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=a.owner}setCurrent(t){this.current=t,this.updatedAt=vo.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=FQ(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return IQ.NODE_ENV!=="production"&&NO(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,a){this.events[t]||(this.events[t]=new DO);const r=this.events[t].add(a);return t==="change"?()=>{r(),Pa.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,a){this.passiveEffect=t,this.stopPassiveEffect=a}set(t,a=!0){!a||!this.passiveEffect?this.updateAndNotify(t,a):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,a,r){this.set(a),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,a=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,a&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=vo.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Fz)return 0;const a=Math.min(this.updatedAt-this.prevUpdatedAt,Fz);return F6(parseFloat(this.current)-parseFloat(this.prevFrameValue),a)}start(t){return this.stop(),new Promise(a=>{this.hasAnimated=!0,this.animation=t(a),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function np(e,t){return new kQ(e,t)}const{schedule:cR}=az(queueMicrotask,!1),os={x:!1,y:!1};function kz(){return os.x||os.y}function GQ(e){return e==="x"||e==="y"?os[e]?null:(os[e]=!0,()=>{os[e]=!1}):os.x||os.y?null:(os.x=os.y=!0,()=>{os.x=os.y=!1})}function Gz(e,t){const a=UQ(e),r=new AbortController,l={passive:!0,...t,signal:r.signal};return[a,l,()=>r.abort()]}function qz(e){return!(e.pointerType==="touch"||kz())}function qQ(e,t,a={}){const[r,l,c]=Gz(e,a),f=m=>{if(!qz(m))return;const{target:g}=m,p=t(g,m);if(typeof p!="function"||!g)return;const y=S=>{qz(S)&&(p(S),g.removeEventListener("pointerleave",y))};g.addEventListener("pointerleave",y,l)};return r.forEach(m=>{m.addEventListener("pointerenter",f,l)}),c}const Yz=(e,t)=>t?e===t?!0:Yz(e,t.parentElement):!1,fR=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,YQ=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function XQ(e){return YQ.has(e.tagName)||e.tabIndex!==-1}const uC=new WeakSet;function Xz(e){return t=>{t.key==="Enter"&&e(t)}}function dR(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const WQ=(e,t)=>{const a=e.currentTarget;if(!a)return;const r=Xz(()=>{if(uC.has(a))return;dR(a,"down");const l=Xz(()=>{dR(a,"up")}),c=()=>dR(a,"cancel");a.addEventListener("keyup",l,t),a.addEventListener("blur",c,t)});a.addEventListener("keydown",r,t),a.addEventListener("blur",()=>a.removeEventListener("keydown",r),t)};function Wz(e){return fR(e)&&!kz()}function ZQ(e,t,a={}){const[r,l,c]=Gz(e,a),f=m=>{const g=m.currentTarget;if(!Wz(m))return;uC.add(g);const p=t(g,m),y=(T,O)=>{window.removeEventListener("pointerup",S),window.removeEventListener("pointercancel",E),uC.has(g)&&uC.delete(g),Wz(T)&&typeof p=="function"&&p(T,{success:O})},S=T=>{y(T,g===window||g===document||a.useGlobalTarget||Yz(g,T.target))},E=T=>{y(T,!1)};window.addEventListener("pointerup",S,l),window.addEventListener("pointercancel",E,l)};return r.forEach(m=>{(a.useGlobalTarget?window:m).addEventListener("pointerdown",f,l),Iz(m)&&(m.addEventListener("focus",p=>WQ(p,l)),!XQ(m)&&!m.hasAttribute("tabindex")&&(m.tabIndex=0))}),c}function Zz(e){return U6(e)&&"ownerSVGElement"in e}function KQ(e){return Zz(e)&&e.tagName==="svg"}const wi=e=>!!(e&&e.getVelocity),QQ=[...Lz,Cr,of],JQ=e=>QQ.find(jz(e)),hR=C.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class eJ extends C.Component{getSnapshotBeforeUpdate(t){const a=this.props.childRef.current;if(a&&t.isPresent&&!this.props.isPresent){const r=a.offsetParent,l=Iz(r)&&r.offsetWidth||0,c=this.props.sizeRef.current;c.height=a.offsetHeight||0,c.width=a.offsetWidth||0,c.top=a.offsetTop,c.left=a.offsetLeft,c.right=l-c.width-c.left}return null}componentDidUpdate(){}render(){return this.props.children}}function tJ({children:e,isPresent:t,anchorX:a,root:r}){const l=C.useId(),c=C.useRef(null),f=C.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:m}=C.useContext(hR);return C.useInsertionEffect(()=>{const{width:g,height:p,top:y,left:S,right:E}=f.current;if(t||!c.current||!g||!p)return;const T=a==="left"?`left: ${S}`:`right: ${E}`;c.current.dataset.motionPopId=l;const O=document.createElement("style");m&&(O.nonce=m);const M=r??document.head;return M.appendChild(O),O.sheet&&O.sheet.insertRule(`
645
645
  [data-motion-pop-id="${l}"] {
646
646
  position: absolute !important;
647
647
  width: ${g}px !important;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "shopify-chatbot-widget",
3
3
  "private": false,
4
- "version": "0.2.6",
4
+ "version": "0.2.7",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",