shopify-chatbot-widget 0.2.2 → 0.2.4

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;background-color:#f7f7f7;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}
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,.jaweb-reset *{all:revert-layer;box-sizing:border-box;vertical-align:baseline;color:inherit;background:0 0;border:none;margin:0;padding:0;font-family:sans-serif;font-weight:400;line-height:1.4;text-decoration:none}@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}
@@ -569,7 +569,7 @@ html body {
569
569
  `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...a){const r=new this(t);return a.forEach(l=>r.set(l)),r}static accessor(t){const r=(this[K4]=this[K4]={accessors:{}}).accessors,l=this.prototype;function c(f){const m=m0(f);r[m]||(RW(l,f),r[m]=!0)}return He.isArray(t)?t.forEach(c):c(t),this}};go.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),He.reduceDescriptors(go.prototype,({value:e},t)=>{let a=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[a]=r}}}),He.freezeMethods(go);function fO(e,t){const a=this||h0,r=t||a,l=go.from(r.headers);let c=r.data;return He.forEach(e,function(m){c=m.call(a,c,l.normalize(),t?t.status:void 0)}),l.normalize(),c}function Q4(e){return!!(e&&e.__CANCEL__)}function qm(e,t,a){xn.call(this,e??"canceled",xn.ERR_CANCELED,t,a),this.name="CanceledError"}He.inherits(qm,xn,{__CANCEL__:!0});function J4(e,t,a){const r=a.config.validateStatus;!a.status||!r||r(a.status)?e(a):t(new xn("Request failed with status code "+a.status,[xn.ERR_BAD_REQUEST,xn.ERR_BAD_RESPONSE][Math.floor(a.status/100)-4],a.config,a.request,a))}function AW(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function MW(e,t){e=e||10;const a=new Array(e),r=new Array(e);let l=0,c=0,f;return t=t!==void 0?t:1e3,function(g){const p=Date.now(),y=r[c];f||(f=p),a[l]=g,r[l]=p;let S=c,E=0;for(;S!==l;)E+=a[S++],S=S%e;if(l=(l+1)%e,l===c&&(c=(c+1)%e),p-f<t)return;const T=y&&p-y;return T?Math.round(E*1e3/T):void 0}}function _W(e,t){let a=0,r=1e3/t,l,c;const f=(p,y=Date.now())=>{a=y,l=null,c&&(clearTimeout(c),c=null),e.apply(null,p)};return[(...p)=>{const y=Date.now(),S=y-a;S>=r?f(p,y):(l=p,c||(c=setTimeout(()=>{c=null,f(l)},r-S)))},()=>l&&f(l)]}const k1=(e,t,a=3)=>{let r=0;const l=MW(50,250);return _W(c=>{const f=c.loaded,m=c.lengthComputable?c.total:void 0,g=f-r,p=l(g),y=f<=m;r=f;const S={loaded:f,total:m,progress:m?f/m:void 0,bytes:g,rate:p||void 0,estimated:p&&m&&y?(m-f)/p:void 0,event:c,lengthComputable:m!=null,[t?"download":"upload"]:!0};e(S)},a)},e6=(e,t)=>{const a=e!=null;return[r=>t[0]({lengthComputable:a,total:e,loaded:r}),t[1]]},t6=e=>(...t)=>He.asap(()=>e(...t)),DW=xi.hasStandardBrowserEnv?((e,t)=>a=>(a=new URL(a,xi.origin),e.protocol===a.protocol&&e.host===a.host&&(t||e.port===a.port)))(new URL(xi.origin),xi.navigator&&/(msie|trident)/i.test(xi.navigator.userAgent)):()=>!0,NW=xi.hasStandardBrowserEnv?{write(e,t,a,r,l,c){const f=[e+"="+encodeURIComponent(t)];He.isNumber(a)&&f.push("expires="+new Date(a).toGMTString()),He.isString(r)&&f.push("path="+r),He.isString(l)&&f.push("domain="+l),c===!0&&f.push("secure"),document.cookie=f.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function $W(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function zW(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function n6(e,t,a){let r=!$W(t);return e&&(r||a==!1)?zW(e,t):t}const a6=e=>e instanceof go?{...e}:e;function jd(e,t){t=t||{};const a={};function r(p,y,S,E){return He.isPlainObject(p)&&He.isPlainObject(y)?He.merge.call({caseless:E},p,y):He.isPlainObject(y)?He.merge({},y):He.isArray(y)?y.slice():y}function l(p,y,S,E){if(He.isUndefined(y)){if(!He.isUndefined(p))return r(void 0,p,S,E)}else return r(p,y,S,E)}function c(p,y){if(!He.isUndefined(y))return r(void 0,y)}function f(p,y){if(He.isUndefined(y)){if(!He.isUndefined(p))return r(void 0,p)}else return r(void 0,y)}function m(p,y,S){if(S in t)return r(p,y);if(S in e)return r(void 0,p)}const g={url:c,method:c,data:c,baseURL:f,transformRequest:f,transformResponse:f,paramsSerializer:f,timeout:f,timeoutMessage:f,withCredentials:f,withXSRFToken:f,adapter:f,responseType:f,xsrfCookieName:f,xsrfHeaderName:f,onUploadProgress:f,onDownloadProgress:f,decompress:f,maxContentLength:f,maxBodyLength:f,beforeRedirect:f,transport:f,httpAgent:f,httpsAgent:f,cancelToken:f,socketPath:f,responseEncoding:f,validateStatus:m,headers:(p,y,S)=>l(a6(p),a6(y),S,!0)};return He.forEach(Object.keys(Object.assign({},e,t)),function(y){const S=g[y]||l,E=S(e[y],t[y],y);He.isUndefined(E)&&S!==m||(a[y]=E)}),a}const r6=e=>{const t=jd({},e);let{data:a,withXSRFToken:r,xsrfHeaderName:l,xsrfCookieName:c,headers:f,auth:m}=t;t.headers=f=go.from(f),t.url=Y4(n6(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),m&&f.set("Authorization","Basic "+btoa((m.username||"")+":"+(m.password?unescape(encodeURIComponent(m.password)):"")));let g;if(He.isFormData(a)){if(xi.hasStandardBrowserEnv||xi.hasStandardBrowserWebWorkerEnv)f.setContentType(void 0);else if((g=f.getContentType())!==!1){const[p,...y]=g?g.split(";").map(S=>S.trim()).filter(Boolean):[];f.setContentType([p||"multipart/form-data",...y].join("; "))}}if(xi.hasStandardBrowserEnv&&(r&&He.isFunction(r)&&(r=r(t)),r||r!==!1&&DW(t.url))){const p=l&&c&&NW.read(c);p&&f.set(l,p)}return t},jW=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(a,r){const l=r6(e);let c=l.data;const f=go.from(l.headers).normalize();let{responseType:m,onUploadProgress:g,onDownloadProgress:p}=l,y,S,E,T,O;function M(){T&&T(),O&&O(),l.cancelToken&&l.cancelToken.unsubscribe(y),l.signal&&l.signal.removeEventListener("abort",y)}let A=new XMLHttpRequest;A.open(l.method.toUpperCase(),l.url,!0),A.timeout=l.timeout;function D(){if(!A)return;const z=go.from("getAllResponseHeaders"in A&&A.getAllResponseHeaders()),$={data:!m||m==="text"||m==="json"?A.responseText:A.response,status:A.status,statusText:A.statusText,headers:z,config:e,request:A};J4(function(H){a(H),M()},function(H){r(H),M()},$),A=null}"onloadend"in A?A.onloadend=D:A.onreadystatechange=function(){!A||A.readyState!==4||A.status===0&&!(A.responseURL&&A.responseURL.indexOf("file:")===0)||setTimeout(D)},A.onabort=function(){A&&(r(new xn("Request aborted",xn.ECONNABORTED,e,A)),A=null)},A.onerror=function(){r(new xn("Network Error",xn.ERR_NETWORK,e,A)),A=null},A.ontimeout=function(){let j=l.timeout?"timeout of "+l.timeout+"ms exceeded":"timeout exceeded";const $=l.transitional||W4;l.timeoutErrorMessage&&(j=l.timeoutErrorMessage),r(new xn(j,$.clarifyTimeoutError?xn.ETIMEDOUT:xn.ECONNABORTED,e,A)),A=null},c===void 0&&f.setContentType(null),"setRequestHeader"in A&&He.forEach(f.toJSON(),function(j,$){A.setRequestHeader($,j)}),He.isUndefined(l.withCredentials)||(A.withCredentials=!!l.withCredentials),m&&m!=="json"&&(A.responseType=l.responseType),p&&([E,O]=k1(p,!0),A.addEventListener("progress",E)),g&&A.upload&&([S,T]=k1(g),A.upload.addEventListener("progress",S),A.upload.addEventListener("loadend",T)),(l.cancelToken||l.signal)&&(y=z=>{A&&(r(!z||z.type?new qm(null,e,A):z),A.abort(),A=null)},l.cancelToken&&l.cancelToken.subscribe(y),l.signal&&(l.signal.aborted?y():l.signal.addEventListener("abort",y)));const _=AW(l.url);if(_&&xi.protocols.indexOf(_)===-1){r(new xn("Unsupported protocol "+_+":",xn.ERR_BAD_REQUEST,e));return}A.send(c||null)})},LW=(e,t)=>{const{length:a}=e=e?e.filter(Boolean):[];if(t||a){let r=new AbortController,l;const c=function(p){if(!l){l=!0,m();const y=p instanceof Error?p:this.reason;r.abort(y instanceof xn?y:new qm(y instanceof Error?y.message:y))}};let f=t&&setTimeout(()=>{f=null,c(new xn(`timeout ${t} of ms exceeded`,xn.ETIMEDOUT))},t);const m=()=>{e&&(f&&clearTimeout(f),f=null,e.forEach(p=>{p.unsubscribe?p.unsubscribe(c):p.removeEventListener("abort",c)}),e=null)};e.forEach(p=>p.addEventListener("abort",c));const{signal:g}=r;return g.unsubscribe=()=>He.asap(m),g}},VW=function*(e,t){let a=e.byteLength;if(a<t){yield e;return}let r=0,l;for(;r<a;)l=r+t,yield e.slice(r,l),r=l},HW=async function*(e,t){for await(const a of BW(e))yield*VW(a,t)},BW=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:a,value:r}=await t.read();if(a)break;yield r}}finally{await t.cancel()}},i6=(e,t,a,r)=>{const l=HW(e,t);let c=0,f,m=g=>{f||(f=!0,r&&r(g))};return new ReadableStream({async pull(g){try{const{done:p,value:y}=await l.next();if(p){m(),g.close();return}let S=y.byteLength;if(a){let E=c+=S;a(E)}g.enqueue(new Uint8Array(y))}catch(p){throw m(p),p}},cancel(g){return m(g),l.return()}},{highWaterMark:2})},G1=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",o6=G1&&typeof ReadableStream=="function",PW=G1&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),l6=(e,...t)=>{try{return!!e(...t)}catch{return!1}},UW=o6&&l6(()=>{let e=!1;const t=new Request(xi.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),s6=64*1024,dO=o6&&l6(()=>He.isReadableStream(new Response("").body)),q1={stream:dO&&(e=>e.body)};G1&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!q1[t]&&(q1[t]=He.isFunction(e[t])?a=>a[t]():(a,r)=>{throw new xn(`Response type '${t}' is not supported`,xn.ERR_NOT_SUPPORT,r)})})})(new Response);const IW=async e=>{if(e==null)return 0;if(He.isBlob(e))return e.size;if(He.isSpecCompliantForm(e))return(await new Request(xi.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(He.isArrayBufferView(e)||He.isArrayBuffer(e))return e.byteLength;if(He.isURLSearchParams(e)&&(e=e+""),He.isString(e))return(await PW(e)).byteLength},FW=async(e,t)=>{const a=He.toFiniteNumber(e.getContentLength());return a??IW(t)},hO={http:cW,xhr:jW,fetch:G1&&(async e=>{let{url:t,method:a,data:r,signal:l,cancelToken:c,timeout:f,onDownloadProgress:m,onUploadProgress:g,responseType:p,headers:y,withCredentials:S="same-origin",fetchOptions:E}=r6(e);p=p?(p+"").toLowerCase():"text";let T=LW([l,c&&c.toAbortSignal()],f),O;const M=T&&T.unsubscribe&&(()=>{T.unsubscribe()});let A;try{if(g&&UW&&a!=="get"&&a!=="head"&&(A=await FW(y,r))!==0){let $=new Request(t,{method:"POST",body:r,duplex:"half"}),V;if(He.isFormData(r)&&(V=$.headers.get("content-type"))&&y.setContentType(V),$.body){const[H,P]=e6(A,k1(t6(g)));r=i6($.body,s6,H,P)}}He.isString(S)||(S=S?"include":"omit");const D="credentials"in Request.prototype;O=new Request(t,{...E,signal:T,method:a.toUpperCase(),headers:y.normalize().toJSON(),body:r,duplex:"half",credentials:D?S:void 0});let _=await fetch(O,E);const z=dO&&(p==="stream"||p==="response");if(dO&&(m||z&&M)){const $={};["status","statusText","headers"].forEach(q=>{$[q]=_[q]});const V=He.toFiniteNumber(_.headers.get("content-length")),[H,P]=m&&e6(V,k1(t6(m),!0))||[];_=new Response(i6(_.body,s6,H,()=>{P&&P(),M&&M()}),$)}p=p||"text";let j=await q1[He.findKey(q1,p)||"text"](_,e);return!z&&M&&M(),await new Promise(($,V)=>{J4($,V,{data:j,headers:go.from(_.headers),status:_.status,statusText:_.statusText,config:e,request:O})})}catch(D){throw M&&M(),D&&D.name==="TypeError"&&/Load failed|fetch/i.test(D.message)?Object.assign(new xn("Network Error",xn.ERR_NETWORK,e,O),{cause:D.cause||D}):xn.from(D,D&&D.code,e,O)}})};He.forEach(hO,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const u6=e=>`- ${e}`,kW=e=>He.isFunction(e)||e===null||e===!1,c6={getAdapter:e=>{e=He.isArray(e)?e:[e];const{length:t}=e;let a,r;const l={};for(let c=0;c<t;c++){a=e[c];let f;if(r=a,!kW(a)&&(r=hO[(f=String(a)).toLowerCase()],r===void 0))throw new xn(`Unknown adapter '${f}'`);if(r)break;l[f||"#"+c]=r}if(!r){const c=Object.entries(l).map(([m,g])=>`adapter ${m} `+(g===!1?"is not supported by the environment":"is not available in the build"));let f=t?c.length>1?`since :
570
570
  `+c.map(u6).join(`
571
571
  `):" "+u6(c[0]):"as no adapter specified";throw new xn("There is no suitable adapter to dispatch the request "+f,"ERR_NOT_SUPPORT")}return r},adapters:hO};function mO(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new qm(null,e)}function f6(e){return mO(e),e.headers=go.from(e.headers),e.data=fO.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),c6.getAdapter(e.adapter||h0.adapter)(e).then(function(r){return mO(e),r.data=fO.call(e,e.transformResponse,r),r.headers=go.from(r.headers),r},function(r){return Q4(r)||(mO(e),r&&r.response&&(r.response.data=fO.call(e,e.transformResponse,r.response),r.response.headers=go.from(r.response.headers))),Promise.reject(r)})}const d6="1.10.0",Y1={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Y1[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const h6={};Y1.transitional=function(t,a,r){function l(c,f){return"[Axios v"+d6+"] Transitional option '"+c+"'"+f+(r?". "+r:"")}return(c,f,m)=>{if(t===!1)throw new xn(l(f," has been removed"+(a?" in "+a:"")),xn.ERR_DEPRECATED);return a&&!h6[f]&&(h6[f]=!0,console.warn(l(f," has been deprecated since v"+a+" and will be removed in the near future"))),t?t(c,f,m):!0}},Y1.spelling=function(t){return(a,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function GW(e,t,a){if(typeof e!="object")throw new xn("options must be an object",xn.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let l=r.length;for(;l-- >0;){const c=r[l],f=t[c];if(f){const m=e[c],g=m===void 0||f(m,c,e);if(g!==!0)throw new xn("option "+c+" must be "+g,xn.ERR_BAD_OPTION_VALUE);continue}if(a!==!0)throw new xn("Unknown option "+c,xn.ERR_BAD_OPTION)}}const X1={assertOptions:GW,validators:Y1},Zs=X1.validators;let Ld=class{constructor(t){this.defaults=t||{},this.interceptors={request:new X4,response:new X4}}async request(t,a){try{return await this._request(t,a)}catch(r){if(r instanceof Error){let l={};Error.captureStackTrace?Error.captureStackTrace(l):l=new Error;const c=l.stack?l.stack.replace(/^.+\n/,""):"";try{r.stack?c&&!String(r.stack).endsWith(c.replace(/^.+\n.+\n/,""))&&(r.stack+=`
572
- `+c):r.stack=c}catch{}}throw r}}_request(t,a){typeof t=="string"?(a=a||{},a.url=t):a=t||{},a=jd(this.defaults,a);const{transitional:r,paramsSerializer:l,headers:c}=a;r!==void 0&&X1.assertOptions(r,{silentJSONParsing:Zs.transitional(Zs.boolean),forcedJSONParsing:Zs.transitional(Zs.boolean),clarifyTimeoutError:Zs.transitional(Zs.boolean)},!1),l!=null&&(He.isFunction(l)?a.paramsSerializer={serialize:l}:X1.assertOptions(l,{encode:Zs.function,serialize:Zs.function},!0)),a.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?a.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:a.allowAbsoluteUrls=!0),X1.assertOptions(a,{baseUrl:Zs.spelling("baseURL"),withXsrfToken:Zs.spelling("withXSRFToken")},!0),a.method=(a.method||this.defaults.method||"get").toLowerCase();let f=c&&He.merge(c.common,c[a.method]);c&&He.forEach(["delete","get","head","post","put","patch","common"],O=>{delete c[O]}),a.headers=go.concat(f,c);const m=[];let g=!0;this.interceptors.request.forEach(function(M){typeof M.runWhen=="function"&&M.runWhen(a)===!1||(g=g&&M.synchronous,m.unshift(M.fulfilled,M.rejected))});const p=[];this.interceptors.response.forEach(function(M){p.push(M.fulfilled,M.rejected)});let y,S=0,E;if(!g){const O=[f6.bind(this),void 0];for(O.unshift.apply(O,m),O.push.apply(O,p),E=O.length,y=Promise.resolve(a);S<E;)y=y.then(O[S++],O[S++]);return y}E=m.length;let T=a;for(S=0;S<E;){const O=m[S++],M=m[S++];try{T=O(T)}catch(A){M.call(this,A);break}}try{y=f6.call(this,T)}catch(O){return Promise.reject(O)}for(S=0,E=p.length;S<E;)y=y.then(p[S++],p[S++]);return y}getUri(t){t=jd(this.defaults,t);const a=n6(t.baseURL,t.url,t.allowAbsoluteUrls);return Y4(a,t.params,t.paramsSerializer)}};He.forEach(["delete","get","head","options"],function(t){Ld.prototype[t]=function(a,r){return this.request(jd(r||{},{method:t,url:a,data:(r||{}).data}))}}),He.forEach(["post","put","patch"],function(t){function a(r){return function(c,f,m){return this.request(jd(m||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:c,data:f}))}}Ld.prototype[t]=a(),Ld.prototype[t+"Form"]=a(!0)});let qW=class o8{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let a;this.promise=new Promise(function(c){a=c});const r=this;this.promise.then(l=>{if(!r._listeners)return;let c=r._listeners.length;for(;c-- >0;)r._listeners[c](l);r._listeners=null}),this.promise.then=l=>{let c;const f=new Promise(m=>{r.subscribe(m),c=m}).then(l);return f.cancel=function(){r.unsubscribe(c)},f},t(function(c,f,m){r.reason||(r.reason=new qm(c,f,m),a(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const a=this._listeners.indexOf(t);a!==-1&&this._listeners.splice(a,1)}toAbortSignal(){const t=new AbortController,a=r=>{t.abort(r)};return this.subscribe(a),t.signal.unsubscribe=()=>this.unsubscribe(a),t.signal}static source(){let t;return{token:new o8(function(l){t=l}),cancel:t}}};function YW(e){return function(a){return e.apply(null,a)}}function XW(e){return He.isObject(e)&&e.isAxiosError===!0}const pO={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(pO).forEach(([e,t])=>{pO[t]=e});function m6(e){const t=new Ld(e),a=N4(Ld.prototype.request,t);return He.extend(a,Ld.prototype,t,{allOwnKeys:!0}),He.extend(a,t,null,{allOwnKeys:!0}),a.create=function(l){return m6(jd(e,l))},a}const $a=m6(h0);$a.Axios=Ld,$a.CanceledError=qm,$a.CancelToken=qW,$a.isCancel=Q4,$a.VERSION=d6,$a.toFormData=I1,$a.AxiosError=xn,$a.Cancel=$a.CanceledError,$a.all=function(t){return Promise.all(t)},$a.spread=YW,$a.isAxiosError=XW,$a.mergeConfig=jd,$a.AxiosHeaders=go,$a.formToJSON=e=>Z4(He.isHTMLForm(e)?new FormData(e):e),$a.getAdapter=c6.getAdapter,$a.HttpStatusCode=pO,$a.default=$a;const{Axios:Iie,AxiosError:Fie,CanceledError:kie,isCancel:Gie,CancelToken:qie,VERSION:Yie,all:Xie,Cancel:Wie,isAxiosError:Zie,spread:Kie,toFormData:Qie,AxiosHeaders:Jie,HttpStatusCode:eoe,formToJSON:toe,getAdapter:noe,mergeConfig:aoe}=$a;/*! js-cookie v3.0.5 | MIT */function W1(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var r in a)e[r]=a[r]}return e}var WW={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function gO(e,t){function a(l,c,f){if(!(typeof document>"u")){f=W1({},t,f),typeof f.expires=="number"&&(f.expires=new Date(Date.now()+f.expires*864e5)),f.expires&&(f.expires=f.expires.toUTCString()),l=encodeURIComponent(l).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var m="";for(var g in f)f[g]&&(m+="; "+g,f[g]!==!0&&(m+="="+f[g].split(";")[0]));return document.cookie=l+"="+e.write(c,l)+m}}function r(l){if(!(typeof document>"u"||arguments.length&&!l)){for(var c=document.cookie?document.cookie.split("; "):[],f={},m=0;m<c.length;m++){var g=c[m].split("="),p=g.slice(1).join("=");try{var y=decodeURIComponent(g[0]);if(f[y]=e.read(p,y),l===y)break}catch{}}return l?f[l]:f}}return Object.create({set:a,get:r,remove:function(l,c){a(l,"",W1({},c,{expires:-1}))},withAttributes:function(l){return gO(this.converter,W1({},this.attributes,l))},withConverter:function(l){return gO(W1({},this.converter,l),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var ZW=gO(WW,{path:"/"});const nf=e=>ZW.get(e),Ei={apiUrl:"https://jawebcrm.onrender.com/api/",websocketUrl:"wss://jawebcrm.onrender.com/ws"},sn=e=>typeof e=="string",p0=()=>{let e,t;const a=new Promise((r,l)=>{e=r,t=l});return a.resolve=e,a.reject=t,a},p6=e=>e==null?"":""+e,KW=(e,t,a)=>{e.forEach(r=>{t[r]&&(a[r]=t[r])})},QW=/###/g,g6=e=>e&&e.indexOf("###")>-1?e.replace(QW,"."):e,v6=e=>!e||sn(e),g0=(e,t,a)=>{const r=sn(t)?t.split("."):t;let l=0;for(;l<r.length-1;){if(v6(e))return{};const c=g6(r[l]);!e[c]&&a&&(e[c]=new a),Object.prototype.hasOwnProperty.call(e,c)?e=e[c]:e={},++l}return v6(e)?{}:{obj:e,k:g6(r[l])}},y6=(e,t,a)=>{const{obj:r,k:l}=g0(e,t,Object);if(r!==void 0||t.length===1){r[l]=a;return}let c=t[t.length-1],f=t.slice(0,t.length-1),m=g0(e,f,Object);for(;m.obj===void 0&&f.length;)c=`${f[f.length-1]}.${c}`,f=f.slice(0,f.length-1),m=g0(e,f,Object),m?.obj&&typeof m.obj[`${m.k}.${c}`]<"u"&&(m.obj=void 0);m.obj[`${m.k}.${c}`]=a},JW=(e,t,a,r)=>{const{obj:l,k:c}=g0(e,t,Object);l[c]=l[c]||[],l[c].push(a)},Z1=(e,t)=>{const{obj:a,k:r}=g0(e,t);if(a&&Object.prototype.hasOwnProperty.call(a,r))return a[r]},eZ=(e,t,a)=>{const r=Z1(e,a);return r!==void 0?r:Z1(t,a)},b6=(e,t,a)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?sn(e[r])||e[r]instanceof String||sn(t[r])||t[r]instanceof String?a&&(e[r]=t[r]):b6(e[r],t[r],a):e[r]=t[r]);return e},Ym=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var tZ={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const nZ=e=>sn(e)?e.replace(/[&<>"'\/]/g,t=>tZ[t]):e;class aZ{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const a=this.regExpMap.get(t);if(a!==void 0)return a;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const rZ=[" ",",","?","!",";"],iZ=new aZ(20),oZ=(e,t,a)=>{t=t||"",a=a||"";const r=rZ.filter(f=>t.indexOf(f)<0&&a.indexOf(f)<0);if(r.length===0)return!0;const l=iZ.getRegExp(`(${r.map(f=>f==="?"?"\\?":f).join("|")})`);let c=!l.test(e);if(!c){const f=e.indexOf(a);f>0&&!l.test(e.substring(0,f))&&(c=!0)}return c},vO=(e,t,a=".")=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const r=t.split(a);let l=e;for(let c=0;c<r.length;){if(!l||typeof l!="object")return;let f,m="";for(let g=c;g<r.length;++g)if(g!==c&&(m+=a),m+=r[g],f=l[m],f!==void 0){if(["string","number","boolean"].indexOf(typeof f)>-1&&g<r.length-1)continue;c+=g-c+1;break}l=f}return l},v0=e=>e?.replace("_","-"),lZ={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};class K1{constructor(t,a={}){this.init(t,a)}init(t,a={}){this.prefix=a.prefix||"i18next:",this.logger=t||lZ,this.options=a,this.debug=a.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,a,r,l){return l&&!this.debug?null:(sn(t[0])&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[a](t))}create(t){return new K1(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new K1(this.logger,t)}}var Ks=new K1;class Q1{constructor(){this.observers={}}on(t,a){return t.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const l=this.observers[r].get(a)||0;this.observers[r].set(a,l+1)}),this}off(t,a){if(this.observers[t]){if(!a){delete this.observers[t];return}this.observers[t].delete(a)}}emit(t,...a){this.observers[t]&&Array.from(this.observers[t].entries()).forEach(([l,c])=>{for(let f=0;f<c;f++)l(...a)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([l,c])=>{for(let f=0;f<c;f++)l.apply(l,[t,...a])})}}class S6 extends Q1{constructor(t,a={ns:["translation"],defaultNS:"translation"}){super(),this.data=t||{},this.options=a,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const a=this.options.ns.indexOf(t);a>-1&&this.options.ns.splice(a,1)}getResource(t,a,r,l={}){const c=l.keySeparator!==void 0?l.keySeparator:this.options.keySeparator,f=l.ignoreJSONStructure!==void 0?l.ignoreJSONStructure:this.options.ignoreJSONStructure;let m;t.indexOf(".")>-1?m=t.split("."):(m=[t,a],r&&(Array.isArray(r)?m.push(...r):sn(r)&&c?m.push(...r.split(c)):m.push(r)));const g=Z1(this.data,m);return!g&&!a&&!r&&t.indexOf(".")>-1&&(t=m[0],a=m[1],r=m.slice(2).join(".")),g||!f||!sn(r)?g:vO(this.data?.[t]?.[a],r,c)}addResource(t,a,r,l,c={silent:!1}){const f=c.keySeparator!==void 0?c.keySeparator:this.options.keySeparator;let m=[t,a];r&&(m=m.concat(f?r.split(f):r)),t.indexOf(".")>-1&&(m=t.split("."),l=a,a=m[1]),this.addNamespaces(a),y6(this.data,m,l),c.silent||this.emit("added",t,a,r,l)}addResources(t,a,r,l={silent:!1}){for(const c in r)(sn(r[c])||Array.isArray(r[c]))&&this.addResource(t,a,c,r[c],{silent:!0});l.silent||this.emit("added",t,a,r)}addResourceBundle(t,a,r,l,c,f={silent:!1,skipCopy:!1}){let m=[t,a];t.indexOf(".")>-1&&(m=t.split("."),l=r,r=a,a=m[1]),this.addNamespaces(a);let g=Z1(this.data,m)||{};f.skipCopy||(r=JSON.parse(JSON.stringify(r))),l?b6(g,r,c):g={...g,...r},y6(this.data,m,g),f.silent||this.emit("added",t,a,r)}removeResourceBundle(t,a){this.hasResourceBundle(t,a)&&delete this.data[t][a],this.removeNamespaces(a),this.emit("removed",t,a)}hasResourceBundle(t,a){return this.getResource(t,a)!==void 0}getResourceBundle(t,a){return a||(a=this.options.defaultNS),this.getResource(t,a)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const a=this.getDataByLanguage(t);return!!(a&&Object.keys(a)||[]).find(l=>a[l]&&Object.keys(a[l]).length>0)}toJSON(){return this.data}}var C6={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,a,r,l){return e.forEach(c=>{t=this.processors[c]?.process(t,a,r,l)??t}),t}};const x6={},E6=e=>!sn(e)&&typeof e!="boolean"&&typeof e!="number";class J1 extends Q1{constructor(t,a={}){super(),KW(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=a,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Ks.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t,a={interpolation:{}}){const r={...a};return t==null?!1:this.resolve(t,r)?.res!==void 0}extractFromKey(t,a){let r=a.nsSeparator!==void 0?a.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const l=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let c=a.ns||this.options.defaultNS||[];const f=r&&t.indexOf(r)>-1,m=!this.options.userDefinedKeySeparator&&!a.keySeparator&&!this.options.userDefinedNsSeparator&&!a.nsSeparator&&!oZ(t,r,l);if(f&&!m){const g=t.match(this.interpolator.nestingRegexp);if(g&&g.length>0)return{key:t,namespaces:sn(c)?[c]:c};const p=t.split(r);(r!==l||r===l&&this.options.ns.indexOf(p[0])>-1)&&(c=p.shift()),t=p.join(l)}return{key:t,namespaces:sn(c)?[c]:c}}translate(t,a,r){let l=typeof a=="object"?{...a}:a;if(typeof l!="object"&&this.options.overloadTranslationOptionHandler&&(l=this.options.overloadTranslationOptionHandler(arguments)),typeof options=="object"&&(l={...l}),l||(l={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const c=l.returnDetails!==void 0?l.returnDetails:this.options.returnDetails,f=l.keySeparator!==void 0?l.keySeparator:this.options.keySeparator,{key:m,namespaces:g}=this.extractFromKey(t[t.length-1],l),p=g[g.length-1];let y=l.nsSeparator!==void 0?l.nsSeparator:this.options.nsSeparator;y===void 0&&(y=":");const S=l.lng||this.language,E=l.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(S?.toLowerCase()==="cimode")return E?c?{res:`${p}${y}${m}`,usedKey:m,exactUsedKey:m,usedLng:S,usedNS:p,usedParams:this.getUsedParamsDetails(l)}:`${p}${y}${m}`:c?{res:m,usedKey:m,exactUsedKey:m,usedLng:S,usedNS:p,usedParams:this.getUsedParamsDetails(l)}:m;const T=this.resolve(t,l);let O=T?.res;const M=T?.usedKey||m,A=T?.exactUsedKey||m,D=["[object Number]","[object Function]","[object RegExp]"],_=l.joinArrays!==void 0?l.joinArrays:this.options.joinArrays,z=!this.i18nFormat||this.i18nFormat.handleAsObject,j=l.count!==void 0&&!sn(l.count),$=J1.hasDefaultValue(l),V=j?this.pluralResolver.getSuffix(S,l.count,l):"",H=l.ordinal&&j?this.pluralResolver.getSuffix(S,l.count,{ordinal:!1}):"",P=j&&!l.ordinal&&l.count===0,q=P&&l[`defaultValue${this.options.pluralSeparator}zero`]||l[`defaultValue${V}`]||l[`defaultValue${H}`]||l.defaultValue;let Y=O;z&&!O&&$&&(Y=q);const te=E6(Y),G=Object.prototype.toString.apply(Y);if(z&&Y&&te&&D.indexOf(G)<0&&!(sn(_)&&Array.isArray(Y))){if(!l.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const K=this.options.returnedObjectHandler?this.options.returnedObjectHandler(M,Y,{...l,ns:g}):`key '${m} (${this.language})' returned an object instead of string.`;return c?(T.res=K,T.usedParams=this.getUsedParamsDetails(l),T):K}if(f){const K=Array.isArray(Y),J=K?[]:{},ie=K?A:M;for(const k in Y)if(Object.prototype.hasOwnProperty.call(Y,k)){const X=`${ie}${f}${k}`;$&&!O?J[k]=this.translate(X,{...l,defaultValue:E6(q)?q[k]:void 0,joinArrays:!1,ns:g}):J[k]=this.translate(X,{...l,joinArrays:!1,ns:g}),J[k]===X&&(J[k]=Y[k])}O=J}}else if(z&&sn(_)&&Array.isArray(O))O=O.join(_),O&&(O=this.extendTranslation(O,t,l,r));else{let K=!1,J=!1;!this.isValidLookup(O)&&$&&(K=!0,O=q),this.isValidLookup(O)||(J=!0,O=m);const k=(l.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&J?void 0:O,X=$&&q!==O&&this.options.updateMissing;if(J||K||X){if(this.logger.log(X?"updateKey":"missingKey",S,p,m,X?q:O),f){const F=this.resolve(m,{...l,keySeparator:!1});F&&F.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let Q=[];const le=this.languageUtils.getFallbackCodes(this.options.fallbackLng,l.lng||this.language);if(this.options.saveMissingTo==="fallback"&&le&&le[0])for(let F=0;F<le.length;F++)Q.push(le[F]);else this.options.saveMissingTo==="all"?Q=this.languageUtils.toResolveHierarchy(l.lng||this.language):Q.push(l.lng||this.language);const U=(F,ne,ae)=>{const oe=$&&ae!==O?ae:k;this.options.missingKeyHandler?this.options.missingKeyHandler(F,p,ne,oe,X,l):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(F,p,ne,oe,X,l),this.emit("missingKey",F,p,ne,O)};this.options.saveMissing&&(this.options.saveMissingPlurals&&j?Q.forEach(F=>{const ne=this.pluralResolver.getSuffixes(F,l);P&&l[`defaultValue${this.options.pluralSeparator}zero`]&&ne.indexOf(`${this.options.pluralSeparator}zero`)<0&&ne.push(`${this.options.pluralSeparator}zero`),ne.forEach(ae=>{U([F],m+ae,l[`defaultValue${ae}`]||q)})}):U(Q,m,q))}O=this.extendTranslation(O,t,l,T,r),J&&O===m&&this.options.appendNamespaceToMissingKey&&(O=`${p}${y}${m}`),(J||K)&&this.options.parseMissingKeyHandler&&(O=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${p}${y}${m}`:m,K?O:void 0,l))}return c?(T.res=O,T.usedParams=this.getUsedParamsDetails(l),T):O}extendTranslation(t,a,r,l,c){if(this.i18nFormat?.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||l.usedLng,l.usedNS,l.usedKey,{resolved:l});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const g=sn(t)&&(r?.interpolation?.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let p;if(g){const S=t.match(this.interpolator.nestingRegexp);p=S&&S.length}let y=r.replace&&!sn(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(y={...this.options.interpolation.defaultVariables,...y}),t=this.interpolator.interpolate(t,y,r.lng||this.language||l.usedLng,r),g){const S=t.match(this.interpolator.nestingRegexp),E=S&&S.length;p<E&&(r.nest=!1)}!r.lng&&l&&l.res&&(r.lng=this.language||l.usedLng),r.nest!==!1&&(t=this.interpolator.nest(t,(...S)=>c?.[0]===S[0]&&!r.context?(this.logger.warn(`It seems you are nesting recursively key: ${S[0]} in key: ${a[0]}`),null):this.translate(...S,a),r)),r.interpolation&&this.interpolator.reset()}const f=r.postProcess||this.options.postProcess,m=sn(f)?[f]:f;return t!=null&&m?.length&&r.applyPostProcessor!==!1&&(t=C6.handle(m,t,a,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...l,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t,a={}){let r,l,c,f,m;return sn(t)&&(t=[t]),t.forEach(g=>{if(this.isValidLookup(r))return;const p=this.extractFromKey(g,a),y=p.key;l=y;let S=p.namespaces;this.options.fallbackNS&&(S=S.concat(this.options.fallbackNS));const E=a.count!==void 0&&!sn(a.count),T=E&&!a.ordinal&&a.count===0,O=a.context!==void 0&&(sn(a.context)||typeof a.context=="number")&&a.context!=="",M=a.lngs?a.lngs:this.languageUtils.toResolveHierarchy(a.lng||this.language,a.fallbackLng);S.forEach(A=>{this.isValidLookup(r)||(m=A,!x6[`${M[0]}-${A}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(m)&&(x6[`${M[0]}-${A}`]=!0,this.logger.warn(`key "${l}" for languages "${M.join(", ")}" won't get resolved as namespace "${m}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),M.forEach(D=>{if(this.isValidLookup(r))return;f=D;const _=[y];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(_,y,D,A,a);else{let j;E&&(j=this.pluralResolver.getSuffix(D,a.count,a));const $=`${this.options.pluralSeparator}zero`,V=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(E&&(_.push(y+j),a.ordinal&&j.indexOf(V)===0&&_.push(y+j.replace(V,this.options.pluralSeparator)),T&&_.push(y+$)),O){const H=`${y}${this.options.contextSeparator}${a.context}`;_.push(H),E&&(_.push(H+j),a.ordinal&&j.indexOf(V)===0&&_.push(H+j.replace(V,this.options.pluralSeparator)),T&&_.push(H+$))}}let z;for(;z=_.pop();)this.isValidLookup(r)||(c=z,r=this.getResource(D,A,z,a))}))})}),{res:r,usedKey:l,exactUsedKey:c,usedLng:f,usedNS:m}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,a,r,l={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(t,a,r,l):this.resourceStore.getResource(t,a,r,l)}getUsedParamsDetails(t={}){const a=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!sn(t.replace);let l=r?t.replace:t;if(r&&typeof t.count<"u"&&(l.count=t.count),this.options.interpolation.defaultVariables&&(l={...this.options.interpolation.defaultVariables,...l}),!r){l={...l};for(const c of a)delete l[c]}return l}static hasDefaultValue(t){const a="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&a===r.substring(0,a.length)&&t[r]!==void 0)return!0;return!1}}class w6{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Ks.create("languageUtils")}getScriptPartFromCode(t){if(t=v0(t),!t||t.indexOf("-")<0)return null;const a=t.split("-");return a.length===2||(a.pop(),a[a.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(a.join("-"))}getLanguagePartFromCode(t){if(t=v0(t),!t||t.indexOf("-")<0)return t;const a=t.split("-");return this.formatLanguageCode(a[0])}formatLanguageCode(t){if(sn(t)&&t.indexOf("-")>-1){let a;try{a=Intl.getCanonicalLocales(t)[0]}catch{}return a&&this.options.lowerCaseLng&&(a=a.toLowerCase()),a||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let a;return t.forEach(r=>{if(a)return;const l=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(l))&&(a=l)}),!a&&this.options.supportedLngs&&t.forEach(r=>{if(a)return;const l=this.getScriptPartFromCode(r);if(this.isSupportedCode(l))return a=l;const c=this.getLanguagePartFromCode(r);if(this.isSupportedCode(c))return a=c;a=this.options.supportedLngs.find(f=>{if(f===c)return f;if(!(f.indexOf("-")<0&&c.indexOf("-")<0)&&(f.indexOf("-")>0&&c.indexOf("-")<0&&f.substring(0,f.indexOf("-"))===c||f.indexOf(c)===0&&c.length>1))return f})}),a||(a=this.getFallbackCodes(this.options.fallbackLng)[0]),a}getFallbackCodes(t,a){if(!t)return[];if(typeof t=="function"&&(t=t(a)),sn(t)&&(t=[t]),Array.isArray(t))return t;if(!a)return t.default||[];let r=t[a];return r||(r=t[this.getScriptPartFromCode(a)]),r||(r=t[this.formatLanguageCode(a)]),r||(r=t[this.getLanguagePartFromCode(a)]),r||(r=t.default),r||[]}toResolveHierarchy(t,a){const r=this.getFallbackCodes((a===!1?[]:a)||this.options.fallbackLng||[],t),l=[],c=f=>{f&&(this.isSupportedCode(f)?l.push(f):this.logger.warn(`rejecting language code not found in supportedLngs: ${f}`))};return sn(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&c(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&c(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&c(this.getLanguagePartFromCode(t))):sn(t)&&c(this.formatLanguageCode(t)),r.forEach(f=>{l.indexOf(f)<0&&c(this.formatLanguageCode(f))}),l}}const T6={zero:0,one:1,two:2,few:3,many:4,other:5},O6={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class sZ{constructor(t,a={}){this.languageUtils=t,this.options=a,this.logger=Ks.create("pluralResolver"),this.pluralRulesCache={}}addRule(t,a){this.rules[t]=a}clearCache(){this.pluralRulesCache={}}getRule(t,a={}){const r=v0(t==="dev"?"en":t),l=a.ordinal?"ordinal":"cardinal",c=JSON.stringify({cleanedCode:r,type:l});if(c in this.pluralRulesCache)return this.pluralRulesCache[c];let f;try{f=new Intl.PluralRules(r,{type:l})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),O6;if(!t.match(/-|_/))return O6;const g=this.languageUtils.getLanguagePartFromCode(t);f=this.getRule(g,a)}return this.pluralRulesCache[c]=f,f}needsPlural(t,a={}){let r=this.getRule(t,a);return r||(r=this.getRule("dev",a)),r?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(t,a,r={}){return this.getSuffixes(t,r).map(l=>`${a}${l}`)}getSuffixes(t,a={}){let r=this.getRule(t,a);return r||(r=this.getRule("dev",a)),r?r.resolvedOptions().pluralCategories.sort((l,c)=>T6[l]-T6[c]).map(l=>`${this.options.prepend}${a.ordinal?`ordinal${this.options.prepend}`:""}${l}`):[]}getSuffix(t,a,r={}){const l=this.getRule(t,r);return l?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${l.select(a)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",a,r))}}const R6=(e,t,a,r=".",l=!0)=>{let c=eZ(e,t,a);return!c&&l&&sn(a)&&(c=vO(e,a,r),c===void 0&&(c=vO(t,a,r))),c},yO=e=>e.replace(/\$/g,"$$$$");class uZ{constructor(t={}){this.logger=Ks.create("interpolator"),this.options=t,this.format=t?.interpolation?.format||(a=>a),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});const{escape:a,escapeValue:r,useRawValueToEscape:l,prefix:c,prefixEscaped:f,suffix:m,suffixEscaped:g,formatSeparator:p,unescapeSuffix:y,unescapePrefix:S,nestingPrefix:E,nestingPrefixEscaped:T,nestingSuffix:O,nestingSuffixEscaped:M,nestingOptionsSeparator:A,maxReplaces:D,alwaysFormat:_}=t.interpolation;this.escape=a!==void 0?a:nZ,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=l!==void 0?l:!1,this.prefix=c?Ym(c):f||"{{",this.suffix=m?Ym(m):g||"}}",this.formatSeparator=p||",",this.unescapePrefix=y?"":S||"-",this.unescapeSuffix=this.unescapePrefix?"":y||"",this.nestingPrefix=E?Ym(E):T||Ym("$t("),this.nestingSuffix=O?Ym(O):M||Ym(")"),this.nestingOptionsSeparator=A||",",this.maxReplaces=D||1e3,this.alwaysFormat=_!==void 0?_:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(a,r)=>a?.source===r?(a.lastIndex=0,a):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,a,r,l){let c,f,m;const g=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},p=T=>{if(T.indexOf(this.formatSeparator)<0){const D=R6(a,g,T,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(D,void 0,r,{...l,...a,interpolationkey:T}):D}const O=T.split(this.formatSeparator),M=O.shift().trim(),A=O.join(this.formatSeparator).trim();return this.format(R6(a,g,M,this.options.keySeparator,this.options.ignoreJSONStructure),A,r,{...l,...a,interpolationkey:M})};this.resetRegExp();const y=l?.missingInterpolationHandler||this.options.missingInterpolationHandler,S=l?.interpolation?.skipOnVariables!==void 0?l.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:T=>yO(T)},{regex:this.regexp,safeValue:T=>this.escapeValue?yO(this.escape(T)):yO(T)}].forEach(T=>{for(m=0;c=T.regex.exec(t);){const O=c[1].trim();if(f=p(O),f===void 0)if(typeof y=="function"){const A=y(t,c,l);f=sn(A)?A:""}else if(l&&Object.prototype.hasOwnProperty.call(l,O))f="";else if(S){f=c[0];continue}else this.logger.warn(`missed to pass in variable ${O} for interpolating ${t}`),f="";else!sn(f)&&!this.useRawValueToEscape&&(f=p6(f));const M=T.safeValue(f);if(t=t.replace(c[0],M),S?(T.regex.lastIndex+=f.length,T.regex.lastIndex-=c[0].length):T.regex.lastIndex=0,m++,m>=this.maxReplaces)break}}),t}nest(t,a,r={}){let l,c,f;const m=(g,p)=>{const y=this.nestingOptionsSeparator;if(g.indexOf(y)<0)return g;const S=g.split(new RegExp(`${y}[ ]*{`));let E=`{${S[1]}`;g=S[0],E=this.interpolate(E,f);const T=E.match(/'/g),O=E.match(/"/g);((T?.length??0)%2===0&&!O||O.length%2!==0)&&(E=E.replace(/'/g,'"'));try{f=JSON.parse(E),p&&(f={...p,...f})}catch(M){return this.logger.warn(`failed parsing options string in nesting for key ${g}`,M),`${g}${y}${E}`}return f.defaultValue&&f.defaultValue.indexOf(this.prefix)>-1&&delete f.defaultValue,g};for(;l=this.nestingRegexp.exec(t);){let g=[];f={...r},f=f.replace&&!sn(f.replace)?f.replace:f,f.applyPostProcessor=!1,delete f.defaultValue;const p=/{.*}/.test(l[1])?l[1].lastIndexOf("}")+1:l[1].indexOf(this.formatSeparator);if(p!==-1&&(g=l[1].slice(p).split(this.formatSeparator).map(y=>y.trim()).filter(Boolean),l[1]=l[1].slice(0,p)),c=a(m.call(this,l[1].trim(),f),f),c&&l[0]===t&&!sn(c))return c;sn(c)||(c=p6(c)),c||(this.logger.warn(`missed to resolve ${l[1]} for nesting ${t}`),c=""),g.length&&(c=g.reduce((y,S)=>this.format(y,S,r.lng,{...r,interpolationkey:l[1].trim()}),c.trim())),t=t.replace(l[0],c),this.regexp.lastIndex=0}return t}}const cZ=e=>{let t=e.toLowerCase().trim();const a={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const l=r[1].substring(0,r[1].length-1);t==="currency"&&l.indexOf(":")<0?a.currency||(a.currency=l.trim()):t==="relativetime"&&l.indexOf(":")<0?a.range||(a.range=l.trim()):l.split(";").forEach(f=>{if(f){const[m,...g]=f.split(":"),p=g.join(":").trim().replace(/^'+|'+$/g,""),y=m.trim();a[y]||(a[y]=p),p==="false"&&(a[y]=!1),p==="true"&&(a[y]=!0),isNaN(p)||(a[y]=parseInt(p,10))}})}return{formatName:t,formatOptions:a}},A6=e=>{const t={};return(a,r,l)=>{let c=l;l&&l.interpolationkey&&l.formatParams&&l.formatParams[l.interpolationkey]&&l[l.interpolationkey]&&(c={...c,[l.interpolationkey]:void 0});const f=r+JSON.stringify(c);let m=t[f];return m||(m=e(v0(r),l),t[f]=m),m(a)}},fZ=e=>(t,a,r)=>e(v0(a),r)(t);class dZ{constructor(t={}){this.logger=Ks.create("formatter"),this.options=t,this.init(t)}init(t,a={interpolation:{}}){this.formatSeparator=a.interpolation.formatSeparator||",";const r=a.cacheInBuiltFormats?A6:fZ;this.formats={number:r((l,c)=>{const f=new Intl.NumberFormat(l,{...c});return m=>f.format(m)}),currency:r((l,c)=>{const f=new Intl.NumberFormat(l,{...c,style:"currency"});return m=>f.format(m)}),datetime:r((l,c)=>{const f=new Intl.DateTimeFormat(l,{...c});return m=>f.format(m)}),relativetime:r((l,c)=>{const f=new Intl.RelativeTimeFormat(l,{...c});return m=>f.format(m,c.range||"day")}),list:r((l,c)=>{const f=new Intl.ListFormat(l,{...c});return m=>f.format(m)})}}add(t,a){this.formats[t.toLowerCase().trim()]=a}addCached(t,a){this.formats[t.toLowerCase().trim()]=A6(a)}format(t,a,r,l={}){const c=a.split(this.formatSeparator);if(c.length>1&&c[0].indexOf("(")>1&&c[0].indexOf(")")<0&&c.find(m=>m.indexOf(")")>-1)){const m=c.findIndex(g=>g.indexOf(")")>-1);c[0]=[c[0],...c.splice(1,m)].join(this.formatSeparator)}return c.reduce((m,g)=>{const{formatName:p,formatOptions:y}=cZ(g);if(this.formats[p]){let S=m;try{const E=l?.formatParams?.[l.interpolationkey]||{},T=E.locale||E.lng||l.locale||l.lng||r;S=this.formats[p](m,T,{...y,...l,...E})}catch(E){this.logger.warn(E)}return S}else this.logger.warn(`there was no format function for ${p}`);return m},t)}}const hZ=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class mZ extends Q1{constructor(t,a,r,l={}){super(),this.backend=t,this.store=a,this.services=r,this.languageUtils=r.languageUtils,this.options=l,this.logger=Ks.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=l.maxParallelReads||10,this.readingCalls=0,this.maxRetries=l.maxRetries>=0?l.maxRetries:5,this.retryTimeout=l.retryTimeout>=1?l.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(r,l.backend,l)}queueLoad(t,a,r,l){const c={},f={},m={},g={};return t.forEach(p=>{let y=!0;a.forEach(S=>{const E=`${p}|${S}`;!r.reload&&this.store.hasResourceBundle(p,S)?this.state[E]=2:this.state[E]<0||(this.state[E]===1?f[E]===void 0&&(f[E]=!0):(this.state[E]=1,y=!1,f[E]===void 0&&(f[E]=!0),c[E]===void 0&&(c[E]=!0),g[S]===void 0&&(g[S]=!0)))}),y||(m[p]=!0)}),(Object.keys(c).length||Object.keys(f).length)&&this.queue.push({pending:f,pendingCount:Object.keys(f).length,loaded:{},errors:[],callback:l}),{toLoad:Object.keys(c),pending:Object.keys(f),toLoadLanguages:Object.keys(m),toLoadNamespaces:Object.keys(g)}}loaded(t,a,r){const l=t.split("|"),c=l[0],f=l[1];a&&this.emit("failedLoading",c,f,a),!a&&r&&this.store.addResourceBundle(c,f,r,void 0,void 0,{skipCopy:!0}),this.state[t]=a?-1:2,a&&r&&(this.state[t]=0);const m={};this.queue.forEach(g=>{JW(g.loaded,[c],f),hZ(g,t),a&&g.errors.push(a),g.pendingCount===0&&!g.done&&(Object.keys(g.loaded).forEach(p=>{m[p]||(m[p]={});const y=g.loaded[p];y.length&&y.forEach(S=>{m[p][S]===void 0&&(m[p][S]=!0)})}),g.done=!0,g.errors.length?g.callback(g.errors):g.callback())}),this.emit("loaded",m),this.queue=this.queue.filter(g=>!g.done)}read(t,a,r,l=0,c=this.retryTimeout,f){if(!t.length)return f(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:a,fcName:r,tried:l,wait:c,callback:f});return}this.readingCalls++;const m=(p,y)=>{if(this.readingCalls--,this.waitingReads.length>0){const S=this.waitingReads.shift();this.read(S.lng,S.ns,S.fcName,S.tried,S.wait,S.callback)}if(p&&y&&l<this.maxRetries){setTimeout(()=>{this.read.call(this,t,a,r,l+1,c*2,f)},c);return}f(p,y)},g=this.backend[r].bind(this.backend);if(g.length===2){try{const p=g(t,a);p&&typeof p.then=="function"?p.then(y=>m(null,y)).catch(m):m(null,p)}catch(p){m(p)}return}return g(t,a,m)}prepareLoading(t,a,r={},l){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),l&&l();sn(t)&&(t=this.languageUtils.toResolveHierarchy(t)),sn(a)&&(a=[a]);const c=this.queueLoad(t,a,r,l);if(!c.toLoad.length)return c.pending.length||l(),null;c.toLoad.forEach(f=>{this.loadOne(f)})}load(t,a,r){this.prepareLoading(t,a,{},r)}reload(t,a,r){this.prepareLoading(t,a,{reload:!0},r)}loadOne(t,a=""){const r=t.split("|"),l=r[0],c=r[1];this.read(l,c,"read",void 0,void 0,(f,m)=>{f&&this.logger.warn(`${a}loading namespace ${c} for language ${l} failed`,f),!f&&m&&this.logger.log(`${a}loaded namespace ${c} for language ${l}`,m),this.loaded(t,f,m)})}saveMissing(t,a,r,l,c,f={},m=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(a)){this.logger.warn(`did not save key "${r}" as the namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend?.create){const g={...f,isUpdate:c},p=this.backend.create.bind(this.backend);if(p.length<6)try{let y;p.length===5?y=p(t,a,r,l,g):y=p(t,a,r,l),y&&typeof y.then=="function"?y.then(S=>m(null,S)).catch(m):m(null,y)}catch(y){m(y)}else p(t,a,r,l,m,g)}!t||!t[0]||this.store.addResource(t[0],a,r,l)}}}const M6=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),sn(e[1])&&(t.defaultValue=e[1]),sn(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const a=e[3]||e[2];Object.keys(a).forEach(r=>{t[r]=a[r]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),_6=e=>(sn(e.ns)&&(e.ns=[e.ns]),sn(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),sn(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),typeof e.initImmediate=="boolean"&&(e.initAsync=e.initImmediate),e),eC=()=>{},pZ=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(a=>{typeof e[a]=="function"&&(e[a]=e[a].bind(e))})};class y0 extends Q1{constructor(t={},a){if(super(),this.options=_6(t),this.services={},this.logger=Ks,this.modules={external:[]},pZ(this),a&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,a),this;setTimeout(()=>{this.init(t,a)},0)}}init(t={},a){this.isInitializing=!0,typeof t=="function"&&(a=t,t={}),t.defaultNS==null&&t.ns&&(sn(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const r=M6();this.options={...r,...this.options,..._6(t)},this.options.interpolation={...r.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator);const l=p=>p?typeof p=="function"?new p:p:null;if(!this.options.isClone){this.modules.logger?Ks.init(l(this.modules.logger),this.options):Ks.init(null,this.options);let p;this.modules.formatter?p=this.modules.formatter:p=dZ;const y=new w6(this.options);this.store=new S6(this.options.resources,this.options);const S=this.services;S.logger=Ks,S.resourceStore=this.store,S.languageUtils=y,S.pluralResolver=new sZ(y,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format&&this.logger.warn("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),p&&(!this.options.interpolation.format||this.options.interpolation.format===r.interpolation.format)&&(S.formatter=l(p),S.formatter.init&&S.formatter.init(S,this.options),this.options.interpolation.format=S.formatter.format.bind(S.formatter)),S.interpolator=new uZ(this.options),S.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},S.backendConnector=new mZ(l(this.modules.backend),S.resourceStore,S,this.options),S.backendConnector.on("*",(T,...O)=>{this.emit(T,...O)}),this.modules.languageDetector&&(S.languageDetector=l(this.modules.languageDetector),S.languageDetector.init&&S.languageDetector.init(S,this.options.detection,this.options)),this.modules.i18nFormat&&(S.i18nFormat=l(this.modules.i18nFormat),S.i18nFormat.init&&S.i18nFormat.init(this)),this.translator=new J1(this.services,this.options),this.translator.on("*",(T,...O)=>{this.emit(T,...O)}),this.modules.external.forEach(T=>{T.init&&T.init(this)})}if(this.format=this.options.interpolation.format,a||(a=eC),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const p=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);p.length>0&&p[0]!=="dev"&&(this.options.lng=p[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(p=>{this[p]=(...y)=>this.store[p](...y)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(p=>{this[p]=(...y)=>(this.store[p](...y),this)});const m=p0(),g=()=>{const p=(y,S)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),m.resolve(S),a(y,S)};if(this.languages&&!this.isInitialized)return p(null,this.t.bind(this));this.changeLanguage(this.options.lng,p)};return this.options.resources||!this.options.initAsync?g():setTimeout(g,0),m}loadResources(t,a=eC){let r=a;const l=sn(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(l?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const c=[],f=m=>{if(!m||m==="cimode")return;this.services.languageUtils.toResolveHierarchy(m).forEach(p=>{p!=="cimode"&&c.indexOf(p)<0&&c.push(p)})};l?f(l):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(g=>f(g)),this.options.preload?.forEach?.(m=>f(m)),this.services.backendConnector.load(c,this.options.ns,m=>{!m&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(m)})}else r(null)}reloadResources(t,a,r){const l=p0();return typeof t=="function"&&(r=t,t=void 0),typeof a=="function"&&(r=a,a=void 0),t||(t=this.languages),a||(a=this.options.ns),r||(r=eC),this.services.backendConnector.reload(t,a,c=>{l.resolve(),r(c)}),l}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&C6.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1)){for(let a=0;a<this.languages.length;a++){const r=this.languages[a];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}!this.resolvedLanguage&&this.languages.indexOf(t)<0&&this.store.hasLanguageSomeTranslations(t)&&(this.resolvedLanguage=t,this.languages.unshift(t))}}changeLanguage(t,a){this.isLanguageChangingTo=t;const r=p0();this.emit("languageChanging",t);const l=m=>{this.language=m,this.languages=this.services.languageUtils.toResolveHierarchy(m),this.resolvedLanguage=void 0,this.setResolvedLanguage(m)},c=(m,g)=>{g?this.isLanguageChangingTo===t&&(l(g),this.translator.changeLanguage(g),this.isLanguageChangingTo=void 0,this.emit("languageChanged",g),this.logger.log("languageChanged",g)):this.isLanguageChangingTo=void 0,r.resolve((...p)=>this.t(...p)),a&&a(m,(...p)=>this.t(...p))},f=m=>{!t&&!m&&this.services.languageDetector&&(m=[]);const g=sn(m)?m:m&&m[0],p=this.store.hasLanguageSomeTranslations(g)?g:this.services.languageUtils.getBestMatchFromCodes(sn(m)?[m]:m);p&&(this.language||l(p),this.translator.language||this.translator.changeLanguage(p),this.services.languageDetector?.cacheUserLanguage?.(p)),this.loadResources(p,y=>{c(y,p)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?f(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(f):this.services.languageDetector.detect(f):f(t),r}getFixedT(t,a,r){const l=(c,f,...m)=>{let g;typeof f!="object"?g=this.options.overloadTranslationOptionHandler([c,f].concat(m)):g={...f},g.lng=g.lng||l.lng,g.lngs=g.lngs||l.lngs,g.ns=g.ns||l.ns,g.keyPrefix!==""&&(g.keyPrefix=g.keyPrefix||r||l.keyPrefix);const p=this.options.keySeparator||".";let y;return g.keyPrefix&&Array.isArray(c)?y=c.map(S=>`${g.keyPrefix}${p}${S}`):y=g.keyPrefix?`${g.keyPrefix}${p}${c}`:c,this.t(y,g)};return sn(t)?l.lng=t:l.lngs=t,l.ns=a,l.keyPrefix=r,l}t(...t){return this.translator?.translate(...t)}exists(...t){return this.translator?.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,a={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=a.lng||this.resolvedLanguage||this.languages[0],l=this.options?this.options.fallbackLng:!1,c=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const f=(m,g)=>{const p=this.services.backendConnector.state[`${m}|${g}`];return p===-1||p===0||p===2};if(a.precheck){const m=a.precheck(this,f);if(m!==void 0)return m}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||f(r,t)&&(!l||f(c,t)))}loadNamespaces(t,a){const r=p0();return this.options.ns?(sn(t)&&(t=[t]),t.forEach(l=>{this.options.ns.indexOf(l)<0&&this.options.ns.push(l)}),this.loadResources(l=>{r.resolve(),a&&a(l)}),r):(a&&a(),Promise.resolve())}loadLanguages(t,a){const r=p0();sn(t)&&(t=[t]);const l=this.options.preload||[],c=t.filter(f=>l.indexOf(f)<0&&this.services.languageUtils.isSupportedCode(f));return c.length?(this.options.preload=l.concat(c),this.loadResources(f=>{r.resolve(),a&&a(f)}),r):(a&&a(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!t)return"rtl";try{const l=new Intl.Locale(t);if(l&&l.getTextInfo){const c=l.getTextInfo();if(c&&c.direction)return c.direction}}catch{}const a=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services?.languageUtils||new w6(M6());return t.toLowerCase().indexOf("-latn")>1?"ltr":a.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},a){return new y0(t,a)}cloneInstance(t={},a=eC){const r=t.forkResourceStore;r&&delete t.forkResourceStore;const l={...this.options,...t,isClone:!0},c=new y0(l);if((t.debug!==void 0||t.prefix!==void 0)&&(c.logger=c.logger.clone(t)),["store","services","language"].forEach(m=>{c[m]=this[m]}),c.services={...this.services},c.services.utils={hasLoadedNamespace:c.hasLoadedNamespace.bind(c)},r){const m=Object.keys(this.store.data).reduce((g,p)=>(g[p]={...this.store.data[p]},g[p]=Object.keys(g[p]).reduce((y,S)=>(y[S]={...g[p][S]},y),g[p]),g),{});c.store=new S6(m,l),c.services.resourceStore=c.store}return c.translator=new J1(c.services,l),c.translator.on("*",(m,...g)=>{c.emit(m,...g)}),c.init(l,a),c.translator.options=l,c.translator.backendConnector.services.utils={hasLoadedNamespace:c.hasLoadedNamespace.bind(c)},c}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Zr=y0.createInstance();Zr.createInstance=y0.createInstance,Zr.createInstance,Zr.dir,Zr.init,Zr.loadResources,Zr.reloadResources,Zr.use,Zr.changeLanguage,Zr.getFixedT,Zr.t,Zr.exists,Zr.setDefaultNamespace,Zr.hasLoadedNamespace,Zr.loadNamespaces,Zr.loadLanguages;const gZ=(e,t,a,r)=>{const l=[a,{code:t,...r||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(l,"warn","react-i18next::",!0);Vd(l[0])&&(l[0]=`react-i18next:: ${l[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...l):console?.warn&&console.warn(...l)},D6={},bO=(e,t,a,r)=>{Vd(a)&&D6[a]||(Vd(a)&&(D6[a]=new Date),gZ(e,t,a,r))},N6=(e,t)=>()=>{if(e.isInitialized)t();else{const a=()=>{setTimeout(()=>{e.off("initialized",a)},0),t()};e.on("initialized",a)}},SO=(e,t,a)=>{e.loadNamespaces(t,N6(e,a))},$6=(e,t,a,r)=>{if(Vd(a)&&(a=[a]),e.options.preload&&e.options.preload.indexOf(t)>-1)return SO(e,a,r);a.forEach(l=>{e.options.ns.indexOf(l)<0&&e.options.ns.push(l)}),e.loadLanguages(t,N6(e,r))},vZ=(e,t,a={})=>!t.languages||!t.languages.length?(bO(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:a.lng,precheck:(r,l)=>{if(a.bindI18n?.indexOf("languageChanging")>-1&&r.services.backendConnector.backend&&r.isLanguageChangingTo&&!l(r.isLanguageChangingTo,e))return!1}}),Vd=e=>typeof e=="string",yZ=e=>typeof e=="object"&&e!==null,bZ=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,SZ={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},CZ=e=>SZ[e];let CO={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:e=>e.replace(bZ,CZ)};const xZ=(e={})=>{CO={...CO,...e}},EZ=()=>CO;let z6;const wZ=e=>{z6=e},TZ=()=>z6,OZ={type:"3rdParty",init(e){xZ(e.options.react),wZ(e)}},RZ=C.createContext();class AZ{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(a=>{this.usedNamespaces[a]||(this.usedNamespaces[a]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const MZ=(e,t)=>{const a=C.useRef();return C.useEffect(()=>{a.current=e},[e,t]),a.current},j6=(e,t,a,r)=>e.getFixedT(t,a,r),_Z=(e,t,a,r)=>C.useCallback(j6(e,t,a,r),[e,t,a,r]),DZ=(e,t={})=>{const{i18n:a}=t,{i18n:r,defaultNS:l}=C.useContext(RZ)||{},c=a||r||TZ();if(c&&!c.reportNamespaces&&(c.reportNamespaces=new AZ),!c){bO(c,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const j=(V,H)=>Vd(H)?H:yZ(H)&&Vd(H.defaultValue)?H.defaultValue:Array.isArray(V)?V[V.length-1]:V,$=[j,{},!1];return $.t=j,$.i18n={},$.ready=!1,$}c.options.react?.wait&&bO(c,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const f={...EZ(),...c.options.react,...t},{useSuspense:m,keyPrefix:g}=f;let p=l||c.options?.defaultNS;p=Vd(p)?[p]:p||["translation"],c.reportNamespaces.addUsedNamespaces?.(p);const y=(c.isInitialized||c.initializedStoreOnce)&&p.every(j=>vZ(j,c,f)),S=_Z(c,t.lng||null,f.nsMode==="fallback"?p:p[0],g),E=()=>S,T=()=>j6(c,t.lng||null,f.nsMode==="fallback"?p:p[0],g),[O,M]=C.useState(E);let A=p.join();t.lng&&(A=`${t.lng}${A}`);const D=MZ(A),_=C.useRef(!0);C.useEffect(()=>{const{bindI18n:j,bindI18nStore:$}=f;_.current=!0,!y&&!m&&(t.lng?$6(c,t.lng,p,()=>{_.current&&M(T)}):SO(c,p,()=>{_.current&&M(T)})),y&&D&&D!==A&&_.current&&M(T);const V=()=>{_.current&&M(T)};return j&&c?.on(j,V),$&&c?.store.on($,V),()=>{_.current=!1,c&&j?.split(" ").forEach(H=>c.off(H,V)),$&&c&&$.split(" ").forEach(H=>c.store.off(H,V))}},[c,A]),C.useEffect(()=>{_.current&&y&&M(E)},[c,g,y]);const z=[O,c,y];if(z.t=O,z.i18n=c,z.ready=y,y||!y&&!m)return z;throw new Promise(j=>{t.lng?$6(c,t.lng,p,()=>j()):SO(c,p,()=>j())})},NZ={en:{translation:{welcome:"Hi there, you’re speaking with Jaweb AI Assistant."}},ar:{translation:{welcome:"مرحبًا، أنت تتحدث إلى مساعد Jaweb AI."}}};Zr.use(OZ).init({resources:NZ,lng:"en",fallbackLng:"en",interpolation:{escapeValue:!1}});const $Z=3,zZ=3e3,jZ=()=>{const[e,t]=C.useState(!0),[a,r]=C.useState(!1),[l,c]=C.useState(""),[f,m]=C.useState(""),[g,p]=C.useState(!1),[y,S]=C.useState(!1),[E,T]=C.useState(""),[O,M]=C.useState(""),[A,D]=C.useState(""),[_,z]=C.useState(""),[j,$]=C.useState([]),[V,H]=C.useState([]),[P,q]=C.useState(""),Y=async(te=0)=>{const G=nf("company_username");t(!0);const K={headers:{"Content-Type":"application/json",Accept:"application/json"},params:{username:G}};try{const ie=(await $a.get(`${Ei.apiUrl}chatbot-details/`,K)).data.data;ie.language==="Arabic"?Zr.changeLanguage("ar"):Zr.changeLanguage("en"),r(ie.chatbot_form),c(ie.chatbot_color),m(ie.chatbot_logo),p(ie.disable_chatbot_globally),S(ie.remove_powered_by_jaweb),T(ie.chatbot_initial_msg),M(ie.status),q(ie.mode),console.log(ie),ie.calendly_link&&D(ie.calendly_link),ie.phone_number_id&&z(`+${ie.phone_number_id}`);const k=await $a.get(`${Ei.apiUrl}chatbot-plugin-suggestions/`,K);let X=[];Array.isArray(k.data.data)?X=k.data.data:Array.isArray(k.data.user_questions)&&(X=k.data.user_questions),X.length>0?($(X.slice(0,3)),H(X.slice(3))):($([]),H([])),t(!1)}catch(J){console.error("Error fetching data:",J),te<$Z?setTimeout(()=>Y(te+1),zZ):console.error("Max retries reached. Could not fetch data.")}};return C.useEffect(()=>{Y()},[]),{isFetchingDetails:e,disableForm:a,colorCode:l,chatbotLogo:f,disableChatbotGlobally:g,removePoweredByJaweb:y,initialMessageText:E,subscription:O,calendly:A,merchantPhone:_,messagesSuggestions:j,restSuggestions:V,userType:P}},{Text:LZ,Title:VZ}=km,HZ=({chatbotLogo:e,colorCode:t,onNewSession:a,visitorId:r,onSessionSelect:l,setOpen:c,Opened:f,Phone:m})=>{const[g,p]=C.useState([]),[y,S]=C.useState(!0),E=async()=>{try{S(!0);const A=(await(await fetch(`${Ei.apiUrl}get-chatlogs-by-ip/?visitor_id=${r}&company_username=${nf("company_username")}`)).json()).map(D=>({id:D.user_session_id,agentName:D.assignee||"AI Agent",createdAt:D.date,isBlurred:D.closed,agentImage:D.assignee_picture}));p(A)}catch(O){console.error("Failed to load sessions:",O)}finally{S(!1)}};C.useEffect(()=>{r&&E()},[r]);const T=re.jsx(ku,{style:{fontSize:24},spin:!0});return re.jsxs("div",{style:{maxWidth:"100%",height:"100%",border:"1px solid #f0f0f0",borderRadius:8,overflow:"hidden",display:"flex",flexDirection:"column",paddingTop:20},children:[re.jsxs("div",{style:{padding:"0 16px 10px",display:"flex"},children:[re.jsx(VZ,{level:4,style:{margin:0},children:"Conversations"}),re.jsx(qv,{onClick:()=>c(!f),className:"chatbot-close",style:{marginLeft:"auto"}})]}),re.jsx("div",{style:{flex:1,overflowY:"auto"},children:y?re.jsx("div",{style:{textAlign:"center",padding:"2rem"},children:re.jsx(tf,{indicator:T})}):g.length>0?re.jsx($1,{itemLayout:"horizontal",dataSource:g,split:!0,renderItem:O=>re.jsx($1.Item,{onClick:()=>!O.isBlurred&&l(O.id,O.agentName||"Ai Agent",O.agentImage||e),style:{padding:"12px",opacity:O.isBlurred?.5:1,cursor:O.isBlurred?"not-allowed":"pointer",borderBottom:"1px solid #f0f0f0"},children:re.jsx($1.Item.Meta,{avatar:re.jsx(RT,{size:"large",src:O.agentImage||e,icon:!O.agentImage&&!e?re.jsx(v4,{}):void 0}),title:re.jsx("span",{style:{fontWeight:600},children:O.agentName||"AI Agent"}),description:re.jsxs(re.Fragment,{children:[re.jsxs(LZ,{type:"secondary",children:["Created: ",new Date(O.createdAt).toLocaleDateString()]}),O.isBlurred&&re.jsx("div",{style:{color:"red",fontSize:"12px",marginTop:4},children:"This session is closed and cannot be reopened."})]})})},O.id)}):re.jsx("div",{style:{padding:"1rem",textAlign:"center",color:"#888"},children:"No conversations yet."})}),re.jsxs("div",{style:{padding:"12px",borderTop:"1px solid #f0f0f0",display:"flex",gap:4},children:[re.jsx(as,{type:"primary",size:"large",block:!0,style:{backgroundColor:t,color:"#fff"},onClick:a,children:"Ask a question ?"}),m?re.jsx(as,{type:"default",style:{backgroundColor:"white",color:t},className:"hover:border-black",size:"large",icon:re.jsx(y4,{style:{color:t}}),onClick:()=>{const O=`https://wa.me/${m}`;window.open(O,"_blank")},children:"Chat on WhatsApp"}):re.jsx(re.Fragment,{})]})]})},{Title:BZ,Text:xO}=km,PZ=({onBack:e,onCreate:t,colorCode:a,visitorId:r,country:l})=>{const[c,f]=C.useState(""),[m,g]=C.useState(""),[p,y]=C.useState(""),[S,E]=C.useState(!1),T=async()=>{const O={visitor_id:r,country:l,name:c,email:m,phone:p,company_username:nf("company_username")};try{E(!0);const M=await fetch(`${Ei.apiUrl}chatlog-create/`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(O)}),A=await M.json();M.ok?t({name:c,email:m,phone:p,session_id:A?.user_session_id,messages:A.messages,hasInfo:!0}):console.error("Failed to register:",A)}catch(M){console.error("Error submitting session data:",M)}finally{E(!1)}};return re.jsxs("div",{style:{padding:"1.5rem"},children:[re.jsx(as,{type:"text",icon:re.jsx(FT,{}),onClick:e,style:{marginBottom:"1rem"},children:"Back"}),re.jsx(BZ,{level:4,style:{marginBottom:"2rem"},children:"Let's create a session"}),re.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"1.5rem"},children:[re.jsxs("div",{children:[re.jsx(xO,{strong:!0,children:"👋 Please, can I have your name?"}),re.jsx(Xu,{size:"large",placeholder:"John Doe",value:c,onChange:O=>f(O.target.value),style:{marginTop:"0.5rem"}})]}),re.jsxs("div",{children:[re.jsx(xO,{strong:!0,children:"📧 What’s your email address?"}),re.jsx(Xu,{size:"large",type:"email",placeholder:"you@example.com",value:m,onChange:O=>g(O.target.value),style:{marginTop:"0.5rem"}})]}),re.jsxs("div",{children:[re.jsx(xO,{strong:!0,children:"📱 May I have your phone number?"}),re.jsx(Xu,{size:"large",placeholder:"+1 234 567 8900",value:p,onChange:O=>y(O.target.value),style:{marginTop:"0.5rem"}})]}),re.jsx(as,{type:"primary",size:"large",style:{backgroundColor:a,color:"white"},onClick:T,disabled:!c||!m||!p,children:S?re.jsx(tf,{indicator:re.jsx(ku,{style:{fontSize:20,color:"white"},spin:!0})}):"Create Session"})]})]})},UZ=e=>{const[t,a]=C.useState([]),[r,l]=C.useState(!1),c=async()=>{const f=e;if(f){l(!0);try{const m=await $a.get(`${Ei.apiUrl}chat-message-history/`,{withCredentials:!0,params:{session_id:f,username:nf("company_username")}});m.data?.messages?.length>0&&(a(m.data.messages),l(!1))}catch(m){console.error("Couldn't load history",m)}}};return C.useEffect(()=>{c()},[e]),{messages:t,setMessages:a,isFetchingMessages:r}};function ri(e,t,a,r){return new(a||(a=Promise))(function(l,c){function f(p){try{g(r.next(p))}catch(y){c(y)}}function m(p){try{g(r.throw(p))}catch(y){c(y)}}function g(p){var y;p.done?l(p.value):(y=p.value,y instanceof a?y:new a(function(S){S(y)})).then(f,m)}g((r=r.apply(e,t||[])).next())})}typeof SuppressedError=="function"&&SuppressedError;class b0{constructor(){this.listeners={}}on(t,a,r){if(this.listeners[t]||(this.listeners[t]=new Set),this.listeners[t].add(a),r?.once){const l=()=>{this.un(t,l),this.un(t,a)};return this.on(t,l),l}return()=>this.un(t,a)}un(t,a){var r;(r=this.listeners[t])===null||r===void 0||r.delete(a)}once(t,a){return this.on(t,a,{once:!0})}unAll(){this.listeners={}}emit(t,...a){this.listeners[t]&&this.listeners[t].forEach(r=>r(...a))}}const tC={decode:function(e,t){return ri(this,void 0,void 0,function*(){const a=new AudioContext({sampleRate:t});return a.decodeAudioData(e).finally(()=>a.close())})},createBuffer:function(e,t){return typeof e[0]=="number"&&(e=[e]),function(a){const r=a[0];if(r.some(l=>l>1||l<-1)){const l=r.length;let c=0;for(let f=0;f<l;f++){const m=Math.abs(r[f]);m>c&&(c=m)}for(const f of a)for(let m=0;m<l;m++)f[m]/=c}}(e),{duration:t,length:e[0].length,sampleRate:e[0].length/t,numberOfChannels:e.length,getChannelData:a=>e?.[a],copyFromChannel:AudioBuffer.prototype.copyFromChannel,copyToChannel:AudioBuffer.prototype.copyToChannel}}};function L6(e,t){const a=t.xmlns?document.createElementNS(t.xmlns,e):document.createElement(e);for(const[r,l]of Object.entries(t))if(r==="children"&&l)for(const[c,f]of Object.entries(l))f instanceof Node?a.appendChild(f):typeof f=="string"?a.appendChild(document.createTextNode(f)):a.appendChild(L6(c,f));else r==="style"?Object.assign(a.style,l):r==="textContent"?a.textContent=l:a.setAttribute(r,l.toString());return a}function V6(e,t,a){const r=L6(e,t||{});return a?.appendChild(r),r}var IZ=Object.freeze({__proto__:null,createElement:V6,default:V6});const FZ={fetchBlob:function(e,t,a){return ri(this,void 0,void 0,function*(){const r=yield fetch(e,a);if(r.status>=400)throw new Error(`Failed to fetch ${e}: ${r.status} (${r.statusText})`);return function(l,c){ri(this,void 0,void 0,function*(){if(!l.body||!l.headers)return;const f=l.body.getReader(),m=Number(l.headers.get("Content-Length"))||0;let g=0;const p=S=>ri(this,void 0,void 0,function*(){g+=S?.length||0;const E=Math.round(g/m*100);c(E)}),y=()=>ri(this,void 0,void 0,function*(){let S;try{S=yield f.read()}catch{return}S.done||(p(S.value),yield y())});y()})}(r.clone(),t),r.blob()})}};class kZ extends b0{constructor(t){super(),this.isExternalMedia=!1,t.media?(this.media=t.media,this.isExternalMedia=!0):this.media=document.createElement("audio"),t.mediaControls&&(this.media.controls=!0),t.autoplay&&(this.media.autoplay=!0),t.playbackRate!=null&&this.onMediaEvent("canplay",()=>{t.playbackRate!=null&&(this.media.playbackRate=t.playbackRate)},{once:!0})}onMediaEvent(t,a,r){return this.media.addEventListener(t,a,r),()=>this.media.removeEventListener(t,a,r)}getSrc(){return this.media.currentSrc||this.media.src||""}revokeSrc(){const t=this.getSrc();t.startsWith("blob:")&&URL.revokeObjectURL(t)}canPlayType(t){return this.media.canPlayType(t)!==""}setSrc(t,a){const r=this.getSrc();if(t&&r===t)return;this.revokeSrc();const l=a instanceof Blob&&(this.canPlayType(a.type)||!t)?URL.createObjectURL(a):t;if(r&&this.media.removeAttribute("src"),l||t)try{this.media.src=l}catch{this.media.src=t}}destroy(){this.isExternalMedia||(this.media.pause(),this.media.remove(),this.revokeSrc(),this.media.removeAttribute("src"),this.media.load())}setMediaElement(t){this.media=t}play(){return ri(this,void 0,void 0,function*(){return this.media.play()})}pause(){this.media.pause()}isPlaying(){return!this.media.paused&&!this.media.ended}setTime(t){this.media.currentTime=Math.max(0,Math.min(t,this.getDuration()))}getDuration(){return this.media.duration}getCurrentTime(){return this.media.currentTime}getVolume(){return this.media.volume}setVolume(t){this.media.volume=t}getMuted(){return this.media.muted}setMuted(t){this.media.muted=t}getPlaybackRate(){return this.media.playbackRate}isSeeking(){return this.media.seeking}setPlaybackRate(t,a){a!=null&&(this.media.preservesPitch=a),this.media.playbackRate=t}getMediaElement(){return this.media}setSinkId(t){return this.media.setSinkId(t)}}class Xm extends b0{constructor(t,a){super(),this.timeouts=[],this.isScrollable=!1,this.audioData=null,this.resizeObserver=null,this.lastContainerWidth=0,this.isDragging=!1,this.subscriptions=[],this.unsubscribeOnScroll=[],this.subscriptions=[],this.options=t;const r=this.parentFromOptionsContainer(t.container);this.parent=r;const[l,c]=this.initHtml();r.appendChild(l),this.container=l,this.scrollContainer=c.querySelector(".scroll"),this.wrapper=c.querySelector(".wrapper"),this.canvasWrapper=c.querySelector(".canvases"),this.progressWrapper=c.querySelector(".progress"),this.cursor=c.querySelector(".cursor"),a&&c.appendChild(a),this.initEvents()}parentFromOptionsContainer(t){let a;if(typeof t=="string"?a=document.querySelector(t):t instanceof HTMLElement&&(a=t),!a)throw new Error("Container not found");return a}initEvents(){const t=a=>{const r=this.wrapper.getBoundingClientRect(),l=a.clientX-r.left,c=a.clientY-r.top;return[l/r.width,c/r.height]};if(this.wrapper.addEventListener("click",a=>{const[r,l]=t(a);this.emit("click",r,l)}),this.wrapper.addEventListener("dblclick",a=>{const[r,l]=t(a);this.emit("dblclick",r,l)}),this.options.dragToSeek!==!0&&typeof this.options.dragToSeek!="object"||this.initDrag(),this.scrollContainer.addEventListener("scroll",()=>{const{scrollLeft:a,scrollWidth:r,clientWidth:l}=this.scrollContainer,c=a/r,f=(a+l)/r;this.emit("scroll",c,f,a,a+l)}),typeof ResizeObserver=="function"){const a=this.createDelay(100);this.resizeObserver=new ResizeObserver(()=>{a().then(()=>this.onContainerResize()).catch(()=>{})}),this.resizeObserver.observe(this.scrollContainer)}}onContainerResize(){const t=this.parent.clientWidth;t===this.lastContainerWidth&&this.options.height!=="auto"||(this.lastContainerWidth=t,this.reRender())}initDrag(){this.subscriptions.push(function(t,a,r,l,c=3,f=0,m=100){if(!t)return()=>{};const g=matchMedia("(pointer: coarse)").matches;let p=()=>{};const y=S=>{if(S.button!==f)return;S.preventDefault(),S.stopPropagation();let E=S.clientX,T=S.clientY,O=!1;const M=Date.now(),A=$=>{if($.preventDefault(),$.stopPropagation(),g&&Date.now()-M<m)return;const V=$.clientX,H=$.clientY,P=V-E,q=H-T;if(O||Math.abs(P)>c||Math.abs(q)>c){const Y=t.getBoundingClientRect(),{left:te,top:G}=Y;O||(r?.(E-te,T-G),O=!0),a(P,q,V-te,H-G),E=V,T=H}},D=$=>{if(O){const V=$.clientX,H=$.clientY,P=t.getBoundingClientRect(),{left:q,top:Y}=P;l?.(V-q,H-Y)}p()},_=$=>{$.relatedTarget&&$.relatedTarget!==document.documentElement||D($)},z=$=>{O&&($.stopPropagation(),$.preventDefault())},j=$=>{O&&$.preventDefault()};document.addEventListener("pointermove",A),document.addEventListener("pointerup",D),document.addEventListener("pointerout",_),document.addEventListener("pointercancel",_),document.addEventListener("touchmove",j,{passive:!1}),document.addEventListener("click",z,{capture:!0}),p=()=>{document.removeEventListener("pointermove",A),document.removeEventListener("pointerup",D),document.removeEventListener("pointerout",_),document.removeEventListener("pointercancel",_),document.removeEventListener("touchmove",j),setTimeout(()=>{document.removeEventListener("click",z,{capture:!0})},10)}};return t.addEventListener("pointerdown",y),()=>{p(),t.removeEventListener("pointerdown",y)}}(this.wrapper,(t,a,r)=>{this.emit("drag",Math.max(0,Math.min(1,r/this.wrapper.getBoundingClientRect().width)))},t=>{this.isDragging=!0,this.emit("dragstart",Math.max(0,Math.min(1,t/this.wrapper.getBoundingClientRect().width)))},t=>{this.isDragging=!1,this.emit("dragend",Math.max(0,Math.min(1,t/this.wrapper.getBoundingClientRect().width)))}))}getHeight(t,a){var r;const l=((r=this.audioData)===null||r===void 0?void 0:r.numberOfChannels)||1;if(t==null)return 128;if(!isNaN(Number(t)))return Number(t);if(t==="auto"){const c=this.parent.clientHeight||128;return a?.every(f=>!f.overlay)?c/l:c}return 128}initHtml(){const t=document.createElement("div"),a=t.attachShadow({mode:"open"}),r=this.options.cspNonce&&typeof this.options.cspNonce=="string"?this.options.cspNonce.replace(/"/g,""):"";return a.innerHTML=`
572
+ `+c):r.stack=c}catch{}}throw r}}_request(t,a){typeof t=="string"?(a=a||{},a.url=t):a=t||{},a=jd(this.defaults,a);const{transitional:r,paramsSerializer:l,headers:c}=a;r!==void 0&&X1.assertOptions(r,{silentJSONParsing:Zs.transitional(Zs.boolean),forcedJSONParsing:Zs.transitional(Zs.boolean),clarifyTimeoutError:Zs.transitional(Zs.boolean)},!1),l!=null&&(He.isFunction(l)?a.paramsSerializer={serialize:l}:X1.assertOptions(l,{encode:Zs.function,serialize:Zs.function},!0)),a.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?a.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:a.allowAbsoluteUrls=!0),X1.assertOptions(a,{baseUrl:Zs.spelling("baseURL"),withXsrfToken:Zs.spelling("withXSRFToken")},!0),a.method=(a.method||this.defaults.method||"get").toLowerCase();let f=c&&He.merge(c.common,c[a.method]);c&&He.forEach(["delete","get","head","post","put","patch","common"],O=>{delete c[O]}),a.headers=go.concat(f,c);const m=[];let g=!0;this.interceptors.request.forEach(function(M){typeof M.runWhen=="function"&&M.runWhen(a)===!1||(g=g&&M.synchronous,m.unshift(M.fulfilled,M.rejected))});const p=[];this.interceptors.response.forEach(function(M){p.push(M.fulfilled,M.rejected)});let y,S=0,E;if(!g){const O=[f6.bind(this),void 0];for(O.unshift.apply(O,m),O.push.apply(O,p),E=O.length,y=Promise.resolve(a);S<E;)y=y.then(O[S++],O[S++]);return y}E=m.length;let T=a;for(S=0;S<E;){const O=m[S++],M=m[S++];try{T=O(T)}catch(A){M.call(this,A);break}}try{y=f6.call(this,T)}catch(O){return Promise.reject(O)}for(S=0,E=p.length;S<E;)y=y.then(p[S++],p[S++]);return y}getUri(t){t=jd(this.defaults,t);const a=n6(t.baseURL,t.url,t.allowAbsoluteUrls);return Y4(a,t.params,t.paramsSerializer)}};He.forEach(["delete","get","head","options"],function(t){Ld.prototype[t]=function(a,r){return this.request(jd(r||{},{method:t,url:a,data:(r||{}).data}))}}),He.forEach(["post","put","patch"],function(t){function a(r){return function(c,f,m){return this.request(jd(m||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:c,data:f}))}}Ld.prototype[t]=a(),Ld.prototype[t+"Form"]=a(!0)});let qW=class o8{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let a;this.promise=new Promise(function(c){a=c});const r=this;this.promise.then(l=>{if(!r._listeners)return;let c=r._listeners.length;for(;c-- >0;)r._listeners[c](l);r._listeners=null}),this.promise.then=l=>{let c;const f=new Promise(m=>{r.subscribe(m),c=m}).then(l);return f.cancel=function(){r.unsubscribe(c)},f},t(function(c,f,m){r.reason||(r.reason=new qm(c,f,m),a(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const a=this._listeners.indexOf(t);a!==-1&&this._listeners.splice(a,1)}toAbortSignal(){const t=new AbortController,a=r=>{t.abort(r)};return this.subscribe(a),t.signal.unsubscribe=()=>this.unsubscribe(a),t.signal}static source(){let t;return{token:new o8(function(l){t=l}),cancel:t}}};function YW(e){return function(a){return e.apply(null,a)}}function XW(e){return He.isObject(e)&&e.isAxiosError===!0}const pO={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(pO).forEach(([e,t])=>{pO[t]=e});function m6(e){const t=new Ld(e),a=N4(Ld.prototype.request,t);return He.extend(a,Ld.prototype,t,{allOwnKeys:!0}),He.extend(a,t,null,{allOwnKeys:!0}),a.create=function(l){return m6(jd(e,l))},a}const $a=m6(h0);$a.Axios=Ld,$a.CanceledError=qm,$a.CancelToken=qW,$a.isCancel=Q4,$a.VERSION=d6,$a.toFormData=I1,$a.AxiosError=xn,$a.Cancel=$a.CanceledError,$a.all=function(t){return Promise.all(t)},$a.spread=YW,$a.isAxiosError=XW,$a.mergeConfig=jd,$a.AxiosHeaders=go,$a.formToJSON=e=>Z4(He.isHTMLForm(e)?new FormData(e):e),$a.getAdapter=c6.getAdapter,$a.HttpStatusCode=pO,$a.default=$a;const{Axios:Iie,AxiosError:Fie,CanceledError:kie,isCancel:Gie,CancelToken:qie,VERSION:Yie,all:Xie,Cancel:Wie,isAxiosError:Zie,spread:Kie,toFormData:Qie,AxiosHeaders:Jie,HttpStatusCode:eoe,formToJSON:toe,getAdapter:noe,mergeConfig:aoe}=$a;/*! js-cookie v3.0.5 | MIT */function W1(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var r in a)e[r]=a[r]}return e}var WW={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function gO(e,t){function a(l,c,f){if(!(typeof document>"u")){f=W1({},t,f),typeof f.expires=="number"&&(f.expires=new Date(Date.now()+f.expires*864e5)),f.expires&&(f.expires=f.expires.toUTCString()),l=encodeURIComponent(l).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var m="";for(var g in f)f[g]&&(m+="; "+g,f[g]!==!0&&(m+="="+f[g].split(";")[0]));return document.cookie=l+"="+e.write(c,l)+m}}function r(l){if(!(typeof document>"u"||arguments.length&&!l)){for(var c=document.cookie?document.cookie.split("; "):[],f={},m=0;m<c.length;m++){var g=c[m].split("="),p=g.slice(1).join("=");try{var y=decodeURIComponent(g[0]);if(f[y]=e.read(p,y),l===y)break}catch{}}return l?f[l]:f}}return Object.create({set:a,get:r,remove:function(l,c){a(l,"",W1({},c,{expires:-1}))},withAttributes:function(l){return gO(this.converter,W1({},this.attributes,l))},withConverter:function(l){return gO(W1({},this.converter,l),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var ZW=gO(WW,{path:"/"});const nf=e=>ZW.get(e),Ei={apiUrl:"http://localhost:8000/api/",websocketUrl:"ws://localhost:8000/ws"},sn=e=>typeof e=="string",p0=()=>{let e,t;const a=new Promise((r,l)=>{e=r,t=l});return a.resolve=e,a.reject=t,a},p6=e=>e==null?"":""+e,KW=(e,t,a)=>{e.forEach(r=>{t[r]&&(a[r]=t[r])})},QW=/###/g,g6=e=>e&&e.indexOf("###")>-1?e.replace(QW,"."):e,v6=e=>!e||sn(e),g0=(e,t,a)=>{const r=sn(t)?t.split("."):t;let l=0;for(;l<r.length-1;){if(v6(e))return{};const c=g6(r[l]);!e[c]&&a&&(e[c]=new a),Object.prototype.hasOwnProperty.call(e,c)?e=e[c]:e={},++l}return v6(e)?{}:{obj:e,k:g6(r[l])}},y6=(e,t,a)=>{const{obj:r,k:l}=g0(e,t,Object);if(r!==void 0||t.length===1){r[l]=a;return}let c=t[t.length-1],f=t.slice(0,t.length-1),m=g0(e,f,Object);for(;m.obj===void 0&&f.length;)c=`${f[f.length-1]}.${c}`,f=f.slice(0,f.length-1),m=g0(e,f,Object),m?.obj&&typeof m.obj[`${m.k}.${c}`]<"u"&&(m.obj=void 0);m.obj[`${m.k}.${c}`]=a},JW=(e,t,a,r)=>{const{obj:l,k:c}=g0(e,t,Object);l[c]=l[c]||[],l[c].push(a)},Z1=(e,t)=>{const{obj:a,k:r}=g0(e,t);if(a&&Object.prototype.hasOwnProperty.call(a,r))return a[r]},eZ=(e,t,a)=>{const r=Z1(e,a);return r!==void 0?r:Z1(t,a)},b6=(e,t,a)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?sn(e[r])||e[r]instanceof String||sn(t[r])||t[r]instanceof String?a&&(e[r]=t[r]):b6(e[r],t[r],a):e[r]=t[r]);return e},Ym=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var tZ={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const nZ=e=>sn(e)?e.replace(/[&<>"'\/]/g,t=>tZ[t]):e;class aZ{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const a=this.regExpMap.get(t);if(a!==void 0)return a;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const rZ=[" ",",","?","!",";"],iZ=new aZ(20),oZ=(e,t,a)=>{t=t||"",a=a||"";const r=rZ.filter(f=>t.indexOf(f)<0&&a.indexOf(f)<0);if(r.length===0)return!0;const l=iZ.getRegExp(`(${r.map(f=>f==="?"?"\\?":f).join("|")})`);let c=!l.test(e);if(!c){const f=e.indexOf(a);f>0&&!l.test(e.substring(0,f))&&(c=!0)}return c},vO=(e,t,a=".")=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const r=t.split(a);let l=e;for(let c=0;c<r.length;){if(!l||typeof l!="object")return;let f,m="";for(let g=c;g<r.length;++g)if(g!==c&&(m+=a),m+=r[g],f=l[m],f!==void 0){if(["string","number","boolean"].indexOf(typeof f)>-1&&g<r.length-1)continue;c+=g-c+1;break}l=f}return l},v0=e=>e?.replace("_","-"),lZ={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};class K1{constructor(t,a={}){this.init(t,a)}init(t,a={}){this.prefix=a.prefix||"i18next:",this.logger=t||lZ,this.options=a,this.debug=a.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,a,r,l){return l&&!this.debug?null:(sn(t[0])&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[a](t))}create(t){return new K1(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new K1(this.logger,t)}}var Ks=new K1;class Q1{constructor(){this.observers={}}on(t,a){return t.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const l=this.observers[r].get(a)||0;this.observers[r].set(a,l+1)}),this}off(t,a){if(this.observers[t]){if(!a){delete this.observers[t];return}this.observers[t].delete(a)}}emit(t,...a){this.observers[t]&&Array.from(this.observers[t].entries()).forEach(([l,c])=>{for(let f=0;f<c;f++)l(...a)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([l,c])=>{for(let f=0;f<c;f++)l.apply(l,[t,...a])})}}class S6 extends Q1{constructor(t,a={ns:["translation"],defaultNS:"translation"}){super(),this.data=t||{},this.options=a,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const a=this.options.ns.indexOf(t);a>-1&&this.options.ns.splice(a,1)}getResource(t,a,r,l={}){const c=l.keySeparator!==void 0?l.keySeparator:this.options.keySeparator,f=l.ignoreJSONStructure!==void 0?l.ignoreJSONStructure:this.options.ignoreJSONStructure;let m;t.indexOf(".")>-1?m=t.split("."):(m=[t,a],r&&(Array.isArray(r)?m.push(...r):sn(r)&&c?m.push(...r.split(c)):m.push(r)));const g=Z1(this.data,m);return!g&&!a&&!r&&t.indexOf(".")>-1&&(t=m[0],a=m[1],r=m.slice(2).join(".")),g||!f||!sn(r)?g:vO(this.data?.[t]?.[a],r,c)}addResource(t,a,r,l,c={silent:!1}){const f=c.keySeparator!==void 0?c.keySeparator:this.options.keySeparator;let m=[t,a];r&&(m=m.concat(f?r.split(f):r)),t.indexOf(".")>-1&&(m=t.split("."),l=a,a=m[1]),this.addNamespaces(a),y6(this.data,m,l),c.silent||this.emit("added",t,a,r,l)}addResources(t,a,r,l={silent:!1}){for(const c in r)(sn(r[c])||Array.isArray(r[c]))&&this.addResource(t,a,c,r[c],{silent:!0});l.silent||this.emit("added",t,a,r)}addResourceBundle(t,a,r,l,c,f={silent:!1,skipCopy:!1}){let m=[t,a];t.indexOf(".")>-1&&(m=t.split("."),l=r,r=a,a=m[1]),this.addNamespaces(a);let g=Z1(this.data,m)||{};f.skipCopy||(r=JSON.parse(JSON.stringify(r))),l?b6(g,r,c):g={...g,...r},y6(this.data,m,g),f.silent||this.emit("added",t,a,r)}removeResourceBundle(t,a){this.hasResourceBundle(t,a)&&delete this.data[t][a],this.removeNamespaces(a),this.emit("removed",t,a)}hasResourceBundle(t,a){return this.getResource(t,a)!==void 0}getResourceBundle(t,a){return a||(a=this.options.defaultNS),this.getResource(t,a)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const a=this.getDataByLanguage(t);return!!(a&&Object.keys(a)||[]).find(l=>a[l]&&Object.keys(a[l]).length>0)}toJSON(){return this.data}}var C6={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,a,r,l){return e.forEach(c=>{t=this.processors[c]?.process(t,a,r,l)??t}),t}};const x6={},E6=e=>!sn(e)&&typeof e!="boolean"&&typeof e!="number";class J1 extends Q1{constructor(t,a={}){super(),KW(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=a,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Ks.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t,a={interpolation:{}}){const r={...a};return t==null?!1:this.resolve(t,r)?.res!==void 0}extractFromKey(t,a){let r=a.nsSeparator!==void 0?a.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const l=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let c=a.ns||this.options.defaultNS||[];const f=r&&t.indexOf(r)>-1,m=!this.options.userDefinedKeySeparator&&!a.keySeparator&&!this.options.userDefinedNsSeparator&&!a.nsSeparator&&!oZ(t,r,l);if(f&&!m){const g=t.match(this.interpolator.nestingRegexp);if(g&&g.length>0)return{key:t,namespaces:sn(c)?[c]:c};const p=t.split(r);(r!==l||r===l&&this.options.ns.indexOf(p[0])>-1)&&(c=p.shift()),t=p.join(l)}return{key:t,namespaces:sn(c)?[c]:c}}translate(t,a,r){let l=typeof a=="object"?{...a}:a;if(typeof l!="object"&&this.options.overloadTranslationOptionHandler&&(l=this.options.overloadTranslationOptionHandler(arguments)),typeof options=="object"&&(l={...l}),l||(l={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const c=l.returnDetails!==void 0?l.returnDetails:this.options.returnDetails,f=l.keySeparator!==void 0?l.keySeparator:this.options.keySeparator,{key:m,namespaces:g}=this.extractFromKey(t[t.length-1],l),p=g[g.length-1];let y=l.nsSeparator!==void 0?l.nsSeparator:this.options.nsSeparator;y===void 0&&(y=":");const S=l.lng||this.language,E=l.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(S?.toLowerCase()==="cimode")return E?c?{res:`${p}${y}${m}`,usedKey:m,exactUsedKey:m,usedLng:S,usedNS:p,usedParams:this.getUsedParamsDetails(l)}:`${p}${y}${m}`:c?{res:m,usedKey:m,exactUsedKey:m,usedLng:S,usedNS:p,usedParams:this.getUsedParamsDetails(l)}:m;const T=this.resolve(t,l);let O=T?.res;const M=T?.usedKey||m,A=T?.exactUsedKey||m,D=["[object Number]","[object Function]","[object RegExp]"],_=l.joinArrays!==void 0?l.joinArrays:this.options.joinArrays,z=!this.i18nFormat||this.i18nFormat.handleAsObject,j=l.count!==void 0&&!sn(l.count),$=J1.hasDefaultValue(l),V=j?this.pluralResolver.getSuffix(S,l.count,l):"",H=l.ordinal&&j?this.pluralResolver.getSuffix(S,l.count,{ordinal:!1}):"",P=j&&!l.ordinal&&l.count===0,q=P&&l[`defaultValue${this.options.pluralSeparator}zero`]||l[`defaultValue${V}`]||l[`defaultValue${H}`]||l.defaultValue;let Y=O;z&&!O&&$&&(Y=q);const te=E6(Y),G=Object.prototype.toString.apply(Y);if(z&&Y&&te&&D.indexOf(G)<0&&!(sn(_)&&Array.isArray(Y))){if(!l.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const K=this.options.returnedObjectHandler?this.options.returnedObjectHandler(M,Y,{...l,ns:g}):`key '${m} (${this.language})' returned an object instead of string.`;return c?(T.res=K,T.usedParams=this.getUsedParamsDetails(l),T):K}if(f){const K=Array.isArray(Y),J=K?[]:{},ie=K?A:M;for(const k in Y)if(Object.prototype.hasOwnProperty.call(Y,k)){const X=`${ie}${f}${k}`;$&&!O?J[k]=this.translate(X,{...l,defaultValue:E6(q)?q[k]:void 0,joinArrays:!1,ns:g}):J[k]=this.translate(X,{...l,joinArrays:!1,ns:g}),J[k]===X&&(J[k]=Y[k])}O=J}}else if(z&&sn(_)&&Array.isArray(O))O=O.join(_),O&&(O=this.extendTranslation(O,t,l,r));else{let K=!1,J=!1;!this.isValidLookup(O)&&$&&(K=!0,O=q),this.isValidLookup(O)||(J=!0,O=m);const k=(l.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&J?void 0:O,X=$&&q!==O&&this.options.updateMissing;if(J||K||X){if(this.logger.log(X?"updateKey":"missingKey",S,p,m,X?q:O),f){const F=this.resolve(m,{...l,keySeparator:!1});F&&F.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let Q=[];const le=this.languageUtils.getFallbackCodes(this.options.fallbackLng,l.lng||this.language);if(this.options.saveMissingTo==="fallback"&&le&&le[0])for(let F=0;F<le.length;F++)Q.push(le[F]);else this.options.saveMissingTo==="all"?Q=this.languageUtils.toResolveHierarchy(l.lng||this.language):Q.push(l.lng||this.language);const U=(F,ne,ae)=>{const oe=$&&ae!==O?ae:k;this.options.missingKeyHandler?this.options.missingKeyHandler(F,p,ne,oe,X,l):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(F,p,ne,oe,X,l),this.emit("missingKey",F,p,ne,O)};this.options.saveMissing&&(this.options.saveMissingPlurals&&j?Q.forEach(F=>{const ne=this.pluralResolver.getSuffixes(F,l);P&&l[`defaultValue${this.options.pluralSeparator}zero`]&&ne.indexOf(`${this.options.pluralSeparator}zero`)<0&&ne.push(`${this.options.pluralSeparator}zero`),ne.forEach(ae=>{U([F],m+ae,l[`defaultValue${ae}`]||q)})}):U(Q,m,q))}O=this.extendTranslation(O,t,l,T,r),J&&O===m&&this.options.appendNamespaceToMissingKey&&(O=`${p}${y}${m}`),(J||K)&&this.options.parseMissingKeyHandler&&(O=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${p}${y}${m}`:m,K?O:void 0,l))}return c?(T.res=O,T.usedParams=this.getUsedParamsDetails(l),T):O}extendTranslation(t,a,r,l,c){if(this.i18nFormat?.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||l.usedLng,l.usedNS,l.usedKey,{resolved:l});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const g=sn(t)&&(r?.interpolation?.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let p;if(g){const S=t.match(this.interpolator.nestingRegexp);p=S&&S.length}let y=r.replace&&!sn(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(y={...this.options.interpolation.defaultVariables,...y}),t=this.interpolator.interpolate(t,y,r.lng||this.language||l.usedLng,r),g){const S=t.match(this.interpolator.nestingRegexp),E=S&&S.length;p<E&&(r.nest=!1)}!r.lng&&l&&l.res&&(r.lng=this.language||l.usedLng),r.nest!==!1&&(t=this.interpolator.nest(t,(...S)=>c?.[0]===S[0]&&!r.context?(this.logger.warn(`It seems you are nesting recursively key: ${S[0]} in key: ${a[0]}`),null):this.translate(...S,a),r)),r.interpolation&&this.interpolator.reset()}const f=r.postProcess||this.options.postProcess,m=sn(f)?[f]:f;return t!=null&&m?.length&&r.applyPostProcessor!==!1&&(t=C6.handle(m,t,a,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...l,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t,a={}){let r,l,c,f,m;return sn(t)&&(t=[t]),t.forEach(g=>{if(this.isValidLookup(r))return;const p=this.extractFromKey(g,a),y=p.key;l=y;let S=p.namespaces;this.options.fallbackNS&&(S=S.concat(this.options.fallbackNS));const E=a.count!==void 0&&!sn(a.count),T=E&&!a.ordinal&&a.count===0,O=a.context!==void 0&&(sn(a.context)||typeof a.context=="number")&&a.context!=="",M=a.lngs?a.lngs:this.languageUtils.toResolveHierarchy(a.lng||this.language,a.fallbackLng);S.forEach(A=>{this.isValidLookup(r)||(m=A,!x6[`${M[0]}-${A}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(m)&&(x6[`${M[0]}-${A}`]=!0,this.logger.warn(`key "${l}" for languages "${M.join(", ")}" won't get resolved as namespace "${m}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),M.forEach(D=>{if(this.isValidLookup(r))return;f=D;const _=[y];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(_,y,D,A,a);else{let j;E&&(j=this.pluralResolver.getSuffix(D,a.count,a));const $=`${this.options.pluralSeparator}zero`,V=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(E&&(_.push(y+j),a.ordinal&&j.indexOf(V)===0&&_.push(y+j.replace(V,this.options.pluralSeparator)),T&&_.push(y+$)),O){const H=`${y}${this.options.contextSeparator}${a.context}`;_.push(H),E&&(_.push(H+j),a.ordinal&&j.indexOf(V)===0&&_.push(H+j.replace(V,this.options.pluralSeparator)),T&&_.push(H+$))}}let z;for(;z=_.pop();)this.isValidLookup(r)||(c=z,r=this.getResource(D,A,z,a))}))})}),{res:r,usedKey:l,exactUsedKey:c,usedLng:f,usedNS:m}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,a,r,l={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(t,a,r,l):this.resourceStore.getResource(t,a,r,l)}getUsedParamsDetails(t={}){const a=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!sn(t.replace);let l=r?t.replace:t;if(r&&typeof t.count<"u"&&(l.count=t.count),this.options.interpolation.defaultVariables&&(l={...this.options.interpolation.defaultVariables,...l}),!r){l={...l};for(const c of a)delete l[c]}return l}static hasDefaultValue(t){const a="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&a===r.substring(0,a.length)&&t[r]!==void 0)return!0;return!1}}class w6{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Ks.create("languageUtils")}getScriptPartFromCode(t){if(t=v0(t),!t||t.indexOf("-")<0)return null;const a=t.split("-");return a.length===2||(a.pop(),a[a.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(a.join("-"))}getLanguagePartFromCode(t){if(t=v0(t),!t||t.indexOf("-")<0)return t;const a=t.split("-");return this.formatLanguageCode(a[0])}formatLanguageCode(t){if(sn(t)&&t.indexOf("-")>-1){let a;try{a=Intl.getCanonicalLocales(t)[0]}catch{}return a&&this.options.lowerCaseLng&&(a=a.toLowerCase()),a||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let a;return t.forEach(r=>{if(a)return;const l=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(l))&&(a=l)}),!a&&this.options.supportedLngs&&t.forEach(r=>{if(a)return;const l=this.getScriptPartFromCode(r);if(this.isSupportedCode(l))return a=l;const c=this.getLanguagePartFromCode(r);if(this.isSupportedCode(c))return a=c;a=this.options.supportedLngs.find(f=>{if(f===c)return f;if(!(f.indexOf("-")<0&&c.indexOf("-")<0)&&(f.indexOf("-")>0&&c.indexOf("-")<0&&f.substring(0,f.indexOf("-"))===c||f.indexOf(c)===0&&c.length>1))return f})}),a||(a=this.getFallbackCodes(this.options.fallbackLng)[0]),a}getFallbackCodes(t,a){if(!t)return[];if(typeof t=="function"&&(t=t(a)),sn(t)&&(t=[t]),Array.isArray(t))return t;if(!a)return t.default||[];let r=t[a];return r||(r=t[this.getScriptPartFromCode(a)]),r||(r=t[this.formatLanguageCode(a)]),r||(r=t[this.getLanguagePartFromCode(a)]),r||(r=t.default),r||[]}toResolveHierarchy(t,a){const r=this.getFallbackCodes((a===!1?[]:a)||this.options.fallbackLng||[],t),l=[],c=f=>{f&&(this.isSupportedCode(f)?l.push(f):this.logger.warn(`rejecting language code not found in supportedLngs: ${f}`))};return sn(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&c(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&c(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&c(this.getLanguagePartFromCode(t))):sn(t)&&c(this.formatLanguageCode(t)),r.forEach(f=>{l.indexOf(f)<0&&c(this.formatLanguageCode(f))}),l}}const T6={zero:0,one:1,two:2,few:3,many:4,other:5},O6={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class sZ{constructor(t,a={}){this.languageUtils=t,this.options=a,this.logger=Ks.create("pluralResolver"),this.pluralRulesCache={}}addRule(t,a){this.rules[t]=a}clearCache(){this.pluralRulesCache={}}getRule(t,a={}){const r=v0(t==="dev"?"en":t),l=a.ordinal?"ordinal":"cardinal",c=JSON.stringify({cleanedCode:r,type:l});if(c in this.pluralRulesCache)return this.pluralRulesCache[c];let f;try{f=new Intl.PluralRules(r,{type:l})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),O6;if(!t.match(/-|_/))return O6;const g=this.languageUtils.getLanguagePartFromCode(t);f=this.getRule(g,a)}return this.pluralRulesCache[c]=f,f}needsPlural(t,a={}){let r=this.getRule(t,a);return r||(r=this.getRule("dev",a)),r?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(t,a,r={}){return this.getSuffixes(t,r).map(l=>`${a}${l}`)}getSuffixes(t,a={}){let r=this.getRule(t,a);return r||(r=this.getRule("dev",a)),r?r.resolvedOptions().pluralCategories.sort((l,c)=>T6[l]-T6[c]).map(l=>`${this.options.prepend}${a.ordinal?`ordinal${this.options.prepend}`:""}${l}`):[]}getSuffix(t,a,r={}){const l=this.getRule(t,r);return l?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${l.select(a)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",a,r))}}const R6=(e,t,a,r=".",l=!0)=>{let c=eZ(e,t,a);return!c&&l&&sn(a)&&(c=vO(e,a,r),c===void 0&&(c=vO(t,a,r))),c},yO=e=>e.replace(/\$/g,"$$$$");class uZ{constructor(t={}){this.logger=Ks.create("interpolator"),this.options=t,this.format=t?.interpolation?.format||(a=>a),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});const{escape:a,escapeValue:r,useRawValueToEscape:l,prefix:c,prefixEscaped:f,suffix:m,suffixEscaped:g,formatSeparator:p,unescapeSuffix:y,unescapePrefix:S,nestingPrefix:E,nestingPrefixEscaped:T,nestingSuffix:O,nestingSuffixEscaped:M,nestingOptionsSeparator:A,maxReplaces:D,alwaysFormat:_}=t.interpolation;this.escape=a!==void 0?a:nZ,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=l!==void 0?l:!1,this.prefix=c?Ym(c):f||"{{",this.suffix=m?Ym(m):g||"}}",this.formatSeparator=p||",",this.unescapePrefix=y?"":S||"-",this.unescapeSuffix=this.unescapePrefix?"":y||"",this.nestingPrefix=E?Ym(E):T||Ym("$t("),this.nestingSuffix=O?Ym(O):M||Ym(")"),this.nestingOptionsSeparator=A||",",this.maxReplaces=D||1e3,this.alwaysFormat=_!==void 0?_:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(a,r)=>a?.source===r?(a.lastIndex=0,a):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,a,r,l){let c,f,m;const g=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},p=T=>{if(T.indexOf(this.formatSeparator)<0){const D=R6(a,g,T,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(D,void 0,r,{...l,...a,interpolationkey:T}):D}const O=T.split(this.formatSeparator),M=O.shift().trim(),A=O.join(this.formatSeparator).trim();return this.format(R6(a,g,M,this.options.keySeparator,this.options.ignoreJSONStructure),A,r,{...l,...a,interpolationkey:M})};this.resetRegExp();const y=l?.missingInterpolationHandler||this.options.missingInterpolationHandler,S=l?.interpolation?.skipOnVariables!==void 0?l.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:T=>yO(T)},{regex:this.regexp,safeValue:T=>this.escapeValue?yO(this.escape(T)):yO(T)}].forEach(T=>{for(m=0;c=T.regex.exec(t);){const O=c[1].trim();if(f=p(O),f===void 0)if(typeof y=="function"){const A=y(t,c,l);f=sn(A)?A:""}else if(l&&Object.prototype.hasOwnProperty.call(l,O))f="";else if(S){f=c[0];continue}else this.logger.warn(`missed to pass in variable ${O} for interpolating ${t}`),f="";else!sn(f)&&!this.useRawValueToEscape&&(f=p6(f));const M=T.safeValue(f);if(t=t.replace(c[0],M),S?(T.regex.lastIndex+=f.length,T.regex.lastIndex-=c[0].length):T.regex.lastIndex=0,m++,m>=this.maxReplaces)break}}),t}nest(t,a,r={}){let l,c,f;const m=(g,p)=>{const y=this.nestingOptionsSeparator;if(g.indexOf(y)<0)return g;const S=g.split(new RegExp(`${y}[ ]*{`));let E=`{${S[1]}`;g=S[0],E=this.interpolate(E,f);const T=E.match(/'/g),O=E.match(/"/g);((T?.length??0)%2===0&&!O||O.length%2!==0)&&(E=E.replace(/'/g,'"'));try{f=JSON.parse(E),p&&(f={...p,...f})}catch(M){return this.logger.warn(`failed parsing options string in nesting for key ${g}`,M),`${g}${y}${E}`}return f.defaultValue&&f.defaultValue.indexOf(this.prefix)>-1&&delete f.defaultValue,g};for(;l=this.nestingRegexp.exec(t);){let g=[];f={...r},f=f.replace&&!sn(f.replace)?f.replace:f,f.applyPostProcessor=!1,delete f.defaultValue;const p=/{.*}/.test(l[1])?l[1].lastIndexOf("}")+1:l[1].indexOf(this.formatSeparator);if(p!==-1&&(g=l[1].slice(p).split(this.formatSeparator).map(y=>y.trim()).filter(Boolean),l[1]=l[1].slice(0,p)),c=a(m.call(this,l[1].trim(),f),f),c&&l[0]===t&&!sn(c))return c;sn(c)||(c=p6(c)),c||(this.logger.warn(`missed to resolve ${l[1]} for nesting ${t}`),c=""),g.length&&(c=g.reduce((y,S)=>this.format(y,S,r.lng,{...r,interpolationkey:l[1].trim()}),c.trim())),t=t.replace(l[0],c),this.regexp.lastIndex=0}return t}}const cZ=e=>{let t=e.toLowerCase().trim();const a={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const l=r[1].substring(0,r[1].length-1);t==="currency"&&l.indexOf(":")<0?a.currency||(a.currency=l.trim()):t==="relativetime"&&l.indexOf(":")<0?a.range||(a.range=l.trim()):l.split(";").forEach(f=>{if(f){const[m,...g]=f.split(":"),p=g.join(":").trim().replace(/^'+|'+$/g,""),y=m.trim();a[y]||(a[y]=p),p==="false"&&(a[y]=!1),p==="true"&&(a[y]=!0),isNaN(p)||(a[y]=parseInt(p,10))}})}return{formatName:t,formatOptions:a}},A6=e=>{const t={};return(a,r,l)=>{let c=l;l&&l.interpolationkey&&l.formatParams&&l.formatParams[l.interpolationkey]&&l[l.interpolationkey]&&(c={...c,[l.interpolationkey]:void 0});const f=r+JSON.stringify(c);let m=t[f];return m||(m=e(v0(r),l),t[f]=m),m(a)}},fZ=e=>(t,a,r)=>e(v0(a),r)(t);class dZ{constructor(t={}){this.logger=Ks.create("formatter"),this.options=t,this.init(t)}init(t,a={interpolation:{}}){this.formatSeparator=a.interpolation.formatSeparator||",";const r=a.cacheInBuiltFormats?A6:fZ;this.formats={number:r((l,c)=>{const f=new Intl.NumberFormat(l,{...c});return m=>f.format(m)}),currency:r((l,c)=>{const f=new Intl.NumberFormat(l,{...c,style:"currency"});return m=>f.format(m)}),datetime:r((l,c)=>{const f=new Intl.DateTimeFormat(l,{...c});return m=>f.format(m)}),relativetime:r((l,c)=>{const f=new Intl.RelativeTimeFormat(l,{...c});return m=>f.format(m,c.range||"day")}),list:r((l,c)=>{const f=new Intl.ListFormat(l,{...c});return m=>f.format(m)})}}add(t,a){this.formats[t.toLowerCase().trim()]=a}addCached(t,a){this.formats[t.toLowerCase().trim()]=A6(a)}format(t,a,r,l={}){const c=a.split(this.formatSeparator);if(c.length>1&&c[0].indexOf("(")>1&&c[0].indexOf(")")<0&&c.find(m=>m.indexOf(")")>-1)){const m=c.findIndex(g=>g.indexOf(")")>-1);c[0]=[c[0],...c.splice(1,m)].join(this.formatSeparator)}return c.reduce((m,g)=>{const{formatName:p,formatOptions:y}=cZ(g);if(this.formats[p]){let S=m;try{const E=l?.formatParams?.[l.interpolationkey]||{},T=E.locale||E.lng||l.locale||l.lng||r;S=this.formats[p](m,T,{...y,...l,...E})}catch(E){this.logger.warn(E)}return S}else this.logger.warn(`there was no format function for ${p}`);return m},t)}}const hZ=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class mZ extends Q1{constructor(t,a,r,l={}){super(),this.backend=t,this.store=a,this.services=r,this.languageUtils=r.languageUtils,this.options=l,this.logger=Ks.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=l.maxParallelReads||10,this.readingCalls=0,this.maxRetries=l.maxRetries>=0?l.maxRetries:5,this.retryTimeout=l.retryTimeout>=1?l.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(r,l.backend,l)}queueLoad(t,a,r,l){const c={},f={},m={},g={};return t.forEach(p=>{let y=!0;a.forEach(S=>{const E=`${p}|${S}`;!r.reload&&this.store.hasResourceBundle(p,S)?this.state[E]=2:this.state[E]<0||(this.state[E]===1?f[E]===void 0&&(f[E]=!0):(this.state[E]=1,y=!1,f[E]===void 0&&(f[E]=!0),c[E]===void 0&&(c[E]=!0),g[S]===void 0&&(g[S]=!0)))}),y||(m[p]=!0)}),(Object.keys(c).length||Object.keys(f).length)&&this.queue.push({pending:f,pendingCount:Object.keys(f).length,loaded:{},errors:[],callback:l}),{toLoad:Object.keys(c),pending:Object.keys(f),toLoadLanguages:Object.keys(m),toLoadNamespaces:Object.keys(g)}}loaded(t,a,r){const l=t.split("|"),c=l[0],f=l[1];a&&this.emit("failedLoading",c,f,a),!a&&r&&this.store.addResourceBundle(c,f,r,void 0,void 0,{skipCopy:!0}),this.state[t]=a?-1:2,a&&r&&(this.state[t]=0);const m={};this.queue.forEach(g=>{JW(g.loaded,[c],f),hZ(g,t),a&&g.errors.push(a),g.pendingCount===0&&!g.done&&(Object.keys(g.loaded).forEach(p=>{m[p]||(m[p]={});const y=g.loaded[p];y.length&&y.forEach(S=>{m[p][S]===void 0&&(m[p][S]=!0)})}),g.done=!0,g.errors.length?g.callback(g.errors):g.callback())}),this.emit("loaded",m),this.queue=this.queue.filter(g=>!g.done)}read(t,a,r,l=0,c=this.retryTimeout,f){if(!t.length)return f(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:a,fcName:r,tried:l,wait:c,callback:f});return}this.readingCalls++;const m=(p,y)=>{if(this.readingCalls--,this.waitingReads.length>0){const S=this.waitingReads.shift();this.read(S.lng,S.ns,S.fcName,S.tried,S.wait,S.callback)}if(p&&y&&l<this.maxRetries){setTimeout(()=>{this.read.call(this,t,a,r,l+1,c*2,f)},c);return}f(p,y)},g=this.backend[r].bind(this.backend);if(g.length===2){try{const p=g(t,a);p&&typeof p.then=="function"?p.then(y=>m(null,y)).catch(m):m(null,p)}catch(p){m(p)}return}return g(t,a,m)}prepareLoading(t,a,r={},l){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),l&&l();sn(t)&&(t=this.languageUtils.toResolveHierarchy(t)),sn(a)&&(a=[a]);const c=this.queueLoad(t,a,r,l);if(!c.toLoad.length)return c.pending.length||l(),null;c.toLoad.forEach(f=>{this.loadOne(f)})}load(t,a,r){this.prepareLoading(t,a,{},r)}reload(t,a,r){this.prepareLoading(t,a,{reload:!0},r)}loadOne(t,a=""){const r=t.split("|"),l=r[0],c=r[1];this.read(l,c,"read",void 0,void 0,(f,m)=>{f&&this.logger.warn(`${a}loading namespace ${c} for language ${l} failed`,f),!f&&m&&this.logger.log(`${a}loaded namespace ${c} for language ${l}`,m),this.loaded(t,f,m)})}saveMissing(t,a,r,l,c,f={},m=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(a)){this.logger.warn(`did not save key "${r}" as the namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend?.create){const g={...f,isUpdate:c},p=this.backend.create.bind(this.backend);if(p.length<6)try{let y;p.length===5?y=p(t,a,r,l,g):y=p(t,a,r,l),y&&typeof y.then=="function"?y.then(S=>m(null,S)).catch(m):m(null,y)}catch(y){m(y)}else p(t,a,r,l,m,g)}!t||!t[0]||this.store.addResource(t[0],a,r,l)}}}const M6=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),sn(e[1])&&(t.defaultValue=e[1]),sn(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const a=e[3]||e[2];Object.keys(a).forEach(r=>{t[r]=a[r]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),_6=e=>(sn(e.ns)&&(e.ns=[e.ns]),sn(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),sn(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),typeof e.initImmediate=="boolean"&&(e.initAsync=e.initImmediate),e),eC=()=>{},pZ=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(a=>{typeof e[a]=="function"&&(e[a]=e[a].bind(e))})};class y0 extends Q1{constructor(t={},a){if(super(),this.options=_6(t),this.services={},this.logger=Ks,this.modules={external:[]},pZ(this),a&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,a),this;setTimeout(()=>{this.init(t,a)},0)}}init(t={},a){this.isInitializing=!0,typeof t=="function"&&(a=t,t={}),t.defaultNS==null&&t.ns&&(sn(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const r=M6();this.options={...r,...this.options,..._6(t)},this.options.interpolation={...r.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator);const l=p=>p?typeof p=="function"?new p:p:null;if(!this.options.isClone){this.modules.logger?Ks.init(l(this.modules.logger),this.options):Ks.init(null,this.options);let p;this.modules.formatter?p=this.modules.formatter:p=dZ;const y=new w6(this.options);this.store=new S6(this.options.resources,this.options);const S=this.services;S.logger=Ks,S.resourceStore=this.store,S.languageUtils=y,S.pluralResolver=new sZ(y,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format&&this.logger.warn("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),p&&(!this.options.interpolation.format||this.options.interpolation.format===r.interpolation.format)&&(S.formatter=l(p),S.formatter.init&&S.formatter.init(S,this.options),this.options.interpolation.format=S.formatter.format.bind(S.formatter)),S.interpolator=new uZ(this.options),S.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},S.backendConnector=new mZ(l(this.modules.backend),S.resourceStore,S,this.options),S.backendConnector.on("*",(T,...O)=>{this.emit(T,...O)}),this.modules.languageDetector&&(S.languageDetector=l(this.modules.languageDetector),S.languageDetector.init&&S.languageDetector.init(S,this.options.detection,this.options)),this.modules.i18nFormat&&(S.i18nFormat=l(this.modules.i18nFormat),S.i18nFormat.init&&S.i18nFormat.init(this)),this.translator=new J1(this.services,this.options),this.translator.on("*",(T,...O)=>{this.emit(T,...O)}),this.modules.external.forEach(T=>{T.init&&T.init(this)})}if(this.format=this.options.interpolation.format,a||(a=eC),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const p=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);p.length>0&&p[0]!=="dev"&&(this.options.lng=p[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(p=>{this[p]=(...y)=>this.store[p](...y)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(p=>{this[p]=(...y)=>(this.store[p](...y),this)});const m=p0(),g=()=>{const p=(y,S)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),m.resolve(S),a(y,S)};if(this.languages&&!this.isInitialized)return p(null,this.t.bind(this));this.changeLanguage(this.options.lng,p)};return this.options.resources||!this.options.initAsync?g():setTimeout(g,0),m}loadResources(t,a=eC){let r=a;const l=sn(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(l?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const c=[],f=m=>{if(!m||m==="cimode")return;this.services.languageUtils.toResolveHierarchy(m).forEach(p=>{p!=="cimode"&&c.indexOf(p)<0&&c.push(p)})};l?f(l):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(g=>f(g)),this.options.preload?.forEach?.(m=>f(m)),this.services.backendConnector.load(c,this.options.ns,m=>{!m&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(m)})}else r(null)}reloadResources(t,a,r){const l=p0();return typeof t=="function"&&(r=t,t=void 0),typeof a=="function"&&(r=a,a=void 0),t||(t=this.languages),a||(a=this.options.ns),r||(r=eC),this.services.backendConnector.reload(t,a,c=>{l.resolve(),r(c)}),l}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&C6.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1)){for(let a=0;a<this.languages.length;a++){const r=this.languages[a];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}!this.resolvedLanguage&&this.languages.indexOf(t)<0&&this.store.hasLanguageSomeTranslations(t)&&(this.resolvedLanguage=t,this.languages.unshift(t))}}changeLanguage(t,a){this.isLanguageChangingTo=t;const r=p0();this.emit("languageChanging",t);const l=m=>{this.language=m,this.languages=this.services.languageUtils.toResolveHierarchy(m),this.resolvedLanguage=void 0,this.setResolvedLanguage(m)},c=(m,g)=>{g?this.isLanguageChangingTo===t&&(l(g),this.translator.changeLanguage(g),this.isLanguageChangingTo=void 0,this.emit("languageChanged",g),this.logger.log("languageChanged",g)):this.isLanguageChangingTo=void 0,r.resolve((...p)=>this.t(...p)),a&&a(m,(...p)=>this.t(...p))},f=m=>{!t&&!m&&this.services.languageDetector&&(m=[]);const g=sn(m)?m:m&&m[0],p=this.store.hasLanguageSomeTranslations(g)?g:this.services.languageUtils.getBestMatchFromCodes(sn(m)?[m]:m);p&&(this.language||l(p),this.translator.language||this.translator.changeLanguage(p),this.services.languageDetector?.cacheUserLanguage?.(p)),this.loadResources(p,y=>{c(y,p)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?f(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(f):this.services.languageDetector.detect(f):f(t),r}getFixedT(t,a,r){const l=(c,f,...m)=>{let g;typeof f!="object"?g=this.options.overloadTranslationOptionHandler([c,f].concat(m)):g={...f},g.lng=g.lng||l.lng,g.lngs=g.lngs||l.lngs,g.ns=g.ns||l.ns,g.keyPrefix!==""&&(g.keyPrefix=g.keyPrefix||r||l.keyPrefix);const p=this.options.keySeparator||".";let y;return g.keyPrefix&&Array.isArray(c)?y=c.map(S=>`${g.keyPrefix}${p}${S}`):y=g.keyPrefix?`${g.keyPrefix}${p}${c}`:c,this.t(y,g)};return sn(t)?l.lng=t:l.lngs=t,l.ns=a,l.keyPrefix=r,l}t(...t){return this.translator?.translate(...t)}exists(...t){return this.translator?.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,a={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=a.lng||this.resolvedLanguage||this.languages[0],l=this.options?this.options.fallbackLng:!1,c=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const f=(m,g)=>{const p=this.services.backendConnector.state[`${m}|${g}`];return p===-1||p===0||p===2};if(a.precheck){const m=a.precheck(this,f);if(m!==void 0)return m}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||f(r,t)&&(!l||f(c,t)))}loadNamespaces(t,a){const r=p0();return this.options.ns?(sn(t)&&(t=[t]),t.forEach(l=>{this.options.ns.indexOf(l)<0&&this.options.ns.push(l)}),this.loadResources(l=>{r.resolve(),a&&a(l)}),r):(a&&a(),Promise.resolve())}loadLanguages(t,a){const r=p0();sn(t)&&(t=[t]);const l=this.options.preload||[],c=t.filter(f=>l.indexOf(f)<0&&this.services.languageUtils.isSupportedCode(f));return c.length?(this.options.preload=l.concat(c),this.loadResources(f=>{r.resolve(),a&&a(f)}),r):(a&&a(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!t)return"rtl";try{const l=new Intl.Locale(t);if(l&&l.getTextInfo){const c=l.getTextInfo();if(c&&c.direction)return c.direction}}catch{}const a=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services?.languageUtils||new w6(M6());return t.toLowerCase().indexOf("-latn")>1?"ltr":a.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},a){return new y0(t,a)}cloneInstance(t={},a=eC){const r=t.forkResourceStore;r&&delete t.forkResourceStore;const l={...this.options,...t,isClone:!0},c=new y0(l);if((t.debug!==void 0||t.prefix!==void 0)&&(c.logger=c.logger.clone(t)),["store","services","language"].forEach(m=>{c[m]=this[m]}),c.services={...this.services},c.services.utils={hasLoadedNamespace:c.hasLoadedNamespace.bind(c)},r){const m=Object.keys(this.store.data).reduce((g,p)=>(g[p]={...this.store.data[p]},g[p]=Object.keys(g[p]).reduce((y,S)=>(y[S]={...g[p][S]},y),g[p]),g),{});c.store=new S6(m,l),c.services.resourceStore=c.store}return c.translator=new J1(c.services,l),c.translator.on("*",(m,...g)=>{c.emit(m,...g)}),c.init(l,a),c.translator.options=l,c.translator.backendConnector.services.utils={hasLoadedNamespace:c.hasLoadedNamespace.bind(c)},c}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Zr=y0.createInstance();Zr.createInstance=y0.createInstance,Zr.createInstance,Zr.dir,Zr.init,Zr.loadResources,Zr.reloadResources,Zr.use,Zr.changeLanguage,Zr.getFixedT,Zr.t,Zr.exists,Zr.setDefaultNamespace,Zr.hasLoadedNamespace,Zr.loadNamespaces,Zr.loadLanguages;const gZ=(e,t,a,r)=>{const l=[a,{code:t,...r||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(l,"warn","react-i18next::",!0);Vd(l[0])&&(l[0]=`react-i18next:: ${l[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...l):console?.warn&&console.warn(...l)},D6={},bO=(e,t,a,r)=>{Vd(a)&&D6[a]||(Vd(a)&&(D6[a]=new Date),gZ(e,t,a,r))},N6=(e,t)=>()=>{if(e.isInitialized)t();else{const a=()=>{setTimeout(()=>{e.off("initialized",a)},0),t()};e.on("initialized",a)}},SO=(e,t,a)=>{e.loadNamespaces(t,N6(e,a))},$6=(e,t,a,r)=>{if(Vd(a)&&(a=[a]),e.options.preload&&e.options.preload.indexOf(t)>-1)return SO(e,a,r);a.forEach(l=>{e.options.ns.indexOf(l)<0&&e.options.ns.push(l)}),e.loadLanguages(t,N6(e,r))},vZ=(e,t,a={})=>!t.languages||!t.languages.length?(bO(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:a.lng,precheck:(r,l)=>{if(a.bindI18n?.indexOf("languageChanging")>-1&&r.services.backendConnector.backend&&r.isLanguageChangingTo&&!l(r.isLanguageChangingTo,e))return!1}}),Vd=e=>typeof e=="string",yZ=e=>typeof e=="object"&&e!==null,bZ=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,SZ={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},CZ=e=>SZ[e];let CO={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:e=>e.replace(bZ,CZ)};const xZ=(e={})=>{CO={...CO,...e}},EZ=()=>CO;let z6;const wZ=e=>{z6=e},TZ=()=>z6,OZ={type:"3rdParty",init(e){xZ(e.options.react),wZ(e)}},RZ=C.createContext();class AZ{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(a=>{this.usedNamespaces[a]||(this.usedNamespaces[a]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const MZ=(e,t)=>{const a=C.useRef();return C.useEffect(()=>{a.current=e},[e,t]),a.current},j6=(e,t,a,r)=>e.getFixedT(t,a,r),_Z=(e,t,a,r)=>C.useCallback(j6(e,t,a,r),[e,t,a,r]),DZ=(e,t={})=>{const{i18n:a}=t,{i18n:r,defaultNS:l}=C.useContext(RZ)||{},c=a||r||TZ();if(c&&!c.reportNamespaces&&(c.reportNamespaces=new AZ),!c){bO(c,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const j=(V,H)=>Vd(H)?H:yZ(H)&&Vd(H.defaultValue)?H.defaultValue:Array.isArray(V)?V[V.length-1]:V,$=[j,{},!1];return $.t=j,$.i18n={},$.ready=!1,$}c.options.react?.wait&&bO(c,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const f={...EZ(),...c.options.react,...t},{useSuspense:m,keyPrefix:g}=f;let p=l||c.options?.defaultNS;p=Vd(p)?[p]:p||["translation"],c.reportNamespaces.addUsedNamespaces?.(p);const y=(c.isInitialized||c.initializedStoreOnce)&&p.every(j=>vZ(j,c,f)),S=_Z(c,t.lng||null,f.nsMode==="fallback"?p:p[0],g),E=()=>S,T=()=>j6(c,t.lng||null,f.nsMode==="fallback"?p:p[0],g),[O,M]=C.useState(E);let A=p.join();t.lng&&(A=`${t.lng}${A}`);const D=MZ(A),_=C.useRef(!0);C.useEffect(()=>{const{bindI18n:j,bindI18nStore:$}=f;_.current=!0,!y&&!m&&(t.lng?$6(c,t.lng,p,()=>{_.current&&M(T)}):SO(c,p,()=>{_.current&&M(T)})),y&&D&&D!==A&&_.current&&M(T);const V=()=>{_.current&&M(T)};return j&&c?.on(j,V),$&&c?.store.on($,V),()=>{_.current=!1,c&&j?.split(" ").forEach(H=>c.off(H,V)),$&&c&&$.split(" ").forEach(H=>c.store.off(H,V))}},[c,A]),C.useEffect(()=>{_.current&&y&&M(E)},[c,g,y]);const z=[O,c,y];if(z.t=O,z.i18n=c,z.ready=y,y||!y&&!m)return z;throw new Promise(j=>{t.lng?$6(c,t.lng,p,()=>j()):SO(c,p,()=>j())})},NZ={en:{translation:{welcome:"Hi there, you’re speaking with Jaweb AI Assistant."}},ar:{translation:{welcome:"مرحبًا، أنت تتحدث إلى مساعد Jaweb AI."}}};Zr.use(OZ).init({resources:NZ,lng:"en",fallbackLng:"en",interpolation:{escapeValue:!1}});const $Z=3,zZ=3e3,jZ=()=>{const[e,t]=C.useState(!0),[a,r]=C.useState(!1),[l,c]=C.useState(""),[f,m]=C.useState(""),[g,p]=C.useState(!1),[y,S]=C.useState(!1),[E,T]=C.useState(""),[O,M]=C.useState(""),[A,D]=C.useState(""),[_,z]=C.useState(""),[j,$]=C.useState([]),[V,H]=C.useState([]),[P,q]=C.useState(""),Y=async(te=0)=>{const G=nf("company_username");t(!0);const K={headers:{"Content-Type":"application/json",Accept:"application/json"},params:{username:G}};try{const ie=(await $a.get(`${Ei.apiUrl}chatbot-details/`,K)).data.data;ie.language==="Arabic"?Zr.changeLanguage("ar"):Zr.changeLanguage("en"),r(ie.chatbot_form),c(ie.chatbot_color),m(ie.chatbot_logo),p(ie.disable_chatbot_globally),S(ie.remove_powered_by_jaweb),T(ie.chatbot_initial_msg),M(ie.status),q(ie.mode),console.log(ie),ie.calendly_link&&D(ie.calendly_link),ie.phone_number_id&&z(`+${ie.phone_number_id}`);const k=await $a.get(`${Ei.apiUrl}chatbot-plugin-suggestions/`,K);let X=[];Array.isArray(k.data.data)?X=k.data.data:Array.isArray(k.data.user_questions)&&(X=k.data.user_questions),X.length>0?($(X.slice(0,3)),H(X.slice(3))):($([]),H([])),t(!1)}catch(J){console.error("Error fetching data:",J),te<$Z?setTimeout(()=>Y(te+1),zZ):console.error("Max retries reached. Could not fetch data.")}};return C.useEffect(()=>{Y()},[]),{isFetchingDetails:e,disableForm:a,colorCode:l,chatbotLogo:f,disableChatbotGlobally:g,removePoweredByJaweb:y,initialMessageText:E,subscription:O,calendly:A,merchantPhone:_,messagesSuggestions:j,restSuggestions:V,userType:P}},{Text:LZ,Title:VZ}=km,HZ=({chatbotLogo:e,colorCode:t,onNewSession:a,visitorId:r,onSessionSelect:l,setOpen:c,Opened:f,Phone:m})=>{const[g,p]=C.useState([]),[y,S]=C.useState(!0),E=async()=>{try{S(!0);const A=(await(await fetch(`${Ei.apiUrl}get-chatlogs-by-ip/?visitor_id=${r}&company_username=${nf("company_username")}`)).json()).map(D=>({id:D.user_session_id,agentName:D.assignee||"AI Agent",createdAt:D.date,isBlurred:D.closed,agentImage:D.assignee_picture}));p(A)}catch(O){console.error("Failed to load sessions:",O)}finally{S(!1)}};C.useEffect(()=>{r&&E()},[r]);const T=re.jsx(ku,{style:{fontSize:24},spin:!0});return re.jsxs("div",{style:{maxWidth:"100%",height:"100%",border:"1px solid #f0f0f0",borderRadius:8,overflow:"hidden",display:"flex",flexDirection:"column",paddingTop:20},children:[re.jsxs("div",{style:{padding:"0 16px 10px",display:"flex"},children:[re.jsx(VZ,{level:4,style:{margin:0},children:"Conversations"}),re.jsx(qv,{onClick:()=>c(!f),className:"chatbot-close",style:{marginLeft:"auto"}})]}),re.jsx("div",{style:{flex:1,overflowY:"auto"},children:y?re.jsx("div",{style:{textAlign:"center",padding:"2rem"},children:re.jsx(tf,{indicator:T})}):g.length>0?re.jsx($1,{itemLayout:"horizontal",dataSource:g,split:!0,renderItem:O=>re.jsx($1.Item,{onClick:()=>!O.isBlurred&&l(O.id,O.agentName||"Ai Agent",O.agentImage||e),style:{padding:"12px",opacity:O.isBlurred?.5:1,cursor:O.isBlurred?"not-allowed":"pointer",borderBottom:"1px solid #f0f0f0"},children:re.jsx($1.Item.Meta,{avatar:re.jsx(RT,{size:"large",src:O.agentImage||e,icon:!O.agentImage&&!e?re.jsx(v4,{}):void 0}),title:re.jsx("span",{style:{fontWeight:600},children:O.agentName||"AI Agent"}),description:re.jsxs(re.Fragment,{children:[re.jsxs(LZ,{type:"secondary",children:["Created: ",new Date(O.createdAt).toLocaleDateString()]}),O.isBlurred&&re.jsx("div",{style:{color:"red",fontSize:"12px",marginTop:4},children:"This session is closed and cannot be reopened."})]})})},O.id)}):re.jsx("div",{style:{padding:"1rem",textAlign:"center",color:"#888"},children:"No conversations yet."})}),re.jsxs("div",{style:{padding:"12px",borderTop:"1px solid #f0f0f0",display:"flex",gap:4},children:[re.jsx(as,{type:"primary",size:"large",block:!0,style:{backgroundColor:t,color:"#fff"},onClick:a,children:"Ask a question ?"}),m?re.jsx(as,{type:"default",style:{backgroundColor:"white",color:t},className:"hover:border-black",size:"large",icon:re.jsx(y4,{style:{color:t}}),onClick:()=>{const O=`https://wa.me/${m}`;window.open(O,"_blank")},children:"Chat on WhatsApp"}):re.jsx(re.Fragment,{})]})]})},{Title:BZ,Text:xO}=km,PZ=({onBack:e,onCreate:t,colorCode:a,visitorId:r,country:l})=>{const[c,f]=C.useState(""),[m,g]=C.useState(""),[p,y]=C.useState(""),[S,E]=C.useState(!1),T=async()=>{const O={visitor_id:r,country:l,name:c,email:m,phone:p,company_username:nf("company_username")};try{E(!0);const M=await fetch(`${Ei.apiUrl}chatlog-create/`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(O)}),A=await M.json();M.ok?t({name:c,email:m,phone:p,session_id:A?.user_session_id,messages:A.messages,hasInfo:!0}):console.error("Failed to register:",A)}catch(M){console.error("Error submitting session data:",M)}finally{E(!1)}};return re.jsxs("div",{style:{padding:"1.5rem"},children:[re.jsx(as,{type:"text",icon:re.jsx(FT,{}),onClick:e,style:{marginBottom:"1rem"},children:"Back"}),re.jsx(BZ,{level:4,style:{marginBottom:"2rem"},children:"Let's create a session"}),re.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"1.5rem"},children:[re.jsxs("div",{children:[re.jsx(xO,{strong:!0,children:"👋 Please, can I have your name?"}),re.jsx(Xu,{size:"large",placeholder:"John Doe",value:c,onChange:O=>f(O.target.value),style:{marginTop:"0.5rem"}})]}),re.jsxs("div",{children:[re.jsx(xO,{strong:!0,children:"📧 What’s your email address?"}),re.jsx(Xu,{size:"large",type:"email",placeholder:"you@example.com",value:m,onChange:O=>g(O.target.value),style:{marginTop:"0.5rem"}})]}),re.jsxs("div",{children:[re.jsx(xO,{strong:!0,children:"📱 May I have your phone number?"}),re.jsx(Xu,{size:"large",placeholder:"+1 234 567 8900",value:p,onChange:O=>y(O.target.value),style:{marginTop:"0.5rem"}})]}),re.jsx(as,{type:"primary",size:"large",style:{backgroundColor:a,color:"white"},onClick:T,disabled:!c||!m||!p,children:S?re.jsx(tf,{indicator:re.jsx(ku,{style:{fontSize:20,color:"white"},spin:!0})}):"Create Session"})]})]})},UZ=e=>{const[t,a]=C.useState([]),[r,l]=C.useState(!1),c=async()=>{const f=e;if(f){l(!0);try{const m=await $a.get(`${Ei.apiUrl}chat-message-history/`,{withCredentials:!0,params:{session_id:f,username:nf("company_username")}});m.data?.messages?.length>0&&(a(m.data.messages),l(!1))}catch(m){console.error("Couldn't load history",m)}}};return C.useEffect(()=>{c()},[e]),{messages:t,setMessages:a,isFetchingMessages:r}};function ri(e,t,a,r){return new(a||(a=Promise))(function(l,c){function f(p){try{g(r.next(p))}catch(y){c(y)}}function m(p){try{g(r.throw(p))}catch(y){c(y)}}function g(p){var y;p.done?l(p.value):(y=p.value,y instanceof a?y:new a(function(S){S(y)})).then(f,m)}g((r=r.apply(e,t||[])).next())})}typeof SuppressedError=="function"&&SuppressedError;class b0{constructor(){this.listeners={}}on(t,a,r){if(this.listeners[t]||(this.listeners[t]=new Set),this.listeners[t].add(a),r?.once){const l=()=>{this.un(t,l),this.un(t,a)};return this.on(t,l),l}return()=>this.un(t,a)}un(t,a){var r;(r=this.listeners[t])===null||r===void 0||r.delete(a)}once(t,a){return this.on(t,a,{once:!0})}unAll(){this.listeners={}}emit(t,...a){this.listeners[t]&&this.listeners[t].forEach(r=>r(...a))}}const tC={decode:function(e,t){return ri(this,void 0,void 0,function*(){const a=new AudioContext({sampleRate:t});return a.decodeAudioData(e).finally(()=>a.close())})},createBuffer:function(e,t){return typeof e[0]=="number"&&(e=[e]),function(a){const r=a[0];if(r.some(l=>l>1||l<-1)){const l=r.length;let c=0;for(let f=0;f<l;f++){const m=Math.abs(r[f]);m>c&&(c=m)}for(const f of a)for(let m=0;m<l;m++)f[m]/=c}}(e),{duration:t,length:e[0].length,sampleRate:e[0].length/t,numberOfChannels:e.length,getChannelData:a=>e?.[a],copyFromChannel:AudioBuffer.prototype.copyFromChannel,copyToChannel:AudioBuffer.prototype.copyToChannel}}};function L6(e,t){const a=t.xmlns?document.createElementNS(t.xmlns,e):document.createElement(e);for(const[r,l]of Object.entries(t))if(r==="children"&&l)for(const[c,f]of Object.entries(l))f instanceof Node?a.appendChild(f):typeof f=="string"?a.appendChild(document.createTextNode(f)):a.appendChild(L6(c,f));else r==="style"?Object.assign(a.style,l):r==="textContent"?a.textContent=l:a.setAttribute(r,l.toString());return a}function V6(e,t,a){const r=L6(e,t||{});return a?.appendChild(r),r}var IZ=Object.freeze({__proto__:null,createElement:V6,default:V6});const FZ={fetchBlob:function(e,t,a){return ri(this,void 0,void 0,function*(){const r=yield fetch(e,a);if(r.status>=400)throw new Error(`Failed to fetch ${e}: ${r.status} (${r.statusText})`);return function(l,c){ri(this,void 0,void 0,function*(){if(!l.body||!l.headers)return;const f=l.body.getReader(),m=Number(l.headers.get("Content-Length"))||0;let g=0;const p=S=>ri(this,void 0,void 0,function*(){g+=S?.length||0;const E=Math.round(g/m*100);c(E)}),y=()=>ri(this,void 0,void 0,function*(){let S;try{S=yield f.read()}catch{return}S.done||(p(S.value),yield y())});y()})}(r.clone(),t),r.blob()})}};class kZ extends b0{constructor(t){super(),this.isExternalMedia=!1,t.media?(this.media=t.media,this.isExternalMedia=!0):this.media=document.createElement("audio"),t.mediaControls&&(this.media.controls=!0),t.autoplay&&(this.media.autoplay=!0),t.playbackRate!=null&&this.onMediaEvent("canplay",()=>{t.playbackRate!=null&&(this.media.playbackRate=t.playbackRate)},{once:!0})}onMediaEvent(t,a,r){return this.media.addEventListener(t,a,r),()=>this.media.removeEventListener(t,a,r)}getSrc(){return this.media.currentSrc||this.media.src||""}revokeSrc(){const t=this.getSrc();t.startsWith("blob:")&&URL.revokeObjectURL(t)}canPlayType(t){return this.media.canPlayType(t)!==""}setSrc(t,a){const r=this.getSrc();if(t&&r===t)return;this.revokeSrc();const l=a instanceof Blob&&(this.canPlayType(a.type)||!t)?URL.createObjectURL(a):t;if(r&&this.media.removeAttribute("src"),l||t)try{this.media.src=l}catch{this.media.src=t}}destroy(){this.isExternalMedia||(this.media.pause(),this.media.remove(),this.revokeSrc(),this.media.removeAttribute("src"),this.media.load())}setMediaElement(t){this.media=t}play(){return ri(this,void 0,void 0,function*(){return this.media.play()})}pause(){this.media.pause()}isPlaying(){return!this.media.paused&&!this.media.ended}setTime(t){this.media.currentTime=Math.max(0,Math.min(t,this.getDuration()))}getDuration(){return this.media.duration}getCurrentTime(){return this.media.currentTime}getVolume(){return this.media.volume}setVolume(t){this.media.volume=t}getMuted(){return this.media.muted}setMuted(t){this.media.muted=t}getPlaybackRate(){return this.media.playbackRate}isSeeking(){return this.media.seeking}setPlaybackRate(t,a){a!=null&&(this.media.preservesPitch=a),this.media.playbackRate=t}getMediaElement(){return this.media}setSinkId(t){return this.media.setSinkId(t)}}class Xm extends b0{constructor(t,a){super(),this.timeouts=[],this.isScrollable=!1,this.audioData=null,this.resizeObserver=null,this.lastContainerWidth=0,this.isDragging=!1,this.subscriptions=[],this.unsubscribeOnScroll=[],this.subscriptions=[],this.options=t;const r=this.parentFromOptionsContainer(t.container);this.parent=r;const[l,c]=this.initHtml();r.appendChild(l),this.container=l,this.scrollContainer=c.querySelector(".scroll"),this.wrapper=c.querySelector(".wrapper"),this.canvasWrapper=c.querySelector(".canvases"),this.progressWrapper=c.querySelector(".progress"),this.cursor=c.querySelector(".cursor"),a&&c.appendChild(a),this.initEvents()}parentFromOptionsContainer(t){let a;if(typeof t=="string"?a=document.querySelector(t):t instanceof HTMLElement&&(a=t),!a)throw new Error("Container not found");return a}initEvents(){const t=a=>{const r=this.wrapper.getBoundingClientRect(),l=a.clientX-r.left,c=a.clientY-r.top;return[l/r.width,c/r.height]};if(this.wrapper.addEventListener("click",a=>{const[r,l]=t(a);this.emit("click",r,l)}),this.wrapper.addEventListener("dblclick",a=>{const[r,l]=t(a);this.emit("dblclick",r,l)}),this.options.dragToSeek!==!0&&typeof this.options.dragToSeek!="object"||this.initDrag(),this.scrollContainer.addEventListener("scroll",()=>{const{scrollLeft:a,scrollWidth:r,clientWidth:l}=this.scrollContainer,c=a/r,f=(a+l)/r;this.emit("scroll",c,f,a,a+l)}),typeof ResizeObserver=="function"){const a=this.createDelay(100);this.resizeObserver=new ResizeObserver(()=>{a().then(()=>this.onContainerResize()).catch(()=>{})}),this.resizeObserver.observe(this.scrollContainer)}}onContainerResize(){const t=this.parent.clientWidth;t===this.lastContainerWidth&&this.options.height!=="auto"||(this.lastContainerWidth=t,this.reRender())}initDrag(){this.subscriptions.push(function(t,a,r,l,c=3,f=0,m=100){if(!t)return()=>{};const g=matchMedia("(pointer: coarse)").matches;let p=()=>{};const y=S=>{if(S.button!==f)return;S.preventDefault(),S.stopPropagation();let E=S.clientX,T=S.clientY,O=!1;const M=Date.now(),A=$=>{if($.preventDefault(),$.stopPropagation(),g&&Date.now()-M<m)return;const V=$.clientX,H=$.clientY,P=V-E,q=H-T;if(O||Math.abs(P)>c||Math.abs(q)>c){const Y=t.getBoundingClientRect(),{left:te,top:G}=Y;O||(r?.(E-te,T-G),O=!0),a(P,q,V-te,H-G),E=V,T=H}},D=$=>{if(O){const V=$.clientX,H=$.clientY,P=t.getBoundingClientRect(),{left:q,top:Y}=P;l?.(V-q,H-Y)}p()},_=$=>{$.relatedTarget&&$.relatedTarget!==document.documentElement||D($)},z=$=>{O&&($.stopPropagation(),$.preventDefault())},j=$=>{O&&$.preventDefault()};document.addEventListener("pointermove",A),document.addEventListener("pointerup",D),document.addEventListener("pointerout",_),document.addEventListener("pointercancel",_),document.addEventListener("touchmove",j,{passive:!1}),document.addEventListener("click",z,{capture:!0}),p=()=>{document.removeEventListener("pointermove",A),document.removeEventListener("pointerup",D),document.removeEventListener("pointerout",_),document.removeEventListener("pointercancel",_),document.removeEventListener("touchmove",j),setTimeout(()=>{document.removeEventListener("click",z,{capture:!0})},10)}};return t.addEventListener("pointerdown",y),()=>{p(),t.removeEventListener("pointerdown",y)}}(this.wrapper,(t,a,r)=>{this.emit("drag",Math.max(0,Math.min(1,r/this.wrapper.getBoundingClientRect().width)))},t=>{this.isDragging=!0,this.emit("dragstart",Math.max(0,Math.min(1,t/this.wrapper.getBoundingClientRect().width)))},t=>{this.isDragging=!1,this.emit("dragend",Math.max(0,Math.min(1,t/this.wrapper.getBoundingClientRect().width)))}))}getHeight(t,a){var r;const l=((r=this.audioData)===null||r===void 0?void 0:r.numberOfChannels)||1;if(t==null)return 128;if(!isNaN(Number(t)))return Number(t);if(t==="auto"){const c=this.parent.clientHeight||128;return a?.every(f=>!f.overlay)?c/l:c}return 128}initHtml(){const t=document.createElement("div"),a=t.attachShadow({mode:"open"}),r=this.options.cspNonce&&typeof this.options.cspNonce=="string"?this.options.cspNonce.replace(/"/g,""):"";return a.innerHTML=`
573
573
  <style${r?` nonce="${r}"`:""}>
574
574
  :host {
575
575
  user-select: none;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "shopify-chatbot-widget",
3
3
  "private": false,
4
- "version": "0.2.2",
4
+ "version": "0.2.4",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",
@@ -38,6 +38,7 @@
38
38
  "tailwindcss": "^4.1.11",
39
39
  "typescript": "~5.8.3",
40
40
  "typescript-eslint": "^8.35.1",
41
- "vite": "^7.0.4"
41
+ "vite": "^7.0.4",
42
+ "vite-plugin-css-injected-by-js": "^3.5.2"
42
43
  }
43
44
  }
package/vite.config.ts CHANGED
@@ -3,7 +3,7 @@ import react from '@vitejs/plugin-react';
3
3
  import tailwindcss from '@tailwindcss/vite'
4
4
 
5
5
  export default defineConfig({
6
- plugins: [react(),tailwindcss() ],
6
+ plugins: [react(),tailwindcss(), ],
7
7
  define: {
8
8
  'process.env': {}, // or optionally, { NODE_ENV: '"production"', ... }
9
9
  },