@eshal-bot/chat-widget 0.2.12 → 0.2.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chat-widget-MarkdownRenderer-CBSXpNd6.esm.js → chat-widget-MarkdownRenderer-D9NjXFWy.esm.js} +6 -6
- package/dist/chat-widget-index-C-9MnNDf.esm.js +20 -0
- package/dist/chat-widget-markdown-chunk.js +122 -10
- package/dist/chat-widget-markdown-chunk.min.js +1 -1
- package/dist/chat-widget.esm.js +1 -1
- package/dist/chat-widget.js +394 -72
- package/dist/chat-widget.min.js +4 -4
- package/dist/chat-widget.umd.js +8 -8
- package/dist/index.d.ts +6 -0
- package/index.d.ts +6 -0
- package/package.json +1 -1
- package/dist/chat-widget-index-DqpnMEPr.esm.js +0 -20
package/dist/chat-widget.min.js
CHANGED
|
@@ -17,23 +17,23 @@
|
|
|
17
17
|
*
|
|
18
18
|
* This source code is licensed under the MIT license found in the
|
|
19
19
|
* LICENSE file in the root directory of this source tree.
|
|
20
|
-
*/function W(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var q=new Set,Q={};function Y(e,t){K(e,t),K(e+"Capture",t)}function K(e,t){for(Q[e]=t,e=0;e<t.length;e++)q.add(t[e])}var G=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),X=Object.prototype.hasOwnProperty,J=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Z={},ee={};function te(e,t,n,r,o,a,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=i}var ne={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ne[e]=new te(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ne[t]=new te(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){ne[e]=new te(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ne[e]=new te(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ne[e]=new te(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){ne[e]=new te(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){ne[e]=new te(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){ne[e]=new te(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){ne[e]=new te(e,5,!1,e.toLowerCase(),null,!1,!1)});var re=/[\-:]([a-z])/g;function oe(e){return e[1].toUpperCase()}function ae(e,t,n,r){var o=ne.hasOwnProperty(t)?ne[t]:null;(null!==o?0!==o.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,o,r)&&(n=null),r||null===o?function(e){return!!X.call(ee,e)||!X.call(Z,e)&&(J.test(e)?ee[e]=!0:(Z[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=null===n?3!==o.type&&"":n:(t=o.attributeName,r=o.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(o=o.type)||4===o&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(re,oe);ne[t]=new te(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(re,oe);ne[t]=new te(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(re,oe);ne[t]=new te(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){ne[e]=new te(e,1,!1,e.toLowerCase(),null,!1,!1)}),ne.xlinkHref=new te("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){ne[e]=new te(e,1,!1,e.toLowerCase(),null,!0,!0)});var ie=U.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,se=Symbol.for("react.element"),le=Symbol.for("react.portal"),ce=Symbol.for("react.fragment"),ue=Symbol.for("react.strict_mode"),de=Symbol.for("react.profiler"),pe=Symbol.for("react.provider"),ge=Symbol.for("react.context"),fe=Symbol.for("react.forward_ref"),he=Symbol.for("react.suspense"),me=Symbol.for("react.suspense_list"),be=Symbol.for("react.memo"),ye=Symbol.for("react.lazy"),ve=Symbol.for("react.offscreen"),we=Symbol.iterator;function ke(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=we&&e[we]||e["@@iterator"])?e:null}var xe,Se=Object.assign;function Ce(e){if(void 0===xe)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);xe=t&&t[1]||""}return"\n"+xe+e}var Me=!1;function Pe(e,t){if(!e||Me)return"";Me=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&"string"==typeof t.stack){for(var o=t.stack.split("\n"),a=r.stack.split("\n"),i=o.length-1,s=a.length-1;1<=i&&0<=s&&o[i]!==a[s];)s--;for(;1<=i&&0<=s;i--,s--)if(o[i]!==a[s]){if(1!==i||1!==s)do{if(i--,0>--s||o[i]!==a[s]){var l="\n"+o[i].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=i&&0<=s);break}}}finally{Me=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Ce(e):""}function ze(e){switch(e.tag){case 5:return Ce(e.type);case 16:return Ce("Lazy");case 13:return Ce("Suspense");case 19:return Ce("SuspenseList");case 0:case 2:case 15:return e=Pe(e.type,!1);case 11:return e=Pe(e.type.render,!1);case 1:return e=Pe(e.type,!0);default:return""}}function Ee(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case ce:return"Fragment";case le:return"Portal";case de:return"Profiler";case ue:return"StrictMode";case he:return"Suspense";case me:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case ge:return(e.displayName||"Context")+".Consumer";case pe:return(e._context.displayName||"Context")+".Provider";case fe:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case be:return null!==(t=e.displayName||null)?t:Ee(e.type)||"Memo";case ye:t=e._payload,e=e._init;try{return Ee(e(t))}catch(e){}}return null}function je(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ee(t);case 8:return t===ue?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function Te(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function Ne(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function Fe(e){e._valueTracker||(e._valueTracker=function(e){var t=Ne(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var o=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){r=""+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function Le(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Ne(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function Re(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Ae(e,t){var n=t.checked;return Se({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function _e(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=Te(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function Ie(e,t){null!=(t=t.checked)&&ae(e,"checked",t,!1)}function Be(e,t){Ie(e,t);var n=Te(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?Oe(e,t.type,n):t.hasOwnProperty("defaultValue")&&Oe(e,t.type,Te(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function De(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function Oe(e,t,n){"number"===t&&Re(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var $e=Array.isArray;function Ve(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Te(n),t=null,o=0;o<e.length;o++){if(e[o].value===n)return e[o].selected=!0,void(r&&(e[o].defaultSelected=!0));null!==t||e[o].disabled||(t=e[o])}null!==t&&(t.selected=!0)}}function Ue(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(W(91));return Se({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function He(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(W(92));if($e(n)){if(1<n.length)throw Error(W(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:Te(n)}}function We(e,t){var n=Te(t.value),r=Te(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function qe(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function Qe(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Ye(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?Qe(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var Ke,Ge,Xe=(Ge=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((Ke=Ke||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Ke.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction(function(){return Ge(e,t)})}:Ge);function Je(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var Ze={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},et=["Webkit","ms","Moz","O"];function tt(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||Ze.hasOwnProperty(e)&&Ze[e]?(""+t).trim():t+"px"}function nt(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=tt(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}Object.keys(Ze).forEach(function(e){et.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ze[t]=Ze[e]})});var rt=Se({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ot(e,t){if(t){if(rt[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(W(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(W(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(W(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(W(62))}}function at(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var it=null;function st(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var lt=null,ct=null,ut=null;function dt(e){if(e=ia(e)){if("function"!=typeof lt)throw Error(W(280));var t=e.stateNode;t&&(t=la(t),lt(e.stateNode,e.type,t))}}function pt(e){ct?ut?ut.push(e):ut=[e]:ct=e}function gt(){if(ct){var e=ct,t=ut;if(ut=ct=null,dt(e),t)for(e=0;e<t.length;e++)dt(t[e])}}function ft(e,t){return e(t)}function ht(){}var mt=!1;function bt(e,t,n){if(mt)return e(t,n);mt=!0;try{return ft(e,t,n)}finally{mt=!1,(null!==ct||null!==ut)&&(ht(),gt())}}function yt(e,t){var n=e.stateNode;if(null===n)return null;var r=la(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(W(231,t,typeof n));return n}var vt=!1;if(G)try{var wt={};Object.defineProperty(wt,"passive",{get:function(){vt=!0}}),window.addEventListener("test",wt,wt),window.removeEventListener("test",wt,wt)}catch(Ge){vt=!1}function kt(e,t,n,r,o,a,i,s,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(e){this.onError(e)}}var xt=!1,St=null,Ct=!1,Mt=null,Pt={onError:function(e){xt=!0,St=e}};function zt(e,t,n,r,o,a,i,s,l){xt=!1,St=null,kt.apply(Pt,arguments)}function Et(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{!!(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function jt(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function Tt(e){if(Et(e)!==e)throw Error(W(188))}function Nt(e){return e=function(e){var t=e.alternate;if(!t){if(null===(t=Et(e)))throw Error(W(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(null===o)break;var a=o.alternate;if(null===a){if(null!==(r=o.return)){n=r;continue}break}if(o.child===a.child){for(a=o.child;a;){if(a===n)return Tt(o),e;if(a===r)return Tt(o),t;a=a.sibling}throw Error(W(188))}if(n.return!==r.return)n=o,r=a;else{for(var i=!1,s=o.child;s;){if(s===n){i=!0,n=o,r=a;break}if(s===r){i=!0,r=o,n=a;break}s=s.sibling}if(!i){for(s=a.child;s;){if(s===n){i=!0,n=a,r=o;break}if(s===r){i=!0,r=a,n=o;break}s=s.sibling}if(!i)throw Error(W(189))}}if(n.alternate!==r)throw Error(W(190))}if(3!==n.tag)throw Error(W(188));return n.stateNode.current===n?e:t}(e),null!==e?Ft(e):null}function Ft(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=Ft(e);if(null!==t)return t;e=e.sibling}return null}var Lt=H.unstable_scheduleCallback,Rt=H.unstable_cancelCallback,At=H.unstable_shouldYield,_t=H.unstable_requestPaint,It=H.unstable_now,Bt=H.unstable_getCurrentPriorityLevel,Dt=H.unstable_ImmediatePriority,Ot=H.unstable_UserBlockingPriority,$t=H.unstable_NormalPriority,Vt=H.unstable_LowPriority,Ut=H.unstable_IdlePriority,Ht=null,Wt=null;var qt=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(Qt(e)/Yt|0)|0},Qt=Math.log,Yt=Math.LN2;var Kt=64,Gt=4194304;function Xt(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Jt(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,o=e.suspendedLanes,a=e.pingedLanes,i=268435455&n;if(0!==i){var s=i&~o;0!==s?r=Xt(s):0!==(a&=i)&&(r=Xt(a))}else 0!==(i=n&~o)?r=Xt(i):0!==a&&(r=Xt(a));if(0===r)return 0;if(0!==t&&t!==r&&0===(t&o)&&((o=r&-r)>=(a=t&-t)||16===o&&4194240&a))return t;if(4&r&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)o=1<<(n=31-qt(t)),r|=e[n],t&=~o;return r}function Zt(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function en(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function tn(){var e=Kt;return!(4194240&(Kt<<=1))&&(Kt=64),e}function nn(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function rn(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-qt(t)]=n}function on(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-qt(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var an=0;function sn(e){return 1<(e&=-e)?4<e?268435455&e?16:536870912:4:1}var ln,cn,un,dn,pn,gn=!1,fn=[],hn=null,mn=null,bn=null,yn=new Map,vn=new Map,wn=[],kn="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function xn(e,t){switch(e){case"focusin":case"focusout":hn=null;break;case"dragenter":case"dragleave":mn=null;break;case"mouseover":case"mouseout":bn=null;break;case"pointerover":case"pointerout":yn.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":vn.delete(t.pointerId)}}function Sn(e,t,n,r,o,a){return null===e||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[o]},null!==t&&(null!==(t=ia(t))&&cn(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==o&&-1===t.indexOf(o)&&t.push(o),e)}function Cn(e){var t=aa(e.target);if(null!==t){var n=Et(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=jt(n)))return e.blockedOn=t,void pn(e.priority,function(){un(n)})}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Mn(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=_n(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=ia(n))&&cn(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);it=r,n.target.dispatchEvent(r),it=null,t.shift()}return!0}function Pn(e,t,n){Mn(e)&&n.delete(t)}function zn(){gn=!1,null!==hn&&Mn(hn)&&(hn=null),null!==mn&&Mn(mn)&&(mn=null),null!==bn&&Mn(bn)&&(bn=null),yn.forEach(Pn),vn.forEach(Pn)}function En(e,t){e.blockedOn===t&&(e.blockedOn=null,gn||(gn=!0,H.unstable_scheduleCallback(H.unstable_NormalPriority,zn)))}function jn(e){function t(t){return En(t,e)}if(0<fn.length){En(fn[0],e);for(var n=1;n<fn.length;n++){var r=fn[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==hn&&En(hn,e),null!==mn&&En(mn,e),null!==bn&&En(bn,e),yn.forEach(t),vn.forEach(t),n=0;n<wn.length;n++)(r=wn[n]).blockedOn===e&&(r.blockedOn=null);for(;0<wn.length&&null===(n=wn[0]).blockedOn;)Cn(n),null===n.blockedOn&&wn.shift()}var Tn=ie.ReactCurrentBatchConfig,Nn=!0;function Fn(e,t,n,r){var o=an,a=Tn.transition;Tn.transition=null;try{an=1,Rn(e,t,n,r)}finally{an=o,Tn.transition=a}}function Ln(e,t,n,r){var o=an,a=Tn.transition;Tn.transition=null;try{an=4,Rn(e,t,n,r)}finally{an=o,Tn.transition=a}}function Rn(e,t,n,r){if(Nn){var o=_n(e,t,n,r);if(null===o)No(e,t,r,An,n),xn(e,r);else if(function(e,t,n,r,o){switch(t){case"focusin":return hn=Sn(hn,e,t,n,r,o),!0;case"dragenter":return mn=Sn(mn,e,t,n,r,o),!0;case"mouseover":return bn=Sn(bn,e,t,n,r,o),!0;case"pointerover":var a=o.pointerId;return yn.set(a,Sn(yn.get(a)||null,e,t,n,r,o)),!0;case"gotpointercapture":return a=o.pointerId,vn.set(a,Sn(vn.get(a)||null,e,t,n,r,o)),!0}return!1}(o,e,t,n,r))r.stopPropagation();else if(xn(e,r),4&t&&-1<kn.indexOf(e)){for(;null!==o;){var a=ia(o);if(null!==a&&ln(a),null===(a=_n(e,t,n,r))&&No(e,t,r,An,n),a===o)break;o=a}null!==o&&r.stopPropagation()}else No(e,t,r,null,n)}}var An=null;function _n(e,t,n,r){if(An=null,null!==(e=aa(e=st(r))))if(null===(t=Et(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=jt(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return An=e,null}function In(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Bt()){case Dt:return 1;case Ot:return 4;case $t:case Vt:return 16;case Ut:return 536870912;default:return 16}default:return 16}}var Bn=null,Dn=null,On=null;function $n(){if(On)return On;var e,t,n=Dn,r=n.length,o="value"in Bn?Bn.value:Bn.textContent,a=o.length;for(e=0;e<r&&n[e]===o[e];e++);var i=r-e;for(t=1;t<=i&&n[r-t]===o[a-t];t++);return On=o.slice(e,1<t?1-t:void 0)}function Vn(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function Un(){return!0}function Hn(){return!1}function Wn(e){function t(t,n,r,o,a){for(var i in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=o,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(i)&&(t=e[i],this[i]=t?t(o):o[i]);return this.isDefaultPrevented=(null!=o.defaultPrevented?o.defaultPrevented:!1===o.returnValue)?Un:Hn,this.isPropagationStopped=Hn,this}return Se(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=Un)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=Un)},persist:function(){},isPersistent:Un}),t}var qn,Qn,Yn,Kn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Gn=Wn(Kn),Xn=Se({},Kn,{view:0,detail:0}),Jn=Wn(Xn),Zn=Se({},Xn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:dr,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Yn&&(Yn&&"mousemove"===e.type?(qn=e.screenX-Yn.screenX,Qn=e.screenY-Yn.screenY):Qn=qn=0,Yn=e),qn)},movementY:function(e){return"movementY"in e?e.movementY:Qn}}),er=Wn(Zn),tr=Wn(Se({},Zn,{dataTransfer:0})),nr=Wn(Se({},Xn,{relatedTarget:0})),rr=Wn(Se({},Kn,{animationName:0,elapsedTime:0,pseudoElement:0})),or=Se({},Kn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),ar=Wn(or),ir=Wn(Se({},Kn,{data:0})),sr={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},lr={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},cr={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ur(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=cr[e])&&!!t[e]}function dr(){return ur}var pr=Se({},Xn,{key:function(e){if(e.key){var t=sr[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=Vn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?lr[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:dr,charCode:function(e){return"keypress"===e.type?Vn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?Vn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),gr=Wn(pr),fr=Wn(Se({},Zn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),hr=Wn(Se({},Xn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:dr})),mr=Wn(Se({},Kn,{propertyName:0,elapsedTime:0,pseudoElement:0})),br=Se({},Zn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),yr=Wn(br),vr=[9,13,27,32],wr=G&&"CompositionEvent"in window,kr=null;G&&"documentMode"in document&&(kr=document.documentMode);var xr=G&&"TextEvent"in window&&!kr,Sr=G&&(!wr||kr&&8<kr&&11>=kr),Cr=String.fromCharCode(32),Mr=!1;function Pr(e,t){switch(e){case"keyup":return-1!==vr.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function zr(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Er=!1;var jr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Tr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!jr[e.type]:"textarea"===t}function Nr(e,t,n,r){pt(r),0<(t=Lo(t,"onChange")).length&&(n=new Gn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Fr=null,Lr=null;function Rr(e){Mo(e,0)}function Ar(e){if(Le(sa(e)))return e}function _r(e,t){if("change"===e)return t}var Ir=!1;if(G){var Br;if(G){var Dr="oninput"in document;if(!Dr){var Or=document.createElement("div");Or.setAttribute("oninput","return;"),Dr="function"==typeof Or.oninput}Br=Dr}else Br=!1;Ir=Br&&(!document.documentMode||9<document.documentMode)}function $r(){Fr&&(Fr.detachEvent("onpropertychange",Vr),Lr=Fr=null)}function Vr(e){if("value"===e.propertyName&&Ar(Lr)){var t=[];Nr(t,Lr,e,st(e)),bt(Rr,t)}}function Ur(e,t,n){"focusin"===e?($r(),Lr=n,(Fr=t).attachEvent("onpropertychange",Vr)):"focusout"===e&&$r()}function Hr(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Ar(Lr)}function Wr(e,t){if("click"===e)return Ar(t)}function qr(e,t){if("input"===e||"change"===e)return Ar(t)}var Qr="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function Yr(e,t){if(Qr(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!X.call(t,o)||!Qr(e[o],t[o]))return!1}return!0}function Kr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Gr(e,t){var n,r=Kr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Kr(r)}}function Xr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?Xr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function Jr(){for(var e=window,t=Re();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=Re((e=t.contentWindow).document)}return t}function Zr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function eo(e){var t=Jr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Xr(n.ownerDocument.documentElement,n)){if(null!==r&&Zr(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var o=n.textContent.length,a=Math.min(r.start,o);r=void 0===r.end?a:Math.min(r.end,o),!e.extend&&a>r&&(o=r,r=a,a=o),o=Gr(n,a);var i=Gr(n,r);o&&i&&(1!==e.rangeCount||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&((t=t.createRange()).setStart(o.node,o.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var to=G&&"documentMode"in document&&11>=document.documentMode,no=null,ro=null,oo=null,ao=!1;function io(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;ao||null==no||no!==Re(r)||("selectionStart"in(r=no)&&Zr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},oo&&Yr(oo,r)||(oo=r,0<(r=Lo(ro,"onSelect")).length&&(t=new Gn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=no)))}function so(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var lo={animationend:so("Animation","AnimationEnd"),animationiteration:so("Animation","AnimationIteration"),animationstart:so("Animation","AnimationStart"),transitionend:so("Transition","TransitionEnd")},co={},uo={};function po(e){if(co[e])return co[e];if(!lo[e])return e;var t,n=lo[e];for(t in n)if(n.hasOwnProperty(t)&&t in uo)return co[e]=n[t];return e}G&&(uo=document.createElement("div").style,"AnimationEvent"in window||(delete lo.animationend.animation,delete lo.animationiteration.animation,delete lo.animationstart.animation),"TransitionEvent"in window||delete lo.transitionend.transition);var go=po("animationend"),fo=po("animationiteration"),ho=po("animationstart"),mo=po("transitionend"),bo=new Map,yo="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function vo(e,t){bo.set(e,t),Y(t,[e])}for(var wo=0;wo<yo.length;wo++){var ko=yo[wo];vo(ko.toLowerCase(),"on"+(ko[0].toUpperCase()+ko.slice(1)))}vo(go,"onAnimationEnd"),vo(fo,"onAnimationIteration"),vo(ho,"onAnimationStart"),vo("dblclick","onDoubleClick"),vo("focusin","onFocus"),vo("focusout","onBlur"),vo(mo,"onTransitionEnd"),K("onMouseEnter",["mouseout","mouseover"]),K("onMouseLeave",["mouseout","mouseover"]),K("onPointerEnter",["pointerout","pointerover"]),K("onPointerLeave",["pointerout","pointerover"]),Y("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Y("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Y("onBeforeInput",["compositionend","keypress","textInput","paste"]),Y("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Y("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Y("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var xo="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),So=new Set("cancel close invalid load scroll toggle".split(" ").concat(xo));function Co(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,o,a,i,s,l){if(zt.apply(this,arguments),xt){if(!xt)throw Error(W(198));var c=St;xt=!1,St=null,Ct||(Ct=!0,Mt=c)}}(r,t,void 0,e),e.currentTarget=null}function Mo(e,t){t=!!(4&t);for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var a=void 0;if(t)for(var i=r.length-1;0<=i;i--){var s=r[i],l=s.instance,c=s.currentTarget;if(s=s.listener,l!==a&&o.isPropagationStopped())break e;Co(o,s,c),a=l}else for(i=0;i<r.length;i++){if(l=(s=r[i]).instance,c=s.currentTarget,s=s.listener,l!==a&&o.isPropagationStopped())break e;Co(o,s,c),a=l}}}if(Ct)throw e=Mt,Ct=!1,Mt=null,e}function Po(e,t){var n=t[na];void 0===n&&(n=t[na]=new Set);var r=e+"__bubble";n.has(r)||(To(t,e,2,!1),n.add(r))}function zo(e,t,n){var r=0;t&&(r|=4),To(n,e,r,t)}var Eo="_reactListening"+Math.random().toString(36).slice(2);function jo(e){if(!e[Eo]){e[Eo]=!0,q.forEach(function(t){"selectionchange"!==t&&(So.has(t)||zo(t,!1,e),zo(t,!0,e))});var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Eo]||(t[Eo]=!0,zo("selectionchange",!1,t))}}function To(e,t,n,r){switch(In(t)){case 1:var o=Fn;break;case 4:o=Ln;break;default:o=Rn}n=o.bind(null,t,n,e),o=void 0,!vt||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(o=!0),r?void 0!==o?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):void 0!==o?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function No(e,t,n,r,o){var a=r;if(!(1&t||2&t||null===r))e:for(;;){if(null===r)return;var i=r.tag;if(3===i||4===i){var s=r.stateNode.containerInfo;if(s===o||8===s.nodeType&&s.parentNode===o)break;if(4===i)for(i=r.return;null!==i;){var l=i.tag;if((3===l||4===l)&&((l=i.stateNode.containerInfo)===o||8===l.nodeType&&l.parentNode===o))return;i=i.return}for(;null!==s;){if(null===(i=aa(s)))return;if(5===(l=i.tag)||6===l){r=a=i;continue e}s=s.parentNode}}r=r.return}bt(function(){var r=a,o=st(n),i=[];e:{var s=bo.get(e);if(void 0!==s){var l=Gn,c=e;switch(e){case"keypress":if(0===Vn(n))break e;case"keydown":case"keyup":l=gr;break;case"focusin":c="focus",l=nr;break;case"focusout":c="blur",l=nr;break;case"beforeblur":case"afterblur":l=nr;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=er;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=tr;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=hr;break;case go:case fo:case ho:l=rr;break;case mo:l=mr;break;case"scroll":l=Jn;break;case"wheel":l=yr;break;case"copy":case"cut":case"paste":l=ar;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=fr}var u=!!(4&t),d=!u&&"scroll"===e,p=u?null!==s?s+"Capture":null:s;u=[];for(var g,f=r;null!==f;){var h=(g=f).stateNode;if(5===g.tag&&null!==h&&(g=h,null!==p&&(null!=(h=yt(f,p))&&u.push(Fo(f,h,g)))),d)break;f=f.return}0<u.length&&(s=new l(s,c,null,n,o),i.push({event:s,listeners:u}))}}if(!(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||n===it||!(c=n.relatedTarget||n.fromElement)||!aa(c)&&!c[ta])&&(l||s)&&(s=o.window===o?o:(s=o.ownerDocument)?s.defaultView||s.parentWindow:window,l?(l=r,null!==(c=(c=n.relatedTarget||n.toElement)?aa(c):null)&&(c!==(d=Et(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(l=null,c=r),l!==c)){if(u=er,h="onMouseLeave",p="onMouseEnter",f="mouse","pointerout"!==e&&"pointerover"!==e||(u=fr,h="onPointerLeave",p="onPointerEnter",f="pointer"),d=null==l?s:sa(l),g=null==c?s:sa(c),(s=new u(h,f+"leave",l,n,o)).target=d,s.relatedTarget=g,h=null,aa(o)===r&&((u=new u(p,f+"enter",c,n,o)).target=g,u.relatedTarget=d,h=u),d=h,l&&c)e:{for(p=c,f=0,g=u=l;g;g=Ro(g))f++;for(g=0,h=p;h;h=Ro(h))g++;for(;0<f-g;)u=Ro(u),f--;for(;0<g-f;)p=Ro(p),g--;for(;f--;){if(u===p||null!==p&&u===p.alternate)break e;u=Ro(u),p=Ro(p)}u=null}else u=null;null!==l&&Ao(i,s,l,u,!1),null!==c&&null!==d&&Ao(i,d,c,u,!0)}if("select"===(l=(s=r?sa(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===l&&"file"===s.type)var m=_r;else if(Tr(s))if(Ir)m=qr;else{m=Hr;var b=Ur}else(l=s.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(m=Wr);switch(m&&(m=m(e,r))?Nr(i,m,n,o):(b&&b(e,s,r),"focusout"===e&&(b=s._wrapperState)&&b.controlled&&"number"===s.type&&Oe(s,"number",s.value)),b=r?sa(r):window,e){case"focusin":(Tr(b)||"true"===b.contentEditable)&&(no=b,ro=r,oo=null);break;case"focusout":oo=ro=no=null;break;case"mousedown":ao=!0;break;case"contextmenu":case"mouseup":case"dragend":ao=!1,io(i,n,o);break;case"selectionchange":if(to)break;case"keydown":case"keyup":io(i,n,o)}var y;if(wr)e:{switch(e){case"compositionstart":var v="onCompositionStart";break e;case"compositionend":v="onCompositionEnd";break e;case"compositionupdate":v="onCompositionUpdate";break e}v=void 0}else Er?Pr(e,n)&&(v="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(v="onCompositionStart");v&&(Sr&&"ko"!==n.locale&&(Er||"onCompositionStart"!==v?"onCompositionEnd"===v&&Er&&(y=$n()):(Dn="value"in(Bn=o)?Bn.value:Bn.textContent,Er=!0)),0<(b=Lo(r,v)).length&&(v=new ir(v,e,null,n,o),i.push({event:v,listeners:b}),y?v.data=y:null!==(y=zr(n))&&(v.data=y))),(y=xr?function(e,t){switch(e){case"compositionend":return zr(t);case"keypress":return 32!==t.which?null:(Mr=!0,Cr);case"textInput":return(e=t.data)===Cr&&Mr?null:e;default:return null}}(e,n):function(e,t){if(Er)return"compositionend"===e||!wr&&Pr(e,t)?(e=$n(),On=Dn=Bn=null,Er=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Sr&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=Lo(r,"onBeforeInput")).length&&(o=new ir("onBeforeInput","beforeinput",null,n,o),i.push({event:o,listeners:r}),o.data=y))}Mo(i,t)})}function Fo(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Lo(e,t){for(var n=t+"Capture",r=[];null!==e;){var o=e,a=o.stateNode;5===o.tag&&null!==a&&(o=a,null!=(a=yt(e,n))&&r.unshift(Fo(e,a,o)),null!=(a=yt(e,t))&&r.push(Fo(e,a,o))),e=e.return}return r}function Ro(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Ao(e,t,n,r,o){for(var a=t._reactName,i=[];null!==n&&n!==r;){var s=n,l=s.alternate,c=s.stateNode;if(null!==l&&l===r)break;5===s.tag&&null!==c&&(s=c,o?null!=(l=yt(n,a))&&i.unshift(Fo(n,l,s)):o||null!=(l=yt(n,a))&&i.push(Fo(n,l,s))),n=n.return}0!==i.length&&e.push({event:t,listeners:i})}var _o=/\r\n?/g,Io=/\u0000|\uFFFD/g;function Bo(e){return("string"==typeof e?e:""+e).replace(_o,"\n").replace(Io,"")}function Do(e,t,n){if(t=Bo(t),Bo(e)!==t&&n)throw Error(W(425))}function Oo(){}var $o=null,Vo=null;function Uo(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var Ho="function"==typeof setTimeout?setTimeout:void 0,Wo="function"==typeof clearTimeout?clearTimeout:void 0,qo="function"==typeof Promise?Promise:void 0,Qo="function"==typeof queueMicrotask?queueMicrotask:void 0!==qo?function(e){return qo.resolve(null).then(e).catch(Yo)}:Ho;function Yo(e){setTimeout(function(){throw e})}function Ko(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&8===o.nodeType)if("/$"===(n=o.data)){if(0===r)return e.removeChild(o),void jn(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=o}while(n);jn(t)}function Go(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function Xo(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var Jo=Math.random().toString(36).slice(2),Zo="__reactFiber$"+Jo,ea="__reactProps$"+Jo,ta="__reactContainer$"+Jo,na="__reactEvents$"+Jo,ra="__reactListeners$"+Jo,oa="__reactHandles$"+Jo;function aa(e){var t=e[Zo];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ta]||n[Zo]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=Xo(e);null!==e;){if(n=e[Zo])return n;e=Xo(e)}return t}n=(e=n).parentNode}return null}function ia(e){return!(e=e[Zo]||e[ta])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function sa(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(W(33))}function la(e){return e[ea]||null}var ca=[],ua=-1;function da(e){return{current:e}}function pa(e){0>ua||(e.current=ca[ua],ca[ua]=null,ua--)}function ga(e,t){ua++,ca[ua]=e.current,e.current=t}var fa={},ha=da(fa),ma=da(!1),ba=fa;function ya(e,t){var n=e.type.contextTypes;if(!n)return fa;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,a={};for(o in n)a[o]=t[o];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function va(e){return null!=(e=e.childContextTypes)}function wa(){pa(ma),pa(ha)}function ka(e,t,n){if(ha.current!==fa)throw Error(W(168));ga(ha,t),ga(ma,n)}function xa(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var o in r=r.getChildContext())if(!(o in t))throw Error(W(108,je(e)||"Unknown",o));return Se({},n,r)}function Sa(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||fa,ba=ha.current,ga(ha,e),ga(ma,ma.current),!0}function Ca(e,t,n){var r=e.stateNode;if(!r)throw Error(W(169));n?(e=xa(e,t,ba),r.__reactInternalMemoizedMergedChildContext=e,pa(ma),pa(ha),ga(ha,e)):pa(ma),ga(ma,n)}var Ma=null,Pa=!1,za=!1;function Ea(e){null===Ma?Ma=[e]:Ma.push(e)}function ja(){if(!za&&null!==Ma){za=!0;var e=0,t=an;try{var n=Ma;for(an=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Ma=null,Pa=!1}catch(t){throw null!==Ma&&(Ma=Ma.slice(e+1)),Lt(Dt,ja),t}finally{an=t,za=!1}}return null}var Ta=[],Na=0,Fa=null,La=0,Ra=[],Aa=0,_a=null,Ia=1,Ba="";function Da(e,t){Ta[Na++]=La,Ta[Na++]=Fa,Fa=e,La=t}function Oa(e,t,n){Ra[Aa++]=Ia,Ra[Aa++]=Ba,Ra[Aa++]=_a,_a=e;var r=Ia;e=Ba;var o=32-qt(r)-1;r&=~(1<<o),n+=1;var a=32-qt(t)+o;if(30<a){var i=o-o%5;a=(r&(1<<i)-1).toString(32),r>>=i,o-=i,Ia=1<<32-qt(t)+o|n<<o|r,Ba=a+e}else Ia=1<<a|n<<o|r,Ba=e}function $a(e){null!==e.return&&(Da(e,1),Oa(e,1,0))}function Va(e){for(;e===Fa;)Fa=Ta[--Na],Ta[Na]=null,La=Ta[--Na],Ta[Na]=null;for(;e===_a;)_a=Ra[--Aa],Ra[Aa]=null,Ba=Ra[--Aa],Ra[Aa]=null,Ia=Ra[--Aa],Ra[Aa]=null}var Ua=null,Ha=null,Wa=!1,qa=null;function Qa(e,t){var n=mu(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function Ya(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,Ua=e,Ha=Go(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,Ua=e,Ha=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==_a?{id:Ia,overflow:Ba}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=mu(18,null,null,0)).stateNode=t,n.return=e,e.child=n,Ua=e,Ha=null,!0);default:return!1}}function Ka(e){return!(!(1&e.mode)||128&e.flags)}function Ga(e){if(Wa){var t=Ha;if(t){var n=t;if(!Ya(e,t)){if(Ka(e))throw Error(W(418));t=Go(n.nextSibling);var r=Ua;t&&Ya(e,t)?Qa(r,n):(e.flags=-4097&e.flags|2,Wa=!1,Ua=e)}}else{if(Ka(e))throw Error(W(418));e.flags=-4097&e.flags|2,Wa=!1,Ua=e}}}function Xa(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;Ua=e}function Ja(e){if(e!==Ua)return!1;if(!Wa)return Xa(e),Wa=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!Uo(e.type,e.memoizedProps)),t&&(t=Ha)){if(Ka(e))throw Za(),Error(W(418));for(;t;)Qa(e,t),t=Go(t.nextSibling)}if(Xa(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(W(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){Ha=Go(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}Ha=null}}else Ha=Ua?Go(e.stateNode.nextSibling):null;return!0}function Za(){for(var e=Ha;e;)e=Go(e.nextSibling)}function ei(){Ha=Ua=null,Wa=!1}function ti(e){null===qa?qa=[e]:qa.push(e)}var ni=ie.ReactCurrentBatchConfig;function ri(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(W(309));var r=n.stateNode}if(!r)throw Error(W(147,e));var o=r,a=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===a?t.ref:(t=function(e){var t=o.refs;null===e?delete t[a]:t[a]=e},t._stringRef=a,t)}if("string"!=typeof e)throw Error(W(284));if(!n._owner)throw Error(W(290,e))}return e}function oi(e,t){throw e=Object.prototype.toString.call(t),Error(W(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function ai(e){return(0,e._init)(e._payload)}function ii(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t){return(e=yu(e,t)).index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function i(t){return e&&null===t.alternate&&(t.flags|=2),t}function s(e,t,n,r){return null===t||6!==t.tag?((t=xu(n,e.mode,r)).return=e,t):((t=o(t,n)).return=e,t)}function l(e,t,n,r){var a=n.type;return a===ce?u(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===a||"object"==typeof a&&null!==a&&a.$$typeof===ye&&ai(a)===t.type)?((r=o(t,n.props)).ref=ri(e,t,n),r.return=e,r):((r=vu(n.type,n.key,n.props,null,e.mode,r)).ref=ri(e,t,n),r.return=e,r)}function c(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Su(n,e.mode,r)).return=e,t):((t=o(t,n.children||[])).return=e,t)}function u(e,t,n,r,a){return null===t||7!==t.tag?((t=wu(n,e.mode,r,a)).return=e,t):((t=o(t,n)).return=e,t)}function d(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=xu(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case se:return(n=vu(t.type,t.key,t.props,null,e.mode,n)).ref=ri(e,null,t),n.return=e,n;case le:return(t=Su(t,e.mode,n)).return=e,t;case ye:return d(e,(0,t._init)(t._payload),n)}if($e(t)||ke(t))return(t=wu(t,e.mode,n,null)).return=e,t;oi(e,t)}return null}function p(e,t,n,r){var o=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==o?null:s(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case se:return n.key===o?l(e,t,n,r):null;case le:return n.key===o?c(e,t,n,r):null;case ye:return p(e,t,(o=n._init)(n._payload),r)}if($e(n)||ke(n))return null!==o?null:u(e,t,n,r,null);oi(e,n)}return null}function g(e,t,n,r,o){if("string"==typeof r&&""!==r||"number"==typeof r)return s(t,e=e.get(n)||null,""+r,o);if("object"==typeof r&&null!==r){switch(r.$$typeof){case se:return l(t,e=e.get(null===r.key?n:r.key)||null,r,o);case le:return c(t,e=e.get(null===r.key?n:r.key)||null,r,o);case ye:return g(e,t,n,(0,r._init)(r._payload),o)}if($e(r)||ke(r))return u(t,e=e.get(n)||null,r,o,null);oi(t,r)}return null}function f(o,i,s,l){for(var c=null,u=null,f=i,h=i=0,m=null;null!==f&&h<s.length;h++){f.index>h?(m=f,f=null):m=f.sibling;var b=p(o,f,s[h],l);if(null===b){null===f&&(f=m);break}e&&f&&null===b.alternate&&t(o,f),i=a(b,i,h),null===u?c=b:u.sibling=b,u=b,f=m}if(h===s.length)return n(o,f),Wa&&Da(o,h),c;if(null===f){for(;h<s.length;h++)null!==(f=d(o,s[h],l))&&(i=a(f,i,h),null===u?c=f:u.sibling=f,u=f);return Wa&&Da(o,h),c}for(f=r(o,f);h<s.length;h++)null!==(m=g(f,o,h,s[h],l))&&(e&&null!==m.alternate&&f.delete(null===m.key?h:m.key),i=a(m,i,h),null===u?c=m:u.sibling=m,u=m);return e&&f.forEach(function(e){return t(o,e)}),Wa&&Da(o,h),c}function h(o,i,s,l){var c=ke(s);if("function"!=typeof c)throw Error(W(150));if(null==(s=c.call(s)))throw Error(W(151));for(var u=c=null,f=i,h=i=0,m=null,b=s.next();null!==f&&!b.done;h++,b=s.next()){f.index>h?(m=f,f=null):m=f.sibling;var y=p(o,f,b.value,l);if(null===y){null===f&&(f=m);break}e&&f&&null===y.alternate&&t(o,f),i=a(y,i,h),null===u?c=y:u.sibling=y,u=y,f=m}if(b.done)return n(o,f),Wa&&Da(o,h),c;if(null===f){for(;!b.done;h++,b=s.next())null!==(b=d(o,b.value,l))&&(i=a(b,i,h),null===u?c=b:u.sibling=b,u=b);return Wa&&Da(o,h),c}for(f=r(o,f);!b.done;h++,b=s.next())null!==(b=g(f,o,h,b.value,l))&&(e&&null!==b.alternate&&f.delete(null===b.key?h:b.key),i=a(b,i,h),null===u?c=b:u.sibling=b,u=b);return e&&f.forEach(function(e){return t(o,e)}),Wa&&Da(o,h),c}return function e(r,a,s,l){if("object"==typeof s&&null!==s&&s.type===ce&&null===s.key&&(s=s.props.children),"object"==typeof s&&null!==s){switch(s.$$typeof){case se:e:{for(var c=s.key,u=a;null!==u;){if(u.key===c){if((c=s.type)===ce){if(7===u.tag){n(r,u.sibling),(a=o(u,s.props.children)).return=r,r=a;break e}}else if(u.elementType===c||"object"==typeof c&&null!==c&&c.$$typeof===ye&&ai(c)===u.type){n(r,u.sibling),(a=o(u,s.props)).ref=ri(r,u,s),a.return=r,r=a;break e}n(r,u);break}t(r,u),u=u.sibling}s.type===ce?((a=wu(s.props.children,r.mode,l,s.key)).return=r,r=a):((l=vu(s.type,s.key,s.props,null,r.mode,l)).ref=ri(r,a,s),l.return=r,r=l)}return i(r);case le:e:{for(u=s.key;null!==a;){if(a.key===u){if(4===a.tag&&a.stateNode.containerInfo===s.containerInfo&&a.stateNode.implementation===s.implementation){n(r,a.sibling),(a=o(a,s.children||[])).return=r,r=a;break e}n(r,a);break}t(r,a),a=a.sibling}(a=Su(s,r.mode,l)).return=r,r=a}return i(r);case ye:return e(r,a,(u=s._init)(s._payload),l)}if($e(s))return f(r,a,s,l);if(ke(s))return h(r,a,s,l);oi(r,s)}return"string"==typeof s&&""!==s||"number"==typeof s?(s=""+s,null!==a&&6===a.tag?(n(r,a.sibling),(a=o(a,s)).return=r,r=a):(n(r,a),(a=xu(s,r.mode,l)).return=r,r=a),i(r)):n(r,a)}}var si=ii(!0),li=ii(!1),ci=da(null),ui=null,di=null,pi=null;function gi(){pi=di=ui=null}function fi(e){var t=ci.current;pa(ci),e._currentValue=t}function hi(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function mi(e,t){ui=e,pi=di=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(ol=!0),e.firstContext=null)}function bi(e){var t=e._currentValue;if(pi!==e)if(e={context:e,memoizedValue:t,next:null},null===di){if(null===ui)throw Error(W(308));di=e,ui.dependencies={lanes:0,firstContext:e}}else di=di.next=e;return t}var yi=null;function vi(e){null===yi?yi=[e]:yi.push(e)}function wi(e,t,n,r){var o=t.interleaved;return null===o?(n.next=n,vi(t)):(n.next=o.next,o.next=n),t.interleaved=n,ki(e,r)}function ki(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var xi=!1;function Si(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ci(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Mi(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Pi(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,2&gc){var o=r.pending;return null===o?t.next=t:(t.next=o.next,o.next=t),r.pending=t,ki(e,n)}return null===(o=r.interleaved)?(t.next=t,vi(r)):(t.next=o.next,o.next=t),r.interleaved=t,ki(e,n)}function zi(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,on(e,n)}}function Ei(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var o=null,a=null;if(null!==(n=n.firstBaseUpdate)){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===a?o=a=i:a=a.next=i,n=n.next}while(null!==n);null===a?o=a=t:a=a.next=t}else o=a=t;return n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:a,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function ji(e,t,n,r){var o=e.updateQueue;xi=!1;var a=o.firstBaseUpdate,i=o.lastBaseUpdate,s=o.shared.pending;if(null!==s){o.shared.pending=null;var l=s,c=l.next;l.next=null,null===i?a=c:i.next=c,i=l;var u=e.alternate;null!==u&&((s=(u=u.updateQueue).lastBaseUpdate)!==i&&(null===s?u.firstBaseUpdate=c:s.next=c,u.lastBaseUpdate=l))}if(null!==a){var d=o.baseState;for(i=0,u=c=l=null,s=a;;){var p=s.lane,g=s.eventTime;if((r&p)===p){null!==u&&(u=u.next={eventTime:g,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var f=e,h=s;switch(p=t,g=n,h.tag){case 1:if("function"==typeof(f=h.payload)){d=f.call(g,d,p);break e}d=f;break e;case 3:f.flags=-65537&f.flags|128;case 0:if(null==(p="function"==typeof(f=h.payload)?f.call(g,d,p):f))break e;d=Se({},d,p);break e;case 2:xi=!0}}null!==s.callback&&0!==s.lane&&(e.flags|=64,null===(p=o.effects)?o.effects=[s]:p.push(s))}else g={eventTime:g,lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===u?(c=u=g,l=d):u=u.next=g,i|=p;if(null===(s=s.next)){if(null===(s=o.shared.pending))break;s=(p=s).next,p.next=null,o.lastBaseUpdate=p,o.shared.pending=null}}if(null===u&&(l=d),o.baseState=l,o.firstBaseUpdate=c,o.lastBaseUpdate=u,null!==(t=o.shared.interleaved)){o=t;do{i|=o.lane,o=o.next}while(o!==t)}else null===a&&(o.shared.lanes=0);kc|=i,e.lanes=i,e.memoizedState=d}}function Ti(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(null!==o){if(r.callback=null,r=n,"function"!=typeof o)throw Error(W(191,o));o.call(r)}}}var Ni={},Fi=da(Ni),Li=da(Ni),Ri=da(Ni);function Ai(e){if(e===Ni)throw Error(W(174));return e}function _i(e,t){switch(ga(Ri,t),ga(Li,e),ga(Fi,Ni),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ye(null,"");break;default:t=Ye(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}pa(Fi),ga(Fi,t)}function Ii(){pa(Fi),pa(Li),pa(Ri)}function Bi(e){Ai(Ri.current);var t=Ai(Fi.current),n=Ye(t,e.type);t!==n&&(ga(Li,e),ga(Fi,n))}function Di(e){Li.current===e&&(pa(Fi),pa(Li))}var Oi=da(0);function $i(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(128&t.flags)return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Vi=[];function Ui(){for(var e=0;e<Vi.length;e++)Vi[e]._workInProgressVersionPrimary=null;Vi.length=0}var Hi=ie.ReactCurrentDispatcher,Wi=ie.ReactCurrentBatchConfig,qi=0,Qi=null,Yi=null,Ki=null,Gi=!1,Xi=!1,Ji=0,Zi=0;function es(){throw Error(W(321))}function ts(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Qr(e[n],t[n]))return!1;return!0}function ns(e,t,n,r,o,a){if(qi=a,Qi=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Hi.current=null===e||null===e.memoizedState?Ds:Os,e=n(r,o),Xi){a=0;do{if(Xi=!1,Ji=0,25<=a)throw Error(W(301));a+=1,Ki=Yi=null,t.updateQueue=null,Hi.current=$s,e=n(r,o)}while(Xi)}if(Hi.current=Bs,t=null!==Yi&&null!==Yi.next,qi=0,Ki=Yi=Qi=null,Gi=!1,t)throw Error(W(300));return e}function rs(){var e=0!==Ji;return Ji=0,e}function os(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Ki?Qi.memoizedState=Ki=e:Ki=Ki.next=e,Ki}function as(){if(null===Yi){var e=Qi.alternate;e=null!==e?e.memoizedState:null}else e=Yi.next;var t=null===Ki?Qi.memoizedState:Ki.next;if(null!==t)Ki=t,Yi=e;else{if(null===e)throw Error(W(310));e={memoizedState:(Yi=e).memoizedState,baseState:Yi.baseState,baseQueue:Yi.baseQueue,queue:Yi.queue,next:null},null===Ki?Qi.memoizedState=Ki=e:Ki=Ki.next=e}return Ki}function is(e,t){return"function"==typeof t?t(e):t}function ss(e){var t=as(),n=t.queue;if(null===n)throw Error(W(311));n.lastRenderedReducer=e;var r=Yi,o=r.baseQueue,a=n.pending;if(null!==a){if(null!==o){var i=o.next;o.next=a.next,a.next=i}r.baseQueue=o=a,n.pending=null}if(null!==o){a=o.next,r=r.baseState;var s=i=null,l=null,c=a;do{var u=c.lane;if((qi&u)===u)null!==l&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var d={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};null===l?(s=l=d,i=r):l=l.next=d,Qi.lanes|=u,kc|=u}c=c.next}while(null!==c&&c!==a);null===l?i=r:l.next=s,Qr(r,t.memoizedState)||(ol=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=l,n.lastRenderedState=r}if(null!==(e=n.interleaved)){o=e;do{a=o.lane,Qi.lanes|=a,kc|=a,o=o.next}while(o!==e)}else null===o&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function ls(e){var t=as(),n=t.queue;if(null===n)throw Error(W(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,a=t.memoizedState;if(null!==o){n.pending=null;var i=o=o.next;do{a=e(a,i.action),i=i.next}while(i!==o);Qr(a,t.memoizedState)||(ol=!0),t.memoizedState=a,null===t.baseQueue&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function cs(){}function us(e,t){var n=Qi,r=as(),o=t(),a=!Qr(r.memoizedState,o);if(a&&(r.memoizedState=o,ol=!0),r=r.queue,xs(gs.bind(null,n,r,e),[e]),r.getSnapshot!==t||a||null!==Ki&&1&Ki.memoizedState.tag){if(n.flags|=2048,bs(9,ps.bind(null,n,r,o,t),void 0,null),null===fc)throw Error(W(349));30&qi||ds(n,t,o)}return o}function ds(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=Qi.updateQueue)?(t={lastEffect:null,stores:null},Qi.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function ps(e,t,n,r){t.value=n,t.getSnapshot=r,fs(t)&&hs(e)}function gs(e,t,n){return n(function(){fs(t)&&hs(e)})}function fs(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Qr(e,n)}catch(e){return!0}}function hs(e){var t=ki(e,1);null!==t&&$c(t,e,1,-1)}function ms(e){var t=os();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:is,lastRenderedState:e},t.queue=e,e=e.dispatch=Rs.bind(null,Qi,e),[t.memoizedState,e]}function bs(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=Qi.updateQueue)?(t={lastEffect:null,stores:null},Qi.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function ys(){return as().memoizedState}function vs(e,t,n,r){var o=os();Qi.flags|=e,o.memoizedState=bs(1|t,n,void 0,void 0===r?null:r)}function ws(e,t,n,r){var o=as();r=void 0===r?null:r;var a=void 0;if(null!==Yi){var i=Yi.memoizedState;if(a=i.destroy,null!==r&&ts(r,i.deps))return void(o.memoizedState=bs(t,n,a,r))}Qi.flags|=e,o.memoizedState=bs(1|t,n,a,r)}function ks(e,t){return vs(8390656,8,e,t)}function xs(e,t){return ws(2048,8,e,t)}function Ss(e,t){return ws(4,2,e,t)}function Cs(e,t){return ws(4,4,e,t)}function Ms(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Ps(e,t,n){return n=null!=n?n.concat([e]):null,ws(4,4,Ms.bind(null,t,e),n)}function zs(){}function Es(e,t){var n=as();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&ts(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function js(e,t){var n=as();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&ts(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Ts(e,t,n){return 21&qi?(Qr(n,t)||(n=tn(),Qi.lanes|=n,kc|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,ol=!0),e.memoizedState=n)}function Ns(e,t){var n=an;an=0!==n&&4>n?n:4,e(!0);var r=Wi.transition;Wi.transition={};try{e(!1),t()}finally{an=n,Wi.transition=r}}function Fs(){return as().memoizedState}function Ls(e,t,n){var r=Oc(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},As(e))_s(t,n);else if(null!==(n=wi(e,t,n,r))){$c(n,e,r,Dc()),Is(n,t,r)}}function Rs(e,t,n){var r=Oc(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(As(e))_s(t,o);else{var a=e.alternate;if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var i=t.lastRenderedState,s=a(i,n);if(o.hasEagerState=!0,o.eagerState=s,Qr(s,i)){var l=t.interleaved;return null===l?(o.next=o,vi(t)):(o.next=l.next,l.next=o),void(t.interleaved=o)}}catch(e){}null!==(n=wi(e,t,o,r))&&($c(n,e,r,o=Dc()),Is(n,t,r))}}function As(e){var t=e.alternate;return e===Qi||null!==t&&t===Qi}function _s(e,t){Xi=Gi=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Is(e,t,n){if(4194240&n){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,on(e,n)}}var Bs={readContext:bi,useCallback:es,useContext:es,useEffect:es,useImperativeHandle:es,useInsertionEffect:es,useLayoutEffect:es,useMemo:es,useReducer:es,useRef:es,useState:es,useDebugValue:es,useDeferredValue:es,useTransition:es,useMutableSource:es,useSyncExternalStore:es,useId:es,unstable_isNewReconciler:!1},Ds={readContext:bi,useCallback:function(e,t){return os().memoizedState=[e,void 0===t?null:t],e},useContext:bi,useEffect:ks,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,vs(4194308,4,Ms.bind(null,t,e),n)},useLayoutEffect:function(e,t){return vs(4194308,4,e,t)},useInsertionEffect:function(e,t){return vs(4,2,e,t)},useMemo:function(e,t){var n=os();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=os();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Ls.bind(null,Qi,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},os().memoizedState=e},useState:ms,useDebugValue:zs,useDeferredValue:function(e){return os().memoizedState=e},useTransition:function(){var e=ms(!1),t=e[0];return e=Ns.bind(null,e[1]),os().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Qi,o=os();if(Wa){if(void 0===n)throw Error(W(407));n=n()}else{if(n=t(),null===fc)throw Error(W(349));30&qi||ds(r,t,n)}o.memoizedState=n;var a={value:n,getSnapshot:t};return o.queue=a,ks(gs.bind(null,r,a,e),[e]),r.flags|=2048,bs(9,ps.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=os(),t=fc.identifierPrefix;if(Wa){var n=Ba;t=":"+t+"R"+(n=(Ia&~(1<<32-qt(Ia)-1)).toString(32)+n),0<(n=Ji++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=Zi++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Os={readContext:bi,useCallback:Es,useContext:bi,useEffect:xs,useImperativeHandle:Ps,useInsertionEffect:Ss,useLayoutEffect:Cs,useMemo:js,useReducer:ss,useRef:ys,useState:function(){return ss(is)},useDebugValue:zs,useDeferredValue:function(e){return Ts(as(),Yi.memoizedState,e)},useTransition:function(){return[ss(is)[0],as().memoizedState]},useMutableSource:cs,useSyncExternalStore:us,useId:Fs,unstable_isNewReconciler:!1},$s={readContext:bi,useCallback:Es,useContext:bi,useEffect:xs,useImperativeHandle:Ps,useInsertionEffect:Ss,useLayoutEffect:Cs,useMemo:js,useReducer:ls,useRef:ys,useState:function(){return ls(is)},useDebugValue:zs,useDeferredValue:function(e){var t=as();return null===Yi?t.memoizedState=e:Ts(t,Yi.memoizedState,e)},useTransition:function(){return[ls(is)[0],as().memoizedState]},useMutableSource:cs,useSyncExternalStore:us,useId:Fs,unstable_isNewReconciler:!1};function Vs(e,t){if(e&&e.defaultProps){for(var n in t=Se({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function Us(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:Se({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var Hs={isMounted:function(e){return!!(e=e._reactInternals)&&Et(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Dc(),o=Oc(e),a=Mi(r,o);a.payload=t,null!=n&&(a.callback=n),null!==(t=Pi(e,a,o))&&($c(t,e,o,r),zi(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Dc(),o=Oc(e),a=Mi(r,o);a.tag=1,a.payload=t,null!=n&&(a.callback=n),null!==(t=Pi(e,a,o))&&($c(t,e,o,r),zi(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Dc(),r=Oc(e),o=Mi(n,r);o.tag=2,null!=t&&(o.callback=t),null!==(t=Pi(e,o,r))&&($c(t,e,r,n),zi(t,e,r))}};function Ws(e,t,n,r,o,a,i){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,a,i):!t.prototype||!t.prototype.isPureReactComponent||(!Yr(n,r)||!Yr(o,a))}function qs(e,t,n){var r=!1,o=fa,a=t.contextType;return"object"==typeof a&&null!==a?a=bi(a):(o=va(t)?ba:ha.current,a=(r=null!=(r=t.contextTypes))?ya(e,o):fa),t=new t(n,a),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=Hs,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=a),t}function Qs(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Hs.enqueueReplaceState(t,t.state,null)}function Ys(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs={},Si(e);var a=t.contextType;"object"==typeof a&&null!==a?o.context=bi(a):(a=va(t)?ba:ha.current,o.context=ya(e,a)),o.state=e.memoizedState,"function"==typeof(a=t.getDerivedStateFromProps)&&(Us(e,t,a,n),o.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof o.getSnapshotBeforeUpdate||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||(t=o.state,"function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),t!==o.state&&Hs.enqueueReplaceState(o,o.state,null),ji(e,n,o,r),o.state=e.memoizedState),"function"==typeof o.componentDidMount&&(e.flags|=4194308)}function Ks(e,t){try{var n="",r=t;do{n+=ze(r),r=r.return}while(r);var o=n}catch(e){o="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:o,digest:null}}function Gs(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}var Xs="function"==typeof WeakMap?WeakMap:Map;function Js(e,t,n){(n=Mi(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){jc||(jc=!0,Tc=r)},n}function Zs(e,t,n){(n=Mi(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){}}var a=e.stateNode;return null!==a&&"function"==typeof a.componentDidCatch&&(n.callback=function(){"function"!=typeof r&&(null===Nc?Nc=new Set([this]):Nc.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function el(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new Xs;var o=new Set;r.set(t,o)}else void 0===(o=r.get(t))&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=uu.bind(null,e,t,n),t.then(e,e))}function tl(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function nl(e,t,n,r,o){return 1&e.mode?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Mi(-1,1)).tag=2,Pi(n,t,1))),n.lanes|=1),e)}var rl=ie.ReactCurrentOwner,ol=!1;function al(e,t,n,r){t.child=null===e?li(t,null,n,r):si(t,e.child,n,r)}function il(e,t,n,r,o){n=n.render;var a=t.ref;return mi(t,o),r=ns(e,t,n,r,a,o),n=rs(),null===e||ol?(Wa&&n&&$a(t),t.flags|=1,al(e,t,r,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,jl(e,t,o))}function sl(e,t,n,r,o){if(null===e){var a=n.type;return"function"!=typeof a||bu(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=vu(n.type,null,r,t,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,ll(e,t,a,r,o))}if(a=e.child,0===(e.lanes&o)){var i=a.memoizedProps;if((n=null!==(n=n.compare)?n:Yr)(i,r)&&e.ref===t.ref)return jl(e,t,o)}return t.flags|=1,(e=yu(a,r)).ref=t.ref,e.return=t,t.child=e}function ll(e,t,n,r,o){if(null!==e){var a=e.memoizedProps;if(Yr(a,r)&&e.ref===t.ref){if(ol=!1,t.pendingProps=r=a,0===(e.lanes&o))return t.lanes=e.lanes,jl(e,t,o);131072&e.flags&&(ol=!0)}}return dl(e,t,n,r,o)}function cl(e,t,n){var r=t.pendingProps,o=r.children,a=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(1&t.mode){if(!(1073741824&n))return e=null!==a?a.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ga(yc,bc),bc|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==a?a.baseLanes:n,ga(yc,bc),bc|=r}else t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ga(yc,bc),bc|=n;else null!==a?(r=a.baseLanes|n,t.memoizedState=null):r=n,ga(yc,bc),bc|=r;return al(e,t,o,n),t.child}function ul(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function dl(e,t,n,r,o){var a=va(n)?ba:ha.current;return a=ya(t,a),mi(t,o),n=ns(e,t,n,r,a,o),r=rs(),null===e||ol?(Wa&&r&&$a(t),t.flags|=1,al(e,t,n,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,jl(e,t,o))}function pl(e,t,n,r,o){if(va(n)){var a=!0;Sa(t)}else a=!1;if(mi(t,o),null===t.stateNode)El(e,t),qs(t,n,r),Ys(t,n,r,o),r=!0;else if(null===e){var i=t.stateNode,s=t.memoizedProps;i.props=s;var l=i.context,c=n.contextType;"object"==typeof c&&null!==c?c=bi(c):c=ya(t,c=va(n)?ba:ha.current);var u=n.getDerivedStateFromProps,d="function"==typeof u||"function"==typeof i.getSnapshotBeforeUpdate;d||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||(s!==r||l!==c)&&Qs(t,i,r,c),xi=!1;var p=t.memoizedState;i.state=p,ji(t,r,i,o),l=t.memoizedState,s!==r||p!==l||ma.current||xi?("function"==typeof u&&(Us(t,n,u,r),l=t.memoizedState),(s=xi||Ws(t,n,s,r,p,l,c))?(d||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||("function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount()),"function"==typeof i.componentDidMount&&(t.flags|=4194308)):("function"==typeof i.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),i.props=r,i.state=l,i.context=c,r=s):("function"==typeof i.componentDidMount&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,Ci(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:Vs(t.type,s),i.props=c,d=t.pendingProps,p=i.context,"object"==typeof(l=n.contextType)&&null!==l?l=bi(l):l=ya(t,l=va(n)?ba:ha.current);var g=n.getDerivedStateFromProps;(u="function"==typeof g||"function"==typeof i.getSnapshotBeforeUpdate)||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||(s!==d||p!==l)&&Qs(t,i,r,l),xi=!1,p=t.memoizedState,i.state=p,ji(t,r,i,o);var f=t.memoizedState;s!==d||p!==f||ma.current||xi?("function"==typeof g&&(Us(t,n,g,r),f=t.memoizedState),(c=xi||Ws(t,n,c,r,p,f,l)||!1)?(u||"function"!=typeof i.UNSAFE_componentWillUpdate&&"function"!=typeof i.componentWillUpdate||("function"==typeof i.componentWillUpdate&&i.componentWillUpdate(r,f,l),"function"==typeof i.UNSAFE_componentWillUpdate&&i.UNSAFE_componentWillUpdate(r,f,l)),"function"==typeof i.componentDidUpdate&&(t.flags|=4),"function"==typeof i.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof i.componentDidUpdate||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),"function"!=typeof i.getSnapshotBeforeUpdate||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=f),i.props=r,i.state=f,i.context=l,r=c):("function"!=typeof i.componentDidUpdate||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),"function"!=typeof i.getSnapshotBeforeUpdate||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),r=!1)}return gl(e,t,n,r,a,o)}function gl(e,t,n,r,o,a){ul(e,t);var i=!!(128&t.flags);if(!r&&!i)return o&&Ca(t,n,!1),jl(e,t,a);r=t.stateNode,rl.current=t;var s=i&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&i?(t.child=si(t,e.child,null,a),t.child=si(t,null,s,a)):al(e,t,s,a),t.memoizedState=r.state,o&&Ca(t,n,!0),t.child}function fl(e){var t=e.stateNode;t.pendingContext?ka(0,t.pendingContext,t.pendingContext!==t.context):t.context&&ka(0,t.context,!1),_i(e,t.containerInfo)}function hl(e,t,n,r,o){return ei(),ti(o),t.flags|=256,al(e,t,n,r),t.child}var ml,bl,yl,vl,wl={dehydrated:null,treeContext:null,retryLane:0};function kl(e){return{baseLanes:e,cachePool:null,transitions:null}}function xl(e,t,n){var r,o=t.pendingProps,a=Oi.current,i=!1,s=!!(128&t.flags);if((r=s)||(r=(null===e||null!==e.memoizedState)&&!!(2&a)),r?(i=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(a|=1),ga(Oi,1&a),null===e)return Ga(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(1&t.mode?"$!"===e.data?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=o.children,e=o.fallback,i?(o=t.mode,i=t.child,s={mode:"hidden",children:s},1&o||null===i?i=ku(s,o,0,null):(i.childLanes=0,i.pendingProps=s),e=wu(e,o,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=kl(n),t.memoizedState=wl,e):Sl(t,s));if(null!==(a=e.memoizedState)&&null!==(r=a.dehydrated))return function(e,t,n,r,o,a,i){if(n)return 256&t.flags?(t.flags&=-257,Cl(e,t,i,r=Gs(Error(W(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(a=r.fallback,o=t.mode,r=ku({mode:"visible",children:r.children},o,0,null),(a=wu(a,o,i,null)).flags|=2,r.return=t,a.return=t,r.sibling=a,t.child=r,1&t.mode&&si(t,e.child,null,i),t.child.memoizedState=kl(i),t.memoizedState=wl,a);if(!(1&t.mode))return Cl(e,t,i,null);if("$!"===o.data){if(r=o.nextSibling&&o.nextSibling.dataset)var s=r.dgst;return r=s,Cl(e,t,i,r=Gs(a=Error(W(419)),r,void 0))}if(s=0!==(i&e.childLanes),ol||s){if(null!==(r=fc)){switch(i&-i){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}0!==(o=0!==(o&(r.suspendedLanes|i))?0:o)&&o!==a.retryLane&&(a.retryLane=o,ki(e,o),$c(r,e,o,-1))}return eu(),Cl(e,t,i,r=Gs(Error(W(421))))}return"$?"===o.data?(t.flags|=128,t.child=e.child,t=pu.bind(null,e),o._reactRetry=t,null):(e=a.treeContext,Ha=Go(o.nextSibling),Ua=t,Wa=!0,qa=null,null!==e&&(Ra[Aa++]=Ia,Ra[Aa++]=Ba,Ra[Aa++]=_a,Ia=e.id,Ba=e.overflow,_a=t),t=Sl(t,r.children),t.flags|=4096,t)}(e,t,s,o,r,a,n);if(i){i=o.fallback,s=t.mode,r=(a=e.child).sibling;var l={mode:"hidden",children:o.children};return 1&s||t.child===a?(o=yu(a,l)).subtreeFlags=14680064&a.subtreeFlags:((o=t.child).childLanes=0,o.pendingProps=l,t.deletions=null),null!==r?i=yu(r,i):(i=wu(i,s,n,null)).flags|=2,i.return=t,o.return=t,o.sibling=i,t.child=o,o=i,i=t.child,s=null===(s=e.child.memoizedState)?kl(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},i.memoizedState=s,i.childLanes=e.childLanes&~n,t.memoizedState=wl,o}return e=(i=e.child).sibling,o=yu(i,{mode:"visible",children:o.children}),!(1&t.mode)&&(o.lanes=n),o.return=t,o.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=o,t.memoizedState=null,o}function Sl(e,t){return(t=ku({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Cl(e,t,n,r){return null!==r&&ti(r),si(t,e.child,null,n),(e=Sl(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Ml(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),hi(e.return,t,n)}function Pl(e,t,n,r,o){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=o)}function zl(e,t,n){var r=t.pendingProps,o=r.revealOrder,a=r.tail;if(al(e,t,r.children,n),2&(r=Oi.current))r=1&r|2,t.flags|=128;else{if(null!==e&&128&e.flags)e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Ml(e,n,t);else if(19===e.tag)Ml(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(ga(Oi,r),1&t.mode)switch(o){case"forwards":for(n=t.child,o=null;null!==n;)null!==(e=n.alternate)&&null===$i(e)&&(o=n),n=n.sibling;null===(n=o)?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Pl(t,!1,o,n,a);break;case"backwards":for(n=null,o=t.child,t.child=null;null!==o;){if(null!==(e=o.alternate)&&null===$i(e)){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Pl(t,!0,n,null,a);break;case"together":Pl(t,!1,null,null,void 0);break;default:t.memoizedState=null}else t.memoizedState=null;return t.child}function El(e,t){!(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function jl(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),kc|=t.lanes,0===(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(W(153));if(null!==t.child){for(n=yu(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=yu(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Tl(e,t){if(!Wa)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Nl(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=14680064&o.subtreeFlags,r|=14680064&o.flags,o.return=e,o=o.sibling;else for(o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Fl(e,t,n){var r=t.pendingProps;switch(Va(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Nl(t),null;case 1:case 17:return va(t.type)&&wa(),Nl(t),null;case 3:return r=t.stateNode,Ii(),pa(ma),pa(ha),Ui(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(Ja(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&!(256&t.flags)||(t.flags|=1024,null!==qa&&(Wc(qa),qa=null))),bl(e,t),Nl(t),null;case 5:Di(t);var o=Ai(Ri.current);if(n=t.type,null!==e&&null!=t.stateNode)yl(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(W(166));return Nl(t),null}if(e=Ai(Fi.current),Ja(t)){r=t.stateNode,n=t.type;var a=t.memoizedProps;switch(r[Zo]=t,r[ea]=a,e=!!(1&t.mode),n){case"dialog":Po("cancel",r),Po("close",r);break;case"iframe":case"object":case"embed":Po("load",r);break;case"video":case"audio":for(o=0;o<xo.length;o++)Po(xo[o],r);break;case"source":Po("error",r);break;case"img":case"image":case"link":Po("error",r),Po("load",r);break;case"details":Po("toggle",r);break;case"input":_e(r,a),Po("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!a.multiple},Po("invalid",r);break;case"textarea":He(r,a),Po("invalid",r)}for(var i in ot(n,a),o=null,a)if(a.hasOwnProperty(i)){var s=a[i];"children"===i?"string"==typeof s?r.textContent!==s&&(!0!==a.suppressHydrationWarning&&Do(r.textContent,s,e),o=["children",s]):"number"==typeof s&&r.textContent!==""+s&&(!0!==a.suppressHydrationWarning&&Do(r.textContent,s,e),o=["children",""+s]):Q.hasOwnProperty(i)&&null!=s&&"onScroll"===i&&Po("scroll",r)}switch(n){case"input":Fe(r),De(r,a,!0);break;case"textarea":Fe(r),qe(r);break;case"select":case"option":break;default:"function"==typeof a.onClick&&(r.onclick=Oo)}r=o,t.updateQueue=r,null!==r&&(t.flags|=4)}else{i=9===o.nodeType?o:o.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=Qe(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=i.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),"select"===n&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[Zo]=t,e[ea]=r,ml(e,t,!1,!1),t.stateNode=e;e:{switch(i=at(n,r),n){case"dialog":Po("cancel",e),Po("close",e),o=r;break;case"iframe":case"object":case"embed":Po("load",e),o=r;break;case"video":case"audio":for(o=0;o<xo.length;o++)Po(xo[o],e);o=r;break;case"source":Po("error",e),o=r;break;case"img":case"image":case"link":Po("error",e),Po("load",e),o=r;break;case"details":Po("toggle",e),o=r;break;case"input":_e(e,r),o=Ae(e,r),Po("invalid",e);break;case"option":default:o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=Se({},r,{value:void 0}),Po("invalid",e);break;case"textarea":He(e,r),o=Ue(e,r),Po("invalid",e)}for(a in ot(n,o),s=o)if(s.hasOwnProperty(a)){var l=s[a];"style"===a?nt(e,l):"dangerouslySetInnerHTML"===a?null!=(l=l?l.__html:void 0)&&Xe(e,l):"children"===a?"string"==typeof l?("textarea"!==n||""!==l)&&Je(e,l):"number"==typeof l&&Je(e,""+l):"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&"autoFocus"!==a&&(Q.hasOwnProperty(a)?null!=l&&"onScroll"===a&&Po("scroll",e):null!=l&&ae(e,a,l,i))}switch(n){case"input":Fe(e),De(e,r,!1);break;case"textarea":Fe(e),qe(e);break;case"option":null!=r.value&&e.setAttribute("value",""+Te(r.value));break;case"select":e.multiple=!!r.multiple,null!=(a=r.value)?Ve(e,!!r.multiple,a,!1):null!=r.defaultValue&&Ve(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof o.onClick&&(e.onclick=Oo)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Nl(t),null;case 6:if(e&&null!=t.stateNode)vl(e,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(W(166));if(n=Ai(Ri.current),Ai(Fi.current),Ja(t)){if(r=t.stateNode,n=t.memoizedProps,r[Zo]=t,(a=r.nodeValue!==n)&&null!==(e=Ua))switch(e.tag){case 3:Do(r.nodeValue,n,!!(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Do(r.nodeValue,n,!!(1&e.mode))}a&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[Zo]=t,t.stateNode=r}return Nl(t),null;case 13:if(pa(Oi),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(Wa&&null!==Ha&&1&t.mode&&!(128&t.flags))Za(),ei(),t.flags|=98560,a=!1;else if(a=Ja(t),null!==r&&null!==r.dehydrated){if(null===e){if(!a)throw Error(W(318));if(!(a=null!==(a=t.memoizedState)?a.dehydrated:null))throw Error(W(317));a[Zo]=t}else ei(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Nl(t),a=!1}else null!==qa&&(Wc(qa),qa=null),a=!0;if(!a)return 65536&t.flags?t:null}return 128&t.flags?(t.lanes=n,t):((r=null!==r)!==(null!==e&&null!==e.memoizedState)&&r&&(t.child.flags|=8192,1&t.mode&&(null===e||1&Oi.current?0===vc&&(vc=3):eu())),null!==t.updateQueue&&(t.flags|=4),Nl(t),null);case 4:return Ii(),bl(e,t),null===e&&jo(t.stateNode.containerInfo),Nl(t),null;case 10:return fi(t.type._context),Nl(t),null;case 19:if(pa(Oi),null===(a=t.memoizedState))return Nl(t),null;if(r=!!(128&t.flags),null===(i=a.rendering))if(r)Tl(a,!1);else{if(0!==vc||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(i=$i(e))){for(t.flags|=128,Tl(a,!1),null!==(r=i.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(a=n).flags&=14680066,null===(i=a.alternate)?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=i.childLanes,a.lanes=i.lanes,a.child=i.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=i.memoizedProps,a.memoizedState=i.memoizedState,a.updateQueue=i.updateQueue,a.type=i.type,e=i.dependencies,a.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return ga(Oi,1&Oi.current|2),t.child}e=e.sibling}null!==a.tail&&It()>zc&&(t.flags|=128,r=!0,Tl(a,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=$i(i))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),Tl(a,!0),null===a.tail&&"hidden"===a.tailMode&&!i.alternate&&!Wa)return Nl(t),null}else 2*It()-a.renderingStartTime>zc&&1073741824!==n&&(t.flags|=128,r=!0,Tl(a,!1),t.lanes=4194304);a.isBackwards?(i.sibling=t.child,t.child=i):(null!==(n=a.last)?n.sibling=i:t.child=i,a.last=i)}return null!==a.tail?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=It(),t.sibling=null,n=Oi.current,ga(Oi,r?1&n|2:1&n),t):(Nl(t),null);case 22:case 23:return Gc(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&1&t.mode?!!(1073741824&bc)&&(Nl(t),6&t.subtreeFlags&&(t.flags|=8192)):Nl(t),null;case 24:case 25:return null}throw Error(W(156,t.tag))}function Ll(e,t){switch(Va(t),t.tag){case 1:return va(t.type)&&wa(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Ii(),pa(ma),pa(ha),Ui(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 5:return Di(t),null;case 13:if(pa(Oi),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(W(340));ei()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return pa(Oi),null;case 4:return Ii(),null;case 10:return fi(t.type._context),null;case 22:case 23:return Gc(),null;default:return null}}ml=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},bl=function(){},yl=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Ai(Fi.current);var a,i=null;switch(n){case"input":o=Ae(e,o),r=Ae(e,r),i=[];break;case"select":o=Se({},o,{value:void 0}),r=Se({},r,{value:void 0}),i=[];break;case"textarea":o=Ue(e,o),r=Ue(e,r),i=[];break;default:"function"!=typeof o.onClick&&"function"==typeof r.onClick&&(e.onclick=Oo)}for(c in ot(n,r),n=null,o)if(!r.hasOwnProperty(c)&&o.hasOwnProperty(c)&&null!=o[c])if("style"===c){var s=o[c];for(a in s)s.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else"dangerouslySetInnerHTML"!==c&&"children"!==c&&"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&"autoFocus"!==c&&(Q.hasOwnProperty(c)?i||(i=[]):(i=i||[]).push(c,null));for(c in r){var l=r[c];if(s=null!=o?o[c]:void 0,r.hasOwnProperty(c)&&l!==s&&(null!=l||null!=s))if("style"===c)if(s){for(a in s)!s.hasOwnProperty(a)||l&&l.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in l)l.hasOwnProperty(a)&&s[a]!==l[a]&&(n||(n={}),n[a]=l[a])}else n||(i||(i=[]),i.push(c,n)),n=l;else"dangerouslySetInnerHTML"===c?(l=l?l.__html:void 0,s=s?s.__html:void 0,null!=l&&s!==l&&(i=i||[]).push(c,l)):"children"===c?"string"!=typeof l&&"number"!=typeof l||(i=i||[]).push(c,""+l):"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&(Q.hasOwnProperty(c)?(null!=l&&"onScroll"===c&&Po("scroll",e),i||s===l||(i=[])):(i=i||[]).push(c,l))}n&&(i=i||[]).push("style",n);var c=i;(t.updateQueue=c)&&(t.flags|=4)}},vl=function(e,t,n,r){n!==r&&(t.flags|=4)};var Rl=!1,Al=!1,_l="function"==typeof WeakSet?WeakSet:Set,Il=null;function Bl(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(n){cu(e,t,n)}else n.current=null}function Dl(e,t,n){try{n()}catch(n){cu(e,t,n)}}var Ol=!1;function $l(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var o=r=r.next;do{if((o.tag&e)===e){var a=o.destroy;o.destroy=void 0,void 0!==a&&Dl(t,n,a)}o=o.next}while(o!==r)}}function Vl(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Ul(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"==typeof t?t(e):t.current=e}}function Hl(e){var t=e.alternate;null!==t&&(e.alternate=null,Hl(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[Zo],delete t[ea],delete t[na],delete t[ra],delete t[oa])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Wl(e){return 5===e.tag||3===e.tag||4===e.tag}function ql(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||Wl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function Ql(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=Oo));else if(4!==r&&null!==(e=e.child))for(Ql(e,t,n),e=e.sibling;null!==e;)Ql(e,t,n),e=e.sibling}function Yl(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(Yl(e,t,n),e=e.sibling;null!==e;)Yl(e,t,n),e=e.sibling}var Kl=null,Gl=!1;function Xl(e,t,n){for(n=n.child;null!==n;)Jl(e,t,n),n=n.sibling}function Jl(e,t,n){if(Wt&&"function"==typeof Wt.onCommitFiberUnmount)try{Wt.onCommitFiberUnmount(Ht,n)}catch(e){}switch(n.tag){case 5:Al||Bl(n,t);case 6:var r=Kl,o=Gl;Kl=null,Xl(e,t,n),Gl=o,null!==(Kl=r)&&(Gl?(e=Kl,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):Kl.removeChild(n.stateNode));break;case 18:null!==Kl&&(Gl?(e=Kl,n=n.stateNode,8===e.nodeType?Ko(e.parentNode,n):1===e.nodeType&&Ko(e,n),jn(e)):Ko(Kl,n.stateNode));break;case 4:r=Kl,o=Gl,Kl=n.stateNode.containerInfo,Gl=!0,Xl(e,t,n),Kl=r,Gl=o;break;case 0:case 11:case 14:case 15:if(!Al&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){o=r=r.next;do{var a=o,i=a.destroy;a=a.tag,void 0!==i&&(2&a||4&a)&&Dl(n,t,i),o=o.next}while(o!==r)}Xl(e,t,n);break;case 1:if(!Al&&(Bl(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){cu(n,t,e)}Xl(e,t,n);break;case 21:Xl(e,t,n);break;case 22:1&n.mode?(Al=(r=Al)||null!==n.memoizedState,Xl(e,t,n),Al=r):Xl(e,t,n);break;default:Xl(e,t,n)}}function Zl(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new _l),t.forEach(function(t){var r=gu.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))})}}function ec(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var o=n[r];try{var a=e,i=t,s=i;e:for(;null!==s;){switch(s.tag){case 5:Kl=s.stateNode,Gl=!1;break e;case 3:case 4:Kl=s.stateNode.containerInfo,Gl=!0;break e}s=s.return}if(null===Kl)throw Error(W(160));Jl(a,i,o),Kl=null,Gl=!1;var l=o.alternate;null!==l&&(l.return=null),o.return=null}catch(e){cu(o,t,e)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)tc(t,e),t=t.sibling}function tc(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(ec(t,e),nc(e),4&r){try{$l(3,e,e.return),Vl(3,e)}catch(t){cu(e,e.return,t)}try{$l(5,e,e.return)}catch(t){cu(e,e.return,t)}}break;case 1:ec(t,e),nc(e),512&r&&null!==n&&Bl(n,n.return);break;case 5:if(ec(t,e),nc(e),512&r&&null!==n&&Bl(n,n.return),32&e.flags){var o=e.stateNode;try{Je(o,"")}catch(t){cu(e,e.return,t)}}if(4&r&&null!=(o=e.stateNode)){var a=e.memoizedProps,i=null!==n?n.memoizedProps:a,s=e.type,l=e.updateQueue;if(e.updateQueue=null,null!==l)try{"input"===s&&"radio"===a.type&&null!=a.name&&Ie(o,a),at(s,i);var c=at(s,a);for(i=0;i<l.length;i+=2){var u=l[i],d=l[i+1];"style"===u?nt(o,d):"dangerouslySetInnerHTML"===u?Xe(o,d):"children"===u?Je(o,d):ae(o,u,d,c)}switch(s){case"input":Be(o,a);break;case"textarea":We(o,a);break;case"select":var p=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!a.multiple;var g=a.value;null!=g?Ve(o,!!a.multiple,g,!1):p!==!!a.multiple&&(null!=a.defaultValue?Ve(o,!!a.multiple,a.defaultValue,!0):Ve(o,!!a.multiple,a.multiple?[]:"",!1))}o[ea]=a}catch(t){cu(e,e.return,t)}}break;case 6:if(ec(t,e),nc(e),4&r){if(null===e.stateNode)throw Error(W(162));o=e.stateNode,a=e.memoizedProps;try{o.nodeValue=a}catch(t){cu(e,e.return,t)}}break;case 3:if(ec(t,e),nc(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{jn(t.containerInfo)}catch(t){cu(e,e.return,t)}break;case 4:default:ec(t,e),nc(e);break;case 13:ec(t,e),nc(e),8192&(o=e.child).flags&&(a=null!==o.memoizedState,o.stateNode.isHidden=a,!a||null!==o.alternate&&null!==o.alternate.memoizedState||(Pc=It())),4&r&&Zl(e);break;case 22:if(u=null!==n&&null!==n.memoizedState,1&e.mode?(Al=(c=Al)||u,ec(t,e),Al=c):ec(t,e),nc(e),8192&r){if(c=null!==e.memoizedState,(e.stateNode.isHidden=c)&&!u&&1&e.mode)for(Il=e,u=e.child;null!==u;){for(d=Il=u;null!==Il;){switch(g=(p=Il).child,p.tag){case 0:case 11:case 14:case 15:$l(4,p,p.return);break;case 1:Bl(p,p.return);var f=p.stateNode;if("function"==typeof f.componentWillUnmount){r=p,n=p.return;try{t=r,f.props=t.memoizedProps,f.state=t.memoizedState,f.componentWillUnmount()}catch(e){cu(r,n,e)}}break;case 5:Bl(p,p.return);break;case 22:if(null!==p.memoizedState){ic(d);continue}}null!==g?(g.return=p,Il=g):ic(d)}u=u.sibling}e:for(u=null,d=e;;){if(5===d.tag){if(null===u){u=d;try{o=d.stateNode,c?"function"==typeof(a=o.style).setProperty?a.setProperty("display","none","important"):a.display="none":(s=d.stateNode,i=null!=(l=d.memoizedProps.style)&&l.hasOwnProperty("display")?l.display:null,s.style.display=tt("display",i))}catch(t){cu(e,e.return,t)}}}else if(6===d.tag){if(null===u)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(t){cu(e,e.return,t)}}else if((22!==d.tag&&23!==d.tag||null===d.memoizedState||d===e)&&null!==d.child){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;null===d.sibling;){if(null===d.return||d.return===e)break e;u===d&&(u=null),d=d.return}u===d&&(u=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:ec(t,e),nc(e),4&r&&Zl(e);case 21:}}function nc(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(Wl(n)){var r=n;break e}n=n.return}throw Error(W(160))}switch(r.tag){case 5:var o=r.stateNode;32&r.flags&&(Je(o,""),r.flags&=-33),Yl(e,ql(e),o);break;case 3:case 4:var a=r.stateNode.containerInfo;Ql(e,ql(e),a);break;default:throw Error(W(161))}}catch(t){cu(e,e.return,t)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function rc(e,t,n){Il=e,oc(e)}function oc(e,t,n){for(var r=!!(1&e.mode);null!==Il;){var o=Il,a=o.child;if(22===o.tag&&r){var i=null!==o.memoizedState||Rl;if(!i){var s=o.alternate,l=null!==s&&null!==s.memoizedState||Al;s=Rl;var c=Al;if(Rl=i,(Al=l)&&!c)for(Il=o;null!==Il;)l=(i=Il).child,22===i.tag&&null!==i.memoizedState?sc(o):null!==l?(l.return=i,Il=l):sc(o);for(;null!==a;)Il=a,oc(a),a=a.sibling;Il=o,Rl=s,Al=c}ac(e)}else 8772&o.subtreeFlags&&null!==a?(a.return=o,Il=a):ac(e)}}function ac(e){for(;null!==Il;){var t=Il;if(8772&t.flags){var n=t.alternate;try{if(8772&t.flags)switch(t.tag){case 0:case 11:case 15:Al||Vl(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!Al)if(null===n)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:Vs(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;null!==a&&Ti(t,a,r);break;case 3:var i=t.updateQueue;if(null!==i){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}Ti(t,i,n)}break;case 5:var s=t.stateNode;if(null===n&&4&t.flags){n=s;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var c=t.alternate;if(null!==c){var u=c.memoizedState;if(null!==u){var d=u.dehydrated;null!==d&&jn(d)}}}break;default:throw Error(W(163))}Al||512&t.flags&&Ul(t)}catch(e){cu(t,t.return,e)}}if(t===e){Il=null;break}if(null!==(n=t.sibling)){n.return=t.return,Il=n;break}Il=t.return}}function ic(e){for(;null!==Il;){var t=Il;if(t===e){Il=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Il=n;break}Il=t.return}}function sc(e){for(;null!==Il;){var t=Il;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Vl(4,t)}catch(e){cu(t,n,e)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var o=t.return;try{r.componentDidMount()}catch(e){cu(t,o,e)}}var a=t.return;try{Ul(t)}catch(e){cu(t,a,e)}break;case 5:var i=t.return;try{Ul(t)}catch(e){cu(t,i,e)}}}catch(e){cu(t,t.return,e)}if(t===e){Il=null;break}var s=t.sibling;if(null!==s){s.return=t.return,Il=s;break}Il=t.return}}var lc,cc=Math.ceil,uc=ie.ReactCurrentDispatcher,dc=ie.ReactCurrentOwner,pc=ie.ReactCurrentBatchConfig,gc=0,fc=null,hc=null,mc=0,bc=0,yc=da(0),vc=0,wc=null,kc=0,xc=0,Sc=0,Cc=null,Mc=null,Pc=0,zc=1/0,Ec=null,jc=!1,Tc=null,Nc=null,Fc=!1,Lc=null,Rc=0,Ac=0,_c=null,Ic=-1,Bc=0;function Dc(){return 6&gc?It():-1!==Ic?Ic:Ic=It()}function Oc(e){return 1&e.mode?2&gc&&0!==mc?mc&-mc:null!==ni.transition?(0===Bc&&(Bc=tn()),Bc):0!==(e=an)?e:e=void 0===(e=window.event)?16:In(e.type):1}function $c(e,t,n,r){if(50<Ac)throw Ac=0,_c=null,Error(W(185));rn(e,n,r),2&gc&&e===fc||(e===fc&&(!(2&gc)&&(xc|=n),4===vc&&qc(e,mc)),Vc(e,r),1===n&&0===gc&&!(1&t.mode)&&(zc=It()+500,Pa&&ja()))}function Vc(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,a=e.pendingLanes;0<a;){var i=31-qt(a),s=1<<i,l=o[i];-1===l?0!==(s&n)&&0===(s&r)||(o[i]=Zt(s,t)):l<=t&&(e.expiredLanes|=s),a&=~s}}(e,t);var r=Jt(e,e===fc?mc:0);if(0===r)null!==n&&Rt(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&Rt(n),1===t)0===e.tag?function(e){Pa=!0,Ea(e)}(Qc.bind(null,e)):Ea(Qc.bind(null,e)),Qo(function(){!(6&gc)&&ja()}),n=null;else{switch(sn(r)){case 1:n=Dt;break;case 4:n=Ot;break;case 16:default:n=$t;break;case 536870912:n=Ut}n=fu(n,Uc.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Uc(e,t){if(Ic=-1,Bc=0,6&gc)throw Error(W(327));var n=e.callbackNode;if(su()&&e.callbackNode!==n)return null;var r=Jt(e,e===fc?mc:0);if(0===r)return null;if(30&r||0!==(r&e.expiredLanes)||t)t=tu(e,r);else{t=r;var o=gc;gc|=2;var a=Zc();for(fc===e&&mc===t||(Ec=null,zc=It()+500,Xc(e,t));;)try{ru();break}catch(t){Jc(e,t)}gi(),uc.current=a,gc=o,null!==hc?t=0:(fc=null,mc=0,t=vc)}if(0!==t){if(2===t&&(0!==(o=en(e))&&(r=o,t=Hc(e,o))),1===t)throw n=wc,Xc(e,0),qc(e,r),Vc(e,It()),n;if(6===t)qc(e,r);else{if(o=e.current.alternate,!(30&r||function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var o=n[r],a=o.getSnapshot;o=o.value;try{if(!Qr(a(),o))return!1}catch(e){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(o)||(t=tu(e,r),2===t&&(a=en(e),0!==a&&(r=a,t=Hc(e,a))),1!==t)))throw n=wc,Xc(e,0),qc(e,r),Vc(e,It()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(W(345));case 2:case 5:iu(e,Mc,Ec);break;case 3:if(qc(e,r),(130023424&r)===r&&10<(t=Pc+500-It())){if(0!==Jt(e,0))break;if(((o=e.suspendedLanes)&r)!==r){Dc(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=Ho(iu.bind(null,e,Mc,Ec),t);break}iu(e,Mc,Ec);break;case 4:if(qc(e,r),(4194240&r)===r)break;for(t=e.eventTimes,o=-1;0<r;){var i=31-qt(r);a=1<<i,(i=t[i])>o&&(o=i),r&=~a}if(r=o,10<(r=(120>(r=It()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*cc(r/1960))-r)){e.timeoutHandle=Ho(iu.bind(null,e,Mc,Ec),r);break}iu(e,Mc,Ec);break;default:throw Error(W(329))}}}return Vc(e,It()),e.callbackNode===n?Uc.bind(null,e):null}function Hc(e,t){var n=Cc;return e.current.memoizedState.isDehydrated&&(Xc(e,t).flags|=256),2!==(e=tu(e,t))&&(t=Mc,Mc=n,null!==t&&Wc(t)),e}function Wc(e){null===Mc?Mc=e:Mc.push.apply(Mc,e)}function qc(e,t){for(t&=~Sc,t&=~xc,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-qt(t),r=1<<n;e[n]=-1,t&=~r}}function Qc(e){if(6&gc)throw Error(W(327));su();var t=Jt(e,0);if(!(1&t))return Vc(e,It()),null;var n=tu(e,t);if(0!==e.tag&&2===n){var r=en(e);0!==r&&(t=r,n=Hc(e,r))}if(1===n)throw n=wc,Xc(e,0),qc(e,t),Vc(e,It()),n;if(6===n)throw Error(W(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,iu(e,Mc,Ec),Vc(e,It()),null}function Yc(e,t){var n=gc;gc|=1;try{return e(t)}finally{0===(gc=n)&&(zc=It()+500,Pa&&ja())}}function Kc(e){null!==Lc&&0===Lc.tag&&!(6&gc)&&su();var t=gc;gc|=1;var n=pc.transition,r=an;try{if(pc.transition=null,an=1,e)return e()}finally{an=r,pc.transition=n,!(6&(gc=t))&&ja()}}function Gc(){bc=yc.current,pa(yc)}function Xc(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,Wo(n)),null!==hc)for(n=hc.return;null!==n;){var r=n;switch(Va(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&wa();break;case 3:Ii(),pa(ma),pa(ha),Ui();break;case 5:Di(r);break;case 4:Ii();break;case 13:case 19:pa(Oi);break;case 10:fi(r.type._context);break;case 22:case 23:Gc()}n=n.return}if(fc=e,hc=e=yu(e.current,null),mc=bc=t,vc=0,wc=null,Sc=xc=kc=0,Mc=Cc=null,null!==yi){for(t=0;t<yi.length;t++)if(null!==(r=(n=yi[t]).interleaved)){n.interleaved=null;var o=r.next,a=n.pending;if(null!==a){var i=a.next;a.next=o,r.next=i}n.pending=r}yi=null}return e}function Jc(e,t){for(;;){var n=hc;try{if(gi(),Hi.current=Bs,Gi){for(var r=Qi.memoizedState;null!==r;){var o=r.queue;null!==o&&(o.pending=null),r=r.next}Gi=!1}if(qi=0,Ki=Yi=Qi=null,Xi=!1,Ji=0,dc.current=null,null===n||null===n.return){vc=1,wc=t,hc=null;break}e:{var a=e,i=n.return,s=n,l=t;if(t=mc,s.flags|=32768,null!==l&&"object"==typeof l&&"function"==typeof l.then){var c=l,u=s,d=u.tag;if(!(1&u.mode||0!==d&&11!==d&&15!==d)){var p=u.alternate;p?(u.updateQueue=p.updateQueue,u.memoizedState=p.memoizedState,u.lanes=p.lanes):(u.updateQueue=null,u.memoizedState=null)}var g=tl(i);if(null!==g){g.flags&=-257,nl(g,i,s,0,t),1&g.mode&&el(a,c,t),l=c;var f=(t=g).updateQueue;if(null===f){var h=new Set;h.add(l),t.updateQueue=h}else f.add(l);break e}if(!(1&t)){el(a,c,t),eu();break e}l=Error(W(426))}else if(Wa&&1&s.mode){var m=tl(i);if(null!==m){!(65536&m.flags)&&(m.flags|=256),nl(m,i,s,0,t),ti(Ks(l,s));break e}}a=l=Ks(l,s),4!==vc&&(vc=2),null===Cc?Cc=[a]:Cc.push(a),a=i;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t,Ei(a,Js(0,l,t));break e;case 1:s=l;var b=a.type,y=a.stateNode;if(!(128&a.flags||"function"!=typeof b.getDerivedStateFromError&&(null===y||"function"!=typeof y.componentDidCatch||null!==Nc&&Nc.has(y)))){a.flags|=65536,t&=-t,a.lanes|=t,Ei(a,Zs(a,s,t));break e}}a=a.return}while(null!==a)}au(n)}catch(e){t=e,hc===n&&null!==n&&(hc=n=n.return);continue}break}}function Zc(){var e=uc.current;return uc.current=Bs,null===e?Bs:e}function eu(){0!==vc&&3!==vc&&2!==vc||(vc=4),null===fc||!(268435455&kc)&&!(268435455&xc)||qc(fc,mc)}function tu(e,t){var n=gc;gc|=2;var r=Zc();for(fc===e&&mc===t||(Ec=null,Xc(e,t));;)try{nu();break}catch(t){Jc(e,t)}if(gi(),gc=n,uc.current=r,null!==hc)throw Error(W(261));return fc=null,mc=0,vc}function nu(){for(;null!==hc;)ou(hc)}function ru(){for(;null!==hc&&!At();)ou(hc)}function ou(e){var t=lc(e.alternate,e,bc);e.memoizedProps=e.pendingProps,null===t?au(e):hc=t,dc.current=null}function au(e){var t=e;do{var n=t.alternate;if(e=t.return,32768&t.flags){if(null!==(n=Ll(n,t)))return n.flags&=32767,void(hc=n);if(null===e)return vc=6,void(hc=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}else if(null!==(n=Fl(n,t,bc)))return void(hc=n);if(null!==(t=t.sibling))return void(hc=t);hc=t=e}while(null!==t);0===vc&&(vc=5)}function iu(e,t,n){var r=an,o=pc.transition;try{pc.transition=null,an=1,function(e,t,n,r){do{su()}while(null!==Lc);if(6&gc)throw Error(W(327));n=e.finishedWork;var o=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(W(177));e.callbackNode=null,e.callbackPriority=0;var a=n.lanes|n.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-qt(n),a=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~a}}(e,a),e===fc&&(hc=fc=null,mc=0),!(2064&n.subtreeFlags)&&!(2064&n.flags)||Fc||(Fc=!0,fu($t,function(){return su(),null})),a=!!(15990&n.flags),!!(15990&n.subtreeFlags)||a){a=pc.transition,pc.transition=null;var i=an;an=1;var s=gc;gc|=4,dc.current=null,function(e,t){if($o=Nn,Zr(e=Jr())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var o=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch(e){n=null;break e}var i=0,s=-1,l=-1,c=0,u=0,d=e,p=null;t:for(;;){for(var g;d!==n||0!==o&&3!==d.nodeType||(s=i+o),d!==a||0!==r&&3!==d.nodeType||(l=i+r),3===d.nodeType&&(i+=d.nodeValue.length),null!==(g=d.firstChild);)p=d,d=g;for(;;){if(d===e)break t;if(p===n&&++c===o&&(s=i),p===a&&++u===r&&(l=i),null!==(g=d.nextSibling))break;p=(d=p).parentNode}d=g}n=-1===s||-1===l?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Vo={focusedElem:e,selectionRange:n},Nn=!1,Il=t;null!==Il;)if(e=(t=Il).child,1028&t.subtreeFlags&&null!==e)e.return=t,Il=e;else for(;null!==Il;){t=Il;try{var f=t.alternate;if(1024&t.flags)switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==f){var h=f.memoizedProps,m=f.memoizedState,b=t.stateNode,y=b.getSnapshotBeforeUpdate(t.elementType===t.type?h:Vs(t.type,h),m);b.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var v=t.stateNode.containerInfo;1===v.nodeType?v.textContent="":9===v.nodeType&&v.documentElement&&v.removeChild(v.documentElement);break;default:throw Error(W(163))}}catch(e){cu(t,t.return,e)}if(null!==(e=t.sibling)){e.return=t.return,Il=e;break}Il=t.return}f=Ol,Ol=!1}(e,n),tc(n,e),eo(Vo),Nn=!!$o,Vo=$o=null,e.current=n,rc(n),_t(),gc=s,an=i,pc.transition=a}else e.current=n;if(Fc&&(Fc=!1,Lc=e,Rc=o),a=e.pendingLanes,0===a&&(Nc=null),function(e){if(Wt&&"function"==typeof Wt.onCommitFiberRoot)try{Wt.onCommitFiberRoot(Ht,e,void 0,!(128&~e.current.flags))}catch(e){}}(n.stateNode),Vc(e,It()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(jc)throw jc=!1,e=Tc,Tc=null,e;!!(1&Rc)&&0!==e.tag&&su(),a=e.pendingLanes,1&a?e===_c?Ac++:(Ac=0,_c=e):Ac=0,ja()}(e,t,n,r)}finally{pc.transition=o,an=r}return null}function su(){if(null!==Lc){var e=sn(Rc),t=pc.transition,n=an;try{if(pc.transition=null,an=16>e?16:e,null===Lc)var r=!1;else{if(e=Lc,Lc=null,Rc=0,6&gc)throw Error(W(331));var o=gc;for(gc|=4,Il=e.current;null!==Il;){var a=Il,i=a.child;if(16&Il.flags){var s=a.deletions;if(null!==s){for(var l=0;l<s.length;l++){var c=s[l];for(Il=c;null!==Il;){var u=Il;switch(u.tag){case 0:case 11:case 15:$l(8,u,a)}var d=u.child;if(null!==d)d.return=u,Il=d;else for(;null!==Il;){var p=(u=Il).sibling,g=u.return;if(Hl(u),u===c){Il=null;break}if(null!==p){p.return=g,Il=p;break}Il=g}}}var f=a.alternate;if(null!==f){var h=f.child;if(null!==h){f.child=null;do{var m=h.sibling;h.sibling=null,h=m}while(null!==h)}}Il=a}}if(2064&a.subtreeFlags&&null!==i)i.return=a,Il=i;else e:for(;null!==Il;){if(2048&(a=Il).flags)switch(a.tag){case 0:case 11:case 15:$l(9,a,a.return)}var b=a.sibling;if(null!==b){b.return=a.return,Il=b;break e}Il=a.return}}var y=e.current;for(Il=y;null!==Il;){var v=(i=Il).child;if(2064&i.subtreeFlags&&null!==v)v.return=i,Il=v;else e:for(i=y;null!==Il;){if(2048&(s=Il).flags)try{switch(s.tag){case 0:case 11:case 15:Vl(9,s)}}catch(e){cu(s,s.return,e)}if(s===i){Il=null;break e}var w=s.sibling;if(null!==w){w.return=s.return,Il=w;break e}Il=s.return}}if(gc=o,ja(),Wt&&"function"==typeof Wt.onPostCommitFiberRoot)try{Wt.onPostCommitFiberRoot(Ht,e)}catch(e){}r=!0}return r}finally{an=n,pc.transition=t}}return!1}function lu(e,t,n){e=Pi(e,t=Js(0,t=Ks(n,t),1),1),t=Dc(),null!==e&&(rn(e,1,t),Vc(e,t))}function cu(e,t,n){if(3===e.tag)lu(e,e,n);else for(;null!==t;){if(3===t.tag){lu(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Nc||!Nc.has(r))){t=Pi(t,e=Zs(t,e=Ks(n,e),1),1),e=Dc(),null!==t&&(rn(t,1,e),Vc(t,e));break}}t=t.return}}function uu(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=Dc(),e.pingedLanes|=e.suspendedLanes&n,fc===e&&(mc&n)===n&&(4===vc||3===vc&&(130023424&mc)===mc&&500>It()-Pc?Xc(e,0):Sc|=n),Vc(e,t)}function du(e,t){0===t&&(1&e.mode?(t=Gt,!(130023424&(Gt<<=1))&&(Gt=4194304)):t=1);var n=Dc();null!==(e=ki(e,t))&&(rn(e,t,n),Vc(e,n))}function pu(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),du(e,n)}function gu(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;null!==o&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(W(314))}null!==r&&r.delete(t),du(e,n)}function fu(e,t){return Lt(e,t)}function hu(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function mu(e,t,n,r){return new hu(e,t,n,r)}function bu(e){return!(!(e=e.prototype)||!e.isReactComponent)}function yu(e,t){var n=e.alternate;return null===n?((n=mu(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function vu(e,t,n,r,o,a){var i=2;if(r=e,"function"==typeof e)bu(e)&&(i=1);else if("string"==typeof e)i=5;else e:switch(e){case ce:return wu(n.children,o,a,t);case ue:i=8,o|=8;break;case de:return(e=mu(12,n,t,2|o)).elementType=de,e.lanes=a,e;case he:return(e=mu(13,n,t,o)).elementType=he,e.lanes=a,e;case me:return(e=mu(19,n,t,o)).elementType=me,e.lanes=a,e;case ve:return ku(n,o,a,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case pe:i=10;break e;case ge:i=9;break e;case fe:i=11;break e;case be:i=14;break e;case ye:i=16,r=null;break e}throw Error(W(130,null==e?e:typeof e,""))}return(t=mu(i,n,t,o)).elementType=e,t.type=r,t.lanes=a,t}function wu(e,t,n,r){return(e=mu(7,e,r,t)).lanes=n,e}function ku(e,t,n,r){return(e=mu(22,e,r,t)).elementType=ve,e.lanes=n,e.stateNode={isHidden:!1},e}function xu(e,t,n){return(e=mu(6,e,null,t)).lanes=n,e}function Su(e,t,n){return(t=mu(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Cu(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=nn(0),this.expirationTimes=nn(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=nn(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Mu(e,t,n,r,o,a,i,s,l){return e=new Cu(e,t,n,s,l),1===t?(t=1,!0===a&&(t|=8)):t=0,a=mu(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Si(a),e}function Pu(e){if(!e)return fa;e:{if(Et(e=e._reactInternals)!==e||1!==e.tag)throw Error(W(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(va(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(W(171))}if(1===e.tag){var n=e.type;if(va(n))return xa(e,n,t)}return t}function zu(e,t,n,r,o,a,i,s,l){return(e=Mu(n,r,!0,e,0,a,0,s,l)).context=Pu(null),n=e.current,(a=Mi(r=Dc(),o=Oc(n))).callback=null!=t?t:null,Pi(n,a,o),e.current.lanes=o,rn(e,o,r),Vc(e,r),e}function Eu(e,t,n,r){var o=t.current,a=Dc(),i=Oc(o);return n=Pu(n),null===t.context?t.context=n:t.pendingContext=n,(t=Mi(a,i)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=Pi(o,t,i))&&($c(e,o,i,a),zi(e,o,i)),i}function ju(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Tu(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Nu(e,t){Tu(e,t),(e=e.alternate)&&Tu(e,t)}lc=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||ma.current)ol=!0;else{if(0===(e.lanes&n)&&!(128&t.flags))return ol=!1,function(e,t,n){switch(t.tag){case 3:fl(t),ei();break;case 5:Bi(t);break;case 1:va(t.type)&&Sa(t);break;case 4:_i(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;ga(ci,r._currentValue),r._currentValue=o;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(ga(Oi,1&Oi.current),t.flags|=128,null):0!==(n&t.child.childLanes)?xl(e,t,n):(ga(Oi,1&Oi.current),null!==(e=jl(e,t,n))?e.sibling:null);ga(Oi,1&Oi.current);break;case 19:if(r=0!==(n&t.childLanes),128&e.flags){if(r)return zl(e,t,n);t.flags|=128}if(null!==(o=t.memoizedState)&&(o.rendering=null,o.tail=null,o.lastEffect=null),ga(Oi,Oi.current),r)break;return null;case 22:case 23:return t.lanes=0,cl(e,t,n)}return jl(e,t,n)}(e,t,n);ol=!!(131072&e.flags)}else ol=!1,Wa&&1048576&t.flags&&Oa(t,La,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;El(e,t),e=t.pendingProps;var o=ya(t,ha.current);mi(t,n),o=ns(null,t,r,e,o,n);var a=rs();return t.flags|=1,"object"==typeof o&&null!==o&&"function"==typeof o.render&&void 0===o.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,va(r)?(a=!0,Sa(t)):a=!1,t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,Si(t),o.updater=Hs,t.stateNode=o,o._reactInternals=t,Ys(t,r,e,n),t=gl(null,t,r,!0,a,n)):(t.tag=0,Wa&&a&&$a(t),al(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(El(e,t),e=t.pendingProps,r=(o=r._init)(r._payload),t.type=r,o=t.tag=function(e){if("function"==typeof e)return bu(e)?1:0;if(null!=e){if((e=e.$$typeof)===fe)return 11;if(e===be)return 14}return 2}(r),e=Vs(r,e),o){case 0:t=dl(null,t,r,e,n);break e;case 1:t=pl(null,t,r,e,n);break e;case 11:t=il(null,t,r,e,n);break e;case 14:t=sl(null,t,r,Vs(r.type,e),n);break e}throw Error(W(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,dl(e,t,r,o=t.elementType===r?o:Vs(r,o),n);case 1:return r=t.type,o=t.pendingProps,pl(e,t,r,o=t.elementType===r?o:Vs(r,o),n);case 3:e:{if(fl(t),null===e)throw Error(W(387));r=t.pendingProps,o=(a=t.memoizedState).element,Ci(e,t),ji(t,r,null,n);var i=t.memoizedState;if(r=i.element,a.isDehydrated){if(a={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=a,t.memoizedState=a,256&t.flags){t=hl(e,t,r,n,o=Ks(Error(W(423)),t));break e}if(r!==o){t=hl(e,t,r,n,o=Ks(Error(W(424)),t));break e}for(Ha=Go(t.stateNode.containerInfo.firstChild),Ua=t,Wa=!0,qa=null,n=li(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(ei(),r===o){t=jl(e,t,n);break e}al(e,t,r,n)}t=t.child}return t;case 5:return Bi(t),null===e&&Ga(t),r=t.type,o=t.pendingProps,a=null!==e?e.memoizedProps:null,i=o.children,Uo(r,o)?i=null:null!==a&&Uo(r,a)&&(t.flags|=32),ul(e,t),al(e,t,i,n),t.child;case 6:return null===e&&Ga(t),null;case 13:return xl(e,t,n);case 4:return _i(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=si(t,null,r,n):al(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,il(e,t,r,o=t.elementType===r?o:Vs(r,o),n);case 7:return al(e,t,t.pendingProps,n),t.child;case 8:case 12:return al(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,a=t.memoizedProps,i=o.value,ga(ci,r._currentValue),r._currentValue=i,null!==a)if(Qr(a.value,i)){if(a.children===o.children&&!ma.current){t=jl(e,t,n);break e}}else for(null!==(a=t.child)&&(a.return=t);null!==a;){var s=a.dependencies;if(null!==s){i=a.child;for(var l=s.firstContext;null!==l;){if(l.context===r){if(1===a.tag){(l=Mi(-1,n&-n)).tag=2;var c=a.updateQueue;if(null!==c){var u=(c=c.shared).pending;null===u?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}a.lanes|=n,null!==(l=a.alternate)&&(l.lanes|=n),hi(a.return,n,t),s.lanes|=n;break}l=l.next}}else if(10===a.tag)i=a.type===t.type?null:a.child;else if(18===a.tag){if(null===(i=a.return))throw Error(W(341));i.lanes|=n,null!==(s=i.alternate)&&(s.lanes|=n),hi(i,n,t),i=a.sibling}else i=a.child;if(null!==i)i.return=a;else for(i=a;null!==i;){if(i===t){i=null;break}if(null!==(a=i.sibling)){a.return=i.return,i=a;break}i=i.return}a=i}al(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,mi(t,n),r=r(o=bi(o)),t.flags|=1,al(e,t,r,n),t.child;case 14:return o=Vs(r=t.type,t.pendingProps),sl(e,t,r,o=Vs(r.type,o),n);case 15:return ll(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Vs(r,o),El(e,t),t.tag=1,va(r)?(e=!0,Sa(t)):e=!1,mi(t,n),qs(t,r,o),Ys(t,r,o,n),gl(null,t,r,!0,e,n);case 19:return zl(e,t,n);case 22:return cl(e,t,n)}throw Error(W(156,t.tag))};var Fu="function"==typeof reportError?reportError:function(e){};function Lu(e){this._internalRoot=e}function Ru(e){this._internalRoot=e}function Au(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function _u(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Iu(){}function Bu(e,t,n,r,o){var a=n._reactRootContainer;if(a){var i=a;if("function"==typeof o){var s=o;o=function(){var e=ju(i);s.call(e)}}Eu(t,i,e,o)}else i=function(e,t,n,r,o){if(o){if("function"==typeof r){var a=r;r=function(){var e=ju(i);a.call(e)}}var i=zu(t,r,e,0,null,!1,0,"",Iu);return e._reactRootContainer=i,e[ta]=i.current,jo(8===e.nodeType?e.parentNode:e),Kc(),i}for(;o=e.lastChild;)e.removeChild(o);if("function"==typeof r){var s=r;r=function(){var e=ju(l);s.call(e)}}var l=Mu(e,0,!1,null,0,!1,0,"",Iu);return e._reactRootContainer=l,e[ta]=l.current,jo(8===e.nodeType?e.parentNode:e),Kc(function(){Eu(t,l,n,r)}),l}(n,t,e,o,r);return ju(i)}Ru.prototype.render=Lu.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(W(409));Eu(e,t,null,null)},Ru.prototype.unmount=Lu.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;Kc(function(){Eu(null,e,null,null)}),t[ta]=null}},Ru.prototype.unstable_scheduleHydration=function(e){if(e){var t=dn();e={blockedOn:null,target:e,priority:t};for(var n=0;n<wn.length&&0!==t&&t<wn[n].priority;n++);wn.splice(n,0,e),0===n&&Cn(e)}},ln=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Xt(t.pendingLanes);0!==n&&(on(t,1|n),Vc(t,It()),!(6&gc)&&(zc=It()+500,ja()))}break;case 13:Kc(function(){var t=ki(e,1);if(null!==t){var n=Dc();$c(t,e,1,n)}}),Nu(e,1)}},cn=function(e){if(13===e.tag){var t=ki(e,134217728);if(null!==t)$c(t,e,134217728,Dc());Nu(e,134217728)}},un=function(e){if(13===e.tag){var t=Oc(e),n=ki(e,t);if(null!==n)$c(n,e,t,Dc());Nu(e,t)}},dn=function(){return an},pn=function(e,t){var n=an;try{return an=e,t()}finally{an=n}},lt=function(e,t,n){switch(t){case"input":if(Be(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=la(r);if(!o)throw Error(W(90));Le(r),Be(r,o)}}}break;case"textarea":We(e,n);break;case"select":null!=(t=n.value)&&Ve(e,!!n.multiple,t,!1)}},ft=Yc,ht=Kc;var Du={usingClientEntryPoint:!1,Events:[ia,sa,la,pt,gt,Yc]},Ou={findFiberByHostInstance:aa,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},$u={bundleType:Ou.bundleType,version:Ou.version,rendererPackageName:Ou.rendererPackageName,rendererConfig:Ou.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ie.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Nt(e))?null:e.stateNode},findFiberByHostInstance:Ou.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var Vu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Vu.isDisabled&&Vu.supportsFiber)try{Ht=Vu.inject($u),Wt=Vu}catch(Ge){}}D.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Du,D.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Au(t))throw Error(W(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:le,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},D.createRoot=function(e,t){if(!Au(e))throw Error(W(299));var n=!1,r="",o=Fu;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(o=t.onRecoverableError)),t=Mu(e,1,!1,null,0,n,0,r,o),e[ta]=t.current,jo(8===e.nodeType?e.parentNode:e),new Lu(t)},D.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(W(188));throw e=Object.keys(e).join(","),Error(W(268,e))}return e=null===(e=Nt(t))?null:e.stateNode},D.flushSync=function(e){return Kc(e)},D.hydrate=function(e,t,n){if(!_u(t))throw Error(W(200));return Bu(null,e,t,!0,n)},D.hydrateRoot=function(e,t,n){if(!Au(e))throw Error(W(405));var r=null!=n&&n.hydratedSources||null,o=!1,a="",i=Fu;if(null!=n&&(!0===n.unstable_strictMode&&(o=!0),void 0!==n.identifierPrefix&&(a=n.identifierPrefix),void 0!==n.onRecoverableError&&(i=n.onRecoverableError)),t=zu(t,null,e,1,null!=n?n:null,o,0,a,i),e[ta]=t.current,jo(e),r)for(e=0;e<r.length;e++)o=(o=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new Ru(t)},D.render=function(e,t,n){if(!_u(t))throw Error(W(200));return Bu(null,e,t,!1,n)},D.unmountComponentAtNode=function(e){if(!_u(e))throw Error(W(40));return!!e._reactRootContainer&&(Kc(function(){Bu(null,null,e,!1,function(){e._reactRootContainer=null,e[ta]=null})}),!0)},D.unstable_batchedUpdates=Yc,D.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!_u(n))throw Error(W(200));if(null==e||void 0===e._reactInternals)throw Error(W(38));return Bu(e,t,n,!1,r)},D.version="18.3.1-next-f1338f8080-20240426",function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){}}(),B.exports=D;var Uu,Hu=B.exports,Wu=Hu;Uu=Wu.createRoot,Wu.hydrateRoot;const qu="processing_start",Qu="text_chunk",Yu="processing_end",Ku="complete",Gu="follow_up_prompts",Xu="error",Ju="human_decision_required",Zu=e=>{if(!e||"string"!=typeof e)return null;if("[DONE]"===e||"[PROCESSING]"===e)return null;try{const t=JSON.parse(e);if(!t||"object"!=typeof t)return null;const n=t.type||t.event_type;if(n===Qu||t.content){const e=t.content||t.choices?.[0]?.delta?.content||"";return{type:Qu,content:e,...t}}return n===qu||"processing_start"===t.type?{type:qu,...t}:n===Yu||"processing_end"===t.type?{type:Yu,...t}:n===Ku||"complete"===t.type?{type:Ku,finalContent:t.finalContent||t.content||"",...t}:n===Xu||"error"===t.type?{type:Xu,error:t.error||t.message||"Unknown error",...t}:n===Ju||"human_decision_required"===t.type?{type:Ju,decisionId:t.decisionId||t.decision_id,question:t.question||"",options:t.options||[],context:t.context||{},...t}:n?{type:n,...t}:t}catch(e){return null}};class ed extends Error{constructor(e="SSE stream ended before completion"){super(e),this.name="IncompleteStreamError"}}const td=async(e,t,n,r)=>{const o={"Content-Type":"application/json",Accept:"text/event-stream"};if("function"==typeof n){const e=await n();e&&(o.Authorization=`Bearer ${e}`)}const a=await fetch(`${t.replace(/\/$/,"")}/api/v1/support`,{method:"POST",headers:o,credentials:"include",body:JSON.stringify(e),...r?{signal:r}:{}});if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);if(!a.body)throw new Error("Response body is null");return a.body},nd=()=>({id:`skeleton-${Date.now()}`,role:"assistant",content:"",timestamp:new Date,isProcessing:!0,processingStatus:""}),rd=e=>{if(!Array.isArray(e)||0===e.length)return;const t=e.map(e=>({type:e.type||"prompt",text:"string"==typeof e.text?e.text:"",submitText:"string"==typeof e.submitText?e.submitText:void 0,promptId:"string"==typeof e.promptId?e.promptId:void 0,confidence:"number"==typeof e.confidence?e.confidence:void 0})).filter(e=>e.text);return t.length?t:void 0},od=(e,t,n={})=>{e(e=>{const r=[...e||[]],o=r[r.length-1];if("assistant"===o?.role){const{prompts:e,...a}=n||{};r[r.length-1]={...o,...a,content:t,isProcessing:!1,...null!=e&&{prompts:rd(e)}}}return r})},ad=/model.candidates.failed|gateway|502|redis|litellm|openai.*error|Failed to initialize agent|Streaming error:/i,id="I'm having a little trouble right now. Please try again in a moment.";function sd(e){return e&&"string"==typeof e?ad.test(e)?id:e:id}const ld=(e,t,n,r,o)=>{if(e&&e.type)switch(e.type){case qu:{const n=e.choices?.[0]?.delta?.content||"";t(e=>{const t=[...e||[]],r=t[t.length-1];return r&&"assistant"===r.role&&r.isProcessing?t[t.length-1]={...r,processingStatus:n}:n&&t.push({...nd(),processingStatus:n}),t});break}case Qu:o.current||(o.current=!0,t(e=>{const t=e[e.length-1];if(!t||"assistant"!==t.role||!t.isProcessing){return[...e||[],nd()]}return e}));const a=e.content||e.choices?.[0]?.delta?.content||"";a&&(n.current+=a,r(n.current));break;case Yu:(e=>{e(e=>{const t=[...e||[]],n=t[t.length-1];return n?.isProcessing&&(t[t.length-1]={...n,isProcessing:!1}),t})})(t);break;case Ku:{const r=e.finalContent||n.current,o={};"boolean"==typeof e.conclusionDetected?o.conclusionDetected=e.conclusionDetected:"boolean"==typeof e.conclusion_detected&&(o.conclusionDetected=e.conclusion_detected);const a={...o,prompts:e.prompts};od(t,r,a);break}case Gu:{const n=Array.isArray(e.prompts)?e.prompts:[];n.length>0&&t(e=>{const t=[...e||[]],r=t[t.length-1];return r&&"assistant"===r.role&&(t[t.length-1]={...r,prompts:rd(n)}),t});break}case Xu:((e,t)=>{t=sd(t),e(e=>{const n=[...e||[]],r=n[n.length-1];return"assistant"===r?.role&&(n[n.length-1]={...r,content:(r.content||"")+`\n\nError: ${t}`,isProcessing:!1}),n})})(t,e.error||"Unknown error occurred");break;case Ju:{const n={id:`decision-${Date.now()}`,role:"assistant",content:e.question||"",timestamp:new Date,isProcessing:!1,requiresDecision:!0,decisionData:{decisionId:e.decisionId,question:e.question,options:e.options||[],context:e.context||{}}};t(e=>[...(e||[]).filter(e=>!e.isProcessing||e.content),n]);break}}},cd=e=>{const t=e.Sources??e.sources??[];return Array.isArray(t)?t.map(e=>({source_type:e.source_type??e.sourceType??"website",source_id:e.sourceid??e.source_id,source_name:e.source_name??e.sourceName??"",url:e.url,citation_indices:e.citation_indices??e.citationIndices,effective_date:e.effective_date??e.effectiveDate,stale:e.stale})).filter(e=>e.source_id||e.url||"database"===e.source_type):[]},ud=async(e,t,n)=>{const r=(e=>{let t=null,n=null,r=0;const o=a=>{if(a-r<16)n=requestAnimationFrame(o);else{if(null!==t){const n=t;t=null,r=a,e(e=>{const t=[...e||[]],r=t[t.length-1];return"assistant"===r?.role&&(t[t.length-1]={...r,content:n}),t})}n=null}},a=e=>{t=e,null===n&&(n=requestAnimationFrame(o))};return a.cancel=()=>{null!==n&&(cancelAnimationFrame(n),n=null,t=null)},a})(t),o=e.getReader(),a=new TextDecoder;let i="";const s={current:""},l={current:!1};let c=!1,u=null;const d=()=>{if(!c&&(c=!0,"function"==typeof n))try{n()}catch(e){}};try{for(;;){const{value:e,done:n}=await o.read();if(n)break;i+=a.decode(e,{stream:!0});const c=i.split(/\r?\n\r?\n/);i=c.pop()||"";for(const e of c){const n=e.split(/\r?\n/).map(e=>e.trim()).filter(Boolean);if(0===n.length)continue;const o=n.filter(e=>e.startsWith("data:")).map(e=>e.slice(5).trim());if(0===o.length)continue;const a=o.join("\n");if("[DONE]"===a)continue;let i;try{i=JSON.parse(a)}catch(e){continue}if(i){if(i.type){if("processing_start"===i.type){const e=i.choices?.[0]?.delta?.content||"";t(t=>{const n=[...t||[]],r=n[n.length-1];return r&&"assistant"===r.role&&r.isProcessing?n[n.length-1]={...r,processingStatus:e}:e&&n.push({...nd(),processingStatus:e}),n});continue}if("processing_end"===i.type)continue;if("human_handoff"===i.type){d();continue}if("duplicate_suppressed"===i.type){d();continue}if("follow_up_prompts"===i.type){const e=Array.isArray(i.prompts)?i.prompts:[];e.length>0&&t(t=>{const n=[...t||[]],r=n[n.length-1];return r&&"assistant"===r.role?null!=u&&r.id!==u?t:(n[n.length-1]={...r,prompts:rd(e)},n):t});continue}if("text_chunk"===i.type){l.current||(l.current=!0,t(e=>{const t=e[e.length-1];if(!t||"assistant"!==t.role||!t.isProcessing){return[...e||[],nd()]}return e}));const e=i.choices?.[0]?.delta?.content||i.content;e&&(s.current+=e,r(s.current));continue}if("sources"===i.type){const e=cd(i);e.length>0&&t(t=>{const n=[...t||[]],r=n[n.length-1];return"assistant"===r?.role&&(n[n.length-1]={...r,sources:e,sourcesPreliminary:!0}),n});continue}if("complete"===i.type){const e=cd(i),n=i.finalContent||i.choices?.[0]?.delta?.content||s.current,o={};"boolean"==typeof i.conclusionDetected?o.conclusionDetected=i.conclusionDetected:"boolean"==typeof i.conclusion_detected&&(o.conclusionDetected=i.conclusion_detected);const a={...o,prompts:i.prompts};r.cancel(),od(t,n,a),t(t=>{const r=[...t||[]],o=r[r.length-1];if("assistant"===o?.role&&(u=o.id??null),"assistant"===o?.role&&(e.length>0||o.sourcesPreliminary)){const{sourcesPreliminary:t,...a}=o;r[r.length-1]={...a,sources:e,content:n,isProcessing:!1}}return r}),d();continue}if("error"===i.type){t(e=>{const t=[...e||[]],n=t[t.length-1];return"assistant"===n?.role&&(t[t.length-1]={...n,content:(n.content||"")+`\n\nError: ${sd(i.error||"Unknown error occurred")}`,isProcessing:!1}),t});continue}const e=Zu(a);if(e&&e.type){ld(e,t,s,r,l);continue}}if("chat.completion.chunk"===i.object&&i.choices?.[0]?.delta?.content)l.current||(l.current=!0,t(e=>{const t=e[e.length-1];if(!t||"assistant"!==t.role||!t.isProcessing){return[...e||[],nd()]}return e})),s.current+=i.choices[0].delta.content,r(s.current);else if(i.choices?.[0]?.finish_reason&&null!==i.choices[0].finish_reason){const e={prompts:i.prompts};od(t,s.current,e),t(e=>{const t=(e||[])[(e||[]).length-1];return"assistant"===t?.role&&(u=t.id??null),e}),d()}}}}}catch(e){if(e&&"AbortError"===e.name)return void(s.current?od(t,s.current,{stoppedByUser:!0}):t(e=>(e||[]).filter(e=>!e.isProcessing)));throw e}finally{o.releaseLock()}if(!c)throw new ed(s.current?"Stream ended mid-response - partial content received":"Stream ended before any content was received")};async function dd(e){if("undefined"==typeof window)throw new Error("Audio recorder can only run in the browser");const t=new AudioContext({sampleRate:16e3}),n=new Blob(["\n class PCMRecorderProcessor extends AudioWorkletProcessor {\n process(inputs) {\n if (!inputs.length || !inputs[0].length) {\n return true;\n }\n const inputChannel = inputs[0][0];\n this.port.postMessage(new Float32Array(inputChannel));\n return true;\n }\n }\n registerProcessor('pcm-recorder-processor', PCMRecorderProcessor);\n "],{type:"application/javascript"}),r=URL.createObjectURL(n);await t.audioWorklet.addModule(r),URL.revokeObjectURL(r);const o=await navigator.mediaDevices.getUserMedia({audio:{channelCount:1}}),a=t.createMediaStreamSource(o),i=new AudioWorkletNode(t,"pcm-recorder-processor");return i.port.onmessage=t=>{const n=function(e){const t=new Int16Array(e.length);for(let n=0;n<e.length;n+=1)t[n]=Math.max(-1,Math.min(1,e[n]))*gd;return t.buffer}(t.data);e(n)},a.connect(i),[i,t,o]}function pd(e){e&&e.getTracks().forEach(e=>e.stop())}const gd=32767;const fd=.025,hd=200,md=1e3,bd=300;function yd(e,t){const n=e.sampleRate,r=e.energyThreshold??fd,o=e.speechStartMs??hd,a=e.hangoverMs??md,i=e.preRollMs??bd;let s=!1,l=0,c=0,u=[],d=0;return{process:e=>{const p=(e=>e.byteLength/2/n*1e3)(e),g=function(e){const t=new Int16Array(e);if(0===t.length)return 0;let n=0;for(let e=0;e<t.length;e+=1){const r=t[e]/32768;n+=r*r}return Math.sqrt(n/t.length)}(e)>=r;if(s)t.onVoiceFrame(e),g?c=0:(c+=p,c>=a&&(s=!1,l=0,c=0,t.onSpeechEnd()));else{for(u.push({pcm:e,durationMs:p}),d+=p;d>i&&u.length>1;){const e=u.shift();d-=e?.durationMs??0}if(g){if(l+=p,l>=o){s=!0,c=0,t.onSpeechStart?.();for(const e of u)t.onVoiceFrame(e.pcm);u=[],d=0}}else l=0}},reset:()=>{s=!1,l=0,c=0,u=[],d=0},isSpeaking:()=>s}}const vd={connectionError:"Sorry, I'm having trouble connecting right now. Please try again.",micDenied:"We couldn't access your microphone. Please allow access and try again.",micNotFound:"No microphone found. Please connect one and try again.",voiceUnavailable:"Voice isn't available right now. Please try again.",categoryTopicsHeading:"Please ask your **{category}** question below.",quickQuestionsHeadingLabel:"Or ask a quick question:",chooseTopicLabel:"Choose a topic to get started:",typeYourMessage:"Type your message...",agentIsLoading:"Agent is loading...",conversationResolved:"Conversation resolved",howWasYourExperience:"How was your experience?",feedbackPrompt:"Please rate our support to help us improve.",feedbackPlaceholder:"Tell us more about your experience...",submitFeedback:"Submit Feedback",submitting:"Submitting...",selectRatingFirst:"Please select a rating first",pleaseSubmitRatingFirst:"Please submit your rating first.",completeOnboardingToEnableVoice:"Complete the onboarding to enable voice",sendMessageToCompleteOnboarding:"Send a message to complete onboarding and enable voice.",resolve:"Resolve",scrollLeft:"Scroll left",scrollRight:"Scroll right",sendMessage:"Send message",stopGenerating:"Stop generating",sessionExpiringSoon:"Your session will expire soon due to inactivity.",startVoiceInput:"Start voice input",stopVoiceInput:"Stop voice input",voiceSessionLive:"Voice session live - speak or type to converse.",connectingVoice:"Connecting to voice session...",poweredBy:"Powered by",poweredByBefore:"Powered by",poweredByAfter:"",menu:"Menu",close:"Close",openChat:"Open chat",closeChat:"Close chat",lightMode:"Light Mode",nightMode:"Night Mode",refreshChat:"Refresh Chat",copyChat:"Copy Chat",startChat:"Start Chat",startingVoiceSession:"Starting voice session...",allowMicAccess:"Allow microphone access",emailRequired:"Please enter your email address",nameRequired:"Please enter your name",phoneRequired:"Please enter your phone number",fieldRequiredSuffix:"is required",emailInvalid:"Please enter a valid email address",nameInvalid:"Please enter a valid name",phoneInvalid:"Please enter a valid phone number",uploadFile:"Upload file",suggestedQuestions:"Suggested questions",agentIsTyping:"Agent is typing",rate:"Rate",rateExperience:"Rate your experience",thumbsUp:"Thumbs up",thumbsDown:"Thumbs down",submittingFeedback:"Submitting feedback...",cancel:"Cancel",submit:"Submit",messageNotDelivered:"Not delivered",retrySend:"Retry"},wd={en:vd,ar:{connectionError:"عذرًا، أواجه مشكلة في الاتصال حاليًا. يرجى المحاولة مرة أخرى.",micDenied:"لم نتمكن من الوصول إلى الميكروفون. يرجى السماح بالوصول والمحاولة مرة أخرى.",micNotFound:"لم يتم العثور على ميكروفون. يرجى توصيل ميكروفون والمحاولة مرة أخرى.",voiceUnavailable:"الميزة الصوتية غير متوفرة حاليًا. يرجى المحاولة مرة أخرى.",chooseTopicLabel:"اختر موضوعًا للبدء:",categoryTopicsHeading:"يرجى طرح سؤالك حول **{category}** أدناه.",quickQuestionsHeadingLabel:"أو اطرح سؤالًا سريعًا:",typeYourMessage:"اكتب رسالتك هنا...",agentIsLoading:"جارٍ تحميل الوكيل...",conversationResolved:"تم إنهاء المحادثة",howWasYourExperience:"كيف كانت تجربتك؟",feedbackPrompt:"يرجى تقييم خدمتنا لمساعدتنا على التحسن.",feedbackPlaceholder:"أخبرنا المزيد عن تجربتك...",submitFeedback:"إرسال التقييم",submitting:"جارٍ الإرسال...",selectRatingFirst:"يرجى تحديد التقييم أولاً",pleaseSubmitRatingFirst:"يرجى إرسال تقييمك أولاً.",completeOnboardingToEnableVoice:"أكمل التسجيل لتفعيل الصوت",sendMessageToCompleteOnboarding:"أرسل رسالة لإكمال التسجيل وتفعيل الصوت.",resolve:"إنهاء",scrollLeft:"تمرير لليسار",scrollRight:"تمرير لليمين",sendMessage:"إرسال رسالة",voiceSessionLive:"الجلسة الصوتية نشطة - تحدث أو اكتب للتواصل.",connectingVoice:"جارٍ الاتصال بالجلسة الصوتية...",poweredBy:"مدعوم من",menu:"القائمة",close:"إغلاق",openChat:"فتح المحادثة",closeChat:"إغلاق المحادثة",lightMode:"الوضع الفاتح",nightMode:"الوضع الداكن",refreshChat:"تحديث المحادثة",copyChat:"نسخ المحادثة",startChat:"بدء المحادثة",startingVoiceSession:"جارٍ بدء الجلسة الصوتية...",allowMicAccess:"السماح بالوصول إلى الميكروفون",uploadFile:"رفع ملف",suggestedQuestions:"أسئلة مقترحة",agentIsTyping:"الوكيل يكتب",rate:"تقييم",rateExperience:"قيّم تجربتك",thumbsUp:"إعجاب",thumbsDown:"عدم إعجاب",submittingFeedback:"جارٍ إرسال التقييم...",cancel:"إلغاء",submit:"إرسال",messageNotDelivered:"لم يتم الإرسال",retrySend:"إعادة المحاولة"},es:{connectionError:"Lo sentimos, estoy teniendo problemas de conexión en este momento. Inténtalo de nuevo.",micDenied:"No pudimos acceder a tu micrófono. Permite el acceso e inténtalo de nuevo.",micNotFound:"No se encontró ningún micrófono. Conecta uno e inténtalo de nuevo.",voiceUnavailable:"La voz no está disponible en este momento. Inténtalo de nuevo.",chooseTopicLabel:"Elige un tema para empezar:",categoryTopicsHeading:"Por favor, haz tu pregunta sobre **{category}** a continuación.",quickQuestionsHeadingLabel:"O haz una pregunta rápida:",typeYourMessage:"Escribe tu mensaje...",agentIsLoading:"El agente está cargando...",conversationResolved:"Conversación resuelta",howWasYourExperience:"¿Cómo fue tu experiencia?",feedbackPrompt:"Califica nuestro soporte para ayudarnos a mejorar.",feedbackPlaceholder:"Cuéntanos más sobre tu experiencia...",submitFeedback:"Enviar comentarios",submitting:"Enviando...",selectRatingFirst:"Primero selecciona una calificación",pleaseSubmitRatingFirst:"Por favor, envía tu calificación primero.",completeOnboardingToEnableVoice:"Completa la configuración para habilitar la voz",sendMessageToCompleteOnboarding:"Envía un mensaje para completar la configuración y habilitar la voz.",resolve:"Resolver",scrollLeft:"Desplazar a la izquierda",scrollRight:"Desplazar a la derecha",sendMessage:"Enviar mensaje",voiceSessionLive:"Sesión de voz activa - habla o escribe para conversar.",connectingVoice:"Conectando a la sesión de voz...",poweredBy:"Desarrollado por",menu:"Menú",close:"Cerrar",openChat:"Abrir chat",closeChat:"Cerrar chat",lightMode:"Modo claro",nightMode:"Modo oscuro",refreshChat:"Actualizar chat",copyChat:"Copiar chat",startChat:"Iniciar chat",startingVoiceSession:"Iniciando sesión de voz...",allowMicAccess:"Permitir acceso al micrófono"},be:{connectionError:"Прабачце, зараз узнікаюць праблемы з падключэннем. Паспрабуйце яшчэ раз.",micDenied:"Не ўдалося атрымаць доступ да мікрафона. Дазвольце доступ і паспрабуйце яшчэ раз.",micNotFound:"Мікрафон не знойдзены. Падключыце яго і паспрабуйце яшчэ раз.",voiceUnavailable:"Галасавая функцыя зараз недаступная. Паспрабуйце яшчэ раз.",chooseTopicLabel:"Выберыце тэму, каб пачаць:",categoryTopicsHeading:"Калі ласка, задайце сваё пытанне пра **{category}** ніжэй.",quickQuestionsHeadingLabel:"Або задайце хуткае пытанне:",typeYourMessage:"Увядзіце паведамленне...",agentIsLoading:"Агент загружаецца...",conversationResolved:"Размова завершана",howWasYourExperience:"Як прайшоў ваш досвед?",feedbackPrompt:"Калі ласка, ацаніце нашу падтрымку, каб дапамагчы нам стаць лепш.",feedbackPlaceholder:"Раскажыце нам больш пра свой досвед...",submitFeedback:"Адправіць водгук",submitting:"Адпраўка...",selectRatingFirst:"Спачатку абярыце ацэнку",pleaseSubmitRatingFirst:"Калі ласка, спачатку адпраўце сваю ацэнку.",completeOnboardingToEnableVoice:"Завяршыце ўводны этап, каб уключыць голас",sendMessageToCompleteOnboarding:"Адпраўце паведамленне, каб завяршыць уводны этап і ўключыць голас.",resolve:"Завяршыць",scrollLeft:"Пракруціць улева",scrollRight:"Пракруціць управа",sendMessage:"Адправіць паведамленне",voiceSessionLive:"Галасавая сесія актыўная - гаварыце або пішыце.",connectingVoice:"Злучэнне з галасавой сесіяй...",poweredBy:"Працуе на",menu:"Меню",close:"Закрыць",openChat:"Адкрыць чат",closeChat:"Закрыць чат",lightMode:"Светлы рэжым",nightMode:"Цёмны рэжым",refreshChat:"Абнавіць чат",copyChat:"Капіраваць чат",startChat:"Пачаць чат",startingVoiceSession:"Запуск галасавой сесіі...",allowMicAccess:"Дазволіць доступ да мікрафона"},bs:{connectionError:"Izvinite, trenutno imam problema s povezivanjem. Pokušajte ponovo.",micDenied:"Nismo mogli pristupiti vašem mikrofonu. Dozvolite pristup i pokušajte ponovo.",micNotFound:"Mikrofon nije pronađen. Priključite ga i pokušajte ponovo.",voiceUnavailable:"Glasovna funkcija trenutno nije dostupna. Pokušajte ponovo.",chooseTopicLabel:"Odaberite temu za početak:",categoryTopicsHeading:"Molimo postavite svoje pitanje o **{category}** ispod.",quickQuestionsHeadingLabel:"Ili postavite brzo pitanje:",typeYourMessage:"Upišite vašu poruku...",agentIsLoading:"Agent se učitava...",conversationResolved:"Razgovor je završen",howWasYourExperience:"Kakvo je bilo vaše iskustvo?",feedbackPrompt:"Molimo ocijenite našu podršku kako bismo se poboljšali.",feedbackPlaceholder:"Recite nam više o vašem iskustvu...",submitFeedback:"Pošalji povratnu informaciju",submitting:"Slanje...",selectRatingFirst:"Prvo odaberite ocjenu",pleaseSubmitRatingFirst:"Molimo prvo pošaljite vašu ocjenu.",completeOnboardingToEnableVoice:"Završite registraciju da omogućite glas",sendMessageToCompleteOnboarding:"Pošaljite poruku da završite registraciju i omogućite glas.",resolve:"Završi",scrollLeft:"Pomjeri lijevo",scrollRight:"Pomjeri desno",sendMessage:"Pošalji poruku",voiceSessionLive:"Glasovna sesija je aktivna - govorite ili pišite.",connectingVoice:"Povezivanje na glasovnu sesiju...",poweredBy:"Pokreće",menu:"Meni",close:"Zatvori",openChat:"Otvori chat",closeChat:"Zatvori chat",lightMode:"Svijetli način",nightMode:"Tamni način",refreshChat:"Osvježi chat",copyChat:"Kopiraj chat",startChat:"Započni chat",startingVoiceSession:"Pokretanje glasovne sesije...",allowMicAccess:"Dozvoli pristup mikrofonu"},bg:{connectionError:"Съжалявам, в момента имам проблеми с връзката. Опитайте отново.",micDenied:"Не успяхме да получим достъп до микрофона ви. Разрешете достъпа и опитайте отново.",micNotFound:"Не е намерен микрофон. Свържете микрофон и опитайте отново.",voiceUnavailable:"Гласовата функция не е достъпна в момента. Опитайте отново.",chooseTopicLabel:"Изберете тема, за да започнете:",categoryTopicsHeading:"Моля, задайте въпроса си за **{category}** по-долу.",quickQuestionsHeadingLabel:"Или задайте бърз въпрос:",typeYourMessage:"Въведете съобщението си...",agentIsLoading:"Агентът се зарежда...",conversationResolved:"Разговорът е приключен",howWasYourExperience:"Как беше вашето изживяване?",feedbackPrompt:"Моля, оценете нашата поддръжка, за да ни помогнете да се подобрим.",feedbackPlaceholder:"Разкажете ни повече за вашето изживяване...",submitFeedback:"Изпрати отзив",submitting:"Изпращане...",selectRatingFirst:"Първо изберете оценка",pleaseSubmitRatingFirst:"Моля, първо изпратете оценката си.",completeOnboardingToEnableVoice:"Завършете регистрацията, за да активирате гласа",sendMessageToCompleteOnboarding:"Изпратете съобщение, за да завършите регистрацията и активирате гласа.",resolve:"Приключи",scrollLeft:"Превърти наляво",scrollRight:"Превърти надясно",sendMessage:"Изпрати съобщение",voiceSessionLive:"Гласовата сесия е активна - говорете или пишете.",connectingVoice:"Свързване с гласова сесия...",poweredBy:"Задвижвано от",menu:"Меню",close:"Затвори",openChat:"Отвори чат",closeChat:"Затвори чат",lightMode:"Светъл режим",nightMode:"Тъмен режим",refreshChat:"Опресни чата",copyChat:"Копирай чата",startChat:"Започни чат",startingVoiceSession:"Стартиране на гласова сесия...",allowMicAccess:"Позволете достъп до микрофона"},my:{connectionError:"ဝမ်းနည်းပါသည်၊ ယခု ချိတ်ဆက်ရာတွင် အခက်အခဲရှိနေပါသည်။ ထပ်မံကြိုးစားပါ။",micDenied:"သင့်မိုက်ခရိုဖုန်းကို အသုံးပြုခွင့် မရနိုင်ပါ။ ခွင့်ပြုပြီး ထပ်မံကြိုးစားပါ။",micNotFound:"မိုက်ခရိုဖုန်း မတွေ့ပါ။ ချိတ်ဆက်ပြီး ထပ်မံကြိုးစားပါ။",voiceUnavailable:"အသံလုပ်ဆောင်ချက် ယခုအချိန် မရနိုင်ပါ။ ထပ်မံကြိုးစားပါ။",chooseTopicLabel:"စတင်ရန် ခေါင်းစဉ်တစ်ခု ရွေးချယ်ပါ:",categoryTopicsHeading:"ကျေးဇူးပြု၍ သင်၏ **{category}** မေးခွန်းကို အောက်တွင် မေးပါ။",quickQuestionsHeadingLabel:"သို့မဟုတ် မြန်ဆန်သော မေးခွန်းတစ်ခု မေးပါ:",typeYourMessage:"သင့်မက်ဆေ့ချ်ကို ရိုက်ထည့်ပါ...",agentIsLoading:"အေးဂျင့်ကို ဖွင့်နေသည်...",conversationResolved:"စကားဝိုင်း ပြီးစီးပြီ",howWasYourExperience:"သင့်အတွေ့အကြုံ မည်သို့ရှိခဲ့သနည်း?",feedbackPrompt:"ကျွန်ုပ်တို့၏ ဝန်ဆောင်မှုကို အဆင့်သတ်မှတ်ပေးပါ။",feedbackPlaceholder:"သင့်အတွေ့အကြုံအကြောင်း ပိုမိုပြောပြပါ...",submitFeedback:"တုံ့ပြန်ချက် ပေးပို့ရန်",submitting:"ပေးပို့နေသည်...",selectRatingFirst:"အရင်ဆုံး အဆင့်ရွေးပါ",pleaseSubmitRatingFirst:"ကျေးဇူးပြု၍ အဆင့်ကို အရင်ဆုံးပို့ပါ။",completeOnboardingToEnableVoice:"အသံကို ဖွင့်ရန် မိတ်ဆက်ခြင်းကို ပြီးဆုံးပါ",sendMessageToCompleteOnboarding:"မိတ်ဆက်ခြင်းကို ပြီးဆုံးပြီး အသံဖွင့်ရန် မက်ဆေ့ချ်ပို့ပါ။",resolve:"ပြီးဆုံး",scrollLeft:"ဘယ်ဘက်သို့ ရွှေ့ပါ",scrollRight:"ညာဘက်သို့ ရွှေ့ပါ",sendMessage:"မက်ဆေ့ချ်ပို့ရန်",voiceSessionLive:"အသံစီရင်ချက် တက်ကြွနေသည် - ပြောပါ သို့မဟုတ် ရိုက်ပါ။",connectingVoice:"အသံစီရင်ချက်သို့ ချိတ်ဆက်နေသည်...",poweredBy:"လုပ်ဆောင်ပေးသူ",menu:"မီနူး",close:"ပိတ်",openChat:"ချတ်ဖွင့်",closeChat:"ချတ်ပိတ်",lightMode:"အလင်းမုဒ်",nightMode:"အမှောင်မုဒ်",refreshChat:"ချတ်ပြန်လည်ရယူ",copyChat:"ချတ်ကူးယူ",startChat:"ချတ်စတင်",startingVoiceSession:"အသံစီရင်ချက် စတင်နေသည်...",allowMicAccess:"မိုက်ခရိုဖုန်း ဝင်ရောက်ခွင့်ပြုပါ"},ca:{connectionError:"Ho sentim, ara mateix tinc problemes de connexió. Torna-ho a provar.",micDenied:"No hem pogut accedir al teu micròfon. Permet l'accés i torna-ho a provar.",micNotFound:"No s'ha trobat cap micròfon. Connecta'n un i torna-ho a provar.",voiceUnavailable:"La veu no està disponible ara mateix. Torna-ho a provar.",chooseTopicLabel:"Tria un tema per començar:",categoryTopicsHeading:"Si us plau, fes la teva pregunta sobre **{category}** a continuació.",quickQuestionsHeadingLabel:"O fes una pregunta ràpida:",typeYourMessage:"Escriu el teu missatge...",agentIsLoading:"L'agent està carregant...",conversationResolved:"Conversa resolta",howWasYourExperience:"Com ha estat la teva experiència?",feedbackPrompt:"Si us plau, valora el nostre suport per ajudar-nos a millorar.",feedbackPlaceholder:"Explica'ns més sobre la teva experiència...",submitFeedback:"Enviar comentaris",submitting:"Enviant...",selectRatingFirst:"Primer selecciona una valoració",pleaseSubmitRatingFirst:"Si us plau, envia primer la teva valoració.",completeOnboardingToEnableVoice:"Completa la configuració per activar la veu",sendMessageToCompleteOnboarding:"Envia un missatge per completar la configuració i activar la veu.",resolve:"Resoldre",scrollLeft:"Desplaçar a l'esquerra",scrollRight:"Desplaçar a la dreta",sendMessage:"Enviar missatge",voiceSessionLive:"Sessió de veu activa - parla o escriu per conversar.",connectingVoice:"Connectant a la sessió de veu...",poweredBy:"Impulsat per",menu:"Menú",close:"Tancar",openChat:"Obrir xat",closeChat:"Tancar xat",lightMode:"Mode clar",nightMode:"Mode fosc",refreshChat:"Actualitzar xat",copyChat:"Copiar xat",startChat:"Iniciar xat",startingVoiceSession:"Iniciant sessió de veu...",allowMicAccess:"Permetre accés al micròfon"},zh:{connectionError:"抱歉,我现在连接遇到问题。请重试。",micDenied:"无法访问您的麦克风。请允许访问后重试。",micNotFound:"未检测到麦克风。请连接麦克风后重试。",voiceUnavailable:"语音功能当前不可用。请重试。",chooseTopicLabel:"选择一个主题开始:",categoryTopicsHeading:"请在下方提出您关于 **{category}** 的问题。",quickQuestionsHeadingLabel:"或者提一个快速问题:",typeYourMessage:"输入您的消息...",agentIsLoading:"客服正在加载...",conversationResolved:"对话已结束",howWasYourExperience:"您的体验如何?",feedbackPrompt:"请为我们的支持评分,帮助我们改进。",feedbackPlaceholder:"告诉我们更多关于您的体验...",submitFeedback:"提交反馈",submitting:"提交中...",selectRatingFirst:"请先选择评分",pleaseSubmitRatingFirst:"请先提交您的评分。",completeOnboardingToEnableVoice:"完成引导以启用语音",sendMessageToCompleteOnboarding:"发送消息完成引导并启用语音。",resolve:"结束",scrollLeft:"向左滚动",scrollRight:"向右滚动",sendMessage:"发送消息",voiceSessionLive:"语音会话进行中 - 请说话或输入。",connectingVoice:"正在连接语音会话...",poweredBy:"技术支持",menu:"菜单",close:"关闭",openChat:"打开聊天",closeChat:"关闭聊天",lightMode:"浅色模式",nightMode:"深色模式",refreshChat:"刷新聊天",copyChat:"复制聊天",startChat:"开始聊天",startingVoiceSession:"正在启动语音会话...",allowMicAccess:"允许访问麦克风"},hr:{connectionError:"Nažalost, trenutno imam problema s povezivanjem. Pokušajte ponovno.",micDenied:"Nismo mogli pristupiti vašem mikrofonu. Dopustite pristup i pokušajte ponovno.",micNotFound:"Mikrofon nije pronađen. Priključite ga i pokušajte ponovno.",voiceUnavailable:"Glasovna funkcija trenutačno nije dostupna. Pokušajte ponovno.",chooseTopicLabel:"Odaberite temu za početak:",categoryTopicsHeading:"Molimo postavite svoje pitanje o **{category}** u nastavku.",quickQuestionsHeadingLabel:"Ili postavite brzo pitanje:",typeYourMessage:"Upišite svoju poruku...",agentIsLoading:"Agent se učitava...",conversationResolved:"Razgovor je završen",howWasYourExperience:"Kakvo je bilo vaše iskustvo?",feedbackPrompt:"Molimo ocijenite našu podršku kako bismo se poboljšali.",feedbackPlaceholder:"Recite nam više o svom iskustvu...",submitFeedback:"Pošalji povratnu informaciju",submitting:"Slanje...",selectRatingFirst:"Prvo odaberite ocjenu",pleaseSubmitRatingFirst:"Molimo prvo pošaljite ocjenu.",completeOnboardingToEnableVoice:"Dovršite uvod za omogućavanje glasa",sendMessageToCompleteOnboarding:"Pošaljite poruku da dovršite uvod i omogućite glas.",resolve:"Završi",scrollLeft:"Pomakni lijevo",scrollRight:"Pomakni desno",sendMessage:"Pošalji poruku",voiceSessionLive:"Glasovna sesija je aktivna - govorite ili pišite.",connectingVoice:"Povezivanje na glasovnu sesiju...",poweredBy:"Pokreće",menu:"Izbornik",close:"Zatvori",openChat:"Otvori chat",closeChat:"Zatvori chat",lightMode:"Svijetli način",nightMode:"Tamni način",refreshChat:"Osvježi chat",copyChat:"Kopiraj chat",startChat:"Pokreni chat",startingVoiceSession:"Pokretanje glasovne sesije...",allowMicAccess:"Dopustite pristup mikrofonu"},cs:{connectionError:"Omlouváme se, momentálně mám problémy s připojením. Zkuste to prosím znovu.",micDenied:"Nepodařilo se získat přístup k mikrofonu. Povolte přístup a zkuste to znovu.",micNotFound:"Mikrofon nebyl nalezen. Připojte jej a zkuste to znovu.",voiceUnavailable:"Hlasová funkce není momentálně dostupná. Zkuste to znovu.",chooseTopicLabel:"Vyberte téma a začněte:",categoryTopicsHeading:"Prosím, položte svou otázku ohledně **{category}** níže.",quickQuestionsHeadingLabel:"Nebo položte rychlou otázku:",typeYourMessage:"Napište zprávu...",agentIsLoading:"Agent se načítá...",conversationResolved:"Konverzace ukončena",howWasYourExperience:"Jaká byla vaše zkušenost?",feedbackPrompt:"Ohodnoťte prosím naši podporu, abychom se mohli zlepšit.",feedbackPlaceholder:"Řekněte nám více o své zkušenosti...",submitFeedback:"Odeslat zpětnou vazbu",submitting:"Odesílání...",selectRatingFirst:"Nejprve vyberte hodnocení",pleaseSubmitRatingFirst:"Nejprve prosím odešlete své hodnocení.",completeOnboardingToEnableVoice:"Dokončete úvod pro povolení hlasu",sendMessageToCompleteOnboarding:"Odešlete zprávu pro dokončení úvodu a povolení hlasu.",resolve:"Dokončit",scrollLeft:"Posunout doleva",scrollRight:"Posunout doprava",sendMessage:"Odeslat zprávu",voiceSessionLive:"Hlasová relace je aktivní - mluvte nebo pište.",connectingVoice:"Připojování k hlasové relaci...",poweredBy:"Používá",menu:"Nabídka",close:"Zavřít",openChat:"Otevřít chat",closeChat:"Zavřít chat",lightMode:"Světlý režim",nightMode:"Tmavý režim",refreshChat:"Obnovit chat",copyChat:"Kopírovat chat",startChat:"Začít chat",startingVoiceSession:"Spouštění hlasové relace...",allowMicAccess:"Povolit přístup k mikrofonu"},da:{connectionError:"Beklager, jeg har problemer med at oprette forbindelse lige nu. Prøv igen.",micDenied:"Vi kunne ikke få adgang til din mikrofon. Tillad adgang og prøv igen.",micNotFound:"Der blev ikke fundet nogen mikrofon. Tilslut en og prøv igen.",voiceUnavailable:"Stemme er ikke tilgængelig lige nu. Prøv igen.",chooseTopicLabel:"Vælg et emne for at komme i gang:",categoryTopicsHeading:"Stil venligst dit spørgsmål om **{category}** nedenfor.",quickQuestionsHeadingLabel:"Eller stil et hurtigt spørgsmål:",typeYourMessage:"Skriv din besked...",agentIsLoading:"Agenten indlæses...",conversationResolved:"Samtale afsluttet",howWasYourExperience:"Hvordan var din oplevelse?",feedbackPrompt:"Bedøm venligst vores support for at hjælpe os med at blive bedre.",feedbackPlaceholder:"Fortæl os mere om din oplevelse...",submitFeedback:"Indsend feedback",submitting:"Sender...",selectRatingFirst:"Vælg først en vurdering",pleaseSubmitRatingFirst:"Indsend venligst din vurdering først.",completeOnboardingToEnableVoice:"Fuldfør onboarding for at aktivere stemme",sendMessageToCompleteOnboarding:"Send en besked for at fuldføre onboarding og aktivere stemme.",resolve:"Afslut",scrollLeft:"Rul til venstre",scrollRight:"Rul til højre",sendMessage:"Send besked",voiceSessionLive:"Stemmesession aktiv - tal eller skriv for at samtale.",connectingVoice:"Forbinder til stemmesession...",poweredBy:"Drevet af",menu:"Menu",close:"Luk",openChat:"Åbn chat",closeChat:"Luk chat",lightMode:"Lys tilstand",nightMode:"Mørk tilstand",refreshChat:"Opdater chat",copyChat:"Kopier chat",startChat:"Start chat",startingVoiceSession:"Starter stemmesession...",allowMicAccess:"Tillad mikrofonadgang"},nl:{connectionError:"Sorry, ik heb momenteel verbindingsproblemen. Probeer het opnieuw.",micDenied:"We konden geen toegang krijgen tot je microfoon. Geef toegang en probeer het opnieuw.",micNotFound:"Geen microfoon gevonden. Sluit een microfoon aan en probeer het opnieuw.",voiceUnavailable:"Spraak is momenteel niet beschikbaar. Probeer het opnieuw.",chooseTopicLabel:"Kies een onderwerp om te beginnen:",categoryTopicsHeading:"Stel hieronder uw vraag over **{category}**.",quickQuestionsHeadingLabel:"Of stel een snelle vraag:",typeYourMessage:"Typ je bericht...",agentIsLoading:"Agent wordt geladen...",conversationResolved:"Gesprek beëindigd",howWasYourExperience:"Hoe was je ervaring?",feedbackPrompt:"Beoordeel onze service om ons te helpen verbeteren.",feedbackPlaceholder:"Vertel ons meer over je ervaring...",submitFeedback:"Feedback versturen",submitting:"Versturen...",selectRatingFirst:"Selecteer eerst een beoordeling",pleaseSubmitRatingFirst:"Dien eerst je beoordeling in.",completeOnboardingToEnableVoice:"Voltooi de onboarding om spraak in te schakelen",sendMessageToCompleteOnboarding:"Verstuur een bericht om de onboarding te voltooien en spraak in te schakelen.",resolve:"Afronden",scrollLeft:"Naar links scrollen",scrollRight:"Naar rechts scrollen",sendMessage:"Bericht versturen",voiceSessionLive:"Spraaksessie actief - spreek of typ om te converseren.",connectingVoice:"Verbinden met spraaksessie...",poweredBy:"Mogelijk gemaakt door",menu:"Menu",close:"Sluiten",openChat:"Chat openen",closeChat:"Chat sluiten",lightMode:"Lichte modus",nightMode:"Donkere modus",refreshChat:"Chat vernieuwen",copyChat:"Chat kopiëren",startChat:"Chat starten",startingVoiceSession:"Spraaksessie starten...",allowMicAccess:"Toegang tot microfoon toestaan"},et:{connectionError:"Kahjuks on mul praegu ühendusprobleeme. Palun proovige uuesti.",micDenied:"Mikrofonile ei pääsenud ligi. Lubage juurdepääs ja proovige uuesti.",micNotFound:"Mikrofoni ei leitud. Ühendage mikrofon ja proovige uuesti.",voiceUnavailable:"Hääl ei ole praegu saadaval. Palun proovige uuesti.",chooseTopicLabel:"Vali alustamiseks teema:",categoryTopicsHeading:"Palun esita oma **{category}** küsimus allpool.",quickQuestionsHeadingLabel:"Või esita kiire küsimus:",typeYourMessage:"Sisesta oma sõnum...",agentIsLoading:"Agent laeb...",conversationResolved:"Vestlus lõpetatud",howWasYourExperience:"Kuidas oli teie kogemus?",feedbackPrompt:"Palun hinnake meie tuge, et aidata meil paremaks saada.",feedbackPlaceholder:"Rääkige meile oma kogemusest rohkem...",submitFeedback:"Saada tagasiside",submitting:"Saatmine...",selectRatingFirst:"Vali esmalt hinnang",pleaseSubmitRatingFirst:"Palun esita esmalt oma hinnang.",completeOnboardingToEnableVoice:"Häälefunktsiooni lubamiseks lõpeta sissejuhatus",sendMessageToCompleteOnboarding:"Saada sõnum, et lõpetada sissejuhatus ja lubada hääl.",resolve:"Lõpeta",scrollLeft:"Keri vasakule",scrollRight:"Keri paremale",sendMessage:"Saada sõnum",voiceSessionLive:"Häälseanss aktiivne - rääkige või kirjutage.",connectingVoice:"Ühendamine häälseansiga...",poweredBy:"Võimaldab",menu:"Menüü",close:"Sulge",openChat:"Ava vestlus",closeChat:"Sulge vestlus",lightMode:"Hele režiim",nightMode:"Tume režiim",refreshChat:"Värskenda vestlust",copyChat:"Kopeeri vestlus",startChat:"Alusta vestlust",startingVoiceSession:"Häälseansi käivitamine...",allowMicAccess:"Luba mikrofoni juurdepääs"},fi:{connectionError:"Pahoittelut, minulla on nyt yhteysongelmia. Yritä uudelleen.",micDenied:"Mikrofoniin ei saatu yhteyttä. Salli käyttöoikeus ja yritä uudelleen.",micNotFound:"Mikrofonia ei löytynyt. Liitä mikrofoni ja yritä uudelleen.",voiceUnavailable:"Ääni ei ole juuri nyt käytettävissä. Yritä uudelleen.",chooseTopicLabel:"Aloita valitsemalla aihe:",categoryTopicsHeading:"Esitä **{category}**-kysymyksesi alla.",quickQuestionsHeadingLabel:"Tai esitä nopea kysymys:",typeYourMessage:"Kirjoita viestisi...",agentIsLoading:"Agenttia ladataan...",conversationResolved:"Keskustelu päättynyt",howWasYourExperience:"Millainen kokemuksesi oli?",feedbackPrompt:"Arvioi tukipalveluamme auttaaksesi meitä kehittymään.",feedbackPlaceholder:"Kerro lisää kokemuksestasi...",submitFeedback:"Lähetä palaute",submitting:"Lähetetään...",selectRatingFirst:"Valitse ensin arvio",pleaseSubmitRatingFirst:"Lähetä arviosi ensin.",completeOnboardingToEnableVoice:"Suorita perehdytys ottaaksesi äänen käyttöön",sendMessageToCompleteOnboarding:"Lähetä viesti suorittaaksesi perehdytyksen ja ottaaksesi äänen käyttöön.",resolve:"Lopeta",scrollLeft:"Vieritä vasemmalle",scrollRight:"Vieritä oikealle",sendMessage:"Lähetä viesti",voiceSessionLive:"Ääni-istunto aktiivinen - puhu tai kirjoita.",connectingVoice:"Yhdistetään ääni-istuntoon...",poweredBy:"Toimittaa",menu:"Valikko",close:"Sulje",openChat:"Avaa chat",closeChat:"Sulje chat",lightMode:"Vaalea tila",nightMode:"Tumma tila",refreshChat:"Päivitä chat",copyChat:"Kopioi chat",startChat:"Aloita chat",startingVoiceSession:"Käynnistetään ääni-istuntoa...",allowMicAccess:"Salli mikrofonin käyttö"},fr:{connectionError:"Désolé, je rencontre des problèmes de connexion en ce moment. Veuillez réessayer.",micDenied:"Nous n'avons pas pu accéder à votre microphone. Autorisez l'accès et réessayez.",micNotFound:"Aucun microphone détecté. Connectez-en un et réessayez.",voiceUnavailable:"La voix n'est pas disponible pour le moment. Veuillez réessayer.",chooseTopicLabel:"Choisissez un sujet pour commencer :",categoryTopicsHeading:"Veuillez poser votre question sur **{category}** ci-dessous.",quickQuestionsHeadingLabel:"Ou posez une question rapide :",typeYourMessage:"Tapez votre message...",agentIsLoading:"L'agent est en cours de chargement...",conversationResolved:"Conversation terminée",howWasYourExperience:"Comment s'est passée votre expérience ?",feedbackPrompt:"Veuillez évaluer notre support pour nous aider à nous améliorer.",feedbackPlaceholder:"Dites-nous en plus sur votre expérience...",submitFeedback:"Envoyer les commentaires",submitting:"Envoi en cours...",selectRatingFirst:"Sélectionnez d'abord une note",pleaseSubmitRatingFirst:"Veuillez d'abord envoyer votre note.",completeOnboardingToEnableVoice:"Terminez l'intégration pour activer la voix",sendMessageToCompleteOnboarding:"Envoyez un message pour terminer l'intégration et activer la voix.",resolve:"Terminer",scrollLeft:"Faire défiler à gauche",scrollRight:"Faire défiler à droite",sendMessage:"Envoyer un message",voiceSessionLive:"Session vocale active - parlez ou tapez pour converser.",connectingVoice:"Connexion à la session vocale...",poweredBy:"Propulsé par",menu:"Menu",close:"Fermer",openChat:"Ouvrir le chat",closeChat:"Fermer le chat",lightMode:"Mode clair",nightMode:"Mode sombre",refreshChat:"Actualiser le chat",copyChat:"Copier le chat",startChat:"Commencer le chat",startingVoiceSession:"Démarrage de la session vocale...",allowMicAccess:"Autoriser l'accès au microphone"},de:{connectionError:"Entschuldigung, ich habe gerade Verbindungsprobleme. Bitte versuchen Sie es erneut.",micDenied:"Wir konnten nicht auf Ihr Mikrofon zugreifen. Bitte erlauben Sie den Zugriff und versuchen Sie es erneut.",micNotFound:"Kein Mikrofon gefunden. Bitte schließen Sie eines an und versuchen Sie es erneut.",voiceUnavailable:"Sprache ist derzeit nicht verfügbar. Bitte versuchen Sie es erneut.",chooseTopicLabel:"Wählen Sie ein Thema, um zu beginnen:",categoryTopicsHeading:"Bitte stellen Sie Ihre Frage zu **{category}** unten.",quickQuestionsHeadingLabel:"Oder stellen Sie eine schnelle Frage:",typeYourMessage:"Geben Sie Ihre Nachricht ein...",agentIsLoading:"Agent wird geladen...",conversationResolved:"Gespräch beendet",howWasYourExperience:"Wie war Ihre Erfahrung?",feedbackPrompt:"Bitte bewerten Sie unseren Support, um uns bei der Verbesserung zu helfen.",feedbackPlaceholder:"Erzählen Sie uns mehr über Ihre Erfahrung...",submitFeedback:"Feedback senden",submitting:"Wird gesendet...",selectRatingFirst:"Wählen Sie zuerst eine Bewertung aus",pleaseSubmitRatingFirst:"Bitte senden Sie zuerst Ihre Bewertung.",completeOnboardingToEnableVoice:"Schließen Sie das Onboarding ab, um die Sprache zu aktivieren",sendMessageToCompleteOnboarding:"Senden Sie eine Nachricht, um das Onboarding abzuschließen und die Sprache zu aktivieren.",resolve:"Beenden",scrollLeft:"Nach links scrollen",scrollRight:"Nach rechts scrollen",sendMessage:"Nachricht senden",voiceSessionLive:"Sprachsitzung aktiv - sprechen oder tippen Sie.",connectingVoice:"Verbindung zur Sprachsitzung...",poweredBy:"Bereitgestellt von",menu:"Menü",close:"Schließen",openChat:"Chat öffnen",closeChat:"Chat schließen",lightMode:"Heller Modus",nightMode:"Dunkler Modus",refreshChat:"Chat aktualisieren",copyChat:"Chat kopieren",startChat:"Chat starten",startingVoiceSession:"Sprachsitzung wird gestartet...",allowMicAccess:"Mikrofonzugriff erlauben"},el:{connectionError:"Συγγνώμη, αντιμετωπίζω πρόβλημα σύνδεσης αυτή τη στιγμή. Δοκιμάστε ξανά.",micDenied:"Δεν μπορέσαμε να αποκτήσουμε πρόσβαση στο μικρόφωνό σας. Επιτρέψτε την πρόσβαση και δοκιμάστε ξανά.",micNotFound:"Δεν βρέθηκε μικρόφωνο. Συνδέστε ένα και δοκιμάστε ξανά.",voiceUnavailable:"Η φωνή δεν είναι διαθέσιμη αυτή τη στιγμή. Δοκιμάστε ξανά.",chooseTopicLabel:"Επιλέξτε ένα θέμα για να ξεκινήσετε:",categoryTopicsHeading:"Παρακαλώ κάντε την ερώτησή σας σχετικά με το **{category}** παρακάτω.",quickQuestionsHeadingLabel:"Ή κάντε μια γρήγορη ερώτηση:",typeYourMessage:"Πληκτρολογήστε το μήνυμά σας...",agentIsLoading:"Ο πράκτορας φορτώνει...",conversationResolved:"Η συζήτηση ολοκληρώθηκε",howWasYourExperience:"Πώς ήταν η εμπειρία σας;",feedbackPrompt:"Παρακαλούμε αξιολογήστε την υποστήριξή μας για να βελτιωθούμε.",feedbackPlaceholder:"Πείτε μας περισσότερα για την εμπειρία σας...",submitFeedback:"Υποβολή σχολίων",submitting:"Υποβολή...",selectRatingFirst:"Επιλέξτε πρώτα μια βαθμολογία",pleaseSubmitRatingFirst:"Υποβάλετε πρώτα τη βαθμολογία σας.",completeOnboardingToEnableVoice:"Ολοκληρώστε την εισαγωγή για ενεργοποίηση φωνής",sendMessageToCompleteOnboarding:"Στείλτε ένα μήνυμα για ολοκλήρωση της εισαγωγής και ενεργοποίηση φωνής.",resolve:"Ολοκλήρωση",scrollLeft:"Κύλιση αριστερά",scrollRight:"Κύλιση δεξιά",sendMessage:"Αποστολή μηνύματος",voiceSessionLive:"Φωνητική συνεδρία ενεργή - μιλήστε ή πληκτρολογήστε.",connectingVoice:"Σύνδεση σε φωνητική συνεδρία...",poweredBy:"Υποστηρίζεται από",menu:"Μενού",close:"Κλείσιμο",openChat:"Άνοιγμα συνομιλίας",closeChat:"Κλείσιμο συνομιλίας",lightMode:"Φωτεινή λειτουργία",nightMode:"Σκοτεινή λειτουργία",refreshChat:"Ανανέωση συνομιλίας",copyChat:"Αντιγραφή συνομιλίας",startChat:"Έναρξη συνομιλίας",startingVoiceSession:"Εκκίνηση φωνητικής συνεδρίας...",allowMicAccess:"Επιτρέψτε πρόσβαση στο μικρόφωνο"},hi:{connectionError:"क्षमा करें, मुझे अभी कनेक्ट होने में समस्या हो रही है। कृपया पुनः प्रयास करें।",micDenied:"हम आपके माइक्रोफ़ोन का उपयोग नहीं कर सके। कृपया अनुमति दें और पुनः प्रयास करें।",micNotFound:"कोई माइक्रोफ़ोन नहीं मिला। कृपया एक कनेक्ट करें और पुनः प्रयास करें।",voiceUnavailable:"वॉइस अभी उपलब्ध नहीं है। कृपया पुनः प्रयास करें।",chooseTopicLabel:"शुरू करने के लिए एक विषय चुनें:",categoryTopicsHeading:"कृपया अपना **{category}** प्रश्न नीचे पूछें।",quickQuestionsHeadingLabel:"या एक त्वरित प्रश्न पूछें:",typeYourMessage:"अपना संदेश लिखें...",agentIsLoading:"एजेंट लोड हो रहा है...",conversationResolved:"बातचीत समाप्त हुई",howWasYourExperience:"आपका अनुभव कैसा रहा?",feedbackPrompt:"हमें बेहतर बनाने में मदद के लिए कृपया हमारे समर्थन को रेट करें।",feedbackPlaceholder:"अपने अनुभव के बारे में और बताएं...",submitFeedback:"फीडबैक भेजें",submitting:"भेजा जा रहा है...",selectRatingFirst:"पहले रेटिंग चुनें",pleaseSubmitRatingFirst:"कृपया पहले अपनी रेटिंग जमा करें।",completeOnboardingToEnableVoice:"वॉयस सक्षम करने के लिए ऑनबोर्डिंग पूरी करें",sendMessageToCompleteOnboarding:"ऑनबोर्डिंग पूरी करने और वॉयस सक्षम करने के लिए संदेश भेजें।",resolve:"समाप्त करें",scrollLeft:"बाएं स्क्रॉल करें",scrollRight:"दाएं स्क्रॉल करें",sendMessage:"संदेश भेजें",voiceSessionLive:"वॉयस सत्र सक्रिय - बात करने के लिए बोलें या टाइप करें।",connectingVoice:"वॉयस सत्र से कनेक्ट हो रहा है...",poweredBy:"Powered by",poweredByBefore:"",poweredByAfter:"द्वारा संचालित",menu:"मेनू",close:"बंद करें",openChat:"चैट खोलें",closeChat:"चैट बंद करें",lightMode:"लाइट मोड",nightMode:"डार्क मोड",refreshChat:"चैट रीफ्रेश करें",copyChat:"चैट कॉपी करें",startChat:"चैट शुरू करें",startingVoiceSession:"वॉयस सत्र शुरू हो रहा है...",allowMicAccess:"माइक्रोफ़ोन एक्सेस की अनुमति दें"},mr:{connectionError:"क्षमस्व, सध्या कनेक्ट होण्यात अडचण येत आहे. कृपया पुन्हा प्रयत्न करा.",micDenied:"आम्ही तुमचा मायक्रोफोन वापरू शकलो नाही. कृपया परवानगी द्या आणि पुन्हा प्रयत्न करा.",micNotFound:"मायक्रोफोन आढळला नाही. कृपया एक जोडा आणि पुन्हा प्रयत्न करा.",voiceUnavailable:"व्हॉइस सध्या उपलब्ध नाही. कृपया पुन्हा प्रयत्न करा.",chooseTopicLabel:"सुरू करण्यासाठी एक विषय निवडा:",categoryTopicsHeading:"कृपया तुमचा **{category}** प्रश्न खाली विचारा.",quickQuestionsHeadingLabel:"किंवा एक झटपट प्रश्न विचारा:",typeYourMessage:"तुमचा संदेश टाइप करा...",agentIsLoading:"एजंट लोड होत आहे...",conversationResolved:"संभाषण समाप्त",howWasYourExperience:"तुमचा अनुभव कसा होता?",feedbackPrompt:"आम्हाला सुधारण्यास मदत करण्यासाठी कृपया आमच्या समर्थनाला रेट करा.",feedbackPlaceholder:"तुमच्या अनुभवाबद्दल आम्हाला अधिक सांगा...",submitFeedback:"फीडबॅक सबमिट करा",submitting:"सबमिट करत आहे...",selectRatingFirst:"प्रथम रेटिंग निवडा",pleaseSubmitRatingFirst:"कृपया प्रथम आपले रेटिंग सबमिट करा.",completeOnboardingToEnableVoice:"व्हॉइस सक्षम करण्यासाठी ऑनबोर्डिंग पूर्ण करा",sendMessageToCompleteOnboarding:"ऑनबोर्डिंग पूर्ण करून व्हॉइस सक्षम करण्यासाठी संदेश पाठवा.",resolve:"समाप्त",scrollLeft:"डावीकडे स्क्रोल करा",scrollRight:"उजवीकडे स्क्रोल करा",sendMessage:"संदेश पाठवा",voiceSessionLive:"व्हॉइस सत्र सक्रिय - बोला किंवा टाइप करा.",connectingVoice:"व्हॉइस सत्रास जोडत आहे...",poweredBy:"Powered by",poweredByBefore:"",poweredByAfter:"द्वारे समर्थित",menu:"मेनू",close:"बंद करा",openChat:"चॅट उघडा",closeChat:"चॅट बंद करा",lightMode:"लाइट मोड",nightMode:"डार्क मोड",refreshChat:"चॅट रीफ्रेश करा",copyChat:"चॅट कॉपी करा",startChat:"चॅट सुरू करा",startingVoiceSession:"व्हॉइस सत्र सुरू होत आहे...",allowMicAccess:"मायक्रोफोन प्रवेशास परवानगी द्या"},hu:{connectionError:"Sajnáljuk, jelenleg kapcsolódási problémám van. Kérjük, próbálja újra.",micDenied:"Nem sikerült hozzáférni a mikrofonjához. Engedélyezze a hozzáférést, és próbálja újra.",micNotFound:"Nem található mikrofon. Csatlakoztasson egyet, és próbálja újra.",voiceUnavailable:"A hang jelenleg nem elérhető. Kérjük, próbálja újra.",chooseTopicLabel:"Válassz egy témát a kezdéshez:",categoryTopicsHeading:"Kérjük, tedd fel **{category}** kérdésedet alább.",quickQuestionsHeadingLabel:"Vagy tegyél fel egy gyors kérdést:",typeYourMessage:"Írja be az üzenetét...",agentIsLoading:"Az ügynök betöltődik...",conversationResolved:"Beszélgetés befejezve",howWasYourExperience:"Milyen volt az élménye?",feedbackPrompt:"Kérjük, értékelje támogatásunkat, hogy segítsen nekünk fejlődni.",feedbackPlaceholder:"Meséljen többet az élményéről...",submitFeedback:"Visszajelzés küldése",submitting:"Küldés...",selectRatingFirst:"Először válasszon értékelést",pleaseSubmitRatingFirst:"Kérjük, először küldje el értékelését.",completeOnboardingToEnableVoice:"Fejezze be a beállítást a hang engedélyezéséhez",sendMessageToCompleteOnboarding:"Küldjön üzenetet a beállítás befejezéséhez és a hang engedélyezéséhez.",resolve:"Befejezés",scrollLeft:"Balra görgetés",scrollRight:"Jobbra görgetés",sendMessage:"Üzenet küldése",voiceSessionLive:"Hangmenet aktív - beszéljen vagy írjon.",connectingVoice:"Csatlakozás hangmenet...",poweredBy:"Működteti",menu:"Menü",close:"Bezárás",openChat:"Csevegés megnyitása",closeChat:"Csevegés bezárása",lightMode:"Világos mód",nightMode:"Sötét mód",refreshChat:"Csevegés frissítése",copyChat:"Csevegés másolása",startChat:"Csevegés indítása",startingVoiceSession:"Hangmenet indítása...",allowMicAccess:"Mikrofon hozzáférés engedélyezése"},is:{connectionError:"Því miður næ ég ekki sambandi núna. Vinsamlegast prófaðu aftur.",micDenied:"Við fengum ekki aðgang að hljóðnemanum þínum. Leyfðu aðgang og prófaðu aftur.",micNotFound:"Enginn hljóðnemi fannst. Tengdu hljóðnema og prófaðu aftur.",voiceUnavailable:"Tal er ekki í boði núna. Vinsamlegast prófaðu aftur.",chooseTopicLabel:"Veldu efni til að byrja:",categoryTopicsHeading:"Vinsamlegast spurðu spurningu þinnar um **{category}** hér að neðan.",quickQuestionsHeadingLabel:"Eða spurðu fljótlegrar spurningar:",typeYourMessage:"Sláðu inn skilaboð...",agentIsLoading:"Fulltrúi hleðst...",conversationResolved:"Samtali lokið",howWasYourExperience:"Hvernig var upplifun þín?",feedbackPrompt:"Vinsamlegast metið þjónustu okkar til að hjálpa okkur að bæta okkur.",feedbackPlaceholder:"Segðu okkur meira um upplifun þína...",submitFeedback:"Senda umsögn",submitting:"Sendir...",selectRatingFirst:"Veldu fyrst einkunn",pleaseSubmitRatingFirst:"Vinsamlegast sendu inn einkunn þína fyrst.",completeOnboardingToEnableVoice:"Ljúktu kynningu til að virkja rödd",sendMessageToCompleteOnboarding:"Sendu skilaboð til að ljúka kynningu og virkja rödd.",resolve:"Ljúka",scrollLeft:"Skruna til vinstri",scrollRight:"Skruna til hægri",sendMessage:"Senda skilaboð",voiceSessionLive:"Raddsamtal virkt - talaðu eða skrifaðu.",connectingVoice:"Tengist raddsamtali...",poweredBy:"Knúið af",menu:"Valmynd",close:"Loka",openChat:"Opna spjall",closeChat:"Loka spjalli",lightMode:"Ljóst þema",nightMode:"Dökkt þema",refreshChat:"Endurnýja spjall",copyChat:"Afrita spjall",startChat:"Byrja spjall",startingVoiceSession:"Byrjar raddsamtal...",allowMicAccess:"Leyfa aðgang að hljóðnema"},id:{connectionError:"Maaf, saya sedang mengalami masalah koneksi. Silakan coba lagi.",micDenied:"Kami tidak dapat mengakses mikrofon Anda. Izinkan akses dan coba lagi.",micNotFound:"Mikrofon tidak ditemukan. Hubungkan mikrofon dan coba lagi.",voiceUnavailable:"Fitur suara tidak tersedia saat ini. Silakan coba lagi.",chooseTopicLabel:"Pilih topik untuk memulai:",categoryTopicsHeading:"Silakan ajukan pertanyaan **{category}** Anda di bawah.",quickQuestionsHeadingLabel:"Atau ajukan pertanyaan cepat:",typeYourMessage:"Ketik pesan Anda...",agentIsLoading:"Agen sedang dimuat...",conversationResolved:"Percakapan selesai",howWasYourExperience:"Bagaimana pengalaman Anda?",feedbackPrompt:"Silakan nilai dukungan kami untuk membantu kami berkembang.",feedbackPlaceholder:"Ceritakan lebih banyak tentang pengalaman Anda...",submitFeedback:"Kirim umpan balik",submitting:"Mengirim...",selectRatingFirst:"Pilih peringkat terlebih dahulu",pleaseSubmitRatingFirst:"Silakan kirim peringkat Anda terlebih dahulu.",completeOnboardingToEnableVoice:"Selesaikan pengenalan untuk mengaktifkan suara",sendMessageToCompleteOnboarding:"Kirim pesan untuk menyelesaikan pengenalan dan mengaktifkan suara.",resolve:"Selesai",scrollLeft:"Gulir kiri",scrollRight:"Gulir kanan",sendMessage:"Kirim pesan",voiceSessionLive:"Sesi suara aktif - bicara atau ketik untuk berbincang.",connectingVoice:"Menghubungkan ke sesi suara...",poweredBy:"Didukung oleh",menu:"Menu",close:"Tutup",openChat:"Buka obrolan",closeChat:"Tutup obrolan",lightMode:"Mode terang",nightMode:"Mode gelap",refreshChat:"Segarkan obrolan",copyChat:"Salin obrolan",startChat:"Mulai obrolan",startingVoiceSession:"Memulai sesi suara...",allowMicAccess:"Izinkan akses mikrofon"},it:{connectionError:"Spiacenti, al momento ho problemi di connessione. Riprova.",micDenied:"Non siamo riusciti ad accedere al tuo microfono. Consenti l'accesso e riprova.",micNotFound:"Nessun microfono rilevato. Collegane uno e riprova.",voiceUnavailable:"La voce non è disponibile al momento. Riprova.",chooseTopicLabel:"Scegli un argomento per iniziare:",categoryTopicsHeading:"Per favore, poni la tua domanda su **{category}** qui sotto.",quickQuestionsHeadingLabel:"Oppure fai una domanda rapida:",typeYourMessage:"Scrivi il tuo messaggio...",agentIsLoading:"L'agente sta caricando...",conversationResolved:"Conversazione conclusa",howWasYourExperience:"Com'è stata la tua esperienza?",feedbackPrompt:"Valuta il nostro supporto per aiutarci a migliorare.",feedbackPlaceholder:"Raccontaci di più sulla tua esperienza...",submitFeedback:"Invia feedback",submitting:"Invio in corso...",selectRatingFirst:"Seleziona prima una valutazione",pleaseSubmitRatingFirst:"Invia prima la tua valutazione.",completeOnboardingToEnableVoice:"Completa l'onboarding per abilitare la voce",sendMessageToCompleteOnboarding:"Invia un messaggio per completare l'onboarding e abilitare la voce.",resolve:"Concludi",scrollLeft:"Scorri a sinistra",scrollRight:"Scorri a destra",sendMessage:"Invia messaggio",voiceSessionLive:"Sessione vocale attiva - parla o scrivi per conversare.",connectingVoice:"Connessione alla sessione vocale...",poweredBy:"Fornito da",menu:"Menu",close:"Chiudi",openChat:"Apri chat",closeChat:"Chiudi chat",lightMode:"Modalità chiara",nightMode:"Modalità scura",refreshChat:"Aggiorna chat",copyChat:"Copia chat",startChat:"Inizia chat",startingVoiceSession:"Avvio sessione vocale...",allowMicAccess:"Consenti l'accesso al microfono"},ja:{connectionError:"申し訳ありません。現在接続に問題が発生しています。もう一度お試しください。",micDenied:"マイクにアクセスできませんでした。アクセスを許可してもう一度お試しください。",micNotFound:"マイクが見つかりません。マイクを接続してもう一度お試しください。",voiceUnavailable:"音声機能は現在利用できません。もう一度お試しください。",chooseTopicLabel:"始めるにはトピックを選択してください:",categoryTopicsHeading:"**{category}** に関するご質問を以下にお書きください。",quickQuestionsHeadingLabel:"または、簡単な質問をどうぞ:",typeYourMessage:"メッセージを入力してください...",agentIsLoading:"エージェントを読み込んでいます...",conversationResolved:"会話が終了しました",howWasYourExperience:"ご体験はいかがでしたか?",feedbackPrompt:"サポート向上のため、評価をお願いします。",feedbackPlaceholder:"体験について詳しく教えてください...",submitFeedback:"フィードバックを送信",submitting:"送信中...",selectRatingFirst:"最初に評価を選択してください",pleaseSubmitRatingFirst:"最初に評価を送信してください。",completeOnboardingToEnableVoice:"音声を有効にするにはオンボーディングを完了してください",sendMessageToCompleteOnboarding:"オンボーディングを完了して音声を有効にするにはメッセージを送信してください。",resolve:"終了",scrollLeft:"左へスクロール",scrollRight:"右へスクロール",sendMessage:"メッセージを送信",voiceSessionLive:"音声セッション中 - 話すか入力してください。",connectingVoice:"音声セッションに接続中...",poweredBy:"提供元",menu:"メニュー",close:"閉じる",openChat:"チャットを開く",closeChat:"チャットを閉じる",lightMode:"ライトモード",nightMode:"ダークモード",refreshChat:"チャットを更新",copyChat:"チャットをコピー",startChat:"チャットを開始",startingVoiceSession:"音声セッションを開始しています...",allowMicAccess:"マイクへのアクセスを許可"},ko:{connectionError:"죄송합니다. 현재 연결에 문제가 있습니다. 다시 시도해 주세요.",micDenied:"마이크에 접근할 수 없습니다. 접근을 허용한 후 다시 시도해 주세요.",micNotFound:"마이크를 찾을 수 없습니다. 마이크를 연결한 후 다시 시도해 주세요.",voiceUnavailable:"음성 기능을 현재 사용할 수 없습니다. 다시 시도해 주세요.",chooseTopicLabel:"시작하려면 주제를 선택하세요:",categoryTopicsHeading:"**{category}** 에 대한 질문을 아래에 작성해 주세요.",quickQuestionsHeadingLabel:"또는 간단한 질문을 해보세요:",typeYourMessage:"메시지를 입력하세요...",agentIsLoading:"상담원을 불러오는 중...",conversationResolved:"대화가 종료되었습니다",howWasYourExperience:"경험은 어떠셨나요?",feedbackPrompt:"개선을 위해 저희 지원 서비스를 평가해주세요.",feedbackPlaceholder:"경험에 대해 더 알려주세요...",submitFeedback:"피드백 제출",submitting:"제출 중...",selectRatingFirst:"먼저 평점을 선택해주세요",pleaseSubmitRatingFirst:"먼저 평점을 제출해주세요.",completeOnboardingToEnableVoice:"음성을 사용하려면 온보딩을 완료하세요",sendMessageToCompleteOnboarding:"온보딩을 완료하고 음성을 사용하려면 메시지를 보내세요.",resolve:"종료",scrollLeft:"왼쪽으로 스크롤",scrollRight:"오른쪽으로 스크롤",sendMessage:"메시지 보내기",voiceSessionLive:"음성 세션 활성화 - 말하거나 입력하세요.",connectingVoice:"음성 세션에 연결 중...",poweredBy:"제공",menu:"메뉴",close:"닫기",openChat:"채팅 열기",closeChat:"채팅 닫기",lightMode:"라이트 모드",nightMode:"다크 모드",refreshChat:"채팅 새로고침",copyChat:"채팅 복사",startChat:"채팅 시작",startingVoiceSession:"음성 세션 시작 중...",allowMicAccess:"마이크 액세스 허용"},lv:{connectionError:"Atvainojiet, šobrīd ir savienojuma problēmas. Lūdzu, mēģiniet vēlreiz.",micDenied:"Neizdevās piekļūt mikrofonam. Lūdzu, atļaujiet piekļuvi un mēģiniet vēlreiz.",micNotFound:"Mikrofons nav atrasts. Lūdzu, pievienojiet mikrofonu un mēģiniet vēlreiz.",voiceUnavailable:"Balss funkcija šobrīd nav pieejama. Lūdzu, mēģiniet vēlreiz.",chooseTopicLabel:"Izvēlieties tēmu, lai sāktu:",categoryTopicsHeading:"Lūdzu, uzdodiet savu jautājumu par **{category}** zemāk.",quickQuestionsHeadingLabel:"Vai uzdodiet ātru jautājumu:",typeYourMessage:"Ierakstiet savu ziņu...",agentIsLoading:"Aģents tiek ielādēts...",conversationResolved:"Saruna pabeigta",howWasYourExperience:"Kāda bija jūsu pieredze?",feedbackPrompt:"Lūdzu, novērtējiet mūsu atbalstu, lai palīdzētu mums uzlabot.",feedbackPlaceholder:"Pastāstiet mums vairāk par savu pieredzi...",submitFeedback:"Nosūtīt atsauksmes",submitting:"Sūta...",selectRatingFirst:"Vispirms izvēlieties vērtējumu",pleaseSubmitRatingFirst:"Lūdzu, vispirms nosūtiet savu vērtējumu.",completeOnboardingToEnableVoice:"Pabeidziet ievadu, lai iespējotu balsi",sendMessageToCompleteOnboarding:"Nosūtiet ziņu, lai pabeigtu ievadu un iespējotu balsi.",resolve:"Pabeigt",scrollLeft:"Ritināt pa kreisi",scrollRight:"Ritināt pa labi",sendMessage:"Nosūtīt ziņu",voiceSessionLive:"Balss sesija aktīva - runājiet vai rakstiet.",connectingVoice:"Pieslēdzas balss sesijai...",poweredBy:"Darbina",menu:"Izvēlne",close:"Aizvērt",openChat:"Atvērt tērzēšanu",closeChat:"Aizvērt tērzēšanu",lightMode:"Gaišais režīms",nightMode:"Tumšais režīms",refreshChat:"Atsvaidzināt tērzēšanu",copyChat:"Kopēt tērzēšanu",startChat:"Sākt tērzēšanu",startingVoiceSession:"Sāk balss sesiju...",allowMicAccess:"Atļaut piekļuvi mikrofonam"},lt:{connectionError:"Atsiprašome, šiuo metu kyla ryšio problemų. Bandykite dar kartą.",micDenied:"Nepavyko pasiekti jūsų mikrofono. Leiskite prieigą ir bandykite dar kartą.",micNotFound:"Mikrofonas nerastas. Prijunkite mikrofoną ir bandykite dar kartą.",voiceUnavailable:"Balso funkcija šiuo metu nepasiekiama. Bandykite dar kartą.",chooseTopicLabel:"Pasirinkite temą, kad pradėtumėte:",categoryTopicsHeading:"Prašome užduoti savo klausimą apie **{category}** žemiau.",quickQuestionsHeadingLabel:"Arba užduokite greitą klausimą:",typeYourMessage:"Įveskite pranešimą...",agentIsLoading:"Agentas kraunamas...",conversationResolved:"Pokalbis baigtas",howWasYourExperience:"Kokia buvo jūsų patirtis?",feedbackPrompt:"Įvertinkite mūsų pagalbą, kad padėtumėte mums tobulėti.",feedbackPlaceholder:"Papasakokite daugiau apie savo patirtį...",submitFeedback:"Pateikti atsiliepimą",submitting:"Siunčiama...",selectRatingFirst:"Pirmiausia pasirinkite įvertinimą",pleaseSubmitRatingFirst:"Pirmiausia pateikite įvertinimą.",completeOnboardingToEnableVoice:"Užbaikite įvadą, kad įjungtumėte balsą",sendMessageToCompleteOnboarding:"Išsiųskite pranešimą, kad užbaigtumėte įvadą ir įjungtumėte balsą.",resolve:"Baigti",scrollLeft:"Slinkti į kairę",scrollRight:"Slinkti į dešinę",sendMessage:"Siųsti pranešimą",voiceSessionLive:"Balso sesija aktyvi - kalbėkite arba rašykite.",connectingVoice:"Jungiamasi prie balso sesijos...",poweredBy:"Veikia",menu:"Meniu",close:"Uždaryti",openChat:"Atidaryti pokalbį",closeChat:"Uždaryti pokalbį",lightMode:"Šviesus režimas",nightMode:"Tamsus režimas",refreshChat:"Atnaujinti pokalbį",copyChat:"Kopijuoti pokalbį",startChat:"Pradėti pokalbį",startingVoiceSession:"Pradedama balso sesija...",allowMicAccess:"Leisti prieigą prie mikrofono"},mk:{connectionError:"Извинете, моментално имам проблеми со поврзувањето. Обидете се повторно.",micDenied:"Не можевме да пристапиме до вашиот микрофон. Дозволете пристап и обидете се повторно.",micNotFound:"Не е најден микрофон. Поврзете микрофон и обидете се повторно.",voiceUnavailable:"Гласовната функција моментално не е достапна. Обидете се повторно.",chooseTopicLabel:"Изберете тема за да започнете:",categoryTopicsHeading:"Ве молиме поставете го вашето прашање за **{category}** подолу.",quickQuestionsHeadingLabel:"Или поставете брзо прашање:",typeYourMessage:"Напишете ја вашата порака...",agentIsLoading:"Агентот се вчитува...",conversationResolved:"Разговорот е завршен",howWasYourExperience:"Какво беше вашето искуство?",feedbackPrompt:"Оценете ја нашата поддршка за да ни помогнете да се подобриме.",feedbackPlaceholder:"Кажете ни повеќе за вашето искуство...",submitFeedback:"Испрати повратна информација",submitting:"Испраќање...",selectRatingFirst:"Прво изберете оценка",pleaseSubmitRatingFirst:"Прво испратете ја вашата оценка.",completeOnboardingToEnableVoice:"Завршете го воведот за да овозможите глас",sendMessageToCompleteOnboarding:"Испратете порака за да го завршите воведот и овозможите глас.",resolve:"Заврши",scrollLeft:"Скролај лево",scrollRight:"Скролај десно",sendMessage:"Испрати порака",voiceSessionLive:"Гласовната сесија е активна - зборувајте или пишувајте.",connectingVoice:"Поврзување со гласовна сесија...",poweredBy:"Поддржано од",menu:"Мени",close:"Затвори",openChat:"Отвори разговор",closeChat:"Затвори разговор",lightMode:"Светол режим",nightMode:"Темен режим",refreshChat:"Освежи разговор",copyChat:"Копирај разговор",startChat:"Започни разговор",startingVoiceSession:"Започнува гласовна сесија...",allowMicAccess:"Дозволи пристап до микрофонот"},ms:{connectionError:"Maaf, saya menghadapi masalah sambungan sekarang. Sila cuba lagi.",micDenied:"Kami tidak dapat mengakses mikrofon anda. Sila benarkan akses dan cuba lagi.",micNotFound:"Tiada mikrofon ditemui. Sila sambungkan mikrofon dan cuba lagi.",voiceUnavailable:"Ciri suara tidak tersedia sekarang. Sila cuba lagi.",chooseTopicLabel:"Pilih topik untuk memulakan:",categoryTopicsHeading:"Sila ajukan soalan **{category}** anda di bawah.",quickQuestionsHeadingLabel:"Atau ajukan soalan ringkas:",typeYourMessage:"Taip mesej anda...",agentIsLoading:"Ejen sedang dimuatkan...",conversationResolved:"Perbualan selesai",howWasYourExperience:"Bagaimanakah pengalaman anda?",feedbackPrompt:"Sila nilaikan sokongan kami untuk membantu kami menambah baik.",feedbackPlaceholder:"Beritahu kami lebih lanjut tentang pengalaman anda...",submitFeedback:"Hantar maklum balas",submitting:"Menghantar...",selectRatingFirst:"Pilih penilaian dahulu",pleaseSubmitRatingFirst:"Sila hantar penilaian anda dahulu.",completeOnboardingToEnableVoice:"Lengkapkan pengenalan untuk mendayakan suara",sendMessageToCompleteOnboarding:"Hantar mesej untuk melengkapkan pengenalan dan mendayakan suara.",resolve:"Selesai",scrollLeft:"Tatal ke kiri",scrollRight:"Tatal ke kanan",sendMessage:"Hantar mesej",voiceSessionLive:"Sesi suara aktif - bercakap atau taip untuk berbual.",connectingVoice:"Menyambung ke sesi suara...",poweredBy:"Dikuasakan oleh",menu:"Menu",close:"Tutup",openChat:"Buka sembang",closeChat:"Tutup sembang",lightMode:"Mod terang",nightMode:"Mod gelap",refreshChat:"Muat semula sembang",copyChat:"Salin sembang",startChat:"Mula sembang",startingVoiceSession:"Memulakan sesi suara...",allowMicAccess:"Benarkan akses mikrofon"},no:{connectionError:"Beklager, jeg har problemer med tilkoblingen akkurat nå. Prøv igjen.",micDenied:"Vi fikk ikke tilgang til mikrofonen din. Gi tilgang og prøv igjen.",micNotFound:"Ingen mikrofon funnet. Koble til en mikrofon og prøv igjen.",voiceUnavailable:"Tale er ikke tilgjengelig akkurat nå. Prøv igjen.",chooseTopicLabel:"Velg et emne for å komme i gang:",categoryTopicsHeading:"Vennligst still spørsmålet ditt om **{category}** nedenfor.",quickQuestionsHeadingLabel:"Eller still et raskt spørsmål:",typeYourMessage:"Skriv meldingen din...",agentIsLoading:"Agenten laster...",conversationResolved:"Samtale avsluttet",howWasYourExperience:"Hvordan var opplevelsen din?",feedbackPrompt:"Vennligst vurder vår støtte for å hjelpe oss med å bli bedre.",feedbackPlaceholder:"Fortell oss mer om opplevelsen din...",submitFeedback:"Send tilbakemelding",submitting:"Sender...",selectRatingFirst:"Velg en vurdering først",pleaseSubmitRatingFirst:"Vennligst send inn vurderingen din først.",completeOnboardingToEnableVoice:"Fullfør introduksjonen for å aktivere tale",sendMessageToCompleteOnboarding:"Send en melding for å fullføre introduksjonen og aktivere tale.",resolve:"Avslutt",scrollLeft:"Bla til venstre",scrollRight:"Bla til høyre",sendMessage:"Send melding",voiceSessionLive:"Talesesjon aktiv - snakk eller skriv for å samtale.",connectingVoice:"Kobler til talesesjon...",poweredBy:"Drevet av",menu:"Meny",close:"Lukk",openChat:"Åpne chat",closeChat:"Lukk chat",lightMode:"Lys modus",nightMode:"Mørk modus",refreshChat:"Oppdater chat",copyChat:"Kopier chat",startChat:"Start chat",startingVoiceSession:"Starter talesesjon...",allowMicAccess:"Tillat mikrofontilgang"},fa:{connectionError:"متأسفیم، در حال حاضر در اتصال مشکل دارم. لطفاً دوباره تلاش کنید.",micDenied:"نتوانستیم به میکروفون شما دسترسی پیدا کنیم. لطفاً دسترسی را اجازه دهید و دوباره تلاش کنید.",micNotFound:"میکروفونی یافت نشد. لطفاً یک میکروفون وصل کنید و دوباره تلاش کنید.",voiceUnavailable:"قابلیت صدا در حال حاضر در دسترس نیست. لطفاً دوباره تلاش کنید.",chooseTopicLabel:"برای شروع، یک موضوع را انتخاب کنید:",categoryTopicsHeading:"لطفاً سؤال خود درباره **{category}** را در زیر مطرح کنید.",quickQuestionsHeadingLabel:"یا یک سؤال سریع بپرسید:",typeYourMessage:"پیام خود را تایپ کنید...",agentIsLoading:"در حال بارگذاری نماینده...",conversationResolved:"مکالمه به پایان رسید",howWasYourExperience:"تجربه شما چگونه بود؟",feedbackPrompt:"لطفاً برای کمک به بهبود ما، پشتیبانی ما را ارزیابی کنید.",feedbackPlaceholder:"درباره تجربه خود بیشتر به ما بگویید...",submitFeedback:"ارسال بازخورد",submitting:"در حال ارسال...",selectRatingFirst:"ابتدا یک امتیاز انتخاب کنید",pleaseSubmitRatingFirst:"لطفاً ابتدا امتیاز خود را ارسال کنید.",completeOnboardingToEnableVoice:"برای فعالسازی صدا، راهاندازی را تکمیل کنید",sendMessageToCompleteOnboarding:"برای تکمیل راهاندازی و فعالسازی صدا، پیام ارسال کنید.",resolve:"پایان",scrollLeft:"پیمایش به چپ",scrollRight:"پیمایش به راست",sendMessage:"ارسال پیام",voiceSessionLive:"جلسه صوتی فعال - صحبت کنید یا تایپ کنید.",connectingVoice:"اتصال به جلسه صوتی...",poweredBy:"قدرت گرفته از",menu:"منو",close:"بستن",openChat:"باز کردن چت",closeChat:"بستن چت",lightMode:"حالت روشن",nightMode:"حالت تاریک",refreshChat:"تازهسازی چت",copyChat:"کپی چت",startChat:"شروع چت",startingVoiceSession:"شروع جلسه صوتی...",allowMicAccess:"اجازه دسترسی به میکروفون"},pl:{connectionError:"Przepraszamy, mam teraz problem z połączeniem. Spróbuj ponownie.",micDenied:"Nie udało się uzyskać dostępu do mikrofonu. Zezwól na dostęp i spróbuj ponownie.",micNotFound:"Nie znaleziono mikrofonu. Podłącz mikrofon i spróbuj ponownie.",voiceUnavailable:"Funkcja głosowa jest obecnie niedostępna. Spróbuj ponownie.",chooseTopicLabel:"Wybierz temat, aby rozpocząć:",categoryTopicsHeading:"Proszę zadać pytanie dotyczące **{category}** poniżej.",quickQuestionsHeadingLabel:"Lub zadaj szybkie pytanie:",typeYourMessage:"Wpisz wiadomość...",agentIsLoading:"Agent się ładuje...",conversationResolved:"Rozmowa zakończona",howWasYourExperience:"Jakie było Twoje doświadczenie?",feedbackPrompt:"Oceń proszę naszą obsługę, aby pomóc nam się rozwijać.",feedbackPlaceholder:"Opowiedz nam więcej o swoim doświadczeniu...",submitFeedback:"Wyślij opinię",submitting:"Wysyłanie...",selectRatingFirst:"Najpierw wybierz ocenę",pleaseSubmitRatingFirst:"Najpierw prześlij swoją ocenę.",completeOnboardingToEnableVoice:"Zakończ wprowadzenie, aby włączyć głos",sendMessageToCompleteOnboarding:"Wyślij wiadomość, aby zakończyć wprowadzenie i włączyć głos.",resolve:"Zakończ",scrollLeft:"Przewiń w lewo",scrollRight:"Przewiń w prawo",sendMessage:"Wyślij wiadomość",voiceSessionLive:"Sesja głosowa aktywna - mów lub pisz.",connectingVoice:"Łączenie z sesją głosową...",poweredBy:"Napędzane przez",menu:"Menu",close:"Zamknij",openChat:"Otwórz czat",closeChat:"Zamknij czat",lightMode:"Tryb jasny",nightMode:"Tryb ciemny",refreshChat:"Odśwież czat",copyChat:"Kopiuj czat",startChat:"Rozpocznij czat",startingVoiceSession:"Uruchamianie sesji głosowej...",allowMicAccess:"Zezwól na dostęp do mikrofonu"},pt:{connectionError:"Desculpe, estou com problemas de conexão neste momento. Tente novamente.",micDenied:"Não foi possível acessar o seu microfone. Permita o acesso e tente novamente.",micNotFound:"Nenhum microfone encontrado. Conecte um e tente novamente.",voiceUnavailable:"A voz não está disponível neste momento. Tente novamente.",chooseTopicLabel:"Escolha um tópico para começar:",categoryTopicsHeading:"Por favor, faça sua pergunta sobre **{category}** abaixo.",quickQuestionsHeadingLabel:"Ou faça uma pergunta rápida:",typeYourMessage:"Digite sua mensagem...",agentIsLoading:"O agente está carregando...",conversationResolved:"Conversa encerrada",howWasYourExperience:"Como foi sua experiência?",feedbackPrompt:"Avalie nosso suporte para nos ajudar a melhorar.",feedbackPlaceholder:"Conte-nos mais sobre sua experiência...",submitFeedback:"Enviar feedback",submitting:"Enviando...",selectRatingFirst:"Selecione uma avaliação primeiro",pleaseSubmitRatingFirst:"Envie sua avaliação primeiro.",completeOnboardingToEnableVoice:"Complete a integração para ativar a voz",sendMessageToCompleteOnboarding:"Envie uma mensagem para completar a integração e ativar a voz.",resolve:"Encerrar",scrollLeft:"Rolar para a esquerda",scrollRight:"Rolar para a direita",sendMessage:"Enviar mensagem",voiceSessionLive:"Sessão de voz ativa - fale ou digite para conversar.",connectingVoice:"Conectando à sessão de voz...",poweredBy:"Desenvolvido por",menu:"Menu",close:"Fechar",openChat:"Abrir chat",closeChat:"Fechar chat",lightMode:"Modo claro",nightMode:"Modo escuro",refreshChat:"Atualizar chat",copyChat:"Copiar chat",startChat:"Iniciar chat",startingVoiceSession:"Iniciando sessão de voz...",allowMicAccess:"Permitir acesso ao microfone"},ro:{connectionError:"Ne pare rău, întâmpin probleme de conexiune în acest moment. Încercați din nou.",micDenied:"Nu am putut accesa microfonul. Permiteți accesul și încercați din nou.",micNotFound:"Nu a fost găsit niciun microfon. Conectați unul și încercați din nou.",voiceUnavailable:"Funcția vocală nu este disponibilă momentan. Încercați din nou.",chooseTopicLabel:"Alegeți un subiect pentru a începe:",categoryTopicsHeading:"Vă rugăm să adresați întrebarea dvs. despre **{category}** mai jos.",quickQuestionsHeadingLabel:"Sau puneți o întrebare rapidă:",typeYourMessage:"Scrieți mesajul dvs...",agentIsLoading:"Agentul se încarcă...",conversationResolved:"Conversație încheiată",howWasYourExperience:"Cum a fost experiența dvs.?",feedbackPrompt:"Vă rugăm să evaluați asistența noastră pentru a ne ajuta să ne îmbunătățim.",feedbackPlaceholder:"Spuneți-ne mai multe despre experiența dvs...",submitFeedback:"Trimite feedback",submitting:"Se trimite...",selectRatingFirst:"Selectați mai întâi o evaluare",pleaseSubmitRatingFirst:"Vă rugăm să trimiteți mai întâi evaluarea.",completeOnboardingToEnableVoice:"Finalizați procesul pentru a activa vocea",sendMessageToCompleteOnboarding:"Trimiteți un mesaj pentru a finaliza procesul și a activa vocea.",resolve:"Închide",scrollLeft:"Derulați la stânga",scrollRight:"Derulați la dreapta",sendMessage:"Trimite mesaj",voiceSessionLive:"Sesiune vocală activă - vorbiți sau tastați.",connectingVoice:"Se conectează la sesiunea vocală...",poweredBy:"Oferit de",menu:"Meniu",close:"Închide",openChat:"Deschide chat",closeChat:"Închide chat",lightMode:"Mod luminos",nightMode:"Mod întunecat",refreshChat:"Reîmprospătează chat",copyChat:"Copiază chat",startChat:"Începe chat",startingVoiceSession:"Începe sesiunea vocală...",allowMicAccess:"Permiteți accesul la microfon"},ru:{connectionError:"Извините, сейчас возникли проблемы с подключением. Попробуйте снова.",micDenied:"Не удалось получить доступ к микрофону. Разрешите доступ и попробуйте снова.",micNotFound:"Микрофон не найден. Подключите микрофон и попробуйте снова.",voiceUnavailable:"Голосовая функция сейчас недоступна. Попробуйте снова.",chooseTopicLabel:"Выберите тему, чтобы начать:",categoryTopicsHeading:"Пожалуйста, задайте свой вопрос о **{category}** ниже.",quickQuestionsHeadingLabel:"Или задайте быстрый вопрос:",typeYourMessage:"Введите ваше сообщение...",agentIsLoading:"Агент загружается...",conversationResolved:"Разговор завершен",howWasYourExperience:"Как прошел ваш опыт?",feedbackPrompt:"Пожалуйста, оцените нашу поддержку, чтобы помочь нам улучшиться.",feedbackPlaceholder:"Расскажите нам больше о вашем опыте...",submitFeedback:"Отправить отзыв",submitting:"Отправка...",selectRatingFirst:"Сначала выберите оценку",pleaseSubmitRatingFirst:"Пожалуйста, сначала отправьте свою оценку.",completeOnboardingToEnableVoice:"Завершите знакомство, чтобы включить голос",sendMessageToCompleteOnboarding:"Отправьте сообщение, чтобы завершить знакомство и включить голос.",resolve:"Завершить",scrollLeft:"Прокрутить влево",scrollRight:"Прокрутить вправо",sendMessage:"Отправить сообщение",voiceSessionLive:"Голосовая сессия активна - говорите или пишите.",connectingVoice:"Подключение к голосовой сессии...",poweredBy:"Работает на",menu:"Меню",close:"Закрыть",openChat:"Открыть чат",closeChat:"Закрыть чат",lightMode:"Светлый режим",nightMode:"Темный режим",refreshChat:"Обновить чат",copyChat:"Копировать чат",startChat:"Начать чат",startingVoiceSession:"Запуск голосовой сессии...",allowMicAccess:"Разрешить доступ к микрофону"},sr:{connectionError:"Извините, тренутно имам проблема са повезивањем. Пробајте поново.",micDenied:"Нисмо могли да приступимо вашем микрофону. Дозволите приступ и пробајте поново.",micNotFound:"Микрофон није пронађен. Прикључите микрофон и пробајте поново.",voiceUnavailable:"Гласовна функција тренутно није доступна. Пробајте поново.",chooseTopicLabel:"Изаберите тему да бисте започели:",categoryTopicsHeading:"Молимо поставите своје питање о **{category}** испод.",quickQuestionsHeadingLabel:"Или поставите брзо питање:",typeYourMessage:"Укуцајте вашу поруку...",agentIsLoading:"Агент се учитава...",conversationResolved:"Разговор је завршен",howWasYourExperience:"Какво је било ваше искуство?",feedbackPrompt:"Молимо оцените нашу подршку да бисмо се побољшали.",feedbackPlaceholder:"Реците нам више о свом искуству...",submitFeedback:"Пошаљи повратне информације",submitting:"Слање...",selectRatingFirst:"Прво одаберите оцену",pleaseSubmitRatingFirst:"Молимо прво пошаљите оцену.",completeOnboardingToEnableVoice:"Завршите увод да омогућите глас",sendMessageToCompleteOnboarding:"Пошаљите поруку да завршите увод и омогућите глас.",resolve:"Заврши",scrollLeft:"Скроловати лево",scrollRight:"Скроловати десно",sendMessage:"Пошаљи поруку",voiceSessionLive:"Гласовна сесија активна - говорите или куцајте.",connectingVoice:"Повезивање са гласовном сесијом...",poweredBy:"Покреће",menu:"Мени",close:"Затвори",openChat:"Отвори ћаскање",closeChat:"Затвори ћаскање",lightMode:"Светли режим",nightMode:"Тамни режим",refreshChat:"Освежи ћаскање",copyChat:"Копирај ћаскање",startChat:"Започни ћаскање",startingVoiceSession:"Покретање гласовне сесије...",allowMicAccess:"Дозволи приступ микрофону"},sk:{connectionError:"Ľutujeme, momentálne mám problém s pripojením. Skúste to znova.",micDenied:"Nepodarilo sa získať prístup k mikrofónu. Povoľte prístup a skúste to znova.",micNotFound:"Mikrofón sa nenašiel. Pripojte ho a skúste to znova.",voiceUnavailable:"Hlasová funkcia momentálne nie je dostupná. Skúste to znova.",chooseTopicLabel:"Vyberte tému, aby ste začali:",categoryTopicsHeading:"Prosím, položte svoju otázku o **{category}** nižšie.",quickQuestionsHeadingLabel:"Alebo položte rýchlu otázku:",typeYourMessage:"Napíšte svoju správu...",agentIsLoading:"Agent sa načítava...",conversationResolved:"Konverzácia ukončená",howWasYourExperience:"Aká bola vaša skúsenosť?",feedbackPrompt:"Ohodnoťte prosím našu podporu, aby sme sa mohli zlepšiť.",feedbackPlaceholder:"Povedzte nám viac o svojej skúsenosti...",submitFeedback:"Odoslať spätnú väzbu",submitting:"Odosielanie...",selectRatingFirst:"Najprv vyberte hodnotenie",pleaseSubmitRatingFirst:"Najprv odošlite svoje hodnotenie.",completeOnboardingToEnableVoice:"Dokončite úvod pre zapnutie hlasu",sendMessageToCompleteOnboarding:"Pošlite správu na dokončenie úvodu a zapnutie hlasu.",resolve:"Ukončiť",scrollLeft:"Posunúť doľava",scrollRight:"Posunúť doprava",sendMessage:"Odoslať správu",voiceSessionLive:"Hlasová relácia aktívna - hovorte alebo píšte.",connectingVoice:"Pripájanie k hlasovej relácii...",poweredBy:"Prevádzkuje",menu:"Ponuka",close:"Zavrieť",openChat:"Otvoriť chat",closeChat:"Zavrieť chat",lightMode:"Svetlý režim",nightMode:"Tmavý režim",refreshChat:"Obnoviť chat",copyChat:"Kopírovať chat",startChat:"Začať chat",startingVoiceSession:"Spúšťanie hlasovej relácie...",allowMicAccess:"Povoliť prístup k mikrofónu"},sl:{connectionError:"Oprostite, trenutno imam težave s povezavo. Poskusite znova.",micDenied:"Do mikrofona ni bilo mogoče dostopati. Dovolite dostop in poskusite znova.",micNotFound:"Mikrofona ni bilo mogoče najti. Priključite ga in poskusite znova.",voiceUnavailable:"Glasovna funkcija trenutno ni na voljo. Poskusite znova.",chooseTopicLabel:"Izberite temo za začetek:",categoryTopicsHeading:"Prosimo, postavite vprašanje o **{category}** spodaj.",quickQuestionsHeadingLabel:"Ali postavite hitro vprašanje:",typeYourMessage:"Vnesite svoje sporočilo...",agentIsLoading:"Agent se nalaga...",conversationResolved:"Pogovor je končan",howWasYourExperience:"Kakšna je bila vaša izkušnja?",feedbackPrompt:"Prosimo, ocenite našo podporo, da nam pomagate izboljšati.",feedbackPlaceholder:"Povejte nam več o svoji izkušnji...",submitFeedback:"Pošlji povratne informacije",submitting:"Pošiljanje...",selectRatingFirst:"Najprej izberite oceno",pleaseSubmitRatingFirst:"Prosimo, najprej pošljite svojo oceno.",completeOnboardingToEnableVoice:"Zaključite uvodne korake za omogočanje glasu",sendMessageToCompleteOnboarding:"Pošljite sporočilo, da zaključite uvod in omogočite glas.",resolve:"Končaj",scrollLeft:"Premakni levo",scrollRight:"Premakni desno",sendMessage:"Pošlji sporočilo",voiceSessionLive:"Glasovna seja aktivna - govorite ali tipkajte.",connectingVoice:"Povezovanje z glasovno sejo...",poweredBy:"Poganja",menu:"Meni",close:"Zapri",openChat:"Odpri klepet",closeChat:"Zapri klepet",lightMode:"Svetli način",nightMode:"Temni način",refreshChat:"Osveži klepet",copyChat:"Kopiraj klepet",startChat:"Začni klepet",startingVoiceSession:"Začetek glasovne seje...",allowMicAccess:"Dovoli dostop do mikrofona"},sv:{connectionError:"Ursäkta, jag har anslutningsproblem just nu. Försök igen.",micDenied:"Vi kunde inte komma åt din mikrofon. Tillåt åtkomst och försök igen.",micNotFound:"Ingen mikrofon hittades. Anslut en mikrofon och försök igen.",voiceUnavailable:"Röst är inte tillgängligt just nu. Försök igen.",chooseTopicLabel:"Välj ett ämne för att komma igång:",categoryTopicsHeading:"Ställ gärna din **{category}**-fråga nedan.",quickQuestionsHeadingLabel:"Eller ställ en snabb fråga:",typeYourMessage:"Skriv ditt meddelande...",agentIsLoading:"Agenten laddas...",conversationResolved:"Konversation avslutad",howWasYourExperience:"Hur var din upplevelse?",feedbackPrompt:"Betygsätt vår support för att hjälpa oss att bli bättre.",feedbackPlaceholder:"Berätta mer om din upplevelse...",submitFeedback:"Skicka feedback",submitting:"Skickar...",selectRatingFirst:"Välj först ett betyg",pleaseSubmitRatingFirst:"Vänligen skicka in ditt betyg först.",completeOnboardingToEnableVoice:"Slutför introduktionen för att aktivera röst",sendMessageToCompleteOnboarding:"Skicka ett meddelande för att slutföra introduktionen och aktivera röst.",resolve:"Avsluta",scrollLeft:"Bläddra åt vänster",scrollRight:"Bläddra åt höger",sendMessage:"Skicka meddelande",voiceSessionLive:"Röstsession aktiv - tala eller skriv för att samtala.",connectingVoice:"Ansluter till röstsession...",poweredBy:"Drivs av",menu:"Meny",close:"Stäng",openChat:"Öppna chatt",closeChat:"Stäng chatt",lightMode:"Ljust läge",nightMode:"Mörkt läge",refreshChat:"Uppdatera chatt",copyChat:"Kopiera chatt",startChat:"Starta chatt",startingVoiceSession:"Startar röstsession...",allowMicAccess:"Tillåt mikrofonåtkomst"},th:{connectionError:"ขออภัย ขณะนี้เกิดปัญหาในการเชื่อมต่อ โปรดลองอีกครั้ง",micDenied:"เราไม่สามารถเข้าถึงไมโครโฟนของคุณได้ โปรดอนุญาตการเข้าถึงแล้วลองอีกครั้ง",micNotFound:"ไม่พบไมโครโฟน โปรดเชื่อมต่อไมโครโฟนแล้วลองอีกครั้ง",voiceUnavailable:"ฟีเจอร์เสียงไม่พร้อมใช้งานในขณะนี้ โปรดลองอีกครั้ง",chooseTopicLabel:"เลือกหัวข้อเพื่อเริ่มต้น:",categoryTopicsHeading:"โปรดถามคำถามเกี่ยวกับ **{category}** ด้านล่าง",quickQuestionsHeadingLabel:"หรือถามคำถามด่วน:",typeYourMessage:"พิมพ์ข้อความของคุณ...",agentIsLoading:"กำลังโหลดตัวแทน...",conversationResolved:"การสนทนาสิ้นสุดลง",howWasYourExperience:"ประสบการณ์ของคุณเป็นอย่างไร?",feedbackPrompt:"โปรดให้คะแนนการสนับสนุนของเราเพื่อช่วยให้เราปรับปรุง",feedbackPlaceholder:"บอกเราเพิ่มเติมเกี่ยวกับประสบการณ์ของคุณ...",submitFeedback:"ส่งความคิดเห็น",submitting:"กำลังส่ง...",selectRatingFirst:"โปรดเลือกคะแนนก่อน",pleaseSubmitRatingFirst:"โปรดส่งคะแนนของคุณก่อน",completeOnboardingToEnableVoice:"ทำการเริ่มต้นให้เสร็จเพื่อเปิดใช้งานเสียง",sendMessageToCompleteOnboarding:"ส่งข้อความเพื่อทำการเริ่มต้นให้เสร็จและเปิดใช้งานเสียง",resolve:"สิ้นสุด",scrollLeft:"เลื่อนไปทางซ้าย",scrollRight:"เลื่อนไปทางขวา",sendMessage:"ส่งข้อความ",voiceSessionLive:"เซสชันเสียงใช้งานอยู่ - พูดหรือพิมพ์เพื่อสนทนา",connectingVoice:"กำลังเชื่อมต่อกับเซสชันเสียง...",poweredBy:"ขับเคลื่อนโดย",menu:"เมนู",close:"ปิด",openChat:"เปิดแชท",closeChat:"ปิดแชท",lightMode:"โหมดสว่าง",nightMode:"โหมดมืด",refreshChat:"รีเฟรชแชท",copyChat:"คัดลอกแชท",startChat:"เริ่มแชท",startingVoiceSession:"กำลังเริ่มเซสชันเสียง...",allowMicAccess:"อนุญาตการเข้าถึงไมโครโฟน"},tr:{connectionError:"Üzgünüz, şu anda bağlantı sorunu yaşıyorum. Lütfen tekrar deneyin.",micDenied:"Mikrofonunuza erişemedik. Lütfen erişime izin verin ve tekrar deneyin.",micNotFound:"Mikrofon bulunamadı. Lütfen bir mikrofon bağlayın ve tekrar deneyin.",voiceUnavailable:"Sesli özellik şu anda kullanılamıyor. Lütfen tekrar deneyin.",chooseTopicLabel:"Başlamak için bir konu seçin:",categoryTopicsHeading:"Lütfen **{category}** sorunuzu aşağıya yazın.",quickQuestionsHeadingLabel:"Veya hızlı bir soru sorun:",typeYourMessage:"Mesajınızı yazın...",agentIsLoading:"Temsilci yükleniyor...",conversationResolved:"Görüşme sonlandırıldı",howWasYourExperience:"Deneyiminiz nasıldı?",feedbackPrompt:"Gelişmemize yardımcı olmak için lütfen desteğimizi değerlendirin.",feedbackPlaceholder:"Deneyiminiz hakkında bize daha fazla bilgi verin...",submitFeedback:"Geri bildirim gönder",submitting:"Gönderiliyor...",selectRatingFirst:"Önce bir değerlendirme seçin",pleaseSubmitRatingFirst:"Lütfen önce değerlendirmenizi gönderin.",completeOnboardingToEnableVoice:"Sesi etkinleştirmek için tanıtımı tamamlayın",sendMessageToCompleteOnboarding:"Tanıtımı tamamlamak ve sesi etkinleştirmek için bir mesaj gönderin.",resolve:"Bitir",scrollLeft:"Sola kaydır",scrollRight:"Sağa kaydır",sendMessage:"Mesaj gönder",voiceSessionLive:"Sesli oturum aktif - konuşun veya yazın.",connectingVoice:"Sesli oturuma bağlanılıyor...",poweredBy:"Tarafından sağlandı",menu:"Menü",close:"Kapat",openChat:"Sohbeti aç",closeChat:"Sohbeti kapat",lightMode:"Açık mod",nightMode:"Karanlık mod",refreshChat:"Sohbeti yenile",copyChat:"Sohbeti kopyala",startChat:"Sohbete başla",startingVoiceSession:"Sesli oturum başlatılıyor...",allowMicAccess:"Mikrofon erişimine izin ver"},uk:{connectionError:"Вибачте, зараз виникли проблеми з підключенням. Спробуйте ще раз.",micDenied:"Не вдалося отримати доступ до мікрофона. Дозвольте доступ і спробуйте ще раз.",micNotFound:"Мікрофон не знайдено. Підключіть мікрофон і спробуйте ще раз.",voiceUnavailable:"Голосова функція зараз недоступна. Спробуйте ще раз.",chooseTopicLabel:"Виберіть тему, щоб почати:",categoryTopicsHeading:"Будь ласка, поставте своє запитання щодо **{category}** нижче.",quickQuestionsHeadingLabel:"Або поставте швидке запитання:",typeYourMessage:"Введіть ваше повідомлення...",agentIsLoading:"Агент завантажується...",conversationResolved:"Розмову завершено",howWasYourExperience:"Яким був ваш досвід?",feedbackPrompt:"Будь ласка, оцініть нашу підтримку, щоб допомогти нам вдосконалюватися.",feedbackPlaceholder:"Розкажіть нам більше про свій досвід...",submitFeedback:"Надіслати відгук",submitting:"Надсилання...",selectRatingFirst:"Спочатку оберіть оцінку",pleaseSubmitRatingFirst:"Будь ласка, спочатку надішліть оцінку.",completeOnboardingToEnableVoice:"Завершіть вступ, щоб увімкнути голос",sendMessageToCompleteOnboarding:"Надішліть повідомлення, щоб завершити вступ та увімкнути голос.",resolve:"Завершити",scrollLeft:"Прокрутити ліворуч",scrollRight:"Прокрутити праворуч",sendMessage:"Надіслати повідомлення",voiceSessionLive:"Голосовий сеанс активний - говоріть або пишіть.",connectingVoice:"Підключення до голосового сеансу...",poweredBy:"Працює на",menu:"Меню",close:"Закрити",openChat:"Відкрити чат",closeChat:"Закрити чат",lightMode:"Світлий режим",nightMode:"Темний режим",refreshChat:"Оновити чат",copyChat:"Копіювати чат",startChat:"Почати чат",startingVoiceSession:"Запуск голосового сеансу...",allowMicAccess:"Дозволити доступ до мікрофона"},ur:{connectionError:"معذرت، اس وقت رابطہ قائم کرنے میں دشواری ہو رہی ہے۔ براہ کرم دوبارہ کوشش کریں۔",micDenied:"ہم آپ کے مائیکروفون تک رسائی حاصل نہیں کر سکے۔ براہ کرم رسائی کی اجازت دیں اور دوبارہ کوشش کریں۔",micNotFound:"کوئی مائیکروفون نہیں ملا۔ براہ کرم ایک منسلک کریں اور دوبارہ کوشش کریں۔",voiceUnavailable:"صوتی سہولت اس وقت دستیاب نہیں ہے۔ براہ کرم دوبارہ کوشش کریں۔",chooseTopicLabel:"شروع کرنے کے لیے ایک موضوع منتخب کریں:",categoryTopicsHeading:"براہ کرم اپنا **{category}** سوال نیچے پوچھیں۔",quickQuestionsHeadingLabel:"یا کوئی فوری سوال پوچھیں:",typeYourMessage:"اپنا پیغام ٹائپ کریں...",agentIsLoading:"ایجنٹ لوڈ ہو رہا ہے...",conversationResolved:"گفتگو مکمل",howWasYourExperience:"آپ کا تجربہ کیسا تھا؟",feedbackPrompt:"براہ کرم ہماری بہتری میں مدد کے لیے ہماری معاونت کی درجہ بندی کریں۔",feedbackPlaceholder:"ہمیں اپنے تجربے کے بارے میں مزید بتائیں...",submitFeedback:"رائے جمع کروائیں",submitting:"جمع ہو رہا ہے...",selectRatingFirst:"پہلے درجہ بندی منتخب کریں",pleaseSubmitRatingFirst:"براہ کرم پہلے اپنی درجہ بندی جمع کروائیں۔",completeOnboardingToEnableVoice:"آواز کو فعال کرنے کے لیے ابتدائی مراحل مکمل کریں",sendMessageToCompleteOnboarding:"ابتدائی مراحل مکمل کرنے اور آواز فعال کرنے کے لیے پیغام بھیجیں۔",resolve:"مکمل کریں",scrollLeft:"بائیں اسکرول کریں",scrollRight:"دائیں اسکرول کریں",sendMessage:"پیغام بھیجیں",voiceSessionLive:"صوتی سیشن فعال - بات کریں یا ٹائپ کریں۔",connectingVoice:"صوتی سیشن سے جڑ رہا ہے...",poweredBy:"پاور بذریعہ",menu:"مینو",close:"بند کریں",openChat:"چیٹ کھولیں",closeChat:"چیٹ بند کریں",lightMode:"ہلکا موڈ",nightMode:"تاریک موڈ",refreshChat:"چیٹ ریفریش کریں",copyChat:"چیٹ کاپی کریں",startChat:"چیٹ شروع کریں",startingVoiceSession:"صوتی سیشن شروع ہو رہا ہے...",allowMicAccess:"مائیکروفون تک رسائی کی اجازت دیں"},vi:{connectionError:"Xin lỗi, hiện tôi đang gặp sự cố kết nối. Vui lòng thử lại.",micDenied:"Chúng tôi không thể truy cập micrô của bạn. Vui lòng cho phép truy cập và thử lại.",micNotFound:"Không tìm thấy micrô. Vui lòng kết nối micrô và thử lại.",voiceUnavailable:"Tính năng giọng nói hiện không khả dụng. Vui lòng thử lại.",chooseTopicLabel:"Chọn một chủ đề để bắt đầu:",categoryTopicsHeading:"Vui lòng đặt câu hỏi của bạn về **{category}** bên dưới.",quickQuestionsHeadingLabel:"Hoặc đặt một câu hỏi nhanh:",typeYourMessage:"Nhập tin nhắn của bạn...",agentIsLoading:"Đang tải trợ lý...",conversationResolved:"Cuộc trò chuyện đã kết thúc",howWasYourExperience:"Trải nghiệm của bạn như thế nào?",feedbackPrompt:"Vui lòng đánh giá hỗ trợ của chúng tôi để giúp chúng tôi cải thiện.",feedbackPlaceholder:"Hãy cho chúng tôi biết thêm về trải nghiệm của bạn...",submitFeedback:"Gửi phản hồi",submitting:"Đang gửi...",selectRatingFirst:"Vui lòng chọn đánh giá trước",pleaseSubmitRatingFirst:"Vui lòng gửi đánh giá của bạn trước.",completeOnboardingToEnableVoice:"Hoàn thành hướng dẫn để bật giọng nói",sendMessageToCompleteOnboarding:"Gửi tin nhắn để hoàn thành hướng dẫn và bật giọng nói.",resolve:"Kết thúc",scrollLeft:"Cuộn sang trái",scrollRight:"Cuộn sang phải",sendMessage:"Gửi tin nhắn",voiceSessionLive:"Phiên giọng nói đang hoạt động - hãy nói hoặc gõ.",connectingVoice:"Đang kết nối phiên giọng nói...",poweredBy:"Được cung cấp bởi",menu:"Menu",close:"Đóng",openChat:"Mở trò chuyện",closeChat:"Đóng trò chuyện",lightMode:"Chế độ sáng",nightMode:"Chế độ tối",refreshChat:"Làm mới trò chuyện",copyChat:"Sao chép trò chuyện",startChat:"Bắt đầu trò chuyện",startingVoiceSession:"Đang bắt đầu phiên giọng nói...",allowMicAccess:"Cho phép truy cập micrô"}},kd={en:{onboardingNamePlaceholder:"Please enter your name",onboardingEmailPlaceholder:"Please enter your email address",onboardingPhonePlaceholder:"Please enter your phone number"},ar:{onboardingNamePlaceholder:"الرجاء إدخال اسمك",onboardingEmailPlaceholder:"الرجاء إدخال بريدك الإلكتروني",onboardingPhonePlaceholder:"الرجاء إدخال رقم هاتفك"},es:{onboardingNamePlaceholder:"Introduce tu nombre",onboardingEmailPlaceholder:"Introduce tu correo electrónico",onboardingPhonePlaceholder:"Introduce tu número de teléfono"},be:{onboardingNamePlaceholder:"Калі ласка, увядзіце ваша імя",onboardingEmailPlaceholder:"Калі ласка, увядзіце адрас электроннай пошты",onboardingPhonePlaceholder:"Калі ласка, увядзіце нумар тэлефона"},bs:{onboardingNamePlaceholder:"Unesite svoje ime",onboardingEmailPlaceholder:"Unesite svoju email adresu",onboardingPhonePlaceholder:"Unesite svoj broj telefona"},bg:{onboardingNamePlaceholder:"Моля, въведете вашето име",onboardingEmailPlaceholder:"Моля, въведете имейл адреса си",onboardingPhonePlaceholder:"Моля, въведете телефонния си номер"},my:{onboardingNamePlaceholder:"ကျေးဇူးပြု၍ သင့်အမည်ကို ထည့်ပါ",onboardingEmailPlaceholder:"ကျေးဇူးပြု၍ သင့်အီးမေးလ်လိပ်စာကို ထည့်ပါ",onboardingPhonePlaceholder:"ကျေးဇူးပြု၍ သင့်ဖုန်းနံပါတ်ကို ထည့်ပါ"},ca:{onboardingNamePlaceholder:"Introdueix el teu nom",onboardingEmailPlaceholder:"Introdueix el teu correu electrònic",onboardingPhonePlaceholder:"Introdueix el teu número de telèfon"},zh:{onboardingNamePlaceholder:"请输入您的姓名",onboardingEmailPlaceholder:"请输入您的电子邮箱地址",onboardingPhonePlaceholder:"请输入您的电话号码"},hr:{onboardingNamePlaceholder:"Unesite svoje ime",onboardingEmailPlaceholder:"Unesite svoju adresu e-pošte",onboardingPhonePlaceholder:"Unesite svoj broj telefona"},cs:{onboardingNamePlaceholder:"Zadejte své jméno",onboardingEmailPlaceholder:"Zadejte svou e-mailovou adresu",onboardingPhonePlaceholder:"Zadejte své telefonní číslo"},da:{onboardingNamePlaceholder:"Indtast dit navn",onboardingEmailPlaceholder:"Indtast din e-mailadresse",onboardingPhonePlaceholder:"Indtast dit telefonnummer"},nl:{onboardingNamePlaceholder:"Voer uw naam in",onboardingEmailPlaceholder:"Voer uw e-mailadres in",onboardingPhonePlaceholder:"Voer uw telefoonnummer in"},et:{onboardingNamePlaceholder:"Sisestage oma nimi",onboardingEmailPlaceholder:"Sisestage oma e-posti aadress",onboardingPhonePlaceholder:"Sisestage oma telefoninumber"},fi:{onboardingNamePlaceholder:"Anna nimesi",onboardingEmailPlaceholder:"Anna sähköpostiosoitteesi",onboardingPhonePlaceholder:"Anna puhelinnumerosi"},fr:{onboardingNamePlaceholder:"Veuillez saisir votre nom",onboardingEmailPlaceholder:"Veuillez saisir votre adresse e-mail",onboardingPhonePlaceholder:"Veuillez saisir votre numéro de téléphone"},de:{onboardingNamePlaceholder:"Bitte geben Sie Ihren Namen ein",onboardingEmailPlaceholder:"Bitte geben Sie Ihre E-Mail-Adresse ein",onboardingPhonePlaceholder:"Bitte geben Sie Ihre Telefonnummer ein"},el:{onboardingNamePlaceholder:"Παρακαλώ εισαγάγετε το όνομά σας",onboardingEmailPlaceholder:"Παρακαλώ εισαγάγετε τη διεύθυνση email σας",onboardingPhonePlaceholder:"Παρακαλώ εισαγάγετε τον αριθμό τηλεφώνου σας"},hi:{onboardingNamePlaceholder:"कृपया अपना नाम दर्ज करें",onboardingEmailPlaceholder:"कृपया अपना ईमेल पता दर्ज करें",onboardingPhonePlaceholder:"कृपया अपना फ़ोन नंबर दर्ज करें"},mr:{onboardingNamePlaceholder:"कृपया आपले नाव प्रविष्ट करा",onboardingEmailPlaceholder:"कृपया आपला ईमेल पत्ता प्रविष्ट करा",onboardingPhonePlaceholder:"कृपया आपला फोन नंबर प्रविष्ट करा"},hu:{onboardingNamePlaceholder:"Adja meg a nevét",onboardingEmailPlaceholder:"Adja meg az e-mail-címét",onboardingPhonePlaceholder:"Adja meg a telefonszámát"},is:{onboardingNamePlaceholder:"Sláðu inn nafn þitt",onboardingEmailPlaceholder:"Sláðu inn netfangið þitt",onboardingPhonePlaceholder:"Sláðu inn símanúmerið þitt"},id:{onboardingNamePlaceholder:"Masukkan nama Anda",onboardingEmailPlaceholder:"Masukkan alamat email Anda",onboardingPhonePlaceholder:"Masukkan nomor telepon Anda"},it:{onboardingNamePlaceholder:"Inserisci il tuo nome",onboardingEmailPlaceholder:"Inserisci il tuo indirizzo email",onboardingPhonePlaceholder:"Inserisci il tuo numero di telefono"},ja:{onboardingNamePlaceholder:"お名前を入力してください",onboardingEmailPlaceholder:"メールアドレスを入力してください",onboardingPhonePlaceholder:"電話番号を入力してください"},ko:{onboardingNamePlaceholder:"이름을 입력해 주세요",onboardingEmailPlaceholder:"이메일 주소를 입력해 주세요",onboardingPhonePlaceholder:"전화번호를 입력해 주세요"},lv:{onboardingNamePlaceholder:"Lūdzu, ievadiet savu vārdu",onboardingEmailPlaceholder:"Lūdzu, ievadiet savu e-pasta adresi",onboardingPhonePlaceholder:"Lūdzu, ievadiet savu tālruņa numuru"},lt:{onboardingNamePlaceholder:"Įveskite savo vardą",onboardingEmailPlaceholder:"Įveskite savo el. pašto adresą",onboardingPhonePlaceholder:"Įveskite savo telefono numerį"},mk:{onboardingNamePlaceholder:"Внесете го вашето име",onboardingEmailPlaceholder:"Внесете ја вашата е-пошта",onboardingPhonePlaceholder:"Внесете го вашиот телефонски број"},ms:{onboardingNamePlaceholder:"Masukkan nama anda",onboardingEmailPlaceholder:"Masukkan alamat e-mel anda",onboardingPhonePlaceholder:"Masukkan nombor telefon anda"},no:{onboardingNamePlaceholder:"Skriv inn navnet ditt",onboardingEmailPlaceholder:"Skriv inn e-postadressen din",onboardingPhonePlaceholder:"Skriv inn telefonnummeret ditt"},fa:{onboardingNamePlaceholder:"لطفاً نام خود را وارد کنید",onboardingEmailPlaceholder:"لطفاً ایمیل خود را وارد کنید",onboardingPhonePlaceholder:"لطفاً شماره تلفن خود را وارد کنید"},pl:{onboardingNamePlaceholder:"Wpisz swoje imię",onboardingEmailPlaceholder:"Wpisz swój adres e-mail",onboardingPhonePlaceholder:"Wpisz swój numer telefonu"},pt:{onboardingNamePlaceholder:"Insira o seu nome",onboardingEmailPlaceholder:"Insira o seu endereço de e-mail",onboardingPhonePlaceholder:"Insira o seu número de telefone"},ro:{onboardingNamePlaceholder:"Introduceți numele dvs.",onboardingEmailPlaceholder:"Introduceți adresa dvs. de e-mail",onboardingPhonePlaceholder:"Introduceți numărul dvs. de telefon"},ru:{onboardingNamePlaceholder:"Введите ваше имя",onboardingEmailPlaceholder:"Введите адрес электронной почты",onboardingPhonePlaceholder:"Введите номер телефона"},sr:{onboardingNamePlaceholder:"Унесите своје име",onboardingEmailPlaceholder:"Унесите своју адресу е-поште",onboardingPhonePlaceholder:"Унесите свој број телефона"},sk:{onboardingNamePlaceholder:"Zadajte svoje meno",onboardingEmailPlaceholder:"Zadajte svoju e-mailovú adresu",onboardingPhonePlaceholder:"Zadajte svoje telefónne číslo"},sl:{onboardingNamePlaceholder:"Vnesite svoje ime",onboardingEmailPlaceholder:"Vnesite svoj e-poštni naslov",onboardingPhonePlaceholder:"Vnesite svojo telefonsko številko"},sv:{onboardingNamePlaceholder:"Ange ditt namn",onboardingEmailPlaceholder:"Ange din e-postadress",onboardingPhonePlaceholder:"Ange ditt telefonnummer"},th:{onboardingNamePlaceholder:"กรุณากรอกชื่อของคุณ",onboardingEmailPlaceholder:"กรุณากรอกอีเมลของคุณ",onboardingPhonePlaceholder:"กรุณากรอกหมายเลขโทรศัพท์ของคุณ"},tr:{onboardingNamePlaceholder:"Lütfen adınızı girin",onboardingEmailPlaceholder:"Lütfen e-posta adresinizi girin",onboardingPhonePlaceholder:"Lütfen telefon numaranızı girin"},uk:{onboardingNamePlaceholder:"Введіть ваше ім’я",onboardingEmailPlaceholder:"Введіть вашу адресу електронної пошти",onboardingPhonePlaceholder:"Введіть ваш номер телефону"},ur:{onboardingNamePlaceholder:"براہ کرم اپنا نام درج کریں",onboardingEmailPlaceholder:"براہ کرم اپنا ای میل پتہ درج کریں",onboardingPhonePlaceholder:"براہ کرم اپنا فون نمبر درج کریں"},vi:{onboardingNamePlaceholder:"Vui lòng nhập tên của bạn",onboardingEmailPlaceholder:"Vui lòng nhập địa chỉ email của bạn",onboardingPhonePlaceholder:"Vui lòng nhập số điện thoại của bạn"}},xd=new Set(["ar","fa","he","ur"]);function Sd(e){if(!e||"string"!=typeof e)return"en";const t=e.toLowerCase().split(/[-_]/)[0];return wd[t]?t:"en"}function Cd(e){const t=(e||"").toLowerCase().split(/[-_]/)[0];return xd.has(t)}const Md=/[\u0590-\u05ff\u0600-\u06ff\u0700-\u074f\u0750-\u077f\u08a0-\u08ff\ufb1d-\ufb4f\ufb50-\ufdff\ufe70-\ufeff]/,Pd=/[A-Za-z\u00c0-\u024f\u0370-\u03ff\u0400-\u04ff]/;function zd(e,t=!1){if("string"!=typeof e||0===e.length)return t;for(const t of e){if(Md.test(t))return!0;if(Pd.test(t))return!1}return t}function Ed(e){const t=Sd(e);return e=>function(e,t){const n=Sd(e),r=wd[n]||vd,o=kd[n];return o?.[t]??r[t]??kd.en[t]??vd[t]??t}(t,e)}const jd=new Set(["NotAllowedError","PermissionDeniedError","SecurityError"]),Td=new Set(["NotFoundError","DevicesNotFoundError","OverconstrainedError"]);function Nd(e){try{const t="string"==typeof e?.name?e.name:"";if(jd.has(t))return"micDenied";if(Td.has(t))return"micNotFound";const n="string"==typeof e?.message?e.message.toLowerCase():"";if(n.includes("permission denied")||n.includes("permission dismissed"))return"micDenied";if(n.includes("device not found")||n.includes("no microphone"))return"micNotFound"}catch{}return"voiceUnavailable"}const Fd=e=>e.replace(/([\u3000-\u303f\u3040-\u30ff\u3400-\u4dbf\u4e00-\u9fff\uff00-\uffef])\s+([\u3000-\u303f\u3040-\u30ff\u3400-\u4dbf\u4e00-\u9fff\uff00-\uffef])/g,"$1$2"),Ld=/^(https?|mailto|tel):/i,Rd=e=>{const t=(e||"").trim();return t?/^https?:\/\//i.test(t)||Ld.test(t)?t:/^[a-z][a-z0-9+.-]*:/i.test(t)?"":`https://${t.replace(/^\/+/,"")}`:""},Ad=(...e)=>e.filter(Boolean).join(" "),_d={fullname:0,name:0,username:0,email:1,phone:2,mobileno:2},Id=e=>{if(!e)return 99;const t=String(e).toLowerCase();return _d[t]??99},Bd="eshal_chat_session",Dd="eshal_chat_session_messages";function Od(e,t=200,n=50){if(!Array.isArray(e))return[];("number"!=typeof t||t<=0)&&(t=200),("number"!=typeof n||n<=0||n>=t)&&(n=Math.min(50,t-1));let r=e;for(;r.length>t;)r=r.slice(n);return r}const $d=(e,t,n,r)=>{if(e&&t)try{const o=r?.cap,a=r?.trimBatch,i=function(e){return Array.isArray(e)?e.filter(e=>e&&!e.isWelcome&&(e.content||Array.isArray(e.sources)&&e.sources.length>0||Array.isArray(e.attachments)&&e.attachments.length>0)).map(e=>({id:e.id,role:e.role,content:e.content,timestamp:e.timestamp instanceof Date?e.timestamp.toISOString():"string"==typeof e.timestamp?e.timestamp:(new Date).toISOString(),type:e.type??null,...Array.isArray(e.sources)&&e.sources.length>0?{sources:e.sources}:{},...void 0!==e.feedback?{feedback:e.feedback}:{},...Array.isArray(e.prompts)&&e.prompts.length>0?{prompts:e.prompts}:{},...Array.isArray(e.attachments)&&e.attachments.length>0?{attachments:e.attachments.filter(e=>e&&(e.filename||e.storageKey)).map(e=>({filename:e.filename,mimeType:e.mimeType,size:e.size,storageKey:e.storageKey,url:e.url}))}:{}})):[]}(Od(n,o,a));localStorage.setItem(`${Dd}_${e}_${t}`,JSON.stringify(i))}catch{}},Vd=(e,t)=>{if(e&&t)try{localStorage.removeItem(`${Dd}_${e}_${t}`)}catch{}},Ud=(e,t)=>{if(null==e||!t)return null;const n={MINUTES:6e4,HOURS:36e5,DAYS:864e5}[t.toUpperCase()];return void 0===n?null:Number(e)*n},Hd=e=>{try{const t=localStorage.getItem(`${Bd}_${e}`);return t?JSON.parse(t):null}catch{return null}},Wd=(e,t,n)=>{if(!e||!e.lastActivity)return!1;if(null==t||0===t)return!0;if(null!==t&&null!==n){const r=JSON.stringify({value:t,unit:n?.toUpperCase()});if(e.settingsSnapshot&&e.settingsSnapshot!==r)return!1}if(null===e.firstInteractionAt)return!0;const r=Ud(t,n);if(!r)return!0;const o=new Date(e.lastActivity).getTime(),a=Date.now()-o<r;return a},qd=(e,t,n={})=>{try{const r=(new Date).toISOString();localStorage.setItem(`${Bd}_${e}`,JSON.stringify({conversationId:t,lastActivity:r,createdAt:r,firstInteractionAt:null,...n}))}catch{}},Qd=e=>{try{const t=Hd(e);if(!t)return;const n=(new Date).toISOString();t.lastActivity=n,t.firstInteractionAt||(t.firstInteractionAt=n),localStorage.setItem(`${Bd}_${e}`,JSON.stringify(t))}catch{}},Yd=e=>{try{return Hd(e)?.onboardingName??""}catch{return""}},Kd=(e,t)=>{try{if(!e)return;if(!Array.isArray(t)||0===t.length)return void localStorage.removeItem(`${Bd}_prompts_${e}`);localStorage.setItem(`${Bd}_prompts_${e}`,JSON.stringify(t))}catch{}};function Gd(e,t){const n=null==e?"":String(e),r=String(t??"").trim();if(!r||!n.trim())return n;const o=function(e){return String(e??"").trim().split(/\s+/).filter(Boolean).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}(r);if(new RegExp(`^\\s*(?:hi|hey|hello)\\s+${o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`,"i").test(n))return n;const a=n.match(/^\s*(hi|hey|hello)(?:\s+there)?\s*([-,!.:;]+)?\s*/i);if(a){const e=a[1],t=a[2]??",",r=n.slice(a[0].length);return`${e} ${o}${t}${r?` ${r}`:""}`}return`Hi ${o}, ${n}`}const Xd=new Set(["fullname","name","username"]);const Jd=({id:e,role:t,content:n,isProcessing:r=!1,isError:o=!1,metadata:a,attachments:i})=>({id:e,role:t,content:n,timestamp:new Date,isProcessing:r,...o?{isError:!0}:{},metadata:a,...Array.isArray(i)&&i.length>0?{attachments:i}:{}}),Zd=(e,t)=>{const n=[...e.map(e=>({...e,metadata:e.metadata||{source:"sse"}})),...t];return Array.from(new Map(n.map(e=>[e.id,e])).values()).sort((e,t)=>(e.timestamp instanceof Date?e.timestamp.getTime():new Date(e.timestamp).getTime())-(t.timestamp instanceof Date?t.timestamp.getTime():new Date(t.timestamp).getTime()))};function ep(){return`widget-session-${"undefined"!=typeof crypto&&crypto.randomUUID?crypto.randomUUID():`${Date.now()}-${Math.random().toString(36).slice(2)}`}`}const tp=e=>e&&e.length>0?e:[],np=({welcomeMessage:e,fallbackMessage:t,quickQuestions:n=[],apiBaseUrl:r,wsBaseUrl:o,apiKey:a,organizationId:i,getAuthToken:s,autoOpen:l,openDelay:c,darkMode:u,enableVoiceInteraction:d=!1,provideCitations:p=!0,onboardingQuestions:g=[],onboardingEnabled:f=!1,collectionPrompt:h,inactivityTimeoutValue:m,inactivityTimeoutUnit:b,messageLimits:y,locale:v="en"})=>{const w=I.useMemo(()=>Ed(v),[v]),k=I.useMemo(()=>({cap:"number"==typeof y?.cap&&y.cap>0?y.cap:200,trimBatch:"number"==typeof y?.trimBatch&&y.trimBatch>0?y.trimBatch:50}),[y?.cap,y?.trimBatch]),[x,S]=I.useState(l),[C,M]=I.useState(!1),[P,z]=I.useState(u),[E,j]=I.useState(()=>{try{const e=Hd(i);if(void 0!==m&&e&&Wd(e,m,b))return[]}catch{}if(!e)return[];let t=e;try{t=Gd(e,Yd(i))}catch{}return[{...Jd({id:Date.now().toString(),role:"assistant",content:t}),isWelcome:!0}]}),[T,N]=I.useState(""),F=I.useRef(""),L=I.useCallback(e=>{const t="function"==typeof e?e(F.current):e;F.current=t,N(t)},[]),[R,A]=I.useState(!1),_=I.useRef(null),B=I.useRef(null),D=I.useRef(1),[O,$]=I.useState(null),[V,U]=I.useState(null),H=I.useRef(null);I.useEffect(()=>{H.current=V},[V]);const[W,q]=I.useState(null),Q=I.useRef(null);I.useEffect(()=>{Q.current=W},[W]);const[Y,K]=I.useState(!1),[G,X]=I.useState(()=>{try{const e=Hd(i);if(e&&e.onboardingCompleted)return!0}catch{}return!1}),[J,Z]=I.useState(()=>{try{return Yd(i)||""}catch{return""}}),ee=I.useMemo(()=>Gd(e,J),[e,J]),[te,ne]=I.useState(null),[re,oe]=I.useState({}),ae=I.useRef(!1),ie=I.useRef(!1),se=I.useRef(0),[le,ce]=I.useState(!1),[ue,de]=I.useState(!1),[pe,ge]=I.useState([]),[fe,he]=I.useState("idle"),[me,be]=I.useState(null),[ye,ve]=I.useState(!1),[we,ke]=I.useState(()=>{try{const e=Hd(i);if(void 0!==m&&e&&Wd(e,m,b))return e.conversationId}catch{}return ep()}),xe=I.useRef(null),[Se,Ce]=I.useState(!1),Me=I.useRef(!1),Pe=I.useCallback(()=>{Me.current=!0,Ce(!0)},[]),ze=I.useRef(null),Ee=I.useRef(null),je=I.useRef(null),Te=I.useRef(null),Ne=I.useRef(null),Fe=I.useRef(null),Le=I.useRef(null),Re=I.useRef(null),Ae=I.useRef(null),_e=I.useRef(!1),Ie=I.useRef(!1);I.useRef(null);const Be=I.useRef(null);I.useRef(null);const De=I.useRef(!1),Oe=I.useRef(null),$e=I.useRef(!1),Ve=I.useRef(!1),Ue=I.useRef(null),He=I.useRef(null),We=I.useRef(null),qe=I.useRef(null),Qe=I.useRef(null),Ye=I.useCallback(e=>{if(!e)return;const t=new Date(e).getTime();if(!Number.isFinite(t))return;t>(Qe.current?new Date(Qe.current).getTime():-1/0)&&(Qe.current=new Date(t).toISOString())},[]),Ke=I.useCallback(e=>{if(Array.isArray(e)&&0!==e.length){for(const t of e)Ye(t?.createdAt);j(t=>{const n=new Set(t.map(e=>e.id)),r=e.filter(e=>e&&e.id&&!n.has(e.id)).map(e=>({...Jd({id:e.id,role:e.role||"assistant",content:e.content,isProcessing:!1,metadata:{senderName:e.senderName}}),timestamp:e.createdAt?new Date(e.createdAt):new Date}));if(0===r.length)return t;const o=e=>{const t=e.timestamp instanceof Date?e.timestamp.getTime():new Date(e.timestamp).getTime();return Number.isFinite(t)?t:0},a=[...t,...r];return a.sort((e,t)=>o(e)-o(t)),a})}},[Ye]),Ge=I.useCallback(async()=>{if(r&&we)try{const e={};if("function"==typeof s){const t=await s();t&&(e.Authorization=`Bearer ${t}`)}const t=Qe.current,n=`${r.replace(/\/$/,"")}/api/v1/widget/history/${encodeURIComponent(we)}`+(t?`?since=${encodeURIComponent(t)}`:""),o=await fetch(n,{headers:e,credentials:"include"});if(!o.ok)return;const a=await o.json(),i=Array.isArray(a?.messages)?a.messages:[];Ke(i.filter(e=>"human_reply"===e?.contentType||"handoff_ack"===e?.contentType))}catch{}},[r,we,s,Ke]),Xe=I.useCallback(async e=>{if(xe.current)return void(e&&e());if(!r||!we)return;let t=`${r.replace(/\/$/,"")}/api/v1/widget/events/${encodeURIComponent(we)}`;if("function"==typeof s)try{const e=await s();e&&(t+=`${t.includes("?")?"&":"?"}token=${encodeURIComponent(e)}`)}catch{}if(xe.current)return void(e&&e());const n=new EventSource(t);n.onmessage=e=>{try{const t=JSON.parse(e.data);"message_created"===t.type&&t.message&&(Ye(t.message.createdAt),j(e=>e.some(e=>e.id===t.message.id)?e:[...e,Jd({id:t.message.id,role:t.message.role||"assistant",content:t.message.content,isProcessing:!1,metadata:{senderName:t.message.senderName}})]))}catch{}},n.onopen=()=>{Ge(),e&&e()},n.onerror=()=>{},xe.current=n},[r,we,s,Ge]);I.useEffect(()=>()=>{xe.current&&(xe.current.close(),xe.current=null)},[]);const Je=I.useMemo(()=>{if(!i)return null;const e=((e,t)=>{if(t)return t.replace(/\/$/,"");if(!e)return"wss://dev.eshal.ai/voice/ws";try{const t=new URL(e);return t.protocol=t.protocol.replace(/^http/,"ws"),t.pathname="/voice/ws",t.toString().replace(/\/$/,"")}catch(e){return"wss://dev.eshal.ai/voice/ws"}})(r,o);return`${e}/${i}/${we}`},[r,o,i,we]),Ze=I.useCallback(()=>{const e=`msg-${D.current}`;return D.current+=1,e},[]);I.useEffect(()=>{if(l&&c>0){const e=setTimeout(()=>S(!0),c);return()=>clearTimeout(e)}},[l,c]),I.useEffect(()=>{let e=!1;return(async()=>{try{const{default:t}=await Promise.resolve().then(function(){return uh}),n=new t({cache:!0,geoFromBrowser:!0,preferredProvider:"ipwho.is",onError:()=>{}}),r=await n.init();if(e)return;if(r?.fingerprintId&&(We.current=r.fingerprintId),r?.geo||r?.ip){const e=r.geo||{};qe.current={ip:r.ip||e.ip||null,country:e.country||null,countryCode:e.countryCode||null,region:e.region||null,city:e.city||null,timezone:e.timezone||null}}}catch{}})(),()=>{e=!0}},[]),I.useEffect(()=>{z(u)},[u]);const et=I.useRef(!1),tt=I.useRef(!1),nt=I.useRef(!1),rt=I.useRef({value:null,unit:null}),[ot,at]=I.useState(!1);I.useEffect(()=>{if(!i||!we||void 0===m)return;const t=Hd(i);if(t&&Wd(t,m,b)){if(we!==t.conversationId)return void ke(t.conversationId);if(!et.current){et.current=!0;const t=((e,t)=>{if(!e||!t)return[];try{const n=localStorage.getItem(`${Dd}_${e}_${t}`);if(!n)return[];const r=JSON.parse(n);return Array.isArray(r)?r.map(e=>({...e,timestamp:e.timestamp?new Date(e.timestamp):new Date})):[]}catch{return[]}})(i,we);if(t.length>0){if(tt.current=!0,e){const e=t[0]?.timestamp,n=e instanceof Date?e.getTime():e?new Date(e).getTime():Date.now(),r={...Jd({id:"welcome-restored",role:"assistant",content:ee}),isWelcome:!0,timestamp:new Date(n-1)};j([r,...t])}else j(t);const n=t.some(e=>"assistant"===e.role&&Array.isArray(e.prompts)&&e.prompts.length>0);if(!n){const e=(e=>{try{const t=localStorage.getItem(`${Bd}_prompts_${e}`);return t&&JSON.parse(t)||[]}catch{return[]}})(i);e.length>0&&j(t=>{const n=[...t];for(let t=n.length-1;t>=0;t-=1)if("assistant"===n[t].role){n[t]={...n[t],prompts:e};break}return n})}}}}else if(et.current||(et.current=!0),t&&we===t.conversationId){const e=ep();Vd(i,we),ke(e)}else t?.conversationId&&t.conversationId!==we&&Vd(i,t.conversationId),t&&t.conversationId===we||qd(i,we,{settingsSnapshot:JSON.stringify({value:m,unit:b?.toUpperCase()})})},[i,we,r,m,b]);const it=I.useRef(null);I.useEffect(()=>{if(!r||!i||!we)return;if(it.current===we)return;it.current=we;let e=!1;return(async()=>{try{const t={};if("function"==typeof s){const e=await s();e&&(t.Authorization=`Bearer ${e}`)}const n=await fetch(`${r.replace(/\/$/,"")}/api/v1/widget/history/${encodeURIComponent(we)}`,{headers:t,credentials:"include"});if(!n.ok||e)return;const o=await n.json(),a=(Array.isArray(o?.messages)?o.messages:[]).filter(e=>"human_reply"===e?.contentType||"handoff_ack"===e?.contentType);e||Ke(a),e||"human"!==o?.responder||(Pe(),Xe())}catch{}})(),()=>{e=!0}},[r,i,we,s,Xe,Pe,Ke]),I.useEffect(()=>{if(i&&E&&0!==E.length)for(let e=E.length-1;e>=0;e-=1){const t=E[e];if("assistant"===t?.role&&Array.isArray(t.prompts)&&t.prompts.length>0)return void Kd(i,t.prompts)}},[E,i]),I.useEffect(()=>{le||R||E.length<=k.cap||j(e=>Od(e,k.cap,k.trimBatch))},[E.length,le,R,k.cap,k.trimBatch]),I.useEffect(()=>{i&&we&&(le||R||$d(i,we,Zd(E,pe),k))},[E,pe,i,we,le,R,k]),I.useEffect(()=>{if(!f||G)return;tp(g).length>0&&K(!0)},[f,G,g]),I.useEffect(()=>{e&&!tt.current&&j(e=>{if(!e.length)return[{...Jd({id:Date.now().toString(),role:"assistant",content:ee}),isWelcome:!0}];const[t,...n]=e;return t.isWelcome?[{...t,content:ee},...n]:e})},[e,ee]),I.useCallback(e=>{j(t=>t.map(t=>t.id===e.id?{...t,...e.update(t)}:t))},[]);const st=I.useCallback((e,t={})=>{if(!e)return;const n=t.replaceMarker||null;j(t=>{const r=n?(t||[]).filter(e=>e?.metadata?.synthesizedKind!==n):t||[];return[...r,Jd({id:Ze(),role:"assistant",content:e,metadata:n?{synthesizedKind:n}:void 0})]})},[Ze]),lt=I.useCallback(()=>{try{_.current&&_.current.abort()}catch{}},[]),ct=I.useCallback(async(e,n,o)=>{const a=String(e??"").trim(),l=Array.isArray(o?.attachments)?o.attachments:[];if(!a&&0===l.length)return{success:!1,error:"Message cannot be empty"};if(ie.current)return{success:!1,error:"A message is already being sent"};ie.current=!0;const c=se.current+=1,u=()=>{se.current===c&&(A(!1),ie.current=!1)};if("Connect with a human representative"===a){const e=async()=>{if(r&&we){const e={"Content-Type":"application/json"};if("function"==typeof s){const t=await s();t&&(e.Authorization=`Bearer ${t}`)}fetch(`${r.replace(/\/$/,"")}/api/v1/widget/handoff/${encodeURIComponent(we)}`,{method:"POST",headers:e,credentials:"include",body:JSON.stringify({reason:"User clicked handoff button"})}).catch(()=>{})}};Pe(),Xe(e)}if(n&&!["inquiry","complaint","technical"].includes((n||"").toLowerCase())||(Q.current=a,q(a)),!r)return ie.current=!1,j(e=>[...e||[],Jd({id:Ze(),role:"assistant",content:w("connectionError"),isProcessing:!1,isError:!0})]),{success:!1,error:"API base URL is required"};const d=["inquiry","complaint","technical","userName","email","phone","fullname","mobileno"];let g="inquiry";if(n){const e=n.toLowerCase();"fullname"===e||"name"===e?g="userName":"email"===e?g="email":"phone"===e||"mobileno"===e?g="phone":d.includes(e)&&(g=e)}let f=null;const h=(e,t)=>{null!=e&&j(n=>(n||[]).map(n=>n.id===e?{...n,status:t}:n))};if("inquiry"===g||"complaint"===g||"technical"===g){f=Ze();const e=Jd({id:f,role:"user",content:a,...l.length?{attachments:l}:{}});j(t=>{const n=(t||[]).map(e=>"assistant"===e.role&&e.prompts?.length?{...e,prompts:void 0}:e);return o&&o.skipUserAppend?n:[...n,e]}),L(""),Me.current||A(!0)}else L("");try{const e={message:a,type:g,conversationId:we,enable_citation:p??!0,channel:"WIDGET",...We.current?{fingerprintId:We.current}:{},...qe.current?{visitor:qe.current}:{},...O&&(O.category||O.tags&&O.tags.length)?{filter:O}:{},...H.current?{routing:H.current}:{},...l.length?{attachments:l}:{},messageHistory:E.filter(e=>!e.isProcessing&&e.content&&e.content.trim()&&!["userName","email","phone"].includes(e.type)).map(e=>{let t;return t=e.timestamp instanceof Date?e.timestamp.toISOString():"string"==typeof e.timestamp?e.timestamp:e.timestamp?new Date(e.timestamp).toISOString():(new Date).toISOString(),{id:e.id,role:e.role,content:e.content,timestamp:t,isProcessing:!1}})},t=[500,1500];if("userName"===g||"email"===g||"phone"===g){const t=(await td(e,r,s)).getReader(),n=new TextDecoder;for(;;){const{done:e,value:r}=await t.read();if(e)break;n.decode(r)}return{success:!0}}if(Me.current&&("inquiry"===g||"complaint"===g||"technical"===g)){try{const t=(await td(e,r,s)).getReader();for(;;){const{done:e}=await t.read();if(e)break}}catch(e){return h(f,"failed"),{success:!1,error:e instanceof Error?e.message:"Failed to send message"}}return h(f,"sent"),Qd(i),{success:!0}}if("inquiry"===g||"complaint"===g||"technical"===g){let n;for(let o=0;o<=t.length;o+=1)try{_.current=new AbortController;const t=await td(e,r,s,_.current.signal);return await ud(t,j,u),h(f,"sent"),Qd(i),{success:!0}}catch(e){if(n=e,e&&"AbortError"===e.name)return j(e=>(e||[]).filter(e=>!e.isProcessing)),h(f,"sent"),{success:!0,stopped:!0};if(e instanceof ed&&o<t.length){j(e=>(e||[]).filter(e=>!e.isProcessing));const e=t[o];await new Promise(t=>setTimeout(t,e));continue}throw e}throw n}return await td(e,r,s),Qd(i),{success:!0}}catch(e){return"inquiry"!==g&&"complaint"!==g&&"technical"!==g||(A(!1),h(f,"failed"),j(e=>[...(e||[]).filter(e=>!e.isProcessing),Jd({id:Ze(),role:"assistant",content:t?.trim()||w("connectionError"),isProcessing:!1,isError:!0})])),{success:!1,error:e instanceof Error?e.message:"Failed to send message"}}finally{u()}},[r,a,Ze,s,E,we,V,O,p]),ut=I.useCallback(e=>e&&"failed"===e.status?(j(t=>(t||[]).filter(t=>t.id!==e.id)),ct(e.content,void 0,{attachments:e.attachments})):Promise.resolve({success:!1,error:"Nothing to retry"}),[ct]),dt=I.useCallback(async e=>{const t=tp(g);if(0===t.length)return;const n=function(e,t){if(!Array.isArray(e)||!t)return"";for(const n of e){const e=String(n?.fieldType??"").toLowerCase();if(!Xd.has(e))continue;const r=t[n?.fieldType??""];if("string"!=typeof r)continue;const o=r.trim();if(o)return o}return""}(t,e);K(!1),X(!0),((e,t)=>{try{const n=Hd(e);if(!n)return;n.onboardingCompleted=!0;const r=(t??"").trim();r&&(n.onboardingName=r),localStorage.setItem(`${Bd}_${e}`,JSON.stringify(n))}catch{}})(i,n),n&&Z(n),oe(t=>({...t,...e})),te&&!ae.current&&(ae.current=!0,L(te),ne(null));const o=[...t].sort((e,t)=>Id(e.fieldType)-Id(t.fieldType)),a={};for(const t of o){const n=t.fieldType||"question",r=(e[n]??"").trim();r&&(a[n]=r)}if(Object.keys(a).length>0&&r&&we)try{await(async(e,{conversationId:t,organizationId:n},r,o)=>{const a={"Content-Type":"application/json"};if("function"==typeof o){const e=await o();e&&(a.Authorization=`Bearer ${e}`)}const i=await fetch(`${r.replace(/\/$/,"")}/api/v1/support/onboarding`,{method:"POST",headers:a,credentials:"include",body:JSON.stringify({conversationId:t,organizationId:n,answers:e})});if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);return i.json()})(a,{conversationId:we,organizationId:i},r,s)}catch(e){}},[g,te,i,r,we,s]),pt=I.useRef(null);I.useEffect(()=>{if(R||ie.current||!pt.current)return;const{text:e,attachments:t}=pt.current;pt.current=null;const n=Array.isArray(t)&&t.length>0;ct(e,void 0,n?{attachments:t}:void 0)},[R,ct]);const gt=I.useCallback(async(e,t)=>{const n=String(e??F.current).trim(),r=Array.isArray(t)&&t.length>0;if(n||r)return ie.current?(pt.current={text:n,attachments:r?t:void 0},void L("")):void await ct(n,void 0,r?{attachments:t}:void 0)},[ct,L]),ft=I.useCallback(async(e,t)=>{await gt(e,t)},[gt]),ht=I.useCallback(async e=>{const t=e?.trim();t&&await ct(t)},[ct]),mt=I.useCallback(async(e,t,n)=>{if(j(t=>t.filter(t=>t.decisionData?.decisionId!==e)),"routing-clarification"===e){const e=String(n||"").toLowerCase(),r="database"===t||"knowledge"===t?t:"database"===e||"knowledge"===e?e:null;if(r){H.current=r,U(r);const e=Q.current;Q.current=null,q(null),e&&e.trim()&&setTimeout(()=>{ct(e,"inquiry",{skipUserAppend:!0}).catch(e=>{})},0)}return}if("connect_agent"===n){const e=Jd({id:Ze(),role:"assistant",content:"Great! I'm setting up a connection with a live customer service agent. Please hold on for a moment while I transfer you."});j(t=>[...t,e])}else if("decline"===n){const e=Jd({id:Ze(),role:"assistant",content:"I understand. I apologize that I don't have specific information about your query in my knowledge base. Is there anything else I can help you with?"});j(t=>[...t,e])}},[Ze,ct,W]);I.useCallback(()=>{Re.current&&(ge(e=>e.map(e=>e.id===Re.current?{...e,isProcessing:!1}:e)),Re.current=null)},[]);const bt=I.useCallback((e,t=!1)=>{if($e.current=!0,!e||"string"==typeof e&&!e.trim())return void(t&&Re.current&&(ge(e=>e.map(e=>e.id===Re.current?{...e,isProcessing:!1}:e)),Re.current=null));const n=Fd(e);ge(e=>{const r=e.length;let o=[...e];if(Re.current){const e=o.some(e=>e.id===Re.current);if(e)o=o.map(e=>{if(e.id!==Re.current)return e;const r=Fd(`${e.content||""}${n}`);return{...e,content:r,isProcessing:!t,metadata:{...e.metadata,transcriptionType:"input"}}});else{const e=`bidi-input-${Date.now()}`;Re.current=e;const r=Jd({id:e,role:"user",content:n,isProcessing:!t,metadata:{source:"bidi",transcriptionType:"input"}});o=[...o,r]}}else{const r=`bidi-input-${Date.now()}`,a=e.filter(e=>"assistant"===e.role&&"bidi"===e.metadata?.source).sort((e,t)=>{const n=e.timestamp instanceof Date?e.timestamp.getTime():new Date(e.timestamp).getTime();return(t.timestamp instanceof Date?t.timestamp.getTime():new Date(t.timestamp).getTime())-n})[0];a&&(a.timestamp instanceof Date?a.timestamp.getTime():new Date(a.timestamp).getTime());const i=Jd({id:r,role:"user",content:n,isProcessing:!t,metadata:{source:"bidi",transcriptionType:"input"}}),s=o.some(e=>e.id===r);s?(Re.current=r,o=o.map(e=>e.id===r?{...e,content:`${e.content||""}${n}`,isProcessing:!t}:e)):(o=[...o,i],Re.current=r)}return o.length<r?e:o}),t&&(Re.current=null,A(!0))},[]),yt=I.useCallback((e,t=!1)=>{if(A(!1),!e||"string"==typeof e&&!e.trim())return void(t&&Ae.current&&(ge(e=>e.map(e=>e.id!==Ae.current?e:{...e,isProcessing:!1})),Ae.current=null,Be.current=null));const n=`${Ae.current||"new"}-${e.substring(0,100)}-${t}`;if(De.current&&Oe.current===n)return;De.current=!0,Oe.current=n;const r=Re.current;if(ge(n=>{const o=n.length;let a=[...n];if(r){const e=a.some(e=>e.id===r);e&&(a=a.map(e=>e.id===r?{...e,isProcessing:!1}:e))}if(Ae.current){const n=a.some(e=>e.id===Ae.current);if(n)a=a.map(n=>{if(n.id!==Ae.current)return n;const r=`${n.content||""}${e}`;return{...n,content:r,isProcessing:!t,...Array.isArray(He.current)&&He.current.length>0?{sources:He.current}:{}}}),Array.isArray(He.current)&&He.current.length>0&&(He.current=null);else{const n=`bidi-assistant-${Date.now()}`;Ae.current=n;const r=Jd({id:n,role:"assistant",content:e,isProcessing:!t,metadata:{source:"bidi"}});Array.isArray(He.current)&&He.current.length>0&&(r.sources=He.current,He.current=null),a=[...a,r]}}else{const n=`bidi-assistant-${Date.now()}`,r=Jd({id:n,role:"assistant",content:e,isProcessing:!t,metadata:{source:"bidi"}});Array.isArray(He.current)&&He.current.length>0&&(r.sources=He.current,He.current=null);const o=a.some(e=>e.id===n);o?(a=a.map(r=>r.id===n?{...r,content:`${r.content||""}${e}`,isProcessing:!t,...Array.isArray(He.current)&&He.current.length>0?{sources:He.current}:{}}:r),Array.isArray(He.current)&&He.current.length>0&&(He.current=null),Ae.current=n):(a=[...a,r],Ae.current=n)}return a.length<o?n:a}),r&&(Re.current=null),t)Ae.current=null,Be.current=null;else{const e=updateKey;Promise.resolve().then(()=>{Be.current===e&&(Be.current=null)})}},[]),vt=I.useCallback((e,t=!1,n=!1)=>{if(!e||!Array.isArray(e))return;let r="";e.forEach((e,t)=>{e.inlineData?.data&&e.inlineData.mimeType?.startsWith("audio/pcm")&&Ee.current&&Ee.current.port.postMessage((e=>{if("undefined"==typeof window)return new ArrayBuffer(0);let t=e.replace(/-/g,"+").replace(/_/g,"/");for(;t.length%4!=0;)t+="=";const n=window.atob(t),r=n.length,o=new Uint8Array(r);for(let e=0;e<r;e+=1)o[e]=n.charCodeAt(e);return o.buffer})(e.inlineData.data)),!n&&e.text&&(r+=e.text)}),r&&yt(r,t)},[yt]),wt=I.useCallback(()=>{A(!1),ge(e=>e.map(e=>"bidi"===e.metadata?.source&&e.isProcessing?{...e,isProcessing:!1}:e)),Ae.current=null,Re.current=null,Ve.current=!1,He.current=null},[]),kt=I.useCallback(()=>{A(!1),Ee.current&&Ee.current.port.postMessage({command:"endOfAudio"}),Ae.current=null,Re.current=null,He.current=null,ge(e=>e.map(e=>"bidi"===e.metadata?.source?{...e,isProcessing:!1,metadata:{...e.metadata,interrupted:!0}}:e))},[]),xt=I.useCallback(()=>{de(!1),A(!1),Ie.current=!1,he("idle"),be(null),$e.current=!1,He.current=null,ze.current&&ze.current.readyState===WebSocket.OPEN&&ze.current.close(),ze.current=null,Ee.current?.disconnect(),je.current?.close(),Ee.current=null,je.current=null,Te.current?.disconnect(),Ne.current?.close(),Te.current=null,Ne.current=null,pd(Fe.current),Fe.current=null,Le.current?.reset(),Le.current=null,_e.current=!1},[]),St=I.useCallback(e=>{if(!e)return;e.error&&be("voiceUnavailable");const t=e.conclusion_detected??e.conclusionDetected;if("boolean"==typeof t&&t&&(Ue.current?.(),ve(!0)),"boolean"==typeof t&&t)return xt(),void ge(e=>{const t=[...e];for(let e=t.length-1;e>=0;e--)if("assistant"===t[e].role){t[e]={...t[e],conclusionDetected:!0};break}return t});if(e.interrupted)return void kt();if(e.inputTranscription){const t=e.inputTranscription.text||"",n=Boolean(e.inputTranscription.finished);(t||n)&&(Qd(i),bt(t,n))}const n=e.sources??e.Sources;if(Array.isArray(n)&&n.length>0){const e=n.map(e=>({source_type:e.source_type??e.sourceType??"file",source_id:e.source_id??e.sourceid??e.sourceId,source_name:e.source_name??e.sourceName??"",url:e.url,citation_indices:e.citation_indices??e.citationIndices})).filter(e=>e.source_id||e.url||"database"===e.source_type);if(0===e.length)return;ge(t=>{const n=[...t];let r=!1;for(let t=n.length-1;t>=0;t--)if("assistant"===n[t].role){n[t]={...n[t],sources:e},r=!0;break}return r||(He.current=e),n})}const r=e.finalTranscript??e.finaltranscript;if(r&&"string"==typeof r.text){const e=r.text;return void(e&&ge(t=>{const n=[...t];for(let t=n.length-1;t>=0;t--)if("assistant"===n[t].role){n[t]={...n[t],content:e,isProcessing:!1};break}return n}))}if($e.current||!e.outputTranscription?.text&&!e.content?.parts){if(e.outputTranscription?.text&&(Ve.current=!0,yt(e.outputTranscription.text,Boolean(e.outputTranscription.finished))),e.content?.parts){const t=e.content?.finished||e.finished||!1;vt(e.content.parts,t,Ve.current)}if(e.prompts&&Array.isArray(e.prompts)&&e.prompts.length>0){ge(t=>{const n=[...t];for(let t=n.length-1;t>=0;t--)if("assistant"===n[t].role){n[t]={...n[t],prompts:e.prompts};break}return n});try{Kd(i,e.prompts)}catch(e){}}e.turnComplete?wt():e.interrupted||e.inputTranscription||e.outputTranscription||e.content||e.prompts}else e.turnComplete&&wt()},[yt,bt,vt,kt,wt,xt]),Ct=I.useCallback(e=>{if(!Ie.current)return;const t=Le.current;if(t)return void t.process(e);const n=ze.current;n&&n.readyState===WebSocket.OPEN&&n.send(e)},[]),Mt=I.useCallback(async()=>{if(!_e.current&&"undefined"!=typeof window)try{const[e,t]=await async function(){if("undefined"==typeof window)throw new Error("Audio player can only be initialized in the browser");const e=new AudioContext({sampleRate:24e3}),t=new Blob(["\n class PCMPlayerProcessor extends AudioWorkletProcessor {\n constructor() {\n super();\n this.bufferSize = 24000 * 180;\n this.buffer = new Float32Array(this.bufferSize);\n this.writeIndex = 0;\n this.readIndex = 0;\n this.port.onmessage = (event) => {\n if (event.data?.command === 'endOfAudio') {\n this.readIndex = this.writeIndex;\n return;\n }\n const int16Samples = new Int16Array(event.data);\n this.enqueue(int16Samples);\n };\n }\n\n enqueue(samples) {\n for (let i = 0; i < samples.length; i += 1) {\n const floatVal = samples[i] / 32768;\n this.buffer[this.writeIndex] = floatVal;\n this.writeIndex = (this.writeIndex + 1) % this.bufferSize;\n if (this.writeIndex === this.readIndex) {\n this.readIndex = (this.readIndex + 1) % this.bufferSize;\n }\n }\n }\n\n process(inputs, outputs) {\n const output = outputs[0];\n const framesPerBlock = output[0].length;\n for (let frame = 0; frame < framesPerBlock; frame += 1) {\n output[0][frame] = this.buffer[this.readIndex];\n if (output.length > 1) {\n output[1][frame] = this.buffer[this.readIndex];\n }\n if (this.readIndex !== this.writeIndex) {\n this.readIndex = (this.readIndex + 1) % this.bufferSize;\n }\n }\n return true;\n }\n }\n\n registerProcessor('pcm-player-processor', PCMPlayerProcessor);\n "],{type:"application/javascript"}),n=URL.createObjectURL(t);await e.audioWorklet.addModule(n);const r=new AudioWorkletNode(e,"pcm-player-processor");return r.connect(e.destination),URL.revokeObjectURL(n),[r,e]}();Ee.current=e,je.current=t,await t.resume();const n=e=>{const t=ze.current;t&&t.readyState===WebSocket.OPEN&&t.send(e)};Le.current=yd({sampleRate:16e3},{onSpeechStart:()=>{Ee.current?.port.postMessage({command:"endOfAudio"});const e=ze.current;e&&e.readyState===WebSocket.OPEN&&e.send(JSON.stringify({type:"interrupt"}))},onVoiceFrame:n,onSpeechEnd:()=>{const e=ze.current;e&&e.readyState===WebSocket.OPEN&&e.send(JSON.stringify({type:"audio_end"}))}});const[r,o,a]=await dd(Ct);Te.current=r,Ne.current=o,Fe.current=a,await o.resume(),_e.current=!0}catch(e){throw e}},[Ct]),Pt=I.useCallback(async()=>{if("undefined"==typeof window||!Je)return;if(ze.current&&ze.current.readyState===WebSocket.OPEN)return;let e;he("connecting"),be(null);try{const t={"Content-Type":"application/json"};if("function"==typeof s){const e=await s();e&&(t.Authorization=`Bearer ${e}`)}const n=await fetch(`${r.replace(/\/$/,"")}/api/v1/widget/voice-ticket`,{method:"POST",headers:t,credentials:"include",body:JSON.stringify({sessionId:we})});if(!n.ok)throw new Error(`voice-ticket ${n.status}`);if(e=(await n.json())?.ticket,!e)throw new Error("voice-ticket returned no ticket")}catch(e){return he("error"),void be(Nd(e))}try{const t=new WebSocket(`${Je}?ticket=${encodeURIComponent(e)}`);ze.current=t,t.onopen=()=>{he("connected")},t.onmessage=e=>{try{"string"==typeof e.data&&e.data.substring(0,200);const t=JSON.parse(e.data);St(t)}catch(e){}},t.onerror=()=>{he("error"),be("voiceUnavailable"),A(!1)},t.onclose=()=>{ze.current=null,he("idle"),A(!1),Ie.current&&setTimeout(()=>{Pt()},5e3)}}catch(e){he("error"),be(Nd(e))}},[St,Je,r,we,s]),zt=I.useCallback(async()=>{if(d&&i){be(null),he(e=>"connected"===e?e:"connecting"),de(!0),Ie.current=!0,ve(!1),$e.current=!1,ge(t=>{if(t.length>0||E.length>0)return t;if(!e||""===e.trim())return[];return[Jd({id:`bidi-welcome-${Date.now()}`,role:"assistant",content:ee,metadata:{source:"bidi"}})]}),Pt();try{await Mt()}catch(e){be(Nd(e)),he("error")}}},[d,i,e,ee,Pt,Mt,E]),Et=I.useCallback(()=>{ue?xt():"connecting"!==fe&&zt()},[ue,zt,xt,fe]),jt=I.useCallback(e=>{const t=e.trim();if(!t)return;$e.current=!0;const n=ze.current;if(!n||n.readyState!==WebSocket.OPEN)return void be("voiceUnavailable");n.send(JSON.stringify({type:"text",text:t})),Qd(i),A(!0);const r=Jd({id:`bidi-user-${Date.now()}`,role:"user",content:t,metadata:{source:"bidi"}});ge(e=>[...e,r]),L("")},[]);I.useEffect(()=>{Ie.current=ue},[ue]),I.useEffect(()=>()=>{ze.current&&ze.current.readyState===WebSocket.OPEN&&ze.current.close(),Ee.current?.disconnect(),je.current?.close(),Te.current?.disconnect(),Ne.current?.close(),pd(Fe.current),Fe.current=null,_e.current=!1},[]);const Tt=I.useCallback(()=>{(e=>{try{const t=Hd(e);localStorage.removeItem(`${Bd}_${e}`),t?.conversationId&&Vd(e,t.conversationId)}catch{}})(i),Kd(i,[]),$(null),U(null),q(null),H.current=null,Q.current=null,j([]),ge([]),Vd(i,we),K(!1),X(!1),oe({}),Z(""),ne(null),ae.current=!1,$e.current=!1,et.current=!1,tt.current=!1,Me.current=!1,Ce(!1),it.current=null,Qe.current=null,xe.current&&(xe.current.close(),xe.current=null);const t=ep();if(qd(i,t,{settingsSnapshot:JSON.stringify({value:m,unit:b?.toUpperCase()})}),ke(t),e&&""!==e.trim()&&j([{...Jd({id:Date.now().toString(),role:"assistant",content:e}),isWelcome:!0}]),f){tp(g).length>0&&K(!0)}},[i,we,e,f,g,m,b]),Nt=I.useRef(Tt);I.useEffect(()=>{Nt.current=Tt},[Tt]),I.useEffect(()=>{nt.current=!1,rt.current={value:null,unit:null}},[i]),I.useEffect(()=>{if(!i||!m)return;const e=Ud(m,b);if(!e)return;const t=rt.current,n=nt.current&&(t.value!==m||t.unit!==b);if(nt.current=!0,rt.current={value:m,unit:b},n)return at(!1),void Nt.current();let r=null;const o=()=>{const t=Hd(i);if(!t)return;if(!t.firstInteractionAt)return void(r=setTimeout(o,e));const n=new Date(t.lastActivity).getTime(),a=Date.now()-n,s=e-a;if(s<=0)return at(!1),void Nt.current();const l=Math.max(1e4,Math.min(12e4,.1*e));at(s<=l);r=setTimeout(o,s<=l?1e3:s-l)};return o(),()=>{r&&clearTimeout(r)}},[i,m,b,we]);const Ft=I.useMemo(()=>n,[n]),Lt=I.useMemo(()=>Zd(E,pe),[pe,E]);I.useEffect(()=>{},[pe,ue]);const Rt=I.useCallback((e,t)=>{j(n=>n.map(n=>"assistant"===n.role&&n.content===e?{...n,feedback:t}:n))},[]);return{conversationId:we,isOpen:x,isMinimized:C,isDark:P,messages:Lt,inputValue:T,isLoading:R,isConversationLoading:le,widgetRef:B,quickQuestions:Ft,isVoiceSessionActive:ue,voiceStatus:fe,voiceError:me,voiceConclusionForCsat:ye,onboardingQuestions:g,onboardingActive:Y,onboardingCompleted:G,handleOnboardingFormSubmit:dt,widgetFilter:O,setWidgetFilter:$,addAssistantMessage:st,setInputValue:L,handleSend:ft,stopGeneration:lt,handleQuickQuestion:ht,sendMessage:ct,retryMessage:ut,toggleChat:()=>{S(e=>!e),M(!1)},toggleTheme:()=>{z(e=>!e)},toggleMinimize:()=>{M(e=>!e)},closeChat:()=>{S(!1)},handleDecision:mt,handleVoiceToggle:Et,sendBidiTextMessage:jt,sessionExpiringSoon:ot,resetConversation:Tt,updateMessageFeedback:Rt}},rp=(...e)=>e.filter((e,t,n)=>Boolean(e)&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim(),op=e=>{const t=(e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()))(e);return t.charAt(0).toUpperCase()+t.slice(1)};
|
|
20
|
+
*/function W(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var q=new Set,Q={};function K(e,t){Y(e,t),Y(e+"Capture",t)}function Y(e,t){for(Q[e]=t,e=0;e<t.length;e++)q.add(t[e])}var G=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),J=Object.prototype.hasOwnProperty,X=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Z={},ee={};function te(e,t,n,r,o,a,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=i}var ne={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ne[e]=new te(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ne[t]=new te(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){ne[e]=new te(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ne[e]=new te(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ne[e]=new te(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){ne[e]=new te(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){ne[e]=new te(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){ne[e]=new te(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){ne[e]=new te(e,5,!1,e.toLowerCase(),null,!1,!1)});var re=/[\-:]([a-z])/g;function oe(e){return e[1].toUpperCase()}function ae(e,t,n,r){var o=ne.hasOwnProperty(t)?ne[t]:null;(null!==o?0!==o.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,o,r)&&(n=null),r||null===o?function(e){return!!J.call(ee,e)||!J.call(Z,e)&&(X.test(e)?ee[e]=!0:(Z[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=null===n?3!==o.type&&"":n:(t=o.attributeName,r=o.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(o=o.type)||4===o&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(re,oe);ne[t]=new te(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(re,oe);ne[t]=new te(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(re,oe);ne[t]=new te(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){ne[e]=new te(e,1,!1,e.toLowerCase(),null,!1,!1)}),ne.xlinkHref=new te("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){ne[e]=new te(e,1,!1,e.toLowerCase(),null,!0,!0)});var ie=U.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,se=Symbol.for("react.element"),le=Symbol.for("react.portal"),ce=Symbol.for("react.fragment"),ue=Symbol.for("react.strict_mode"),de=Symbol.for("react.profiler"),pe=Symbol.for("react.provider"),ge=Symbol.for("react.context"),fe=Symbol.for("react.forward_ref"),he=Symbol.for("react.suspense"),me=Symbol.for("react.suspense_list"),be=Symbol.for("react.memo"),ye=Symbol.for("react.lazy"),ve=Symbol.for("react.offscreen"),we=Symbol.iterator;function ke(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=we&&e[we]||e["@@iterator"])?e:null}var xe,Se=Object.assign;function Ce(e){if(void 0===xe)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);xe=t&&t[1]||""}return"\n"+xe+e}var Me=!1;function Pe(e,t){if(!e||Me)return"";Me=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&"string"==typeof t.stack){for(var o=t.stack.split("\n"),a=r.stack.split("\n"),i=o.length-1,s=a.length-1;1<=i&&0<=s&&o[i]!==a[s];)s--;for(;1<=i&&0<=s;i--,s--)if(o[i]!==a[s]){if(1!==i||1!==s)do{if(i--,0>--s||o[i]!==a[s]){var l="\n"+o[i].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=i&&0<=s);break}}}finally{Me=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Ce(e):""}function ze(e){switch(e.tag){case 5:return Ce(e.type);case 16:return Ce("Lazy");case 13:return Ce("Suspense");case 19:return Ce("SuspenseList");case 0:case 2:case 15:return e=Pe(e.type,!1);case 11:return e=Pe(e.type.render,!1);case 1:return e=Pe(e.type,!0);default:return""}}function Ee(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case ce:return"Fragment";case le:return"Portal";case de:return"Profiler";case ue:return"StrictMode";case he:return"Suspense";case me:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case ge:return(e.displayName||"Context")+".Consumer";case pe:return(e._context.displayName||"Context")+".Provider";case fe:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case be:return null!==(t=e.displayName||null)?t:Ee(e.type)||"Memo";case ye:t=e._payload,e=e._init;try{return Ee(e(t))}catch(e){}}return null}function je(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ee(t);case 8:return t===ue?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function Te(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function Ne(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function Fe(e){e._valueTracker||(e._valueTracker=function(e){var t=Ne(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var o=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){r=""+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function Le(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Ne(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function Re(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Ae(e,t){var n=t.checked;return Se({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function _e(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=Te(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function Ie(e,t){null!=(t=t.checked)&&ae(e,"checked",t,!1)}function Be(e,t){Ie(e,t);var n=Te(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?Oe(e,t.type,n):t.hasOwnProperty("defaultValue")&&Oe(e,t.type,Te(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function De(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function Oe(e,t,n){"number"===t&&Re(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var $e=Array.isArray;function Ve(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Te(n),t=null,o=0;o<e.length;o++){if(e[o].value===n)return e[o].selected=!0,void(r&&(e[o].defaultSelected=!0));null!==t||e[o].disabled||(t=e[o])}null!==t&&(t.selected=!0)}}function Ue(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(W(91));return Se({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function He(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(W(92));if($e(n)){if(1<n.length)throw Error(W(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:Te(n)}}function We(e,t){var n=Te(t.value),r=Te(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function qe(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function Qe(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Ke(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?Qe(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var Ye,Ge,Je=(Ge=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((Ye=Ye||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Ye.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction(function(){return Ge(e,t)})}:Ge);function Xe(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var Ze={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},et=["Webkit","ms","Moz","O"];function tt(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||Ze.hasOwnProperty(e)&&Ze[e]?(""+t).trim():t+"px"}function nt(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=tt(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}Object.keys(Ze).forEach(function(e){et.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ze[t]=Ze[e]})});var rt=Se({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ot(e,t){if(t){if(rt[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(W(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(W(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(W(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(W(62))}}function at(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var it=null;function st(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var lt=null,ct=null,ut=null;function dt(e){if(e=ia(e)){if("function"!=typeof lt)throw Error(W(280));var t=e.stateNode;t&&(t=la(t),lt(e.stateNode,e.type,t))}}function pt(e){ct?ut?ut.push(e):ut=[e]:ct=e}function gt(){if(ct){var e=ct,t=ut;if(ut=ct=null,dt(e),t)for(e=0;e<t.length;e++)dt(t[e])}}function ft(e,t){return e(t)}function ht(){}var mt=!1;function bt(e,t,n){if(mt)return e(t,n);mt=!0;try{return ft(e,t,n)}finally{mt=!1,(null!==ct||null!==ut)&&(ht(),gt())}}function yt(e,t){var n=e.stateNode;if(null===n)return null;var r=la(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(W(231,t,typeof n));return n}var vt=!1;if(G)try{var wt={};Object.defineProperty(wt,"passive",{get:function(){vt=!0}}),window.addEventListener("test",wt,wt),window.removeEventListener("test",wt,wt)}catch(Ge){vt=!1}function kt(e,t,n,r,o,a,i,s,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(e){this.onError(e)}}var xt=!1,St=null,Ct=!1,Mt=null,Pt={onError:function(e){xt=!0,St=e}};function zt(e,t,n,r,o,a,i,s,l){xt=!1,St=null,kt.apply(Pt,arguments)}function Et(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{!!(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function jt(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function Tt(e){if(Et(e)!==e)throw Error(W(188))}function Nt(e){return e=function(e){var t=e.alternate;if(!t){if(null===(t=Et(e)))throw Error(W(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(null===o)break;var a=o.alternate;if(null===a){if(null!==(r=o.return)){n=r;continue}break}if(o.child===a.child){for(a=o.child;a;){if(a===n)return Tt(o),e;if(a===r)return Tt(o),t;a=a.sibling}throw Error(W(188))}if(n.return!==r.return)n=o,r=a;else{for(var i=!1,s=o.child;s;){if(s===n){i=!0,n=o,r=a;break}if(s===r){i=!0,r=o,n=a;break}s=s.sibling}if(!i){for(s=a.child;s;){if(s===n){i=!0,n=a,r=o;break}if(s===r){i=!0,r=a,n=o;break}s=s.sibling}if(!i)throw Error(W(189))}}if(n.alternate!==r)throw Error(W(190))}if(3!==n.tag)throw Error(W(188));return n.stateNode.current===n?e:t}(e),null!==e?Ft(e):null}function Ft(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=Ft(e);if(null!==t)return t;e=e.sibling}return null}var Lt=H.unstable_scheduleCallback,Rt=H.unstable_cancelCallback,At=H.unstable_shouldYield,_t=H.unstable_requestPaint,It=H.unstable_now,Bt=H.unstable_getCurrentPriorityLevel,Dt=H.unstable_ImmediatePriority,Ot=H.unstable_UserBlockingPriority,$t=H.unstable_NormalPriority,Vt=H.unstable_LowPriority,Ut=H.unstable_IdlePriority,Ht=null,Wt=null;var qt=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(Qt(e)/Kt|0)|0},Qt=Math.log,Kt=Math.LN2;var Yt=64,Gt=4194304;function Jt(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Xt(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,o=e.suspendedLanes,a=e.pingedLanes,i=268435455&n;if(0!==i){var s=i&~o;0!==s?r=Jt(s):0!==(a&=i)&&(r=Jt(a))}else 0!==(i=n&~o)?r=Jt(i):0!==a&&(r=Jt(a));if(0===r)return 0;if(0!==t&&t!==r&&0===(t&o)&&((o=r&-r)>=(a=t&-t)||16===o&&4194240&a))return t;if(4&r&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)o=1<<(n=31-qt(t)),r|=e[n],t&=~o;return r}function Zt(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function en(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function tn(){var e=Yt;return!(4194240&(Yt<<=1))&&(Yt=64),e}function nn(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function rn(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-qt(t)]=n}function on(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-qt(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var an=0;function sn(e){return 1<(e&=-e)?4<e?268435455&e?16:536870912:4:1}var ln,cn,un,dn,pn,gn=!1,fn=[],hn=null,mn=null,bn=null,yn=new Map,vn=new Map,wn=[],kn="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function xn(e,t){switch(e){case"focusin":case"focusout":hn=null;break;case"dragenter":case"dragleave":mn=null;break;case"mouseover":case"mouseout":bn=null;break;case"pointerover":case"pointerout":yn.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":vn.delete(t.pointerId)}}function Sn(e,t,n,r,o,a){return null===e||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[o]},null!==t&&(null!==(t=ia(t))&&cn(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==o&&-1===t.indexOf(o)&&t.push(o),e)}function Cn(e){var t=aa(e.target);if(null!==t){var n=Et(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=jt(n)))return e.blockedOn=t,void pn(e.priority,function(){un(n)})}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Mn(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=_n(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=ia(n))&&cn(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);it=r,n.target.dispatchEvent(r),it=null,t.shift()}return!0}function Pn(e,t,n){Mn(e)&&n.delete(t)}function zn(){gn=!1,null!==hn&&Mn(hn)&&(hn=null),null!==mn&&Mn(mn)&&(mn=null),null!==bn&&Mn(bn)&&(bn=null),yn.forEach(Pn),vn.forEach(Pn)}function En(e,t){e.blockedOn===t&&(e.blockedOn=null,gn||(gn=!0,H.unstable_scheduleCallback(H.unstable_NormalPriority,zn)))}function jn(e){function t(t){return En(t,e)}if(0<fn.length){En(fn[0],e);for(var n=1;n<fn.length;n++){var r=fn[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==hn&&En(hn,e),null!==mn&&En(mn,e),null!==bn&&En(bn,e),yn.forEach(t),vn.forEach(t),n=0;n<wn.length;n++)(r=wn[n]).blockedOn===e&&(r.blockedOn=null);for(;0<wn.length&&null===(n=wn[0]).blockedOn;)Cn(n),null===n.blockedOn&&wn.shift()}var Tn=ie.ReactCurrentBatchConfig,Nn=!0;function Fn(e,t,n,r){var o=an,a=Tn.transition;Tn.transition=null;try{an=1,Rn(e,t,n,r)}finally{an=o,Tn.transition=a}}function Ln(e,t,n,r){var o=an,a=Tn.transition;Tn.transition=null;try{an=4,Rn(e,t,n,r)}finally{an=o,Tn.transition=a}}function Rn(e,t,n,r){if(Nn){var o=_n(e,t,n,r);if(null===o)No(e,t,r,An,n),xn(e,r);else if(function(e,t,n,r,o){switch(t){case"focusin":return hn=Sn(hn,e,t,n,r,o),!0;case"dragenter":return mn=Sn(mn,e,t,n,r,o),!0;case"mouseover":return bn=Sn(bn,e,t,n,r,o),!0;case"pointerover":var a=o.pointerId;return yn.set(a,Sn(yn.get(a)||null,e,t,n,r,o)),!0;case"gotpointercapture":return a=o.pointerId,vn.set(a,Sn(vn.get(a)||null,e,t,n,r,o)),!0}return!1}(o,e,t,n,r))r.stopPropagation();else if(xn(e,r),4&t&&-1<kn.indexOf(e)){for(;null!==o;){var a=ia(o);if(null!==a&&ln(a),null===(a=_n(e,t,n,r))&&No(e,t,r,An,n),a===o)break;o=a}null!==o&&r.stopPropagation()}else No(e,t,r,null,n)}}var An=null;function _n(e,t,n,r){if(An=null,null!==(e=aa(e=st(r))))if(null===(t=Et(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=jt(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return An=e,null}function In(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Bt()){case Dt:return 1;case Ot:return 4;case $t:case Vt:return 16;case Ut:return 536870912;default:return 16}default:return 16}}var Bn=null,Dn=null,On=null;function $n(){if(On)return On;var e,t,n=Dn,r=n.length,o="value"in Bn?Bn.value:Bn.textContent,a=o.length;for(e=0;e<r&&n[e]===o[e];e++);var i=r-e;for(t=1;t<=i&&n[r-t]===o[a-t];t++);return On=o.slice(e,1<t?1-t:void 0)}function Vn(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function Un(){return!0}function Hn(){return!1}function Wn(e){function t(t,n,r,o,a){for(var i in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=o,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(i)&&(t=e[i],this[i]=t?t(o):o[i]);return this.isDefaultPrevented=(null!=o.defaultPrevented?o.defaultPrevented:!1===o.returnValue)?Un:Hn,this.isPropagationStopped=Hn,this}return Se(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=Un)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=Un)},persist:function(){},isPersistent:Un}),t}var qn,Qn,Kn,Yn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Gn=Wn(Yn),Jn=Se({},Yn,{view:0,detail:0}),Xn=Wn(Jn),Zn=Se({},Jn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:dr,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Kn&&(Kn&&"mousemove"===e.type?(qn=e.screenX-Kn.screenX,Qn=e.screenY-Kn.screenY):Qn=qn=0,Kn=e),qn)},movementY:function(e){return"movementY"in e?e.movementY:Qn}}),er=Wn(Zn),tr=Wn(Se({},Zn,{dataTransfer:0})),nr=Wn(Se({},Jn,{relatedTarget:0})),rr=Wn(Se({},Yn,{animationName:0,elapsedTime:0,pseudoElement:0})),or=Se({},Yn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),ar=Wn(or),ir=Wn(Se({},Yn,{data:0})),sr={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},lr={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},cr={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ur(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=cr[e])&&!!t[e]}function dr(){return ur}var pr=Se({},Jn,{key:function(e){if(e.key){var t=sr[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=Vn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?lr[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:dr,charCode:function(e){return"keypress"===e.type?Vn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?Vn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),gr=Wn(pr),fr=Wn(Se({},Zn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),hr=Wn(Se({},Jn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:dr})),mr=Wn(Se({},Yn,{propertyName:0,elapsedTime:0,pseudoElement:0})),br=Se({},Zn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),yr=Wn(br),vr=[9,13,27,32],wr=G&&"CompositionEvent"in window,kr=null;G&&"documentMode"in document&&(kr=document.documentMode);var xr=G&&"TextEvent"in window&&!kr,Sr=G&&(!wr||kr&&8<kr&&11>=kr),Cr=String.fromCharCode(32),Mr=!1;function Pr(e,t){switch(e){case"keyup":return-1!==vr.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function zr(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Er=!1;var jr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Tr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!jr[e.type]:"textarea"===t}function Nr(e,t,n,r){pt(r),0<(t=Lo(t,"onChange")).length&&(n=new Gn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Fr=null,Lr=null;function Rr(e){Mo(e,0)}function Ar(e){if(Le(sa(e)))return e}function _r(e,t){if("change"===e)return t}var Ir=!1;if(G){var Br;if(G){var Dr="oninput"in document;if(!Dr){var Or=document.createElement("div");Or.setAttribute("oninput","return;"),Dr="function"==typeof Or.oninput}Br=Dr}else Br=!1;Ir=Br&&(!document.documentMode||9<document.documentMode)}function $r(){Fr&&(Fr.detachEvent("onpropertychange",Vr),Lr=Fr=null)}function Vr(e){if("value"===e.propertyName&&Ar(Lr)){var t=[];Nr(t,Lr,e,st(e)),bt(Rr,t)}}function Ur(e,t,n){"focusin"===e?($r(),Lr=n,(Fr=t).attachEvent("onpropertychange",Vr)):"focusout"===e&&$r()}function Hr(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Ar(Lr)}function Wr(e,t){if("click"===e)return Ar(t)}function qr(e,t){if("input"===e||"change"===e)return Ar(t)}var Qr="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function Kr(e,t){if(Qr(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!J.call(t,o)||!Qr(e[o],t[o]))return!1}return!0}function Yr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Gr(e,t){var n,r=Yr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Yr(r)}}function Jr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?Jr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function Xr(){for(var e=window,t=Re();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=Re((e=t.contentWindow).document)}return t}function Zr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function eo(e){var t=Xr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Jr(n.ownerDocument.documentElement,n)){if(null!==r&&Zr(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var o=n.textContent.length,a=Math.min(r.start,o);r=void 0===r.end?a:Math.min(r.end,o),!e.extend&&a>r&&(o=r,r=a,a=o),o=Gr(n,a);var i=Gr(n,r);o&&i&&(1!==e.rangeCount||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&((t=t.createRange()).setStart(o.node,o.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var to=G&&"documentMode"in document&&11>=document.documentMode,no=null,ro=null,oo=null,ao=!1;function io(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;ao||null==no||no!==Re(r)||("selectionStart"in(r=no)&&Zr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},oo&&Kr(oo,r)||(oo=r,0<(r=Lo(ro,"onSelect")).length&&(t=new Gn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=no)))}function so(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var lo={animationend:so("Animation","AnimationEnd"),animationiteration:so("Animation","AnimationIteration"),animationstart:so("Animation","AnimationStart"),transitionend:so("Transition","TransitionEnd")},co={},uo={};function po(e){if(co[e])return co[e];if(!lo[e])return e;var t,n=lo[e];for(t in n)if(n.hasOwnProperty(t)&&t in uo)return co[e]=n[t];return e}G&&(uo=document.createElement("div").style,"AnimationEvent"in window||(delete lo.animationend.animation,delete lo.animationiteration.animation,delete lo.animationstart.animation),"TransitionEvent"in window||delete lo.transitionend.transition);var go=po("animationend"),fo=po("animationiteration"),ho=po("animationstart"),mo=po("transitionend"),bo=new Map,yo="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function vo(e,t){bo.set(e,t),K(t,[e])}for(var wo=0;wo<yo.length;wo++){var ko=yo[wo];vo(ko.toLowerCase(),"on"+(ko[0].toUpperCase()+ko.slice(1)))}vo(go,"onAnimationEnd"),vo(fo,"onAnimationIteration"),vo(ho,"onAnimationStart"),vo("dblclick","onDoubleClick"),vo("focusin","onFocus"),vo("focusout","onBlur"),vo(mo,"onTransitionEnd"),Y("onMouseEnter",["mouseout","mouseover"]),Y("onMouseLeave",["mouseout","mouseover"]),Y("onPointerEnter",["pointerout","pointerover"]),Y("onPointerLeave",["pointerout","pointerover"]),K("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),K("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),K("onBeforeInput",["compositionend","keypress","textInput","paste"]),K("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),K("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),K("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var xo="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),So=new Set("cancel close invalid load scroll toggle".split(" ").concat(xo));function Co(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,o,a,i,s,l){if(zt.apply(this,arguments),xt){if(!xt)throw Error(W(198));var c=St;xt=!1,St=null,Ct||(Ct=!0,Mt=c)}}(r,t,void 0,e),e.currentTarget=null}function Mo(e,t){t=!!(4&t);for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var a=void 0;if(t)for(var i=r.length-1;0<=i;i--){var s=r[i],l=s.instance,c=s.currentTarget;if(s=s.listener,l!==a&&o.isPropagationStopped())break e;Co(o,s,c),a=l}else for(i=0;i<r.length;i++){if(l=(s=r[i]).instance,c=s.currentTarget,s=s.listener,l!==a&&o.isPropagationStopped())break e;Co(o,s,c),a=l}}}if(Ct)throw e=Mt,Ct=!1,Mt=null,e}function Po(e,t){var n=t[na];void 0===n&&(n=t[na]=new Set);var r=e+"__bubble";n.has(r)||(To(t,e,2,!1),n.add(r))}function zo(e,t,n){var r=0;t&&(r|=4),To(n,e,r,t)}var Eo="_reactListening"+Math.random().toString(36).slice(2);function jo(e){if(!e[Eo]){e[Eo]=!0,q.forEach(function(t){"selectionchange"!==t&&(So.has(t)||zo(t,!1,e),zo(t,!0,e))});var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Eo]||(t[Eo]=!0,zo("selectionchange",!1,t))}}function To(e,t,n,r){switch(In(t)){case 1:var o=Fn;break;case 4:o=Ln;break;default:o=Rn}n=o.bind(null,t,n,e),o=void 0,!vt||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(o=!0),r?void 0!==o?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):void 0!==o?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function No(e,t,n,r,o){var a=r;if(!(1&t||2&t||null===r))e:for(;;){if(null===r)return;var i=r.tag;if(3===i||4===i){var s=r.stateNode.containerInfo;if(s===o||8===s.nodeType&&s.parentNode===o)break;if(4===i)for(i=r.return;null!==i;){var l=i.tag;if((3===l||4===l)&&((l=i.stateNode.containerInfo)===o||8===l.nodeType&&l.parentNode===o))return;i=i.return}for(;null!==s;){if(null===(i=aa(s)))return;if(5===(l=i.tag)||6===l){r=a=i;continue e}s=s.parentNode}}r=r.return}bt(function(){var r=a,o=st(n),i=[];e:{var s=bo.get(e);if(void 0!==s){var l=Gn,c=e;switch(e){case"keypress":if(0===Vn(n))break e;case"keydown":case"keyup":l=gr;break;case"focusin":c="focus",l=nr;break;case"focusout":c="blur",l=nr;break;case"beforeblur":case"afterblur":l=nr;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=er;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=tr;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=hr;break;case go:case fo:case ho:l=rr;break;case mo:l=mr;break;case"scroll":l=Xn;break;case"wheel":l=yr;break;case"copy":case"cut":case"paste":l=ar;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=fr}var u=!!(4&t),d=!u&&"scroll"===e,p=u?null!==s?s+"Capture":null:s;u=[];for(var g,f=r;null!==f;){var h=(g=f).stateNode;if(5===g.tag&&null!==h&&(g=h,null!==p&&(null!=(h=yt(f,p))&&u.push(Fo(f,h,g)))),d)break;f=f.return}0<u.length&&(s=new l(s,c,null,n,o),i.push({event:s,listeners:u}))}}if(!(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||n===it||!(c=n.relatedTarget||n.fromElement)||!aa(c)&&!c[ta])&&(l||s)&&(s=o.window===o?o:(s=o.ownerDocument)?s.defaultView||s.parentWindow:window,l?(l=r,null!==(c=(c=n.relatedTarget||n.toElement)?aa(c):null)&&(c!==(d=Et(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(l=null,c=r),l!==c)){if(u=er,h="onMouseLeave",p="onMouseEnter",f="mouse","pointerout"!==e&&"pointerover"!==e||(u=fr,h="onPointerLeave",p="onPointerEnter",f="pointer"),d=null==l?s:sa(l),g=null==c?s:sa(c),(s=new u(h,f+"leave",l,n,o)).target=d,s.relatedTarget=g,h=null,aa(o)===r&&((u=new u(p,f+"enter",c,n,o)).target=g,u.relatedTarget=d,h=u),d=h,l&&c)e:{for(p=c,f=0,g=u=l;g;g=Ro(g))f++;for(g=0,h=p;h;h=Ro(h))g++;for(;0<f-g;)u=Ro(u),f--;for(;0<g-f;)p=Ro(p),g--;for(;f--;){if(u===p||null!==p&&u===p.alternate)break e;u=Ro(u),p=Ro(p)}u=null}else u=null;null!==l&&Ao(i,s,l,u,!1),null!==c&&null!==d&&Ao(i,d,c,u,!0)}if("select"===(l=(s=r?sa(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===l&&"file"===s.type)var m=_r;else if(Tr(s))if(Ir)m=qr;else{m=Hr;var b=Ur}else(l=s.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(m=Wr);switch(m&&(m=m(e,r))?Nr(i,m,n,o):(b&&b(e,s,r),"focusout"===e&&(b=s._wrapperState)&&b.controlled&&"number"===s.type&&Oe(s,"number",s.value)),b=r?sa(r):window,e){case"focusin":(Tr(b)||"true"===b.contentEditable)&&(no=b,ro=r,oo=null);break;case"focusout":oo=ro=no=null;break;case"mousedown":ao=!0;break;case"contextmenu":case"mouseup":case"dragend":ao=!1,io(i,n,o);break;case"selectionchange":if(to)break;case"keydown":case"keyup":io(i,n,o)}var y;if(wr)e:{switch(e){case"compositionstart":var v="onCompositionStart";break e;case"compositionend":v="onCompositionEnd";break e;case"compositionupdate":v="onCompositionUpdate";break e}v=void 0}else Er?Pr(e,n)&&(v="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(v="onCompositionStart");v&&(Sr&&"ko"!==n.locale&&(Er||"onCompositionStart"!==v?"onCompositionEnd"===v&&Er&&(y=$n()):(Dn="value"in(Bn=o)?Bn.value:Bn.textContent,Er=!0)),0<(b=Lo(r,v)).length&&(v=new ir(v,e,null,n,o),i.push({event:v,listeners:b}),y?v.data=y:null!==(y=zr(n))&&(v.data=y))),(y=xr?function(e,t){switch(e){case"compositionend":return zr(t);case"keypress":return 32!==t.which?null:(Mr=!0,Cr);case"textInput":return(e=t.data)===Cr&&Mr?null:e;default:return null}}(e,n):function(e,t){if(Er)return"compositionend"===e||!wr&&Pr(e,t)?(e=$n(),On=Dn=Bn=null,Er=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Sr&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=Lo(r,"onBeforeInput")).length&&(o=new ir("onBeforeInput","beforeinput",null,n,o),i.push({event:o,listeners:r}),o.data=y))}Mo(i,t)})}function Fo(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Lo(e,t){for(var n=t+"Capture",r=[];null!==e;){var o=e,a=o.stateNode;5===o.tag&&null!==a&&(o=a,null!=(a=yt(e,n))&&r.unshift(Fo(e,a,o)),null!=(a=yt(e,t))&&r.push(Fo(e,a,o))),e=e.return}return r}function Ro(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Ao(e,t,n,r,o){for(var a=t._reactName,i=[];null!==n&&n!==r;){var s=n,l=s.alternate,c=s.stateNode;if(null!==l&&l===r)break;5===s.tag&&null!==c&&(s=c,o?null!=(l=yt(n,a))&&i.unshift(Fo(n,l,s)):o||null!=(l=yt(n,a))&&i.push(Fo(n,l,s))),n=n.return}0!==i.length&&e.push({event:t,listeners:i})}var _o=/\r\n?/g,Io=/\u0000|\uFFFD/g;function Bo(e){return("string"==typeof e?e:""+e).replace(_o,"\n").replace(Io,"")}function Do(e,t,n){if(t=Bo(t),Bo(e)!==t&&n)throw Error(W(425))}function Oo(){}var $o=null,Vo=null;function Uo(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var Ho="function"==typeof setTimeout?setTimeout:void 0,Wo="function"==typeof clearTimeout?clearTimeout:void 0,qo="function"==typeof Promise?Promise:void 0,Qo="function"==typeof queueMicrotask?queueMicrotask:void 0!==qo?function(e){return qo.resolve(null).then(e).catch(Ko)}:Ho;function Ko(e){setTimeout(function(){throw e})}function Yo(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&8===o.nodeType)if("/$"===(n=o.data)){if(0===r)return e.removeChild(o),void jn(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=o}while(n);jn(t)}function Go(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function Jo(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var Xo=Math.random().toString(36).slice(2),Zo="__reactFiber$"+Xo,ea="__reactProps$"+Xo,ta="__reactContainer$"+Xo,na="__reactEvents$"+Xo,ra="__reactListeners$"+Xo,oa="__reactHandles$"+Xo;function aa(e){var t=e[Zo];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ta]||n[Zo]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=Jo(e);null!==e;){if(n=e[Zo])return n;e=Jo(e)}return t}n=(e=n).parentNode}return null}function ia(e){return!(e=e[Zo]||e[ta])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function sa(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(W(33))}function la(e){return e[ea]||null}var ca=[],ua=-1;function da(e){return{current:e}}function pa(e){0>ua||(e.current=ca[ua],ca[ua]=null,ua--)}function ga(e,t){ua++,ca[ua]=e.current,e.current=t}var fa={},ha=da(fa),ma=da(!1),ba=fa;function ya(e,t){var n=e.type.contextTypes;if(!n)return fa;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,a={};for(o in n)a[o]=t[o];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function va(e){return null!=(e=e.childContextTypes)}function wa(){pa(ma),pa(ha)}function ka(e,t,n){if(ha.current!==fa)throw Error(W(168));ga(ha,t),ga(ma,n)}function xa(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var o in r=r.getChildContext())if(!(o in t))throw Error(W(108,je(e)||"Unknown",o));return Se({},n,r)}function Sa(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||fa,ba=ha.current,ga(ha,e),ga(ma,ma.current),!0}function Ca(e,t,n){var r=e.stateNode;if(!r)throw Error(W(169));n?(e=xa(e,t,ba),r.__reactInternalMemoizedMergedChildContext=e,pa(ma),pa(ha),ga(ha,e)):pa(ma),ga(ma,n)}var Ma=null,Pa=!1,za=!1;function Ea(e){null===Ma?Ma=[e]:Ma.push(e)}function ja(){if(!za&&null!==Ma){za=!0;var e=0,t=an;try{var n=Ma;for(an=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Ma=null,Pa=!1}catch(t){throw null!==Ma&&(Ma=Ma.slice(e+1)),Lt(Dt,ja),t}finally{an=t,za=!1}}return null}var Ta=[],Na=0,Fa=null,La=0,Ra=[],Aa=0,_a=null,Ia=1,Ba="";function Da(e,t){Ta[Na++]=La,Ta[Na++]=Fa,Fa=e,La=t}function Oa(e,t,n){Ra[Aa++]=Ia,Ra[Aa++]=Ba,Ra[Aa++]=_a,_a=e;var r=Ia;e=Ba;var o=32-qt(r)-1;r&=~(1<<o),n+=1;var a=32-qt(t)+o;if(30<a){var i=o-o%5;a=(r&(1<<i)-1).toString(32),r>>=i,o-=i,Ia=1<<32-qt(t)+o|n<<o|r,Ba=a+e}else Ia=1<<a|n<<o|r,Ba=e}function $a(e){null!==e.return&&(Da(e,1),Oa(e,1,0))}function Va(e){for(;e===Fa;)Fa=Ta[--Na],Ta[Na]=null,La=Ta[--Na],Ta[Na]=null;for(;e===_a;)_a=Ra[--Aa],Ra[Aa]=null,Ba=Ra[--Aa],Ra[Aa]=null,Ia=Ra[--Aa],Ra[Aa]=null}var Ua=null,Ha=null,Wa=!1,qa=null;function Qa(e,t){var n=mu(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function Ka(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,Ua=e,Ha=Go(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,Ua=e,Ha=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==_a?{id:Ia,overflow:Ba}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=mu(18,null,null,0)).stateNode=t,n.return=e,e.child=n,Ua=e,Ha=null,!0);default:return!1}}function Ya(e){return!(!(1&e.mode)||128&e.flags)}function Ga(e){if(Wa){var t=Ha;if(t){var n=t;if(!Ka(e,t)){if(Ya(e))throw Error(W(418));t=Go(n.nextSibling);var r=Ua;t&&Ka(e,t)?Qa(r,n):(e.flags=-4097&e.flags|2,Wa=!1,Ua=e)}}else{if(Ya(e))throw Error(W(418));e.flags=-4097&e.flags|2,Wa=!1,Ua=e}}}function Ja(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;Ua=e}function Xa(e){if(e!==Ua)return!1;if(!Wa)return Ja(e),Wa=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!Uo(e.type,e.memoizedProps)),t&&(t=Ha)){if(Ya(e))throw Za(),Error(W(418));for(;t;)Qa(e,t),t=Go(t.nextSibling)}if(Ja(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(W(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){Ha=Go(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}Ha=null}}else Ha=Ua?Go(e.stateNode.nextSibling):null;return!0}function Za(){for(var e=Ha;e;)e=Go(e.nextSibling)}function ei(){Ha=Ua=null,Wa=!1}function ti(e){null===qa?qa=[e]:qa.push(e)}var ni=ie.ReactCurrentBatchConfig;function ri(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(W(309));var r=n.stateNode}if(!r)throw Error(W(147,e));var o=r,a=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===a?t.ref:(t=function(e){var t=o.refs;null===e?delete t[a]:t[a]=e},t._stringRef=a,t)}if("string"!=typeof e)throw Error(W(284));if(!n._owner)throw Error(W(290,e))}return e}function oi(e,t){throw e=Object.prototype.toString.call(t),Error(W(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function ai(e){return(0,e._init)(e._payload)}function ii(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t){return(e=yu(e,t)).index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function i(t){return e&&null===t.alternate&&(t.flags|=2),t}function s(e,t,n,r){return null===t||6!==t.tag?((t=xu(n,e.mode,r)).return=e,t):((t=o(t,n)).return=e,t)}function l(e,t,n,r){var a=n.type;return a===ce?u(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===a||"object"==typeof a&&null!==a&&a.$$typeof===ye&&ai(a)===t.type)?((r=o(t,n.props)).ref=ri(e,t,n),r.return=e,r):((r=vu(n.type,n.key,n.props,null,e.mode,r)).ref=ri(e,t,n),r.return=e,r)}function c(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Su(n,e.mode,r)).return=e,t):((t=o(t,n.children||[])).return=e,t)}function u(e,t,n,r,a){return null===t||7!==t.tag?((t=wu(n,e.mode,r,a)).return=e,t):((t=o(t,n)).return=e,t)}function d(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=xu(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case se:return(n=vu(t.type,t.key,t.props,null,e.mode,n)).ref=ri(e,null,t),n.return=e,n;case le:return(t=Su(t,e.mode,n)).return=e,t;case ye:return d(e,(0,t._init)(t._payload),n)}if($e(t)||ke(t))return(t=wu(t,e.mode,n,null)).return=e,t;oi(e,t)}return null}function p(e,t,n,r){var o=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==o?null:s(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case se:return n.key===o?l(e,t,n,r):null;case le:return n.key===o?c(e,t,n,r):null;case ye:return p(e,t,(o=n._init)(n._payload),r)}if($e(n)||ke(n))return null!==o?null:u(e,t,n,r,null);oi(e,n)}return null}function g(e,t,n,r,o){if("string"==typeof r&&""!==r||"number"==typeof r)return s(t,e=e.get(n)||null,""+r,o);if("object"==typeof r&&null!==r){switch(r.$$typeof){case se:return l(t,e=e.get(null===r.key?n:r.key)||null,r,o);case le:return c(t,e=e.get(null===r.key?n:r.key)||null,r,o);case ye:return g(e,t,n,(0,r._init)(r._payload),o)}if($e(r)||ke(r))return u(t,e=e.get(n)||null,r,o,null);oi(t,r)}return null}function f(o,i,s,l){for(var c=null,u=null,f=i,h=i=0,m=null;null!==f&&h<s.length;h++){f.index>h?(m=f,f=null):m=f.sibling;var b=p(o,f,s[h],l);if(null===b){null===f&&(f=m);break}e&&f&&null===b.alternate&&t(o,f),i=a(b,i,h),null===u?c=b:u.sibling=b,u=b,f=m}if(h===s.length)return n(o,f),Wa&&Da(o,h),c;if(null===f){for(;h<s.length;h++)null!==(f=d(o,s[h],l))&&(i=a(f,i,h),null===u?c=f:u.sibling=f,u=f);return Wa&&Da(o,h),c}for(f=r(o,f);h<s.length;h++)null!==(m=g(f,o,h,s[h],l))&&(e&&null!==m.alternate&&f.delete(null===m.key?h:m.key),i=a(m,i,h),null===u?c=m:u.sibling=m,u=m);return e&&f.forEach(function(e){return t(o,e)}),Wa&&Da(o,h),c}function h(o,i,s,l){var c=ke(s);if("function"!=typeof c)throw Error(W(150));if(null==(s=c.call(s)))throw Error(W(151));for(var u=c=null,f=i,h=i=0,m=null,b=s.next();null!==f&&!b.done;h++,b=s.next()){f.index>h?(m=f,f=null):m=f.sibling;var y=p(o,f,b.value,l);if(null===y){null===f&&(f=m);break}e&&f&&null===y.alternate&&t(o,f),i=a(y,i,h),null===u?c=y:u.sibling=y,u=y,f=m}if(b.done)return n(o,f),Wa&&Da(o,h),c;if(null===f){for(;!b.done;h++,b=s.next())null!==(b=d(o,b.value,l))&&(i=a(b,i,h),null===u?c=b:u.sibling=b,u=b);return Wa&&Da(o,h),c}for(f=r(o,f);!b.done;h++,b=s.next())null!==(b=g(f,o,h,b.value,l))&&(e&&null!==b.alternate&&f.delete(null===b.key?h:b.key),i=a(b,i,h),null===u?c=b:u.sibling=b,u=b);return e&&f.forEach(function(e){return t(o,e)}),Wa&&Da(o,h),c}return function e(r,a,s,l){if("object"==typeof s&&null!==s&&s.type===ce&&null===s.key&&(s=s.props.children),"object"==typeof s&&null!==s){switch(s.$$typeof){case se:e:{for(var c=s.key,u=a;null!==u;){if(u.key===c){if((c=s.type)===ce){if(7===u.tag){n(r,u.sibling),(a=o(u,s.props.children)).return=r,r=a;break e}}else if(u.elementType===c||"object"==typeof c&&null!==c&&c.$$typeof===ye&&ai(c)===u.type){n(r,u.sibling),(a=o(u,s.props)).ref=ri(r,u,s),a.return=r,r=a;break e}n(r,u);break}t(r,u),u=u.sibling}s.type===ce?((a=wu(s.props.children,r.mode,l,s.key)).return=r,r=a):((l=vu(s.type,s.key,s.props,null,r.mode,l)).ref=ri(r,a,s),l.return=r,r=l)}return i(r);case le:e:{for(u=s.key;null!==a;){if(a.key===u){if(4===a.tag&&a.stateNode.containerInfo===s.containerInfo&&a.stateNode.implementation===s.implementation){n(r,a.sibling),(a=o(a,s.children||[])).return=r,r=a;break e}n(r,a);break}t(r,a),a=a.sibling}(a=Su(s,r.mode,l)).return=r,r=a}return i(r);case ye:return e(r,a,(u=s._init)(s._payload),l)}if($e(s))return f(r,a,s,l);if(ke(s))return h(r,a,s,l);oi(r,s)}return"string"==typeof s&&""!==s||"number"==typeof s?(s=""+s,null!==a&&6===a.tag?(n(r,a.sibling),(a=o(a,s)).return=r,r=a):(n(r,a),(a=xu(s,r.mode,l)).return=r,r=a),i(r)):n(r,a)}}var si=ii(!0),li=ii(!1),ci=da(null),ui=null,di=null,pi=null;function gi(){pi=di=ui=null}function fi(e){var t=ci.current;pa(ci),e._currentValue=t}function hi(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function mi(e,t){ui=e,pi=di=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(ol=!0),e.firstContext=null)}function bi(e){var t=e._currentValue;if(pi!==e)if(e={context:e,memoizedValue:t,next:null},null===di){if(null===ui)throw Error(W(308));di=e,ui.dependencies={lanes:0,firstContext:e}}else di=di.next=e;return t}var yi=null;function vi(e){null===yi?yi=[e]:yi.push(e)}function wi(e,t,n,r){var o=t.interleaved;return null===o?(n.next=n,vi(t)):(n.next=o.next,o.next=n),t.interleaved=n,ki(e,r)}function ki(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var xi=!1;function Si(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ci(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Mi(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Pi(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,2&gc){var o=r.pending;return null===o?t.next=t:(t.next=o.next,o.next=t),r.pending=t,ki(e,n)}return null===(o=r.interleaved)?(t.next=t,vi(r)):(t.next=o.next,o.next=t),r.interleaved=t,ki(e,n)}function zi(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,on(e,n)}}function Ei(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var o=null,a=null;if(null!==(n=n.firstBaseUpdate)){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===a?o=a=i:a=a.next=i,n=n.next}while(null!==n);null===a?o=a=t:a=a.next=t}else o=a=t;return n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:a,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function ji(e,t,n,r){var o=e.updateQueue;xi=!1;var a=o.firstBaseUpdate,i=o.lastBaseUpdate,s=o.shared.pending;if(null!==s){o.shared.pending=null;var l=s,c=l.next;l.next=null,null===i?a=c:i.next=c,i=l;var u=e.alternate;null!==u&&((s=(u=u.updateQueue).lastBaseUpdate)!==i&&(null===s?u.firstBaseUpdate=c:s.next=c,u.lastBaseUpdate=l))}if(null!==a){var d=o.baseState;for(i=0,u=c=l=null,s=a;;){var p=s.lane,g=s.eventTime;if((r&p)===p){null!==u&&(u=u.next={eventTime:g,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var f=e,h=s;switch(p=t,g=n,h.tag){case 1:if("function"==typeof(f=h.payload)){d=f.call(g,d,p);break e}d=f;break e;case 3:f.flags=-65537&f.flags|128;case 0:if(null==(p="function"==typeof(f=h.payload)?f.call(g,d,p):f))break e;d=Se({},d,p);break e;case 2:xi=!0}}null!==s.callback&&0!==s.lane&&(e.flags|=64,null===(p=o.effects)?o.effects=[s]:p.push(s))}else g={eventTime:g,lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===u?(c=u=g,l=d):u=u.next=g,i|=p;if(null===(s=s.next)){if(null===(s=o.shared.pending))break;s=(p=s).next,p.next=null,o.lastBaseUpdate=p,o.shared.pending=null}}if(null===u&&(l=d),o.baseState=l,o.firstBaseUpdate=c,o.lastBaseUpdate=u,null!==(t=o.shared.interleaved)){o=t;do{i|=o.lane,o=o.next}while(o!==t)}else null===a&&(o.shared.lanes=0);kc|=i,e.lanes=i,e.memoizedState=d}}function Ti(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(null!==o){if(r.callback=null,r=n,"function"!=typeof o)throw Error(W(191,o));o.call(r)}}}var Ni={},Fi=da(Ni),Li=da(Ni),Ri=da(Ni);function Ai(e){if(e===Ni)throw Error(W(174));return e}function _i(e,t){switch(ga(Ri,t),ga(Li,e),ga(Fi,Ni),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ke(null,"");break;default:t=Ke(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}pa(Fi),ga(Fi,t)}function Ii(){pa(Fi),pa(Li),pa(Ri)}function Bi(e){Ai(Ri.current);var t=Ai(Fi.current),n=Ke(t,e.type);t!==n&&(ga(Li,e),ga(Fi,n))}function Di(e){Li.current===e&&(pa(Fi),pa(Li))}var Oi=da(0);function $i(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(128&t.flags)return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Vi=[];function Ui(){for(var e=0;e<Vi.length;e++)Vi[e]._workInProgressVersionPrimary=null;Vi.length=0}var Hi=ie.ReactCurrentDispatcher,Wi=ie.ReactCurrentBatchConfig,qi=0,Qi=null,Ki=null,Yi=null,Gi=!1,Ji=!1,Xi=0,Zi=0;function es(){throw Error(W(321))}function ts(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Qr(e[n],t[n]))return!1;return!0}function ns(e,t,n,r,o,a){if(qi=a,Qi=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Hi.current=null===e||null===e.memoizedState?Ds:Os,e=n(r,o),Ji){a=0;do{if(Ji=!1,Xi=0,25<=a)throw Error(W(301));a+=1,Yi=Ki=null,t.updateQueue=null,Hi.current=$s,e=n(r,o)}while(Ji)}if(Hi.current=Bs,t=null!==Ki&&null!==Ki.next,qi=0,Yi=Ki=Qi=null,Gi=!1,t)throw Error(W(300));return e}function rs(){var e=0!==Xi;return Xi=0,e}function os(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Yi?Qi.memoizedState=Yi=e:Yi=Yi.next=e,Yi}function as(){if(null===Ki){var e=Qi.alternate;e=null!==e?e.memoizedState:null}else e=Ki.next;var t=null===Yi?Qi.memoizedState:Yi.next;if(null!==t)Yi=t,Ki=e;else{if(null===e)throw Error(W(310));e={memoizedState:(Ki=e).memoizedState,baseState:Ki.baseState,baseQueue:Ki.baseQueue,queue:Ki.queue,next:null},null===Yi?Qi.memoizedState=Yi=e:Yi=Yi.next=e}return Yi}function is(e,t){return"function"==typeof t?t(e):t}function ss(e){var t=as(),n=t.queue;if(null===n)throw Error(W(311));n.lastRenderedReducer=e;var r=Ki,o=r.baseQueue,a=n.pending;if(null!==a){if(null!==o){var i=o.next;o.next=a.next,a.next=i}r.baseQueue=o=a,n.pending=null}if(null!==o){a=o.next,r=r.baseState;var s=i=null,l=null,c=a;do{var u=c.lane;if((qi&u)===u)null!==l&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var d={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};null===l?(s=l=d,i=r):l=l.next=d,Qi.lanes|=u,kc|=u}c=c.next}while(null!==c&&c!==a);null===l?i=r:l.next=s,Qr(r,t.memoizedState)||(ol=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=l,n.lastRenderedState=r}if(null!==(e=n.interleaved)){o=e;do{a=o.lane,Qi.lanes|=a,kc|=a,o=o.next}while(o!==e)}else null===o&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function ls(e){var t=as(),n=t.queue;if(null===n)throw Error(W(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,a=t.memoizedState;if(null!==o){n.pending=null;var i=o=o.next;do{a=e(a,i.action),i=i.next}while(i!==o);Qr(a,t.memoizedState)||(ol=!0),t.memoizedState=a,null===t.baseQueue&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function cs(){}function us(e,t){var n=Qi,r=as(),o=t(),a=!Qr(r.memoizedState,o);if(a&&(r.memoizedState=o,ol=!0),r=r.queue,xs(gs.bind(null,n,r,e),[e]),r.getSnapshot!==t||a||null!==Yi&&1&Yi.memoizedState.tag){if(n.flags|=2048,bs(9,ps.bind(null,n,r,o,t),void 0,null),null===fc)throw Error(W(349));30&qi||ds(n,t,o)}return o}function ds(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=Qi.updateQueue)?(t={lastEffect:null,stores:null},Qi.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function ps(e,t,n,r){t.value=n,t.getSnapshot=r,fs(t)&&hs(e)}function gs(e,t,n){return n(function(){fs(t)&&hs(e)})}function fs(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Qr(e,n)}catch(e){return!0}}function hs(e){var t=ki(e,1);null!==t&&$c(t,e,1,-1)}function ms(e){var t=os();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:is,lastRenderedState:e},t.queue=e,e=e.dispatch=Rs.bind(null,Qi,e),[t.memoizedState,e]}function bs(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=Qi.updateQueue)?(t={lastEffect:null,stores:null},Qi.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function ys(){return as().memoizedState}function vs(e,t,n,r){var o=os();Qi.flags|=e,o.memoizedState=bs(1|t,n,void 0,void 0===r?null:r)}function ws(e,t,n,r){var o=as();r=void 0===r?null:r;var a=void 0;if(null!==Ki){var i=Ki.memoizedState;if(a=i.destroy,null!==r&&ts(r,i.deps))return void(o.memoizedState=bs(t,n,a,r))}Qi.flags|=e,o.memoizedState=bs(1|t,n,a,r)}function ks(e,t){return vs(8390656,8,e,t)}function xs(e,t){return ws(2048,8,e,t)}function Ss(e,t){return ws(4,2,e,t)}function Cs(e,t){return ws(4,4,e,t)}function Ms(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Ps(e,t,n){return n=null!=n?n.concat([e]):null,ws(4,4,Ms.bind(null,t,e),n)}function zs(){}function Es(e,t){var n=as();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&ts(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function js(e,t){var n=as();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&ts(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Ts(e,t,n){return 21&qi?(Qr(n,t)||(n=tn(),Qi.lanes|=n,kc|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,ol=!0),e.memoizedState=n)}function Ns(e,t){var n=an;an=0!==n&&4>n?n:4,e(!0);var r=Wi.transition;Wi.transition={};try{e(!1),t()}finally{an=n,Wi.transition=r}}function Fs(){return as().memoizedState}function Ls(e,t,n){var r=Oc(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},As(e))_s(t,n);else if(null!==(n=wi(e,t,n,r))){$c(n,e,r,Dc()),Is(n,t,r)}}function Rs(e,t,n){var r=Oc(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(As(e))_s(t,o);else{var a=e.alternate;if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var i=t.lastRenderedState,s=a(i,n);if(o.hasEagerState=!0,o.eagerState=s,Qr(s,i)){var l=t.interleaved;return null===l?(o.next=o,vi(t)):(o.next=l.next,l.next=o),void(t.interleaved=o)}}catch(e){}null!==(n=wi(e,t,o,r))&&($c(n,e,r,o=Dc()),Is(n,t,r))}}function As(e){var t=e.alternate;return e===Qi||null!==t&&t===Qi}function _s(e,t){Ji=Gi=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Is(e,t,n){if(4194240&n){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,on(e,n)}}var Bs={readContext:bi,useCallback:es,useContext:es,useEffect:es,useImperativeHandle:es,useInsertionEffect:es,useLayoutEffect:es,useMemo:es,useReducer:es,useRef:es,useState:es,useDebugValue:es,useDeferredValue:es,useTransition:es,useMutableSource:es,useSyncExternalStore:es,useId:es,unstable_isNewReconciler:!1},Ds={readContext:bi,useCallback:function(e,t){return os().memoizedState=[e,void 0===t?null:t],e},useContext:bi,useEffect:ks,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,vs(4194308,4,Ms.bind(null,t,e),n)},useLayoutEffect:function(e,t){return vs(4194308,4,e,t)},useInsertionEffect:function(e,t){return vs(4,2,e,t)},useMemo:function(e,t){var n=os();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=os();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Ls.bind(null,Qi,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},os().memoizedState=e},useState:ms,useDebugValue:zs,useDeferredValue:function(e){return os().memoizedState=e},useTransition:function(){var e=ms(!1),t=e[0];return e=Ns.bind(null,e[1]),os().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Qi,o=os();if(Wa){if(void 0===n)throw Error(W(407));n=n()}else{if(n=t(),null===fc)throw Error(W(349));30&qi||ds(r,t,n)}o.memoizedState=n;var a={value:n,getSnapshot:t};return o.queue=a,ks(gs.bind(null,r,a,e),[e]),r.flags|=2048,bs(9,ps.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=os(),t=fc.identifierPrefix;if(Wa){var n=Ba;t=":"+t+"R"+(n=(Ia&~(1<<32-qt(Ia)-1)).toString(32)+n),0<(n=Xi++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=Zi++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Os={readContext:bi,useCallback:Es,useContext:bi,useEffect:xs,useImperativeHandle:Ps,useInsertionEffect:Ss,useLayoutEffect:Cs,useMemo:js,useReducer:ss,useRef:ys,useState:function(){return ss(is)},useDebugValue:zs,useDeferredValue:function(e){return Ts(as(),Ki.memoizedState,e)},useTransition:function(){return[ss(is)[0],as().memoizedState]},useMutableSource:cs,useSyncExternalStore:us,useId:Fs,unstable_isNewReconciler:!1},$s={readContext:bi,useCallback:Es,useContext:bi,useEffect:xs,useImperativeHandle:Ps,useInsertionEffect:Ss,useLayoutEffect:Cs,useMemo:js,useReducer:ls,useRef:ys,useState:function(){return ls(is)},useDebugValue:zs,useDeferredValue:function(e){var t=as();return null===Ki?t.memoizedState=e:Ts(t,Ki.memoizedState,e)},useTransition:function(){return[ls(is)[0],as().memoizedState]},useMutableSource:cs,useSyncExternalStore:us,useId:Fs,unstable_isNewReconciler:!1};function Vs(e,t){if(e&&e.defaultProps){for(var n in t=Se({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function Us(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:Se({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var Hs={isMounted:function(e){return!!(e=e._reactInternals)&&Et(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Dc(),o=Oc(e),a=Mi(r,o);a.payload=t,null!=n&&(a.callback=n),null!==(t=Pi(e,a,o))&&($c(t,e,o,r),zi(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Dc(),o=Oc(e),a=Mi(r,o);a.tag=1,a.payload=t,null!=n&&(a.callback=n),null!==(t=Pi(e,a,o))&&($c(t,e,o,r),zi(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Dc(),r=Oc(e),o=Mi(n,r);o.tag=2,null!=t&&(o.callback=t),null!==(t=Pi(e,o,r))&&($c(t,e,r,n),zi(t,e,r))}};function Ws(e,t,n,r,o,a,i){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,a,i):!t.prototype||!t.prototype.isPureReactComponent||(!Kr(n,r)||!Kr(o,a))}function qs(e,t,n){var r=!1,o=fa,a=t.contextType;return"object"==typeof a&&null!==a?a=bi(a):(o=va(t)?ba:ha.current,a=(r=null!=(r=t.contextTypes))?ya(e,o):fa),t=new t(n,a),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=Hs,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=a),t}function Qs(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Hs.enqueueReplaceState(t,t.state,null)}function Ks(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs={},Si(e);var a=t.contextType;"object"==typeof a&&null!==a?o.context=bi(a):(a=va(t)?ba:ha.current,o.context=ya(e,a)),o.state=e.memoizedState,"function"==typeof(a=t.getDerivedStateFromProps)&&(Us(e,t,a,n),o.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof o.getSnapshotBeforeUpdate||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||(t=o.state,"function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),t!==o.state&&Hs.enqueueReplaceState(o,o.state,null),ji(e,n,o,r),o.state=e.memoizedState),"function"==typeof o.componentDidMount&&(e.flags|=4194308)}function Ys(e,t){try{var n="",r=t;do{n+=ze(r),r=r.return}while(r);var o=n}catch(e){o="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:o,digest:null}}function Gs(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}var Js="function"==typeof WeakMap?WeakMap:Map;function Xs(e,t,n){(n=Mi(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){jc||(jc=!0,Tc=r)},n}function Zs(e,t,n){(n=Mi(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){}}var a=e.stateNode;return null!==a&&"function"==typeof a.componentDidCatch&&(n.callback=function(){"function"!=typeof r&&(null===Nc?Nc=new Set([this]):Nc.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function el(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new Js;var o=new Set;r.set(t,o)}else void 0===(o=r.get(t))&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=uu.bind(null,e,t,n),t.then(e,e))}function tl(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function nl(e,t,n,r,o){return 1&e.mode?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Mi(-1,1)).tag=2,Pi(n,t,1))),n.lanes|=1),e)}var rl=ie.ReactCurrentOwner,ol=!1;function al(e,t,n,r){t.child=null===e?li(t,null,n,r):si(t,e.child,n,r)}function il(e,t,n,r,o){n=n.render;var a=t.ref;return mi(t,o),r=ns(e,t,n,r,a,o),n=rs(),null===e||ol?(Wa&&n&&$a(t),t.flags|=1,al(e,t,r,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,jl(e,t,o))}function sl(e,t,n,r,o){if(null===e){var a=n.type;return"function"!=typeof a||bu(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=vu(n.type,null,r,t,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,ll(e,t,a,r,o))}if(a=e.child,0===(e.lanes&o)){var i=a.memoizedProps;if((n=null!==(n=n.compare)?n:Kr)(i,r)&&e.ref===t.ref)return jl(e,t,o)}return t.flags|=1,(e=yu(a,r)).ref=t.ref,e.return=t,t.child=e}function ll(e,t,n,r,o){if(null!==e){var a=e.memoizedProps;if(Kr(a,r)&&e.ref===t.ref){if(ol=!1,t.pendingProps=r=a,0===(e.lanes&o))return t.lanes=e.lanes,jl(e,t,o);131072&e.flags&&(ol=!0)}}return dl(e,t,n,r,o)}function cl(e,t,n){var r=t.pendingProps,o=r.children,a=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(1&t.mode){if(!(1073741824&n))return e=null!==a?a.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ga(yc,bc),bc|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==a?a.baseLanes:n,ga(yc,bc),bc|=r}else t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ga(yc,bc),bc|=n;else null!==a?(r=a.baseLanes|n,t.memoizedState=null):r=n,ga(yc,bc),bc|=r;return al(e,t,o,n),t.child}function ul(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function dl(e,t,n,r,o){var a=va(n)?ba:ha.current;return a=ya(t,a),mi(t,o),n=ns(e,t,n,r,a,o),r=rs(),null===e||ol?(Wa&&r&&$a(t),t.flags|=1,al(e,t,n,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,jl(e,t,o))}function pl(e,t,n,r,o){if(va(n)){var a=!0;Sa(t)}else a=!1;if(mi(t,o),null===t.stateNode)El(e,t),qs(t,n,r),Ks(t,n,r,o),r=!0;else if(null===e){var i=t.stateNode,s=t.memoizedProps;i.props=s;var l=i.context,c=n.contextType;"object"==typeof c&&null!==c?c=bi(c):c=ya(t,c=va(n)?ba:ha.current);var u=n.getDerivedStateFromProps,d="function"==typeof u||"function"==typeof i.getSnapshotBeforeUpdate;d||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||(s!==r||l!==c)&&Qs(t,i,r,c),xi=!1;var p=t.memoizedState;i.state=p,ji(t,r,i,o),l=t.memoizedState,s!==r||p!==l||ma.current||xi?("function"==typeof u&&(Us(t,n,u,r),l=t.memoizedState),(s=xi||Ws(t,n,s,r,p,l,c))?(d||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||("function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount()),"function"==typeof i.componentDidMount&&(t.flags|=4194308)):("function"==typeof i.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),i.props=r,i.state=l,i.context=c,r=s):("function"==typeof i.componentDidMount&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,Ci(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:Vs(t.type,s),i.props=c,d=t.pendingProps,p=i.context,"object"==typeof(l=n.contextType)&&null!==l?l=bi(l):l=ya(t,l=va(n)?ba:ha.current);var g=n.getDerivedStateFromProps;(u="function"==typeof g||"function"==typeof i.getSnapshotBeforeUpdate)||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||(s!==d||p!==l)&&Qs(t,i,r,l),xi=!1,p=t.memoizedState,i.state=p,ji(t,r,i,o);var f=t.memoizedState;s!==d||p!==f||ma.current||xi?("function"==typeof g&&(Us(t,n,g,r),f=t.memoizedState),(c=xi||Ws(t,n,c,r,p,f,l)||!1)?(u||"function"!=typeof i.UNSAFE_componentWillUpdate&&"function"!=typeof i.componentWillUpdate||("function"==typeof i.componentWillUpdate&&i.componentWillUpdate(r,f,l),"function"==typeof i.UNSAFE_componentWillUpdate&&i.UNSAFE_componentWillUpdate(r,f,l)),"function"==typeof i.componentDidUpdate&&(t.flags|=4),"function"==typeof i.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof i.componentDidUpdate||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),"function"!=typeof i.getSnapshotBeforeUpdate||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=f),i.props=r,i.state=f,i.context=l,r=c):("function"!=typeof i.componentDidUpdate||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),"function"!=typeof i.getSnapshotBeforeUpdate||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),r=!1)}return gl(e,t,n,r,a,o)}function gl(e,t,n,r,o,a){ul(e,t);var i=!!(128&t.flags);if(!r&&!i)return o&&Ca(t,n,!1),jl(e,t,a);r=t.stateNode,rl.current=t;var s=i&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&i?(t.child=si(t,e.child,null,a),t.child=si(t,null,s,a)):al(e,t,s,a),t.memoizedState=r.state,o&&Ca(t,n,!0),t.child}function fl(e){var t=e.stateNode;t.pendingContext?ka(0,t.pendingContext,t.pendingContext!==t.context):t.context&&ka(0,t.context,!1),_i(e,t.containerInfo)}function hl(e,t,n,r,o){return ei(),ti(o),t.flags|=256,al(e,t,n,r),t.child}var ml,bl,yl,vl,wl={dehydrated:null,treeContext:null,retryLane:0};function kl(e){return{baseLanes:e,cachePool:null,transitions:null}}function xl(e,t,n){var r,o=t.pendingProps,a=Oi.current,i=!1,s=!!(128&t.flags);if((r=s)||(r=(null===e||null!==e.memoizedState)&&!!(2&a)),r?(i=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(a|=1),ga(Oi,1&a),null===e)return Ga(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(1&t.mode?"$!"===e.data?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=o.children,e=o.fallback,i?(o=t.mode,i=t.child,s={mode:"hidden",children:s},1&o||null===i?i=ku(s,o,0,null):(i.childLanes=0,i.pendingProps=s),e=wu(e,o,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=kl(n),t.memoizedState=wl,e):Sl(t,s));if(null!==(a=e.memoizedState)&&null!==(r=a.dehydrated))return function(e,t,n,r,o,a,i){if(n)return 256&t.flags?(t.flags&=-257,Cl(e,t,i,r=Gs(Error(W(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(a=r.fallback,o=t.mode,r=ku({mode:"visible",children:r.children},o,0,null),(a=wu(a,o,i,null)).flags|=2,r.return=t,a.return=t,r.sibling=a,t.child=r,1&t.mode&&si(t,e.child,null,i),t.child.memoizedState=kl(i),t.memoizedState=wl,a);if(!(1&t.mode))return Cl(e,t,i,null);if("$!"===o.data){if(r=o.nextSibling&&o.nextSibling.dataset)var s=r.dgst;return r=s,Cl(e,t,i,r=Gs(a=Error(W(419)),r,void 0))}if(s=0!==(i&e.childLanes),ol||s){if(null!==(r=fc)){switch(i&-i){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}0!==(o=0!==(o&(r.suspendedLanes|i))?0:o)&&o!==a.retryLane&&(a.retryLane=o,ki(e,o),$c(r,e,o,-1))}return eu(),Cl(e,t,i,r=Gs(Error(W(421))))}return"$?"===o.data?(t.flags|=128,t.child=e.child,t=pu.bind(null,e),o._reactRetry=t,null):(e=a.treeContext,Ha=Go(o.nextSibling),Ua=t,Wa=!0,qa=null,null!==e&&(Ra[Aa++]=Ia,Ra[Aa++]=Ba,Ra[Aa++]=_a,Ia=e.id,Ba=e.overflow,_a=t),t=Sl(t,r.children),t.flags|=4096,t)}(e,t,s,o,r,a,n);if(i){i=o.fallback,s=t.mode,r=(a=e.child).sibling;var l={mode:"hidden",children:o.children};return 1&s||t.child===a?(o=yu(a,l)).subtreeFlags=14680064&a.subtreeFlags:((o=t.child).childLanes=0,o.pendingProps=l,t.deletions=null),null!==r?i=yu(r,i):(i=wu(i,s,n,null)).flags|=2,i.return=t,o.return=t,o.sibling=i,t.child=o,o=i,i=t.child,s=null===(s=e.child.memoizedState)?kl(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},i.memoizedState=s,i.childLanes=e.childLanes&~n,t.memoizedState=wl,o}return e=(i=e.child).sibling,o=yu(i,{mode:"visible",children:o.children}),!(1&t.mode)&&(o.lanes=n),o.return=t,o.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=o,t.memoizedState=null,o}function Sl(e,t){return(t=ku({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Cl(e,t,n,r){return null!==r&&ti(r),si(t,e.child,null,n),(e=Sl(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Ml(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),hi(e.return,t,n)}function Pl(e,t,n,r,o){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=o)}function zl(e,t,n){var r=t.pendingProps,o=r.revealOrder,a=r.tail;if(al(e,t,r.children,n),2&(r=Oi.current))r=1&r|2,t.flags|=128;else{if(null!==e&&128&e.flags)e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Ml(e,n,t);else if(19===e.tag)Ml(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(ga(Oi,r),1&t.mode)switch(o){case"forwards":for(n=t.child,o=null;null!==n;)null!==(e=n.alternate)&&null===$i(e)&&(o=n),n=n.sibling;null===(n=o)?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Pl(t,!1,o,n,a);break;case"backwards":for(n=null,o=t.child,t.child=null;null!==o;){if(null!==(e=o.alternate)&&null===$i(e)){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Pl(t,!0,n,null,a);break;case"together":Pl(t,!1,null,null,void 0);break;default:t.memoizedState=null}else t.memoizedState=null;return t.child}function El(e,t){!(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function jl(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),kc|=t.lanes,0===(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(W(153));if(null!==t.child){for(n=yu(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=yu(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Tl(e,t){if(!Wa)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Nl(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=14680064&o.subtreeFlags,r|=14680064&o.flags,o.return=e,o=o.sibling;else for(o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Fl(e,t,n){var r=t.pendingProps;switch(Va(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Nl(t),null;case 1:case 17:return va(t.type)&&wa(),Nl(t),null;case 3:return r=t.stateNode,Ii(),pa(ma),pa(ha),Ui(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(Xa(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&!(256&t.flags)||(t.flags|=1024,null!==qa&&(Wc(qa),qa=null))),bl(e,t),Nl(t),null;case 5:Di(t);var o=Ai(Ri.current);if(n=t.type,null!==e&&null!=t.stateNode)yl(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(W(166));return Nl(t),null}if(e=Ai(Fi.current),Xa(t)){r=t.stateNode,n=t.type;var a=t.memoizedProps;switch(r[Zo]=t,r[ea]=a,e=!!(1&t.mode),n){case"dialog":Po("cancel",r),Po("close",r);break;case"iframe":case"object":case"embed":Po("load",r);break;case"video":case"audio":for(o=0;o<xo.length;o++)Po(xo[o],r);break;case"source":Po("error",r);break;case"img":case"image":case"link":Po("error",r),Po("load",r);break;case"details":Po("toggle",r);break;case"input":_e(r,a),Po("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!a.multiple},Po("invalid",r);break;case"textarea":He(r,a),Po("invalid",r)}for(var i in ot(n,a),o=null,a)if(a.hasOwnProperty(i)){var s=a[i];"children"===i?"string"==typeof s?r.textContent!==s&&(!0!==a.suppressHydrationWarning&&Do(r.textContent,s,e),o=["children",s]):"number"==typeof s&&r.textContent!==""+s&&(!0!==a.suppressHydrationWarning&&Do(r.textContent,s,e),o=["children",""+s]):Q.hasOwnProperty(i)&&null!=s&&"onScroll"===i&&Po("scroll",r)}switch(n){case"input":Fe(r),De(r,a,!0);break;case"textarea":Fe(r),qe(r);break;case"select":case"option":break;default:"function"==typeof a.onClick&&(r.onclick=Oo)}r=o,t.updateQueue=r,null!==r&&(t.flags|=4)}else{i=9===o.nodeType?o:o.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=Qe(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=i.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),"select"===n&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[Zo]=t,e[ea]=r,ml(e,t,!1,!1),t.stateNode=e;e:{switch(i=at(n,r),n){case"dialog":Po("cancel",e),Po("close",e),o=r;break;case"iframe":case"object":case"embed":Po("load",e),o=r;break;case"video":case"audio":for(o=0;o<xo.length;o++)Po(xo[o],e);o=r;break;case"source":Po("error",e),o=r;break;case"img":case"image":case"link":Po("error",e),Po("load",e),o=r;break;case"details":Po("toggle",e),o=r;break;case"input":_e(e,r),o=Ae(e,r),Po("invalid",e);break;case"option":default:o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=Se({},r,{value:void 0}),Po("invalid",e);break;case"textarea":He(e,r),o=Ue(e,r),Po("invalid",e)}for(a in ot(n,o),s=o)if(s.hasOwnProperty(a)){var l=s[a];"style"===a?nt(e,l):"dangerouslySetInnerHTML"===a?null!=(l=l?l.__html:void 0)&&Je(e,l):"children"===a?"string"==typeof l?("textarea"!==n||""!==l)&&Xe(e,l):"number"==typeof l&&Xe(e,""+l):"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&"autoFocus"!==a&&(Q.hasOwnProperty(a)?null!=l&&"onScroll"===a&&Po("scroll",e):null!=l&&ae(e,a,l,i))}switch(n){case"input":Fe(e),De(e,r,!1);break;case"textarea":Fe(e),qe(e);break;case"option":null!=r.value&&e.setAttribute("value",""+Te(r.value));break;case"select":e.multiple=!!r.multiple,null!=(a=r.value)?Ve(e,!!r.multiple,a,!1):null!=r.defaultValue&&Ve(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof o.onClick&&(e.onclick=Oo)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Nl(t),null;case 6:if(e&&null!=t.stateNode)vl(e,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(W(166));if(n=Ai(Ri.current),Ai(Fi.current),Xa(t)){if(r=t.stateNode,n=t.memoizedProps,r[Zo]=t,(a=r.nodeValue!==n)&&null!==(e=Ua))switch(e.tag){case 3:Do(r.nodeValue,n,!!(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Do(r.nodeValue,n,!!(1&e.mode))}a&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[Zo]=t,t.stateNode=r}return Nl(t),null;case 13:if(pa(Oi),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(Wa&&null!==Ha&&1&t.mode&&!(128&t.flags))Za(),ei(),t.flags|=98560,a=!1;else if(a=Xa(t),null!==r&&null!==r.dehydrated){if(null===e){if(!a)throw Error(W(318));if(!(a=null!==(a=t.memoizedState)?a.dehydrated:null))throw Error(W(317));a[Zo]=t}else ei(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Nl(t),a=!1}else null!==qa&&(Wc(qa),qa=null),a=!0;if(!a)return 65536&t.flags?t:null}return 128&t.flags?(t.lanes=n,t):((r=null!==r)!==(null!==e&&null!==e.memoizedState)&&r&&(t.child.flags|=8192,1&t.mode&&(null===e||1&Oi.current?0===vc&&(vc=3):eu())),null!==t.updateQueue&&(t.flags|=4),Nl(t),null);case 4:return Ii(),bl(e,t),null===e&&jo(t.stateNode.containerInfo),Nl(t),null;case 10:return fi(t.type._context),Nl(t),null;case 19:if(pa(Oi),null===(a=t.memoizedState))return Nl(t),null;if(r=!!(128&t.flags),null===(i=a.rendering))if(r)Tl(a,!1);else{if(0!==vc||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(i=$i(e))){for(t.flags|=128,Tl(a,!1),null!==(r=i.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(a=n).flags&=14680066,null===(i=a.alternate)?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=i.childLanes,a.lanes=i.lanes,a.child=i.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=i.memoizedProps,a.memoizedState=i.memoizedState,a.updateQueue=i.updateQueue,a.type=i.type,e=i.dependencies,a.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return ga(Oi,1&Oi.current|2),t.child}e=e.sibling}null!==a.tail&&It()>zc&&(t.flags|=128,r=!0,Tl(a,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=$i(i))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),Tl(a,!0),null===a.tail&&"hidden"===a.tailMode&&!i.alternate&&!Wa)return Nl(t),null}else 2*It()-a.renderingStartTime>zc&&1073741824!==n&&(t.flags|=128,r=!0,Tl(a,!1),t.lanes=4194304);a.isBackwards?(i.sibling=t.child,t.child=i):(null!==(n=a.last)?n.sibling=i:t.child=i,a.last=i)}return null!==a.tail?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=It(),t.sibling=null,n=Oi.current,ga(Oi,r?1&n|2:1&n),t):(Nl(t),null);case 22:case 23:return Gc(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&1&t.mode?!!(1073741824&bc)&&(Nl(t),6&t.subtreeFlags&&(t.flags|=8192)):Nl(t),null;case 24:case 25:return null}throw Error(W(156,t.tag))}function Ll(e,t){switch(Va(t),t.tag){case 1:return va(t.type)&&wa(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Ii(),pa(ma),pa(ha),Ui(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 5:return Di(t),null;case 13:if(pa(Oi),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(W(340));ei()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return pa(Oi),null;case 4:return Ii(),null;case 10:return fi(t.type._context),null;case 22:case 23:return Gc(),null;default:return null}}ml=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},bl=function(){},yl=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Ai(Fi.current);var a,i=null;switch(n){case"input":o=Ae(e,o),r=Ae(e,r),i=[];break;case"select":o=Se({},o,{value:void 0}),r=Se({},r,{value:void 0}),i=[];break;case"textarea":o=Ue(e,o),r=Ue(e,r),i=[];break;default:"function"!=typeof o.onClick&&"function"==typeof r.onClick&&(e.onclick=Oo)}for(c in ot(n,r),n=null,o)if(!r.hasOwnProperty(c)&&o.hasOwnProperty(c)&&null!=o[c])if("style"===c){var s=o[c];for(a in s)s.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else"dangerouslySetInnerHTML"!==c&&"children"!==c&&"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&"autoFocus"!==c&&(Q.hasOwnProperty(c)?i||(i=[]):(i=i||[]).push(c,null));for(c in r){var l=r[c];if(s=null!=o?o[c]:void 0,r.hasOwnProperty(c)&&l!==s&&(null!=l||null!=s))if("style"===c)if(s){for(a in s)!s.hasOwnProperty(a)||l&&l.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in l)l.hasOwnProperty(a)&&s[a]!==l[a]&&(n||(n={}),n[a]=l[a])}else n||(i||(i=[]),i.push(c,n)),n=l;else"dangerouslySetInnerHTML"===c?(l=l?l.__html:void 0,s=s?s.__html:void 0,null!=l&&s!==l&&(i=i||[]).push(c,l)):"children"===c?"string"!=typeof l&&"number"!=typeof l||(i=i||[]).push(c,""+l):"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&(Q.hasOwnProperty(c)?(null!=l&&"onScroll"===c&&Po("scroll",e),i||s===l||(i=[])):(i=i||[]).push(c,l))}n&&(i=i||[]).push("style",n);var c=i;(t.updateQueue=c)&&(t.flags|=4)}},vl=function(e,t,n,r){n!==r&&(t.flags|=4)};var Rl=!1,Al=!1,_l="function"==typeof WeakSet?WeakSet:Set,Il=null;function Bl(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(n){cu(e,t,n)}else n.current=null}function Dl(e,t,n){try{n()}catch(n){cu(e,t,n)}}var Ol=!1;function $l(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var o=r=r.next;do{if((o.tag&e)===e){var a=o.destroy;o.destroy=void 0,void 0!==a&&Dl(t,n,a)}o=o.next}while(o!==r)}}function Vl(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Ul(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"==typeof t?t(e):t.current=e}}function Hl(e){var t=e.alternate;null!==t&&(e.alternate=null,Hl(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[Zo],delete t[ea],delete t[na],delete t[ra],delete t[oa])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Wl(e){return 5===e.tag||3===e.tag||4===e.tag}function ql(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||Wl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function Ql(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=Oo));else if(4!==r&&null!==(e=e.child))for(Ql(e,t,n),e=e.sibling;null!==e;)Ql(e,t,n),e=e.sibling}function Kl(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(Kl(e,t,n),e=e.sibling;null!==e;)Kl(e,t,n),e=e.sibling}var Yl=null,Gl=!1;function Jl(e,t,n){for(n=n.child;null!==n;)Xl(e,t,n),n=n.sibling}function Xl(e,t,n){if(Wt&&"function"==typeof Wt.onCommitFiberUnmount)try{Wt.onCommitFiberUnmount(Ht,n)}catch(e){}switch(n.tag){case 5:Al||Bl(n,t);case 6:var r=Yl,o=Gl;Yl=null,Jl(e,t,n),Gl=o,null!==(Yl=r)&&(Gl?(e=Yl,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):Yl.removeChild(n.stateNode));break;case 18:null!==Yl&&(Gl?(e=Yl,n=n.stateNode,8===e.nodeType?Yo(e.parentNode,n):1===e.nodeType&&Yo(e,n),jn(e)):Yo(Yl,n.stateNode));break;case 4:r=Yl,o=Gl,Yl=n.stateNode.containerInfo,Gl=!0,Jl(e,t,n),Yl=r,Gl=o;break;case 0:case 11:case 14:case 15:if(!Al&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){o=r=r.next;do{var a=o,i=a.destroy;a=a.tag,void 0!==i&&(2&a||4&a)&&Dl(n,t,i),o=o.next}while(o!==r)}Jl(e,t,n);break;case 1:if(!Al&&(Bl(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){cu(n,t,e)}Jl(e,t,n);break;case 21:Jl(e,t,n);break;case 22:1&n.mode?(Al=(r=Al)||null!==n.memoizedState,Jl(e,t,n),Al=r):Jl(e,t,n);break;default:Jl(e,t,n)}}function Zl(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new _l),t.forEach(function(t){var r=gu.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))})}}function ec(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var o=n[r];try{var a=e,i=t,s=i;e:for(;null!==s;){switch(s.tag){case 5:Yl=s.stateNode,Gl=!1;break e;case 3:case 4:Yl=s.stateNode.containerInfo,Gl=!0;break e}s=s.return}if(null===Yl)throw Error(W(160));Xl(a,i,o),Yl=null,Gl=!1;var l=o.alternate;null!==l&&(l.return=null),o.return=null}catch(e){cu(o,t,e)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)tc(t,e),t=t.sibling}function tc(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(ec(t,e),nc(e),4&r){try{$l(3,e,e.return),Vl(3,e)}catch(t){cu(e,e.return,t)}try{$l(5,e,e.return)}catch(t){cu(e,e.return,t)}}break;case 1:ec(t,e),nc(e),512&r&&null!==n&&Bl(n,n.return);break;case 5:if(ec(t,e),nc(e),512&r&&null!==n&&Bl(n,n.return),32&e.flags){var o=e.stateNode;try{Xe(o,"")}catch(t){cu(e,e.return,t)}}if(4&r&&null!=(o=e.stateNode)){var a=e.memoizedProps,i=null!==n?n.memoizedProps:a,s=e.type,l=e.updateQueue;if(e.updateQueue=null,null!==l)try{"input"===s&&"radio"===a.type&&null!=a.name&&Ie(o,a),at(s,i);var c=at(s,a);for(i=0;i<l.length;i+=2){var u=l[i],d=l[i+1];"style"===u?nt(o,d):"dangerouslySetInnerHTML"===u?Je(o,d):"children"===u?Xe(o,d):ae(o,u,d,c)}switch(s){case"input":Be(o,a);break;case"textarea":We(o,a);break;case"select":var p=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!a.multiple;var g=a.value;null!=g?Ve(o,!!a.multiple,g,!1):p!==!!a.multiple&&(null!=a.defaultValue?Ve(o,!!a.multiple,a.defaultValue,!0):Ve(o,!!a.multiple,a.multiple?[]:"",!1))}o[ea]=a}catch(t){cu(e,e.return,t)}}break;case 6:if(ec(t,e),nc(e),4&r){if(null===e.stateNode)throw Error(W(162));o=e.stateNode,a=e.memoizedProps;try{o.nodeValue=a}catch(t){cu(e,e.return,t)}}break;case 3:if(ec(t,e),nc(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{jn(t.containerInfo)}catch(t){cu(e,e.return,t)}break;case 4:default:ec(t,e),nc(e);break;case 13:ec(t,e),nc(e),8192&(o=e.child).flags&&(a=null!==o.memoizedState,o.stateNode.isHidden=a,!a||null!==o.alternate&&null!==o.alternate.memoizedState||(Pc=It())),4&r&&Zl(e);break;case 22:if(u=null!==n&&null!==n.memoizedState,1&e.mode?(Al=(c=Al)||u,ec(t,e),Al=c):ec(t,e),nc(e),8192&r){if(c=null!==e.memoizedState,(e.stateNode.isHidden=c)&&!u&&1&e.mode)for(Il=e,u=e.child;null!==u;){for(d=Il=u;null!==Il;){switch(g=(p=Il).child,p.tag){case 0:case 11:case 14:case 15:$l(4,p,p.return);break;case 1:Bl(p,p.return);var f=p.stateNode;if("function"==typeof f.componentWillUnmount){r=p,n=p.return;try{t=r,f.props=t.memoizedProps,f.state=t.memoizedState,f.componentWillUnmount()}catch(e){cu(r,n,e)}}break;case 5:Bl(p,p.return);break;case 22:if(null!==p.memoizedState){ic(d);continue}}null!==g?(g.return=p,Il=g):ic(d)}u=u.sibling}e:for(u=null,d=e;;){if(5===d.tag){if(null===u){u=d;try{o=d.stateNode,c?"function"==typeof(a=o.style).setProperty?a.setProperty("display","none","important"):a.display="none":(s=d.stateNode,i=null!=(l=d.memoizedProps.style)&&l.hasOwnProperty("display")?l.display:null,s.style.display=tt("display",i))}catch(t){cu(e,e.return,t)}}}else if(6===d.tag){if(null===u)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(t){cu(e,e.return,t)}}else if((22!==d.tag&&23!==d.tag||null===d.memoizedState||d===e)&&null!==d.child){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;null===d.sibling;){if(null===d.return||d.return===e)break e;u===d&&(u=null),d=d.return}u===d&&(u=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:ec(t,e),nc(e),4&r&&Zl(e);case 21:}}function nc(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(Wl(n)){var r=n;break e}n=n.return}throw Error(W(160))}switch(r.tag){case 5:var o=r.stateNode;32&r.flags&&(Xe(o,""),r.flags&=-33),Kl(e,ql(e),o);break;case 3:case 4:var a=r.stateNode.containerInfo;Ql(e,ql(e),a);break;default:throw Error(W(161))}}catch(t){cu(e,e.return,t)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function rc(e,t,n){Il=e,oc(e)}function oc(e,t,n){for(var r=!!(1&e.mode);null!==Il;){var o=Il,a=o.child;if(22===o.tag&&r){var i=null!==o.memoizedState||Rl;if(!i){var s=o.alternate,l=null!==s&&null!==s.memoizedState||Al;s=Rl;var c=Al;if(Rl=i,(Al=l)&&!c)for(Il=o;null!==Il;)l=(i=Il).child,22===i.tag&&null!==i.memoizedState?sc(o):null!==l?(l.return=i,Il=l):sc(o);for(;null!==a;)Il=a,oc(a),a=a.sibling;Il=o,Rl=s,Al=c}ac(e)}else 8772&o.subtreeFlags&&null!==a?(a.return=o,Il=a):ac(e)}}function ac(e){for(;null!==Il;){var t=Il;if(8772&t.flags){var n=t.alternate;try{if(8772&t.flags)switch(t.tag){case 0:case 11:case 15:Al||Vl(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!Al)if(null===n)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:Vs(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;null!==a&&Ti(t,a,r);break;case 3:var i=t.updateQueue;if(null!==i){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}Ti(t,i,n)}break;case 5:var s=t.stateNode;if(null===n&&4&t.flags){n=s;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var c=t.alternate;if(null!==c){var u=c.memoizedState;if(null!==u){var d=u.dehydrated;null!==d&&jn(d)}}}break;default:throw Error(W(163))}Al||512&t.flags&&Ul(t)}catch(e){cu(t,t.return,e)}}if(t===e){Il=null;break}if(null!==(n=t.sibling)){n.return=t.return,Il=n;break}Il=t.return}}function ic(e){for(;null!==Il;){var t=Il;if(t===e){Il=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Il=n;break}Il=t.return}}function sc(e){for(;null!==Il;){var t=Il;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Vl(4,t)}catch(e){cu(t,n,e)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var o=t.return;try{r.componentDidMount()}catch(e){cu(t,o,e)}}var a=t.return;try{Ul(t)}catch(e){cu(t,a,e)}break;case 5:var i=t.return;try{Ul(t)}catch(e){cu(t,i,e)}}}catch(e){cu(t,t.return,e)}if(t===e){Il=null;break}var s=t.sibling;if(null!==s){s.return=t.return,Il=s;break}Il=t.return}}var lc,cc=Math.ceil,uc=ie.ReactCurrentDispatcher,dc=ie.ReactCurrentOwner,pc=ie.ReactCurrentBatchConfig,gc=0,fc=null,hc=null,mc=0,bc=0,yc=da(0),vc=0,wc=null,kc=0,xc=0,Sc=0,Cc=null,Mc=null,Pc=0,zc=1/0,Ec=null,jc=!1,Tc=null,Nc=null,Fc=!1,Lc=null,Rc=0,Ac=0,_c=null,Ic=-1,Bc=0;function Dc(){return 6&gc?It():-1!==Ic?Ic:Ic=It()}function Oc(e){return 1&e.mode?2&gc&&0!==mc?mc&-mc:null!==ni.transition?(0===Bc&&(Bc=tn()),Bc):0!==(e=an)?e:e=void 0===(e=window.event)?16:In(e.type):1}function $c(e,t,n,r){if(50<Ac)throw Ac=0,_c=null,Error(W(185));rn(e,n,r),2&gc&&e===fc||(e===fc&&(!(2&gc)&&(xc|=n),4===vc&&qc(e,mc)),Vc(e,r),1===n&&0===gc&&!(1&t.mode)&&(zc=It()+500,Pa&&ja()))}function Vc(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,a=e.pendingLanes;0<a;){var i=31-qt(a),s=1<<i,l=o[i];-1===l?0!==(s&n)&&0===(s&r)||(o[i]=Zt(s,t)):l<=t&&(e.expiredLanes|=s),a&=~s}}(e,t);var r=Xt(e,e===fc?mc:0);if(0===r)null!==n&&Rt(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&Rt(n),1===t)0===e.tag?function(e){Pa=!0,Ea(e)}(Qc.bind(null,e)):Ea(Qc.bind(null,e)),Qo(function(){!(6&gc)&&ja()}),n=null;else{switch(sn(r)){case 1:n=Dt;break;case 4:n=Ot;break;case 16:default:n=$t;break;case 536870912:n=Ut}n=fu(n,Uc.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Uc(e,t){if(Ic=-1,Bc=0,6&gc)throw Error(W(327));var n=e.callbackNode;if(su()&&e.callbackNode!==n)return null;var r=Xt(e,e===fc?mc:0);if(0===r)return null;if(30&r||0!==(r&e.expiredLanes)||t)t=tu(e,r);else{t=r;var o=gc;gc|=2;var a=Zc();for(fc===e&&mc===t||(Ec=null,zc=It()+500,Jc(e,t));;)try{ru();break}catch(t){Xc(e,t)}gi(),uc.current=a,gc=o,null!==hc?t=0:(fc=null,mc=0,t=vc)}if(0!==t){if(2===t&&(0!==(o=en(e))&&(r=o,t=Hc(e,o))),1===t)throw n=wc,Jc(e,0),qc(e,r),Vc(e,It()),n;if(6===t)qc(e,r);else{if(o=e.current.alternate,!(30&r||function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var o=n[r],a=o.getSnapshot;o=o.value;try{if(!Qr(a(),o))return!1}catch(e){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(o)||(t=tu(e,r),2===t&&(a=en(e),0!==a&&(r=a,t=Hc(e,a))),1!==t)))throw n=wc,Jc(e,0),qc(e,r),Vc(e,It()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(W(345));case 2:case 5:iu(e,Mc,Ec);break;case 3:if(qc(e,r),(130023424&r)===r&&10<(t=Pc+500-It())){if(0!==Xt(e,0))break;if(((o=e.suspendedLanes)&r)!==r){Dc(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=Ho(iu.bind(null,e,Mc,Ec),t);break}iu(e,Mc,Ec);break;case 4:if(qc(e,r),(4194240&r)===r)break;for(t=e.eventTimes,o=-1;0<r;){var i=31-qt(r);a=1<<i,(i=t[i])>o&&(o=i),r&=~a}if(r=o,10<(r=(120>(r=It()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*cc(r/1960))-r)){e.timeoutHandle=Ho(iu.bind(null,e,Mc,Ec),r);break}iu(e,Mc,Ec);break;default:throw Error(W(329))}}}return Vc(e,It()),e.callbackNode===n?Uc.bind(null,e):null}function Hc(e,t){var n=Cc;return e.current.memoizedState.isDehydrated&&(Jc(e,t).flags|=256),2!==(e=tu(e,t))&&(t=Mc,Mc=n,null!==t&&Wc(t)),e}function Wc(e){null===Mc?Mc=e:Mc.push.apply(Mc,e)}function qc(e,t){for(t&=~Sc,t&=~xc,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-qt(t),r=1<<n;e[n]=-1,t&=~r}}function Qc(e){if(6&gc)throw Error(W(327));su();var t=Xt(e,0);if(!(1&t))return Vc(e,It()),null;var n=tu(e,t);if(0!==e.tag&&2===n){var r=en(e);0!==r&&(t=r,n=Hc(e,r))}if(1===n)throw n=wc,Jc(e,0),qc(e,t),Vc(e,It()),n;if(6===n)throw Error(W(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,iu(e,Mc,Ec),Vc(e,It()),null}function Kc(e,t){var n=gc;gc|=1;try{return e(t)}finally{0===(gc=n)&&(zc=It()+500,Pa&&ja())}}function Yc(e){null!==Lc&&0===Lc.tag&&!(6&gc)&&su();var t=gc;gc|=1;var n=pc.transition,r=an;try{if(pc.transition=null,an=1,e)return e()}finally{an=r,pc.transition=n,!(6&(gc=t))&&ja()}}function Gc(){bc=yc.current,pa(yc)}function Jc(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,Wo(n)),null!==hc)for(n=hc.return;null!==n;){var r=n;switch(Va(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&wa();break;case 3:Ii(),pa(ma),pa(ha),Ui();break;case 5:Di(r);break;case 4:Ii();break;case 13:case 19:pa(Oi);break;case 10:fi(r.type._context);break;case 22:case 23:Gc()}n=n.return}if(fc=e,hc=e=yu(e.current,null),mc=bc=t,vc=0,wc=null,Sc=xc=kc=0,Mc=Cc=null,null!==yi){for(t=0;t<yi.length;t++)if(null!==(r=(n=yi[t]).interleaved)){n.interleaved=null;var o=r.next,a=n.pending;if(null!==a){var i=a.next;a.next=o,r.next=i}n.pending=r}yi=null}return e}function Xc(e,t){for(;;){var n=hc;try{if(gi(),Hi.current=Bs,Gi){for(var r=Qi.memoizedState;null!==r;){var o=r.queue;null!==o&&(o.pending=null),r=r.next}Gi=!1}if(qi=0,Yi=Ki=Qi=null,Ji=!1,Xi=0,dc.current=null,null===n||null===n.return){vc=1,wc=t,hc=null;break}e:{var a=e,i=n.return,s=n,l=t;if(t=mc,s.flags|=32768,null!==l&&"object"==typeof l&&"function"==typeof l.then){var c=l,u=s,d=u.tag;if(!(1&u.mode||0!==d&&11!==d&&15!==d)){var p=u.alternate;p?(u.updateQueue=p.updateQueue,u.memoizedState=p.memoizedState,u.lanes=p.lanes):(u.updateQueue=null,u.memoizedState=null)}var g=tl(i);if(null!==g){g.flags&=-257,nl(g,i,s,0,t),1&g.mode&&el(a,c,t),l=c;var f=(t=g).updateQueue;if(null===f){var h=new Set;h.add(l),t.updateQueue=h}else f.add(l);break e}if(!(1&t)){el(a,c,t),eu();break e}l=Error(W(426))}else if(Wa&&1&s.mode){var m=tl(i);if(null!==m){!(65536&m.flags)&&(m.flags|=256),nl(m,i,s,0,t),ti(Ys(l,s));break e}}a=l=Ys(l,s),4!==vc&&(vc=2),null===Cc?Cc=[a]:Cc.push(a),a=i;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t,Ei(a,Xs(0,l,t));break e;case 1:s=l;var b=a.type,y=a.stateNode;if(!(128&a.flags||"function"!=typeof b.getDerivedStateFromError&&(null===y||"function"!=typeof y.componentDidCatch||null!==Nc&&Nc.has(y)))){a.flags|=65536,t&=-t,a.lanes|=t,Ei(a,Zs(a,s,t));break e}}a=a.return}while(null!==a)}au(n)}catch(e){t=e,hc===n&&null!==n&&(hc=n=n.return);continue}break}}function Zc(){var e=uc.current;return uc.current=Bs,null===e?Bs:e}function eu(){0!==vc&&3!==vc&&2!==vc||(vc=4),null===fc||!(268435455&kc)&&!(268435455&xc)||qc(fc,mc)}function tu(e,t){var n=gc;gc|=2;var r=Zc();for(fc===e&&mc===t||(Ec=null,Jc(e,t));;)try{nu();break}catch(t){Xc(e,t)}if(gi(),gc=n,uc.current=r,null!==hc)throw Error(W(261));return fc=null,mc=0,vc}function nu(){for(;null!==hc;)ou(hc)}function ru(){for(;null!==hc&&!At();)ou(hc)}function ou(e){var t=lc(e.alternate,e,bc);e.memoizedProps=e.pendingProps,null===t?au(e):hc=t,dc.current=null}function au(e){var t=e;do{var n=t.alternate;if(e=t.return,32768&t.flags){if(null!==(n=Ll(n,t)))return n.flags&=32767,void(hc=n);if(null===e)return vc=6,void(hc=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}else if(null!==(n=Fl(n,t,bc)))return void(hc=n);if(null!==(t=t.sibling))return void(hc=t);hc=t=e}while(null!==t);0===vc&&(vc=5)}function iu(e,t,n){var r=an,o=pc.transition;try{pc.transition=null,an=1,function(e,t,n,r){do{su()}while(null!==Lc);if(6&gc)throw Error(W(327));n=e.finishedWork;var o=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(W(177));e.callbackNode=null,e.callbackPriority=0;var a=n.lanes|n.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-qt(n),a=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~a}}(e,a),e===fc&&(hc=fc=null,mc=0),!(2064&n.subtreeFlags)&&!(2064&n.flags)||Fc||(Fc=!0,fu($t,function(){return su(),null})),a=!!(15990&n.flags),!!(15990&n.subtreeFlags)||a){a=pc.transition,pc.transition=null;var i=an;an=1;var s=gc;gc|=4,dc.current=null,function(e,t){if($o=Nn,Zr(e=Xr())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var o=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch(e){n=null;break e}var i=0,s=-1,l=-1,c=0,u=0,d=e,p=null;t:for(;;){for(var g;d!==n||0!==o&&3!==d.nodeType||(s=i+o),d!==a||0!==r&&3!==d.nodeType||(l=i+r),3===d.nodeType&&(i+=d.nodeValue.length),null!==(g=d.firstChild);)p=d,d=g;for(;;){if(d===e)break t;if(p===n&&++c===o&&(s=i),p===a&&++u===r&&(l=i),null!==(g=d.nextSibling))break;p=(d=p).parentNode}d=g}n=-1===s||-1===l?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Vo={focusedElem:e,selectionRange:n},Nn=!1,Il=t;null!==Il;)if(e=(t=Il).child,1028&t.subtreeFlags&&null!==e)e.return=t,Il=e;else for(;null!==Il;){t=Il;try{var f=t.alternate;if(1024&t.flags)switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==f){var h=f.memoizedProps,m=f.memoizedState,b=t.stateNode,y=b.getSnapshotBeforeUpdate(t.elementType===t.type?h:Vs(t.type,h),m);b.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var v=t.stateNode.containerInfo;1===v.nodeType?v.textContent="":9===v.nodeType&&v.documentElement&&v.removeChild(v.documentElement);break;default:throw Error(W(163))}}catch(e){cu(t,t.return,e)}if(null!==(e=t.sibling)){e.return=t.return,Il=e;break}Il=t.return}f=Ol,Ol=!1}(e,n),tc(n,e),eo(Vo),Nn=!!$o,Vo=$o=null,e.current=n,rc(n),_t(),gc=s,an=i,pc.transition=a}else e.current=n;if(Fc&&(Fc=!1,Lc=e,Rc=o),a=e.pendingLanes,0===a&&(Nc=null),function(e){if(Wt&&"function"==typeof Wt.onCommitFiberRoot)try{Wt.onCommitFiberRoot(Ht,e,void 0,!(128&~e.current.flags))}catch(e){}}(n.stateNode),Vc(e,It()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(jc)throw jc=!1,e=Tc,Tc=null,e;!!(1&Rc)&&0!==e.tag&&su(),a=e.pendingLanes,1&a?e===_c?Ac++:(Ac=0,_c=e):Ac=0,ja()}(e,t,n,r)}finally{pc.transition=o,an=r}return null}function su(){if(null!==Lc){var e=sn(Rc),t=pc.transition,n=an;try{if(pc.transition=null,an=16>e?16:e,null===Lc)var r=!1;else{if(e=Lc,Lc=null,Rc=0,6&gc)throw Error(W(331));var o=gc;for(gc|=4,Il=e.current;null!==Il;){var a=Il,i=a.child;if(16&Il.flags){var s=a.deletions;if(null!==s){for(var l=0;l<s.length;l++){var c=s[l];for(Il=c;null!==Il;){var u=Il;switch(u.tag){case 0:case 11:case 15:$l(8,u,a)}var d=u.child;if(null!==d)d.return=u,Il=d;else for(;null!==Il;){var p=(u=Il).sibling,g=u.return;if(Hl(u),u===c){Il=null;break}if(null!==p){p.return=g,Il=p;break}Il=g}}}var f=a.alternate;if(null!==f){var h=f.child;if(null!==h){f.child=null;do{var m=h.sibling;h.sibling=null,h=m}while(null!==h)}}Il=a}}if(2064&a.subtreeFlags&&null!==i)i.return=a,Il=i;else e:for(;null!==Il;){if(2048&(a=Il).flags)switch(a.tag){case 0:case 11:case 15:$l(9,a,a.return)}var b=a.sibling;if(null!==b){b.return=a.return,Il=b;break e}Il=a.return}}var y=e.current;for(Il=y;null!==Il;){var v=(i=Il).child;if(2064&i.subtreeFlags&&null!==v)v.return=i,Il=v;else e:for(i=y;null!==Il;){if(2048&(s=Il).flags)try{switch(s.tag){case 0:case 11:case 15:Vl(9,s)}}catch(e){cu(s,s.return,e)}if(s===i){Il=null;break e}var w=s.sibling;if(null!==w){w.return=s.return,Il=w;break e}Il=s.return}}if(gc=o,ja(),Wt&&"function"==typeof Wt.onPostCommitFiberRoot)try{Wt.onPostCommitFiberRoot(Ht,e)}catch(e){}r=!0}return r}finally{an=n,pc.transition=t}}return!1}function lu(e,t,n){e=Pi(e,t=Xs(0,t=Ys(n,t),1),1),t=Dc(),null!==e&&(rn(e,1,t),Vc(e,t))}function cu(e,t,n){if(3===e.tag)lu(e,e,n);else for(;null!==t;){if(3===t.tag){lu(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Nc||!Nc.has(r))){t=Pi(t,e=Zs(t,e=Ys(n,e),1),1),e=Dc(),null!==t&&(rn(t,1,e),Vc(t,e));break}}t=t.return}}function uu(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=Dc(),e.pingedLanes|=e.suspendedLanes&n,fc===e&&(mc&n)===n&&(4===vc||3===vc&&(130023424&mc)===mc&&500>It()-Pc?Jc(e,0):Sc|=n),Vc(e,t)}function du(e,t){0===t&&(1&e.mode?(t=Gt,!(130023424&(Gt<<=1))&&(Gt=4194304)):t=1);var n=Dc();null!==(e=ki(e,t))&&(rn(e,t,n),Vc(e,n))}function pu(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),du(e,n)}function gu(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;null!==o&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(W(314))}null!==r&&r.delete(t),du(e,n)}function fu(e,t){return Lt(e,t)}function hu(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function mu(e,t,n,r){return new hu(e,t,n,r)}function bu(e){return!(!(e=e.prototype)||!e.isReactComponent)}function yu(e,t){var n=e.alternate;return null===n?((n=mu(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function vu(e,t,n,r,o,a){var i=2;if(r=e,"function"==typeof e)bu(e)&&(i=1);else if("string"==typeof e)i=5;else e:switch(e){case ce:return wu(n.children,o,a,t);case ue:i=8,o|=8;break;case de:return(e=mu(12,n,t,2|o)).elementType=de,e.lanes=a,e;case he:return(e=mu(13,n,t,o)).elementType=he,e.lanes=a,e;case me:return(e=mu(19,n,t,o)).elementType=me,e.lanes=a,e;case ve:return ku(n,o,a,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case pe:i=10;break e;case ge:i=9;break e;case fe:i=11;break e;case be:i=14;break e;case ye:i=16,r=null;break e}throw Error(W(130,null==e?e:typeof e,""))}return(t=mu(i,n,t,o)).elementType=e,t.type=r,t.lanes=a,t}function wu(e,t,n,r){return(e=mu(7,e,r,t)).lanes=n,e}function ku(e,t,n,r){return(e=mu(22,e,r,t)).elementType=ve,e.lanes=n,e.stateNode={isHidden:!1},e}function xu(e,t,n){return(e=mu(6,e,null,t)).lanes=n,e}function Su(e,t,n){return(t=mu(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Cu(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=nn(0),this.expirationTimes=nn(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=nn(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Mu(e,t,n,r,o,a,i,s,l){return e=new Cu(e,t,n,s,l),1===t?(t=1,!0===a&&(t|=8)):t=0,a=mu(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Si(a),e}function Pu(e){if(!e)return fa;e:{if(Et(e=e._reactInternals)!==e||1!==e.tag)throw Error(W(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(va(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(W(171))}if(1===e.tag){var n=e.type;if(va(n))return xa(e,n,t)}return t}function zu(e,t,n,r,o,a,i,s,l){return(e=Mu(n,r,!0,e,0,a,0,s,l)).context=Pu(null),n=e.current,(a=Mi(r=Dc(),o=Oc(n))).callback=null!=t?t:null,Pi(n,a,o),e.current.lanes=o,rn(e,o,r),Vc(e,r),e}function Eu(e,t,n,r){var o=t.current,a=Dc(),i=Oc(o);return n=Pu(n),null===t.context?t.context=n:t.pendingContext=n,(t=Mi(a,i)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=Pi(o,t,i))&&($c(e,o,i,a),zi(e,o,i)),i}function ju(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Tu(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Nu(e,t){Tu(e,t),(e=e.alternate)&&Tu(e,t)}lc=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||ma.current)ol=!0;else{if(0===(e.lanes&n)&&!(128&t.flags))return ol=!1,function(e,t,n){switch(t.tag){case 3:fl(t),ei();break;case 5:Bi(t);break;case 1:va(t.type)&&Sa(t);break;case 4:_i(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;ga(ci,r._currentValue),r._currentValue=o;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(ga(Oi,1&Oi.current),t.flags|=128,null):0!==(n&t.child.childLanes)?xl(e,t,n):(ga(Oi,1&Oi.current),null!==(e=jl(e,t,n))?e.sibling:null);ga(Oi,1&Oi.current);break;case 19:if(r=0!==(n&t.childLanes),128&e.flags){if(r)return zl(e,t,n);t.flags|=128}if(null!==(o=t.memoizedState)&&(o.rendering=null,o.tail=null,o.lastEffect=null),ga(Oi,Oi.current),r)break;return null;case 22:case 23:return t.lanes=0,cl(e,t,n)}return jl(e,t,n)}(e,t,n);ol=!!(131072&e.flags)}else ol=!1,Wa&&1048576&t.flags&&Oa(t,La,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;El(e,t),e=t.pendingProps;var o=ya(t,ha.current);mi(t,n),o=ns(null,t,r,e,o,n);var a=rs();return t.flags|=1,"object"==typeof o&&null!==o&&"function"==typeof o.render&&void 0===o.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,va(r)?(a=!0,Sa(t)):a=!1,t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,Si(t),o.updater=Hs,t.stateNode=o,o._reactInternals=t,Ks(t,r,e,n),t=gl(null,t,r,!0,a,n)):(t.tag=0,Wa&&a&&$a(t),al(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(El(e,t),e=t.pendingProps,r=(o=r._init)(r._payload),t.type=r,o=t.tag=function(e){if("function"==typeof e)return bu(e)?1:0;if(null!=e){if((e=e.$$typeof)===fe)return 11;if(e===be)return 14}return 2}(r),e=Vs(r,e),o){case 0:t=dl(null,t,r,e,n);break e;case 1:t=pl(null,t,r,e,n);break e;case 11:t=il(null,t,r,e,n);break e;case 14:t=sl(null,t,r,Vs(r.type,e),n);break e}throw Error(W(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,dl(e,t,r,o=t.elementType===r?o:Vs(r,o),n);case 1:return r=t.type,o=t.pendingProps,pl(e,t,r,o=t.elementType===r?o:Vs(r,o),n);case 3:e:{if(fl(t),null===e)throw Error(W(387));r=t.pendingProps,o=(a=t.memoizedState).element,Ci(e,t),ji(t,r,null,n);var i=t.memoizedState;if(r=i.element,a.isDehydrated){if(a={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=a,t.memoizedState=a,256&t.flags){t=hl(e,t,r,n,o=Ys(Error(W(423)),t));break e}if(r!==o){t=hl(e,t,r,n,o=Ys(Error(W(424)),t));break e}for(Ha=Go(t.stateNode.containerInfo.firstChild),Ua=t,Wa=!0,qa=null,n=li(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(ei(),r===o){t=jl(e,t,n);break e}al(e,t,r,n)}t=t.child}return t;case 5:return Bi(t),null===e&&Ga(t),r=t.type,o=t.pendingProps,a=null!==e?e.memoizedProps:null,i=o.children,Uo(r,o)?i=null:null!==a&&Uo(r,a)&&(t.flags|=32),ul(e,t),al(e,t,i,n),t.child;case 6:return null===e&&Ga(t),null;case 13:return xl(e,t,n);case 4:return _i(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=si(t,null,r,n):al(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,il(e,t,r,o=t.elementType===r?o:Vs(r,o),n);case 7:return al(e,t,t.pendingProps,n),t.child;case 8:case 12:return al(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,a=t.memoizedProps,i=o.value,ga(ci,r._currentValue),r._currentValue=i,null!==a)if(Qr(a.value,i)){if(a.children===o.children&&!ma.current){t=jl(e,t,n);break e}}else for(null!==(a=t.child)&&(a.return=t);null!==a;){var s=a.dependencies;if(null!==s){i=a.child;for(var l=s.firstContext;null!==l;){if(l.context===r){if(1===a.tag){(l=Mi(-1,n&-n)).tag=2;var c=a.updateQueue;if(null!==c){var u=(c=c.shared).pending;null===u?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}a.lanes|=n,null!==(l=a.alternate)&&(l.lanes|=n),hi(a.return,n,t),s.lanes|=n;break}l=l.next}}else if(10===a.tag)i=a.type===t.type?null:a.child;else if(18===a.tag){if(null===(i=a.return))throw Error(W(341));i.lanes|=n,null!==(s=i.alternate)&&(s.lanes|=n),hi(i,n,t),i=a.sibling}else i=a.child;if(null!==i)i.return=a;else for(i=a;null!==i;){if(i===t){i=null;break}if(null!==(a=i.sibling)){a.return=i.return,i=a;break}i=i.return}a=i}al(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,mi(t,n),r=r(o=bi(o)),t.flags|=1,al(e,t,r,n),t.child;case 14:return o=Vs(r=t.type,t.pendingProps),sl(e,t,r,o=Vs(r.type,o),n);case 15:return ll(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Vs(r,o),El(e,t),t.tag=1,va(r)?(e=!0,Sa(t)):e=!1,mi(t,n),qs(t,r,o),Ks(t,r,o,n),gl(null,t,r,!0,e,n);case 19:return zl(e,t,n);case 22:return cl(e,t,n)}throw Error(W(156,t.tag))};var Fu="function"==typeof reportError?reportError:function(e){};function Lu(e){this._internalRoot=e}function Ru(e){this._internalRoot=e}function Au(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function _u(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Iu(){}function Bu(e,t,n,r,o){var a=n._reactRootContainer;if(a){var i=a;if("function"==typeof o){var s=o;o=function(){var e=ju(i);s.call(e)}}Eu(t,i,e,o)}else i=function(e,t,n,r,o){if(o){if("function"==typeof r){var a=r;r=function(){var e=ju(i);a.call(e)}}var i=zu(t,r,e,0,null,!1,0,"",Iu);return e._reactRootContainer=i,e[ta]=i.current,jo(8===e.nodeType?e.parentNode:e),Yc(),i}for(;o=e.lastChild;)e.removeChild(o);if("function"==typeof r){var s=r;r=function(){var e=ju(l);s.call(e)}}var l=Mu(e,0,!1,null,0,!1,0,"",Iu);return e._reactRootContainer=l,e[ta]=l.current,jo(8===e.nodeType?e.parentNode:e),Yc(function(){Eu(t,l,n,r)}),l}(n,t,e,o,r);return ju(i)}Ru.prototype.render=Lu.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(W(409));Eu(e,t,null,null)},Ru.prototype.unmount=Lu.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;Yc(function(){Eu(null,e,null,null)}),t[ta]=null}},Ru.prototype.unstable_scheduleHydration=function(e){if(e){var t=dn();e={blockedOn:null,target:e,priority:t};for(var n=0;n<wn.length&&0!==t&&t<wn[n].priority;n++);wn.splice(n,0,e),0===n&&Cn(e)}},ln=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Jt(t.pendingLanes);0!==n&&(on(t,1|n),Vc(t,It()),!(6&gc)&&(zc=It()+500,ja()))}break;case 13:Yc(function(){var t=ki(e,1);if(null!==t){var n=Dc();$c(t,e,1,n)}}),Nu(e,1)}},cn=function(e){if(13===e.tag){var t=ki(e,134217728);if(null!==t)$c(t,e,134217728,Dc());Nu(e,134217728)}},un=function(e){if(13===e.tag){var t=Oc(e),n=ki(e,t);if(null!==n)$c(n,e,t,Dc());Nu(e,t)}},dn=function(){return an},pn=function(e,t){var n=an;try{return an=e,t()}finally{an=n}},lt=function(e,t,n){switch(t){case"input":if(Be(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=la(r);if(!o)throw Error(W(90));Le(r),Be(r,o)}}}break;case"textarea":We(e,n);break;case"select":null!=(t=n.value)&&Ve(e,!!n.multiple,t,!1)}},ft=Kc,ht=Yc;var Du={usingClientEntryPoint:!1,Events:[ia,sa,la,pt,gt,Kc]},Ou={findFiberByHostInstance:aa,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},$u={bundleType:Ou.bundleType,version:Ou.version,rendererPackageName:Ou.rendererPackageName,rendererConfig:Ou.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ie.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Nt(e))?null:e.stateNode},findFiberByHostInstance:Ou.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var Vu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Vu.isDisabled&&Vu.supportsFiber)try{Ht=Vu.inject($u),Wt=Vu}catch(Ge){}}D.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Du,D.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Au(t))throw Error(W(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:le,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},D.createRoot=function(e,t){if(!Au(e))throw Error(W(299));var n=!1,r="",o=Fu;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(o=t.onRecoverableError)),t=Mu(e,1,!1,null,0,n,0,r,o),e[ta]=t.current,jo(8===e.nodeType?e.parentNode:e),new Lu(t)},D.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(W(188));throw e=Object.keys(e).join(","),Error(W(268,e))}return e=null===(e=Nt(t))?null:e.stateNode},D.flushSync=function(e){return Yc(e)},D.hydrate=function(e,t,n){if(!_u(t))throw Error(W(200));return Bu(null,e,t,!0,n)},D.hydrateRoot=function(e,t,n){if(!Au(e))throw Error(W(405));var r=null!=n&&n.hydratedSources||null,o=!1,a="",i=Fu;if(null!=n&&(!0===n.unstable_strictMode&&(o=!0),void 0!==n.identifierPrefix&&(a=n.identifierPrefix),void 0!==n.onRecoverableError&&(i=n.onRecoverableError)),t=zu(t,null,e,1,null!=n?n:null,o,0,a,i),e[ta]=t.current,jo(e),r)for(e=0;e<r.length;e++)o=(o=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new Ru(t)},D.render=function(e,t,n){if(!_u(t))throw Error(W(200));return Bu(null,e,t,!1,n)},D.unmountComponentAtNode=function(e){if(!_u(e))throw Error(W(40));return!!e._reactRootContainer&&(Yc(function(){Bu(null,null,e,!1,function(){e._reactRootContainer=null,e[ta]=null})}),!0)},D.unstable_batchedUpdates=Kc,D.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!_u(n))throw Error(W(200));if(null==e||void 0===e._reactInternals)throw Error(W(38));return Bu(e,t,n,!1,r)},D.version="18.3.1-next-f1338f8080-20240426",function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){}}(),B.exports=D;var Uu,Hu=B.exports,Wu=Hu;Uu=Wu.createRoot,Wu.hydrateRoot;const qu="processing_start",Qu="text_chunk",Ku="processing_end",Yu="complete",Gu="follow_up_prompts",Ju="error",Xu="human_decision_required",Zu=e=>{if(!e||"string"!=typeof e)return null;if("[DONE]"===e||"[PROCESSING]"===e)return null;try{const t=JSON.parse(e);if(!t||"object"!=typeof t)return null;const n=t.type||t.event_type;if(n===Qu||t.content){const e=t.content||t.choices?.[0]?.delta?.content||"";return{type:Qu,content:e,...t}}return n===qu||"processing_start"===t.type?{type:qu,...t}:n===Ku||"processing_end"===t.type?{type:Ku,...t}:n===Yu||"complete"===t.type?{type:Yu,finalContent:t.finalContent||t.content||"",...t}:n===Ju||"error"===t.type?{type:Ju,error:t.error||t.message||"Unknown error",...t}:n===Xu||"human_decision_required"===t.type?{type:Xu,decisionId:t.decisionId||t.decision_id,question:t.question||"",options:t.options||[],context:t.context||{},...t}:n?{type:n,...t}:t}catch(e){return null}};class ed extends Error{constructor(e="SSE stream ended before completion"){super(e),this.name="IncompleteStreamError"}}const td=async(e,t,n,r)=>{const o={"Content-Type":"application/json",Accept:"text/event-stream"};if("function"==typeof n){const e=await n();e&&(o.Authorization=`Bearer ${e}`)}const a=await fetch(`${t.replace(/\/$/,"")}/api/v1/support`,{method:"POST",headers:o,credentials:"include",body:JSON.stringify(e),...r?{signal:r}:{}});if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);if(!a.body)throw new Error("Response body is null");return a.body},nd=()=>({id:`skeleton-${Date.now()}`,role:"assistant",content:"",timestamp:new Date,isProcessing:!0,processingStatus:""}),rd=e=>{if(!Array.isArray(e)||0===e.length)return;const t=e.map(e=>({type:e.type||"prompt",text:"string"==typeof e.text?e.text:"",submitText:"string"==typeof e.submitText?e.submitText:void 0,promptId:"string"==typeof e.promptId?e.promptId:void 0,confidence:"number"==typeof e.confidence?e.confidence:void 0})).filter(e=>e.text);return t.length?t:void 0},od=(e,t,n={})=>{e(e=>{const r=[...e||[]],o=r[r.length-1];if("assistant"===o?.role){const{prompts:e,...a}=n||{};r[r.length-1]={...o,...a,content:t,isProcessing:!1,...null!=e&&{prompts:rd(e)}}}return r})},ad=/model.candidates.failed|gateway|502|redis|litellm|openai.*error|Failed to initialize agent|Streaming error:/i,id="I'm having a little trouble right now. Please try again in a moment.";function sd(e){return e&&"string"==typeof e?ad.test(e)?id:e:id}const ld=(e,t,n,r,o)=>{if(e&&e.type)switch(e.type){case qu:{const n=e.choices?.[0]?.delta?.content||"";t(e=>{const t=[...e||[]],r=t[t.length-1];return r&&"assistant"===r.role&&r.isProcessing?t[t.length-1]={...r,processingStatus:n}:n&&t.push({...nd(),processingStatus:n}),t});break}case Qu:o.current||(o.current=!0,t(e=>{const t=e[e.length-1];if(!t||"assistant"!==t.role||!t.isProcessing){return[...e||[],nd()]}return e}));const a=e.content||e.choices?.[0]?.delta?.content||"";a&&(n.current+=a,r(n.current));break;case Ku:(e=>{e(e=>{const t=[...e||[]],n=t[t.length-1];return n?.isProcessing&&(t[t.length-1]={...n,isProcessing:!1}),t})})(t);break;case Yu:{const r=e.finalContent||n.current,o={};"boolean"==typeof e.conclusionDetected?o.conclusionDetected=e.conclusionDetected:"boolean"==typeof e.conclusion_detected&&(o.conclusionDetected=e.conclusion_detected);const a={...o,prompts:e.prompts};od(t,r,a);break}case Gu:{const n=Array.isArray(e.prompts)?e.prompts:[];n.length>0&&t(e=>{const t=[...e||[]],r=t[t.length-1];return r&&"assistant"===r.role&&(t[t.length-1]={...r,prompts:rd(n)}),t});break}case Ju:((e,t)=>{t=sd(t),e(e=>{const n=[...e||[]],r=n[n.length-1];return"assistant"===r?.role&&(n[n.length-1]={...r,content:(r.content||"")+`\n\nError: ${t}`,isProcessing:!1}),n})})(t,e.error||"Unknown error occurred");break;case Xu:{const n={id:`decision-${Date.now()}`,role:"assistant",content:e.question||"",timestamp:new Date,isProcessing:!1,requiresDecision:!0,decisionData:{decisionId:e.decisionId,question:e.question,options:e.options||[],context:e.context||{}}};t(e=>[...(e||[]).filter(e=>!e.isProcessing||e.content),n]);break}}},cd=e=>{const t=e.Sources??e.sources??[];return Array.isArray(t)?t.map(e=>({source_type:e.source_type??e.sourceType??"website",source_id:e.sourceid??e.source_id,source_name:e.source_name??e.sourceName??"",url:e.url,citation_indices:e.citation_indices??e.citationIndices,effective_date:e.effective_date??e.effectiveDate,stale:e.stale})).filter(e=>e.source_id||e.url||"database"===e.source_type):[]},ud=async(e,t,n)=>{const r=(e=>{let t=null,n=null,r=0;const o=a=>{if(a-r<16)n=requestAnimationFrame(o);else{if(null!==t){const n=t;t=null,r=a,e(e=>{const t=[...e||[]],r=t[t.length-1];return"assistant"===r?.role&&(t[t.length-1]={...r,content:n}),t})}n=null}},a=e=>{t=e,null===n&&(n=requestAnimationFrame(o))};return a.cancel=()=>{null!==n&&(cancelAnimationFrame(n),n=null,t=null)},a})(t),o=e.getReader(),a=new TextDecoder;let i="";const s={current:""},l={current:!1};let c=!1,u=null;const d=()=>{if(!c&&(c=!0,"function"==typeof n))try{n()}catch(e){}};try{for(;;){const{value:e,done:n}=await o.read();if(n)break;i+=a.decode(e,{stream:!0});const c=i.split(/\r?\n\r?\n/);i=c.pop()||"";for(const e of c){const n=e.split(/\r?\n/).map(e=>e.trim()).filter(Boolean);if(0===n.length)continue;const o=n.filter(e=>e.startsWith("data:")).map(e=>e.slice(5).trim());if(0===o.length)continue;const a=o.join("\n");if("[DONE]"===a)continue;let i;try{i=JSON.parse(a)}catch(e){continue}if(i){if(i.type){if("processing_start"===i.type){const e=i.choices?.[0]?.delta?.content||"";t(t=>{const n=[...t||[]],r=n[n.length-1];return r&&"assistant"===r.role&&r.isProcessing?n[n.length-1]={...r,processingStatus:e}:e&&n.push({...nd(),processingStatus:e}),n});continue}if("processing_end"===i.type)continue;if("human_handoff"===i.type){d();continue}if("duplicate_suppressed"===i.type){d();continue}if("follow_up_prompts"===i.type){const e=Array.isArray(i.prompts)?i.prompts:[];e.length>0&&t(t=>{const n=[...t||[]],r=n[n.length-1];return r&&"assistant"===r.role?null!=u&&r.id!==u?t:(n[n.length-1]={...r,prompts:rd(e)},n):t});continue}if("text_chunk"===i.type){l.current||(l.current=!0,t(e=>{const t=e[e.length-1];if(!t||"assistant"!==t.role||!t.isProcessing){return[...e||[],nd()]}return e}));const e=i.choices?.[0]?.delta?.content||i.content;e&&(s.current+=e,r(s.current));continue}if("sources"===i.type){const e=cd(i);e.length>0&&t(t=>{const n=[...t||[]],r=n[n.length-1];return"assistant"===r?.role&&(n[n.length-1]={...r,sources:e,sourcesPreliminary:!0}),n});continue}if("complete"===i.type){const e=cd(i),n=i.finalContent||i.choices?.[0]?.delta?.content||s.current,o={};"boolean"==typeof i.conclusionDetected?o.conclusionDetected=i.conclusionDetected:"boolean"==typeof i.conclusion_detected&&(o.conclusionDetected=i.conclusion_detected);const a={...o,prompts:i.prompts};r.cancel(),od(t,n,a),t(t=>{const r=[...t||[]],o=r[r.length-1];if("assistant"===o?.role&&(u=o.id??null),"assistant"===o?.role&&(e.length>0||o.sourcesPreliminary)){const{sourcesPreliminary:t,...a}=o;r[r.length-1]={...a,sources:e,content:n,isProcessing:!1}}return r}),d();continue}if("error"===i.type){t(e=>{const t=[...e||[]],n=t[t.length-1];return"assistant"===n?.role&&(t[t.length-1]={...n,content:(n.content||"")+`\n\nError: ${sd(i.error||"Unknown error occurred")}`,isProcessing:!1}),t});continue}const e=Zu(a);if(e&&e.type){ld(e,t,s,r,l);continue}}if("chat.completion.chunk"===i.object&&i.choices?.[0]?.delta?.content)l.current||(l.current=!0,t(e=>{const t=e[e.length-1];if(!t||"assistant"!==t.role||!t.isProcessing){return[...e||[],nd()]}return e})),s.current+=i.choices[0].delta.content,r(s.current);else if(i.choices?.[0]?.finish_reason&&null!==i.choices[0].finish_reason){const e={prompts:i.prompts};od(t,s.current,e),t(e=>{const t=(e||[])[(e||[]).length-1];return"assistant"===t?.role&&(u=t.id??null),e}),d()}}}}}catch(e){if(e&&"AbortError"===e.name)return void(s.current?od(t,s.current,{stoppedByUser:!0}):t(e=>(e||[]).filter(e=>!e.isProcessing)));throw e}finally{o.releaseLock()}if(!c)throw new ed(s.current?"Stream ended mid-response - partial content received":"Stream ended before any content was received")};async function dd(e){if("undefined"==typeof window)throw new Error("Audio recorder can only run in the browser");const t=new AudioContext({sampleRate:16e3}),n=new Blob(["\n class PCMRecorderProcessor extends AudioWorkletProcessor {\n process(inputs) {\n if (!inputs.length || !inputs[0].length) {\n return true;\n }\n const inputChannel = inputs[0][0];\n this.port.postMessage(new Float32Array(inputChannel));\n return true;\n }\n }\n registerProcessor('pcm-recorder-processor', PCMRecorderProcessor);\n "],{type:"application/javascript"}),r=URL.createObjectURL(n);await t.audioWorklet.addModule(r),URL.revokeObjectURL(r);const o=await navigator.mediaDevices.getUserMedia({audio:{channelCount:1}}),a=t.createMediaStreamSource(o),i=new AudioWorkletNode(t,"pcm-recorder-processor");return i.port.onmessage=t=>{const n=function(e){const t=new Int16Array(e.length);for(let n=0;n<e.length;n+=1)t[n]=Math.max(-1,Math.min(1,e[n]))*gd;return t.buffer}(t.data);e(n)},a.connect(i),[i,t,o]}function pd(e){e&&e.getTracks().forEach(e=>e.stop())}const gd=32767;const fd=.025,hd=200,md=1e3,bd=300;function yd(e,t){const n=e.sampleRate,r=e.energyThreshold??fd,o=e.speechStartMs??hd,a=e.hangoverMs??md,i=e.preRollMs??bd;let s=!1,l=0,c=0,u=[],d=0;return{process:e=>{const p=(e=>e.byteLength/2/n*1e3)(e),g=function(e){const t=new Int16Array(e);if(0===t.length)return 0;let n=0;for(let e=0;e<t.length;e+=1){const r=t[e]/32768;n+=r*r}return Math.sqrt(n/t.length)}(e)>=r;if(s)t.onVoiceFrame(e),g?c=0:(c+=p,c>=a&&(s=!1,l=0,c=0,t.onSpeechEnd()));else{for(u.push({pcm:e,durationMs:p}),d+=p;d>i&&u.length>1;){const e=u.shift();d-=e?.durationMs??0}if(g){if(l+=p,l>=o){s=!0,c=0,t.onSpeechStart?.();for(const e of u)t.onVoiceFrame(e.pcm);u=[],d=0}}else l=0}},reset:()=>{s=!1,l=0,c=0,u=[],d=0},isSpeaking:()=>s}}const vd={connectionError:"Sorry, I'm having trouble connecting right now. Please try again.",micDenied:"We couldn't access your microphone. Please allow access and try again.",micNotFound:"No microphone found. Please connect one and try again.",voiceUnavailable:"Voice isn't available right now. Please try again.",categoryTopicsHeading:"Please ask your **{category}** question below.",quickQuestionsHeadingLabel:"Or ask a quick question:",chooseTopicLabel:"Choose a topic to get started:",typeYourMessage:"Type your message...",agentIsLoading:"Agent is loading...",conversationResolved:"Conversation resolved",howWasYourExperience:"How was your experience?",feedbackPrompt:"Please rate our support to help us improve.",feedbackPlaceholder:"Tell us more about your experience...",submitFeedback:"Submit Feedback",submitting:"Submitting...",selectRatingFirst:"Please select a rating first",pleaseSubmitRatingFirst:"Please submit your rating first.",completeOnboardingToEnableVoice:"Complete the onboarding to enable voice",sendMessageToCompleteOnboarding:"Send a message to complete onboarding and enable voice.",resolve:"Resolve",scrollLeft:"Scroll left",scrollRight:"Scroll right",sendMessage:"Send message",stopGenerating:"Stop generating",agentJoinedConversation:"{name} has joined the conversation",chatHere:"Chat here",chooseChannel:"Choose how to chat",sessionExpiringSoon:"Your session will expire soon due to inactivity.",startVoiceInput:"Start voice input",stopVoiceInput:"Stop voice input",voiceSessionLive:"Voice session live - speak or type to converse.",connectingVoice:"Connecting to voice session...",poweredBy:"Powered by",poweredByBefore:"Powered by",poweredByAfter:"",menu:"Menu",close:"Close",openChat:"Open chat",closeChat:"Close chat",lightMode:"Light Mode",nightMode:"Night Mode",refreshChat:"Refresh Chat",copyChat:"Copy Chat",startChat:"Start Chat",startingVoiceSession:"Starting voice session...",allowMicAccess:"Allow microphone access",emailRequired:"Please enter your email address",nameRequired:"Please enter your name",phoneRequired:"Please enter your phone number",fieldRequiredSuffix:"is required",emailInvalid:"Please enter a valid email address",nameInvalid:"Please enter a valid name",phoneInvalid:"Please enter a valid phone number",uploadFile:"Upload file",suggestedQuestions:"Suggested questions",agentIsTyping:"Agent is typing",rate:"Rate",rateExperience:"Rate your experience",thumbsUp:"Thumbs up",thumbsDown:"Thumbs down",submittingFeedback:"Submitting feedback...",cancel:"Cancel",submit:"Submit",messageNotDelivered:"Not delivered",retrySend:"Retry"},wd={en:vd,ar:{agentJoinedConversation:"انضم {name} إلى المحادثة",chatHere:"الدردشة هنا",chooseChannel:"اختر طريقة الدردشة",connectionError:"عذرًا، أواجه مشكلة في الاتصال حاليًا. يرجى المحاولة مرة أخرى.",micDenied:"لم نتمكن من الوصول إلى الميكروفون. يرجى السماح بالوصول والمحاولة مرة أخرى.",micNotFound:"لم يتم العثور على ميكروفون. يرجى توصيل ميكروفون والمحاولة مرة أخرى.",voiceUnavailable:"الميزة الصوتية غير متوفرة حاليًا. يرجى المحاولة مرة أخرى.",chooseTopicLabel:"اختر موضوعًا للبدء:",categoryTopicsHeading:"يرجى طرح سؤالك حول **{category}** أدناه.",quickQuestionsHeadingLabel:"أو اطرح سؤالًا سريعًا:",typeYourMessage:"اكتب رسالتك هنا...",agentIsLoading:"جارٍ تحميل الوكيل...",conversationResolved:"تم إنهاء المحادثة",howWasYourExperience:"كيف كانت تجربتك؟",feedbackPrompt:"يرجى تقييم خدمتنا لمساعدتنا على التحسن.",feedbackPlaceholder:"أخبرنا المزيد عن تجربتك...",submitFeedback:"إرسال التقييم",submitting:"جارٍ الإرسال...",selectRatingFirst:"يرجى تحديد التقييم أولاً",pleaseSubmitRatingFirst:"يرجى إرسال تقييمك أولاً.",completeOnboardingToEnableVoice:"أكمل التسجيل لتفعيل الصوت",sendMessageToCompleteOnboarding:"أرسل رسالة لإكمال التسجيل وتفعيل الصوت.",resolve:"إنهاء",scrollLeft:"تمرير لليسار",scrollRight:"تمرير لليمين",sendMessage:"إرسال رسالة",voiceSessionLive:"الجلسة الصوتية نشطة - تحدث أو اكتب للتواصل.",connectingVoice:"جارٍ الاتصال بالجلسة الصوتية...",poweredBy:"مدعوم من",menu:"القائمة",close:"إغلاق",openChat:"فتح المحادثة",closeChat:"إغلاق المحادثة",lightMode:"الوضع الفاتح",nightMode:"الوضع الداكن",refreshChat:"تحديث المحادثة",copyChat:"نسخ المحادثة",startChat:"بدء المحادثة",startingVoiceSession:"جارٍ بدء الجلسة الصوتية...",allowMicAccess:"السماح بالوصول إلى الميكروفون",uploadFile:"رفع ملف",suggestedQuestions:"أسئلة مقترحة",agentIsTyping:"الوكيل يكتب",rate:"تقييم",rateExperience:"قيّم تجربتك",thumbsUp:"إعجاب",thumbsDown:"عدم إعجاب",submittingFeedback:"جارٍ إرسال التقييم...",cancel:"إلغاء",submit:"إرسال",messageNotDelivered:"لم يتم الإرسال",retrySend:"إعادة المحاولة"},es:{connectionError:"Lo sentimos, estoy teniendo problemas de conexión en este momento. Inténtalo de nuevo.",micDenied:"No pudimos acceder a tu micrófono. Permite el acceso e inténtalo de nuevo.",micNotFound:"No se encontró ningún micrófono. Conecta uno e inténtalo de nuevo.",voiceUnavailable:"La voz no está disponible en este momento. Inténtalo de nuevo.",chooseTopicLabel:"Elige un tema para empezar:",categoryTopicsHeading:"Por favor, haz tu pregunta sobre **{category}** a continuación.",quickQuestionsHeadingLabel:"O haz una pregunta rápida:",typeYourMessage:"Escribe tu mensaje...",agentIsLoading:"El agente está cargando...",conversationResolved:"Conversación resuelta",howWasYourExperience:"¿Cómo fue tu experiencia?",feedbackPrompt:"Califica nuestro soporte para ayudarnos a mejorar.",feedbackPlaceholder:"Cuéntanos más sobre tu experiencia...",submitFeedback:"Enviar comentarios",submitting:"Enviando...",selectRatingFirst:"Primero selecciona una calificación",pleaseSubmitRatingFirst:"Por favor, envía tu calificación primero.",completeOnboardingToEnableVoice:"Completa la configuración para habilitar la voz",sendMessageToCompleteOnboarding:"Envía un mensaje para completar la configuración y habilitar la voz.",resolve:"Resolver",scrollLeft:"Desplazar a la izquierda",scrollRight:"Desplazar a la derecha",sendMessage:"Enviar mensaje",voiceSessionLive:"Sesión de voz activa - habla o escribe para conversar.",connectingVoice:"Conectando a la sesión de voz...",poweredBy:"Desarrollado por",menu:"Menú",close:"Cerrar",openChat:"Abrir chat",closeChat:"Cerrar chat",lightMode:"Modo claro",nightMode:"Modo oscuro",refreshChat:"Actualizar chat",copyChat:"Copiar chat",startChat:"Iniciar chat",startingVoiceSession:"Iniciando sesión de voz...",allowMicAccess:"Permitir acceso al micrófono"},be:{connectionError:"Прабачце, зараз узнікаюць праблемы з падключэннем. Паспрабуйце яшчэ раз.",micDenied:"Не ўдалося атрымаць доступ да мікрафона. Дазвольце доступ і паспрабуйце яшчэ раз.",micNotFound:"Мікрафон не знойдзены. Падключыце яго і паспрабуйце яшчэ раз.",voiceUnavailable:"Галасавая функцыя зараз недаступная. Паспрабуйце яшчэ раз.",chooseTopicLabel:"Выберыце тэму, каб пачаць:",categoryTopicsHeading:"Калі ласка, задайце сваё пытанне пра **{category}** ніжэй.",quickQuestionsHeadingLabel:"Або задайце хуткае пытанне:",typeYourMessage:"Увядзіце паведамленне...",agentIsLoading:"Агент загружаецца...",conversationResolved:"Размова завершана",howWasYourExperience:"Як прайшоў ваш досвед?",feedbackPrompt:"Калі ласка, ацаніце нашу падтрымку, каб дапамагчы нам стаць лепш.",feedbackPlaceholder:"Раскажыце нам больш пра свой досвед...",submitFeedback:"Адправіць водгук",submitting:"Адпраўка...",selectRatingFirst:"Спачатку абярыце ацэнку",pleaseSubmitRatingFirst:"Калі ласка, спачатку адпраўце сваю ацэнку.",completeOnboardingToEnableVoice:"Завяршыце ўводны этап, каб уключыць голас",sendMessageToCompleteOnboarding:"Адпраўце паведамленне, каб завяршыць уводны этап і ўключыць голас.",resolve:"Завяршыць",scrollLeft:"Пракруціць улева",scrollRight:"Пракруціць управа",sendMessage:"Адправіць паведамленне",voiceSessionLive:"Галасавая сесія актыўная - гаварыце або пішыце.",connectingVoice:"Злучэнне з галасавой сесіяй...",poweredBy:"Працуе на",menu:"Меню",close:"Закрыць",openChat:"Адкрыць чат",closeChat:"Закрыць чат",lightMode:"Светлы рэжым",nightMode:"Цёмны рэжым",refreshChat:"Абнавіць чат",copyChat:"Капіраваць чат",startChat:"Пачаць чат",startingVoiceSession:"Запуск галасавой сесіі...",allowMicAccess:"Дазволіць доступ да мікрафона"},bs:{connectionError:"Izvinite, trenutno imam problema s povezivanjem. Pokušajte ponovo.",micDenied:"Nismo mogli pristupiti vašem mikrofonu. Dozvolite pristup i pokušajte ponovo.",micNotFound:"Mikrofon nije pronađen. Priključite ga i pokušajte ponovo.",voiceUnavailable:"Glasovna funkcija trenutno nije dostupna. Pokušajte ponovo.",chooseTopicLabel:"Odaberite temu za početak:",categoryTopicsHeading:"Molimo postavite svoje pitanje o **{category}** ispod.",quickQuestionsHeadingLabel:"Ili postavite brzo pitanje:",typeYourMessage:"Upišite vašu poruku...",agentIsLoading:"Agent se učitava...",conversationResolved:"Razgovor je završen",howWasYourExperience:"Kakvo je bilo vaše iskustvo?",feedbackPrompt:"Molimo ocijenite našu podršku kako bismo se poboljšali.",feedbackPlaceholder:"Recite nam više o vašem iskustvu...",submitFeedback:"Pošalji povratnu informaciju",submitting:"Slanje...",selectRatingFirst:"Prvo odaberite ocjenu",pleaseSubmitRatingFirst:"Molimo prvo pošaljite vašu ocjenu.",completeOnboardingToEnableVoice:"Završite registraciju da omogućite glas",sendMessageToCompleteOnboarding:"Pošaljite poruku da završite registraciju i omogućite glas.",resolve:"Završi",scrollLeft:"Pomjeri lijevo",scrollRight:"Pomjeri desno",sendMessage:"Pošalji poruku",voiceSessionLive:"Glasovna sesija je aktivna - govorite ili pišite.",connectingVoice:"Povezivanje na glasovnu sesiju...",poweredBy:"Pokreće",menu:"Meni",close:"Zatvori",openChat:"Otvori chat",closeChat:"Zatvori chat",lightMode:"Svijetli način",nightMode:"Tamni način",refreshChat:"Osvježi chat",copyChat:"Kopiraj chat",startChat:"Započni chat",startingVoiceSession:"Pokretanje glasovne sesije...",allowMicAccess:"Dozvoli pristup mikrofonu"},bg:{connectionError:"Съжалявам, в момента имам проблеми с връзката. Опитайте отново.",micDenied:"Не успяхме да получим достъп до микрофона ви. Разрешете достъпа и опитайте отново.",micNotFound:"Не е намерен микрофон. Свържете микрофон и опитайте отново.",voiceUnavailable:"Гласовата функция не е достъпна в момента. Опитайте отново.",chooseTopicLabel:"Изберете тема, за да започнете:",categoryTopicsHeading:"Моля, задайте въпроса си за **{category}** по-долу.",quickQuestionsHeadingLabel:"Или задайте бърз въпрос:",typeYourMessage:"Въведете съобщението си...",agentIsLoading:"Агентът се зарежда...",conversationResolved:"Разговорът е приключен",howWasYourExperience:"Как беше вашето изживяване?",feedbackPrompt:"Моля, оценете нашата поддръжка, за да ни помогнете да се подобрим.",feedbackPlaceholder:"Разкажете ни повече за вашето изживяване...",submitFeedback:"Изпрати отзив",submitting:"Изпращане...",selectRatingFirst:"Първо изберете оценка",pleaseSubmitRatingFirst:"Моля, първо изпратете оценката си.",completeOnboardingToEnableVoice:"Завършете регистрацията, за да активирате гласа",sendMessageToCompleteOnboarding:"Изпратете съобщение, за да завършите регистрацията и активирате гласа.",resolve:"Приключи",scrollLeft:"Превърти наляво",scrollRight:"Превърти надясно",sendMessage:"Изпрати съобщение",voiceSessionLive:"Гласовата сесия е активна - говорете или пишете.",connectingVoice:"Свързване с гласова сесия...",poweredBy:"Задвижвано от",menu:"Меню",close:"Затвори",openChat:"Отвори чат",closeChat:"Затвори чат",lightMode:"Светъл режим",nightMode:"Тъмен режим",refreshChat:"Опресни чата",copyChat:"Копирай чата",startChat:"Започни чат",startingVoiceSession:"Стартиране на гласова сесия...",allowMicAccess:"Позволете достъп до микрофона"},my:{connectionError:"ဝမ်းနည်းပါသည်၊ ယခု ချိတ်ဆက်ရာတွင် အခက်အခဲရှိနေပါသည်။ ထပ်မံကြိုးစားပါ။",micDenied:"သင့်မိုက်ခရိုဖုန်းကို အသုံးပြုခွင့် မရနိုင်ပါ။ ခွင့်ပြုပြီး ထပ်မံကြိုးစားပါ။",micNotFound:"မိုက်ခရိုဖုန်း မတွေ့ပါ။ ချိတ်ဆက်ပြီး ထပ်မံကြိုးစားပါ။",voiceUnavailable:"အသံလုပ်ဆောင်ချက် ယခုအချိန် မရနိုင်ပါ။ ထပ်မံကြိုးစားပါ။",chooseTopicLabel:"စတင်ရန် ခေါင်းစဉ်တစ်ခု ရွေးချယ်ပါ:",categoryTopicsHeading:"ကျေးဇူးပြု၍ သင်၏ **{category}** မေးခွန်းကို အောက်တွင် မေးပါ။",quickQuestionsHeadingLabel:"သို့မဟုတ် မြန်ဆန်သော မေးခွန်းတစ်ခု မေးပါ:",typeYourMessage:"သင့်မက်ဆေ့ချ်ကို ရိုက်ထည့်ပါ...",agentIsLoading:"အေးဂျင့်ကို ဖွင့်နေသည်...",conversationResolved:"စကားဝိုင်း ပြီးစီးပြီ",howWasYourExperience:"သင့်အတွေ့အကြုံ မည်သို့ရှိခဲ့သနည်း?",feedbackPrompt:"ကျွန်ုပ်တို့၏ ဝန်ဆောင်မှုကို အဆင့်သတ်မှတ်ပေးပါ။",feedbackPlaceholder:"သင့်အတွေ့အကြုံအကြောင်း ပိုမိုပြောပြပါ...",submitFeedback:"တုံ့ပြန်ချက် ပေးပို့ရန်",submitting:"ပေးပို့နေသည်...",selectRatingFirst:"အရင်ဆုံး အဆင့်ရွေးပါ",pleaseSubmitRatingFirst:"ကျေးဇူးပြု၍ အဆင့်ကို အရင်ဆုံးပို့ပါ။",completeOnboardingToEnableVoice:"အသံကို ဖွင့်ရန် မိတ်ဆက်ခြင်းကို ပြီးဆုံးပါ",sendMessageToCompleteOnboarding:"မိတ်ဆက်ခြင်းကို ပြီးဆုံးပြီး အသံဖွင့်ရန် မက်ဆေ့ချ်ပို့ပါ။",resolve:"ပြီးဆုံး",scrollLeft:"ဘယ်ဘက်သို့ ရွှေ့ပါ",scrollRight:"ညာဘက်သို့ ရွှေ့ပါ",sendMessage:"မက်ဆေ့ချ်ပို့ရန်",voiceSessionLive:"အသံစီရင်ချက် တက်ကြွနေသည် - ပြောပါ သို့မဟုတ် ရိုက်ပါ။",connectingVoice:"အသံစီရင်ချက်သို့ ချိတ်ဆက်နေသည်...",poweredBy:"လုပ်ဆောင်ပေးသူ",menu:"မီနူး",close:"ပိတ်",openChat:"ချတ်ဖွင့်",closeChat:"ချတ်ပိတ်",lightMode:"အလင်းမုဒ်",nightMode:"အမှောင်မုဒ်",refreshChat:"ချတ်ပြန်လည်ရယူ",copyChat:"ချတ်ကူးယူ",startChat:"ချတ်စတင်",startingVoiceSession:"အသံစီရင်ချက် စတင်နေသည်...",allowMicAccess:"မိုက်ခရိုဖုန်း ဝင်ရောက်ခွင့်ပြုပါ"},ca:{connectionError:"Ho sentim, ara mateix tinc problemes de connexió. Torna-ho a provar.",micDenied:"No hem pogut accedir al teu micròfon. Permet l'accés i torna-ho a provar.",micNotFound:"No s'ha trobat cap micròfon. Connecta'n un i torna-ho a provar.",voiceUnavailable:"La veu no està disponible ara mateix. Torna-ho a provar.",chooseTopicLabel:"Tria un tema per començar:",categoryTopicsHeading:"Si us plau, fes la teva pregunta sobre **{category}** a continuació.",quickQuestionsHeadingLabel:"O fes una pregunta ràpida:",typeYourMessage:"Escriu el teu missatge...",agentIsLoading:"L'agent està carregant...",conversationResolved:"Conversa resolta",howWasYourExperience:"Com ha estat la teva experiència?",feedbackPrompt:"Si us plau, valora el nostre suport per ajudar-nos a millorar.",feedbackPlaceholder:"Explica'ns més sobre la teva experiència...",submitFeedback:"Enviar comentaris",submitting:"Enviant...",selectRatingFirst:"Primer selecciona una valoració",pleaseSubmitRatingFirst:"Si us plau, envia primer la teva valoració.",completeOnboardingToEnableVoice:"Completa la configuració per activar la veu",sendMessageToCompleteOnboarding:"Envia un missatge per completar la configuració i activar la veu.",resolve:"Resoldre",scrollLeft:"Desplaçar a l'esquerra",scrollRight:"Desplaçar a la dreta",sendMessage:"Enviar missatge",voiceSessionLive:"Sessió de veu activa - parla o escriu per conversar.",connectingVoice:"Connectant a la sessió de veu...",poweredBy:"Impulsat per",menu:"Menú",close:"Tancar",openChat:"Obrir xat",closeChat:"Tancar xat",lightMode:"Mode clar",nightMode:"Mode fosc",refreshChat:"Actualitzar xat",copyChat:"Copiar xat",startChat:"Iniciar xat",startingVoiceSession:"Iniciant sessió de veu...",allowMicAccess:"Permetre accés al micròfon"},zh:{connectionError:"抱歉,我现在连接遇到问题。请重试。",micDenied:"无法访问您的麦克风。请允许访问后重试。",micNotFound:"未检测到麦克风。请连接麦克风后重试。",voiceUnavailable:"语音功能当前不可用。请重试。",chooseTopicLabel:"选择一个主题开始:",categoryTopicsHeading:"请在下方提出您关于 **{category}** 的问题。",quickQuestionsHeadingLabel:"或者提一个快速问题:",typeYourMessage:"输入您的消息...",agentIsLoading:"客服正在加载...",conversationResolved:"对话已结束",howWasYourExperience:"您的体验如何?",feedbackPrompt:"请为我们的支持评分,帮助我们改进。",feedbackPlaceholder:"告诉我们更多关于您的体验...",submitFeedback:"提交反馈",submitting:"提交中...",selectRatingFirst:"请先选择评分",pleaseSubmitRatingFirst:"请先提交您的评分。",completeOnboardingToEnableVoice:"完成引导以启用语音",sendMessageToCompleteOnboarding:"发送消息完成引导并启用语音。",resolve:"结束",scrollLeft:"向左滚动",scrollRight:"向右滚动",sendMessage:"发送消息",voiceSessionLive:"语音会话进行中 - 请说话或输入。",connectingVoice:"正在连接语音会话...",poweredBy:"技术支持",menu:"菜单",close:"关闭",openChat:"打开聊天",closeChat:"关闭聊天",lightMode:"浅色模式",nightMode:"深色模式",refreshChat:"刷新聊天",copyChat:"复制聊天",startChat:"开始聊天",startingVoiceSession:"正在启动语音会话...",allowMicAccess:"允许访问麦克风"},hr:{connectionError:"Nažalost, trenutno imam problema s povezivanjem. Pokušajte ponovno.",micDenied:"Nismo mogli pristupiti vašem mikrofonu. Dopustite pristup i pokušajte ponovno.",micNotFound:"Mikrofon nije pronađen. Priključite ga i pokušajte ponovno.",voiceUnavailable:"Glasovna funkcija trenutačno nije dostupna. Pokušajte ponovno.",chooseTopicLabel:"Odaberite temu za početak:",categoryTopicsHeading:"Molimo postavite svoje pitanje o **{category}** u nastavku.",quickQuestionsHeadingLabel:"Ili postavite brzo pitanje:",typeYourMessage:"Upišite svoju poruku...",agentIsLoading:"Agent se učitava...",conversationResolved:"Razgovor je završen",howWasYourExperience:"Kakvo je bilo vaše iskustvo?",feedbackPrompt:"Molimo ocijenite našu podršku kako bismo se poboljšali.",feedbackPlaceholder:"Recite nam više o svom iskustvu...",submitFeedback:"Pošalji povratnu informaciju",submitting:"Slanje...",selectRatingFirst:"Prvo odaberite ocjenu",pleaseSubmitRatingFirst:"Molimo prvo pošaljite ocjenu.",completeOnboardingToEnableVoice:"Dovršite uvod za omogućavanje glasa",sendMessageToCompleteOnboarding:"Pošaljite poruku da dovršite uvod i omogućite glas.",resolve:"Završi",scrollLeft:"Pomakni lijevo",scrollRight:"Pomakni desno",sendMessage:"Pošalji poruku",voiceSessionLive:"Glasovna sesija je aktivna - govorite ili pišite.",connectingVoice:"Povezivanje na glasovnu sesiju...",poweredBy:"Pokreće",menu:"Izbornik",close:"Zatvori",openChat:"Otvori chat",closeChat:"Zatvori chat",lightMode:"Svijetli način",nightMode:"Tamni način",refreshChat:"Osvježi chat",copyChat:"Kopiraj chat",startChat:"Pokreni chat",startingVoiceSession:"Pokretanje glasovne sesije...",allowMicAccess:"Dopustite pristup mikrofonu"},cs:{connectionError:"Omlouváme se, momentálně mám problémy s připojením. Zkuste to prosím znovu.",micDenied:"Nepodařilo se získat přístup k mikrofonu. Povolte přístup a zkuste to znovu.",micNotFound:"Mikrofon nebyl nalezen. Připojte jej a zkuste to znovu.",voiceUnavailable:"Hlasová funkce není momentálně dostupná. Zkuste to znovu.",chooseTopicLabel:"Vyberte téma a začněte:",categoryTopicsHeading:"Prosím, položte svou otázku ohledně **{category}** níže.",quickQuestionsHeadingLabel:"Nebo položte rychlou otázku:",typeYourMessage:"Napište zprávu...",agentIsLoading:"Agent se načítá...",conversationResolved:"Konverzace ukončena",howWasYourExperience:"Jaká byla vaše zkušenost?",feedbackPrompt:"Ohodnoťte prosím naši podporu, abychom se mohli zlepšit.",feedbackPlaceholder:"Řekněte nám více o své zkušenosti...",submitFeedback:"Odeslat zpětnou vazbu",submitting:"Odesílání...",selectRatingFirst:"Nejprve vyberte hodnocení",pleaseSubmitRatingFirst:"Nejprve prosím odešlete své hodnocení.",completeOnboardingToEnableVoice:"Dokončete úvod pro povolení hlasu",sendMessageToCompleteOnboarding:"Odešlete zprávu pro dokončení úvodu a povolení hlasu.",resolve:"Dokončit",scrollLeft:"Posunout doleva",scrollRight:"Posunout doprava",sendMessage:"Odeslat zprávu",voiceSessionLive:"Hlasová relace je aktivní - mluvte nebo pište.",connectingVoice:"Připojování k hlasové relaci...",poweredBy:"Používá",menu:"Nabídka",close:"Zavřít",openChat:"Otevřít chat",closeChat:"Zavřít chat",lightMode:"Světlý režim",nightMode:"Tmavý režim",refreshChat:"Obnovit chat",copyChat:"Kopírovat chat",startChat:"Začít chat",startingVoiceSession:"Spouštění hlasové relace...",allowMicAccess:"Povolit přístup k mikrofonu"},da:{connectionError:"Beklager, jeg har problemer med at oprette forbindelse lige nu. Prøv igen.",micDenied:"Vi kunne ikke få adgang til din mikrofon. Tillad adgang og prøv igen.",micNotFound:"Der blev ikke fundet nogen mikrofon. Tilslut en og prøv igen.",voiceUnavailable:"Stemme er ikke tilgængelig lige nu. Prøv igen.",chooseTopicLabel:"Vælg et emne for at komme i gang:",categoryTopicsHeading:"Stil venligst dit spørgsmål om **{category}** nedenfor.",quickQuestionsHeadingLabel:"Eller stil et hurtigt spørgsmål:",typeYourMessage:"Skriv din besked...",agentIsLoading:"Agenten indlæses...",conversationResolved:"Samtale afsluttet",howWasYourExperience:"Hvordan var din oplevelse?",feedbackPrompt:"Bedøm venligst vores support for at hjælpe os med at blive bedre.",feedbackPlaceholder:"Fortæl os mere om din oplevelse...",submitFeedback:"Indsend feedback",submitting:"Sender...",selectRatingFirst:"Vælg først en vurdering",pleaseSubmitRatingFirst:"Indsend venligst din vurdering først.",completeOnboardingToEnableVoice:"Fuldfør onboarding for at aktivere stemme",sendMessageToCompleteOnboarding:"Send en besked for at fuldføre onboarding og aktivere stemme.",resolve:"Afslut",scrollLeft:"Rul til venstre",scrollRight:"Rul til højre",sendMessage:"Send besked",voiceSessionLive:"Stemmesession aktiv - tal eller skriv for at samtale.",connectingVoice:"Forbinder til stemmesession...",poweredBy:"Drevet af",menu:"Menu",close:"Luk",openChat:"Åbn chat",closeChat:"Luk chat",lightMode:"Lys tilstand",nightMode:"Mørk tilstand",refreshChat:"Opdater chat",copyChat:"Kopier chat",startChat:"Start chat",startingVoiceSession:"Starter stemmesession...",allowMicAccess:"Tillad mikrofonadgang"},nl:{connectionError:"Sorry, ik heb momenteel verbindingsproblemen. Probeer het opnieuw.",micDenied:"We konden geen toegang krijgen tot je microfoon. Geef toegang en probeer het opnieuw.",micNotFound:"Geen microfoon gevonden. Sluit een microfoon aan en probeer het opnieuw.",voiceUnavailable:"Spraak is momenteel niet beschikbaar. Probeer het opnieuw.",chooseTopicLabel:"Kies een onderwerp om te beginnen:",categoryTopicsHeading:"Stel hieronder uw vraag over **{category}**.",quickQuestionsHeadingLabel:"Of stel een snelle vraag:",typeYourMessage:"Typ je bericht...",agentIsLoading:"Agent wordt geladen...",conversationResolved:"Gesprek beëindigd",howWasYourExperience:"Hoe was je ervaring?",feedbackPrompt:"Beoordeel onze service om ons te helpen verbeteren.",feedbackPlaceholder:"Vertel ons meer over je ervaring...",submitFeedback:"Feedback versturen",submitting:"Versturen...",selectRatingFirst:"Selecteer eerst een beoordeling",pleaseSubmitRatingFirst:"Dien eerst je beoordeling in.",completeOnboardingToEnableVoice:"Voltooi de onboarding om spraak in te schakelen",sendMessageToCompleteOnboarding:"Verstuur een bericht om de onboarding te voltooien en spraak in te schakelen.",resolve:"Afronden",scrollLeft:"Naar links scrollen",scrollRight:"Naar rechts scrollen",sendMessage:"Bericht versturen",voiceSessionLive:"Spraaksessie actief - spreek of typ om te converseren.",connectingVoice:"Verbinden met spraaksessie...",poweredBy:"Mogelijk gemaakt door",menu:"Menu",close:"Sluiten",openChat:"Chat openen",closeChat:"Chat sluiten",lightMode:"Lichte modus",nightMode:"Donkere modus",refreshChat:"Chat vernieuwen",copyChat:"Chat kopiëren",startChat:"Chat starten",startingVoiceSession:"Spraaksessie starten...",allowMicAccess:"Toegang tot microfoon toestaan"},et:{connectionError:"Kahjuks on mul praegu ühendusprobleeme. Palun proovige uuesti.",micDenied:"Mikrofonile ei pääsenud ligi. Lubage juurdepääs ja proovige uuesti.",micNotFound:"Mikrofoni ei leitud. Ühendage mikrofon ja proovige uuesti.",voiceUnavailable:"Hääl ei ole praegu saadaval. Palun proovige uuesti.",chooseTopicLabel:"Vali alustamiseks teema:",categoryTopicsHeading:"Palun esita oma **{category}** küsimus allpool.",quickQuestionsHeadingLabel:"Või esita kiire küsimus:",typeYourMessage:"Sisesta oma sõnum...",agentIsLoading:"Agent laeb...",conversationResolved:"Vestlus lõpetatud",howWasYourExperience:"Kuidas oli teie kogemus?",feedbackPrompt:"Palun hinnake meie tuge, et aidata meil paremaks saada.",feedbackPlaceholder:"Rääkige meile oma kogemusest rohkem...",submitFeedback:"Saada tagasiside",submitting:"Saatmine...",selectRatingFirst:"Vali esmalt hinnang",pleaseSubmitRatingFirst:"Palun esita esmalt oma hinnang.",completeOnboardingToEnableVoice:"Häälefunktsiooni lubamiseks lõpeta sissejuhatus",sendMessageToCompleteOnboarding:"Saada sõnum, et lõpetada sissejuhatus ja lubada hääl.",resolve:"Lõpeta",scrollLeft:"Keri vasakule",scrollRight:"Keri paremale",sendMessage:"Saada sõnum",voiceSessionLive:"Häälseanss aktiivne - rääkige või kirjutage.",connectingVoice:"Ühendamine häälseansiga...",poweredBy:"Võimaldab",menu:"Menüü",close:"Sulge",openChat:"Ava vestlus",closeChat:"Sulge vestlus",lightMode:"Hele režiim",nightMode:"Tume režiim",refreshChat:"Värskenda vestlust",copyChat:"Kopeeri vestlus",startChat:"Alusta vestlust",startingVoiceSession:"Häälseansi käivitamine...",allowMicAccess:"Luba mikrofoni juurdepääs"},fi:{connectionError:"Pahoittelut, minulla on nyt yhteysongelmia. Yritä uudelleen.",micDenied:"Mikrofoniin ei saatu yhteyttä. Salli käyttöoikeus ja yritä uudelleen.",micNotFound:"Mikrofonia ei löytynyt. Liitä mikrofoni ja yritä uudelleen.",voiceUnavailable:"Ääni ei ole juuri nyt käytettävissä. Yritä uudelleen.",chooseTopicLabel:"Aloita valitsemalla aihe:",categoryTopicsHeading:"Esitä **{category}**-kysymyksesi alla.",quickQuestionsHeadingLabel:"Tai esitä nopea kysymys:",typeYourMessage:"Kirjoita viestisi...",agentIsLoading:"Agenttia ladataan...",conversationResolved:"Keskustelu päättynyt",howWasYourExperience:"Millainen kokemuksesi oli?",feedbackPrompt:"Arvioi tukipalveluamme auttaaksesi meitä kehittymään.",feedbackPlaceholder:"Kerro lisää kokemuksestasi...",submitFeedback:"Lähetä palaute",submitting:"Lähetetään...",selectRatingFirst:"Valitse ensin arvio",pleaseSubmitRatingFirst:"Lähetä arviosi ensin.",completeOnboardingToEnableVoice:"Suorita perehdytys ottaaksesi äänen käyttöön",sendMessageToCompleteOnboarding:"Lähetä viesti suorittaaksesi perehdytyksen ja ottaaksesi äänen käyttöön.",resolve:"Lopeta",scrollLeft:"Vieritä vasemmalle",scrollRight:"Vieritä oikealle",sendMessage:"Lähetä viesti",voiceSessionLive:"Ääni-istunto aktiivinen - puhu tai kirjoita.",connectingVoice:"Yhdistetään ääni-istuntoon...",poweredBy:"Toimittaa",menu:"Valikko",close:"Sulje",openChat:"Avaa chat",closeChat:"Sulje chat",lightMode:"Vaalea tila",nightMode:"Tumma tila",refreshChat:"Päivitä chat",copyChat:"Kopioi chat",startChat:"Aloita chat",startingVoiceSession:"Käynnistetään ääni-istuntoa...",allowMicAccess:"Salli mikrofonin käyttö"},fr:{connectionError:"Désolé, je rencontre des problèmes de connexion en ce moment. Veuillez réessayer.",micDenied:"Nous n'avons pas pu accéder à votre microphone. Autorisez l'accès et réessayez.",micNotFound:"Aucun microphone détecté. Connectez-en un et réessayez.",voiceUnavailable:"La voix n'est pas disponible pour le moment. Veuillez réessayer.",chooseTopicLabel:"Choisissez un sujet pour commencer :",categoryTopicsHeading:"Veuillez poser votre question sur **{category}** ci-dessous.",quickQuestionsHeadingLabel:"Ou posez une question rapide :",typeYourMessage:"Tapez votre message...",agentIsLoading:"L'agent est en cours de chargement...",conversationResolved:"Conversation terminée",howWasYourExperience:"Comment s'est passée votre expérience ?",feedbackPrompt:"Veuillez évaluer notre support pour nous aider à nous améliorer.",feedbackPlaceholder:"Dites-nous en plus sur votre expérience...",submitFeedback:"Envoyer les commentaires",submitting:"Envoi en cours...",selectRatingFirst:"Sélectionnez d'abord une note",pleaseSubmitRatingFirst:"Veuillez d'abord envoyer votre note.",completeOnboardingToEnableVoice:"Terminez l'intégration pour activer la voix",sendMessageToCompleteOnboarding:"Envoyez un message pour terminer l'intégration et activer la voix.",resolve:"Terminer",scrollLeft:"Faire défiler à gauche",scrollRight:"Faire défiler à droite",sendMessage:"Envoyer un message",voiceSessionLive:"Session vocale active - parlez ou tapez pour converser.",connectingVoice:"Connexion à la session vocale...",poweredBy:"Propulsé par",menu:"Menu",close:"Fermer",openChat:"Ouvrir le chat",closeChat:"Fermer le chat",lightMode:"Mode clair",nightMode:"Mode sombre",refreshChat:"Actualiser le chat",copyChat:"Copier le chat",startChat:"Commencer le chat",startingVoiceSession:"Démarrage de la session vocale...",allowMicAccess:"Autoriser l'accès au microphone"},de:{connectionError:"Entschuldigung, ich habe gerade Verbindungsprobleme. Bitte versuchen Sie es erneut.",micDenied:"Wir konnten nicht auf Ihr Mikrofon zugreifen. Bitte erlauben Sie den Zugriff und versuchen Sie es erneut.",micNotFound:"Kein Mikrofon gefunden. Bitte schließen Sie eines an und versuchen Sie es erneut.",voiceUnavailable:"Sprache ist derzeit nicht verfügbar. Bitte versuchen Sie es erneut.",chooseTopicLabel:"Wählen Sie ein Thema, um zu beginnen:",categoryTopicsHeading:"Bitte stellen Sie Ihre Frage zu **{category}** unten.",quickQuestionsHeadingLabel:"Oder stellen Sie eine schnelle Frage:",typeYourMessage:"Geben Sie Ihre Nachricht ein...",agentIsLoading:"Agent wird geladen...",conversationResolved:"Gespräch beendet",howWasYourExperience:"Wie war Ihre Erfahrung?",feedbackPrompt:"Bitte bewerten Sie unseren Support, um uns bei der Verbesserung zu helfen.",feedbackPlaceholder:"Erzählen Sie uns mehr über Ihre Erfahrung...",submitFeedback:"Feedback senden",submitting:"Wird gesendet...",selectRatingFirst:"Wählen Sie zuerst eine Bewertung aus",pleaseSubmitRatingFirst:"Bitte senden Sie zuerst Ihre Bewertung.",completeOnboardingToEnableVoice:"Schließen Sie das Onboarding ab, um die Sprache zu aktivieren",sendMessageToCompleteOnboarding:"Senden Sie eine Nachricht, um das Onboarding abzuschließen und die Sprache zu aktivieren.",resolve:"Beenden",scrollLeft:"Nach links scrollen",scrollRight:"Nach rechts scrollen",sendMessage:"Nachricht senden",voiceSessionLive:"Sprachsitzung aktiv - sprechen oder tippen Sie.",connectingVoice:"Verbindung zur Sprachsitzung...",poweredBy:"Bereitgestellt von",menu:"Menü",close:"Schließen",openChat:"Chat öffnen",closeChat:"Chat schließen",lightMode:"Heller Modus",nightMode:"Dunkler Modus",refreshChat:"Chat aktualisieren",copyChat:"Chat kopieren",startChat:"Chat starten",startingVoiceSession:"Sprachsitzung wird gestartet...",allowMicAccess:"Mikrofonzugriff erlauben"},el:{connectionError:"Συγγνώμη, αντιμετωπίζω πρόβλημα σύνδεσης αυτή τη στιγμή. Δοκιμάστε ξανά.",micDenied:"Δεν μπορέσαμε να αποκτήσουμε πρόσβαση στο μικρόφωνό σας. Επιτρέψτε την πρόσβαση και δοκιμάστε ξανά.",micNotFound:"Δεν βρέθηκε μικρόφωνο. Συνδέστε ένα και δοκιμάστε ξανά.",voiceUnavailable:"Η φωνή δεν είναι διαθέσιμη αυτή τη στιγμή. Δοκιμάστε ξανά.",chooseTopicLabel:"Επιλέξτε ένα θέμα για να ξεκινήσετε:",categoryTopicsHeading:"Παρακαλώ κάντε την ερώτησή σας σχετικά με το **{category}** παρακάτω.",quickQuestionsHeadingLabel:"Ή κάντε μια γρήγορη ερώτηση:",typeYourMessage:"Πληκτρολογήστε το μήνυμά σας...",agentIsLoading:"Ο πράκτορας φορτώνει...",conversationResolved:"Η συζήτηση ολοκληρώθηκε",howWasYourExperience:"Πώς ήταν η εμπειρία σας;",feedbackPrompt:"Παρακαλούμε αξιολογήστε την υποστήριξή μας για να βελτιωθούμε.",feedbackPlaceholder:"Πείτε μας περισσότερα για την εμπειρία σας...",submitFeedback:"Υποβολή σχολίων",submitting:"Υποβολή...",selectRatingFirst:"Επιλέξτε πρώτα μια βαθμολογία",pleaseSubmitRatingFirst:"Υποβάλετε πρώτα τη βαθμολογία σας.",completeOnboardingToEnableVoice:"Ολοκληρώστε την εισαγωγή για ενεργοποίηση φωνής",sendMessageToCompleteOnboarding:"Στείλτε ένα μήνυμα για ολοκλήρωση της εισαγωγής και ενεργοποίηση φωνής.",resolve:"Ολοκλήρωση",scrollLeft:"Κύλιση αριστερά",scrollRight:"Κύλιση δεξιά",sendMessage:"Αποστολή μηνύματος",voiceSessionLive:"Φωνητική συνεδρία ενεργή - μιλήστε ή πληκτρολογήστε.",connectingVoice:"Σύνδεση σε φωνητική συνεδρία...",poweredBy:"Υποστηρίζεται από",menu:"Μενού",close:"Κλείσιμο",openChat:"Άνοιγμα συνομιλίας",closeChat:"Κλείσιμο συνομιλίας",lightMode:"Φωτεινή λειτουργία",nightMode:"Σκοτεινή λειτουργία",refreshChat:"Ανανέωση συνομιλίας",copyChat:"Αντιγραφή συνομιλίας",startChat:"Έναρξη συνομιλίας",startingVoiceSession:"Εκκίνηση φωνητικής συνεδρίας...",allowMicAccess:"Επιτρέψτε πρόσβαση στο μικρόφωνο"},hi:{connectionError:"क्षमा करें, मुझे अभी कनेक्ट होने में समस्या हो रही है। कृपया पुनः प्रयास करें।",micDenied:"हम आपके माइक्रोफ़ोन का उपयोग नहीं कर सके। कृपया अनुमति दें और पुनः प्रयास करें।",micNotFound:"कोई माइक्रोफ़ोन नहीं मिला। कृपया एक कनेक्ट करें और पुनः प्रयास करें।",voiceUnavailable:"वॉइस अभी उपलब्ध नहीं है। कृपया पुनः प्रयास करें।",chooseTopicLabel:"शुरू करने के लिए एक विषय चुनें:",categoryTopicsHeading:"कृपया अपना **{category}** प्रश्न नीचे पूछें।",quickQuestionsHeadingLabel:"या एक त्वरित प्रश्न पूछें:",typeYourMessage:"अपना संदेश लिखें...",agentIsLoading:"एजेंट लोड हो रहा है...",conversationResolved:"बातचीत समाप्त हुई",howWasYourExperience:"आपका अनुभव कैसा रहा?",feedbackPrompt:"हमें बेहतर बनाने में मदद के लिए कृपया हमारे समर्थन को रेट करें।",feedbackPlaceholder:"अपने अनुभव के बारे में और बताएं...",submitFeedback:"फीडबैक भेजें",submitting:"भेजा जा रहा है...",selectRatingFirst:"पहले रेटिंग चुनें",pleaseSubmitRatingFirst:"कृपया पहले अपनी रेटिंग जमा करें।",completeOnboardingToEnableVoice:"वॉयस सक्षम करने के लिए ऑनबोर्डिंग पूरी करें",sendMessageToCompleteOnboarding:"ऑनबोर्डिंग पूरी करने और वॉयस सक्षम करने के लिए संदेश भेजें।",resolve:"समाप्त करें",scrollLeft:"बाएं स्क्रॉल करें",scrollRight:"दाएं स्क्रॉल करें",sendMessage:"संदेश भेजें",voiceSessionLive:"वॉयस सत्र सक्रिय - बात करने के लिए बोलें या टाइप करें।",connectingVoice:"वॉयस सत्र से कनेक्ट हो रहा है...",poweredBy:"Powered by",poweredByBefore:"",poweredByAfter:"द्वारा संचालित",menu:"मेनू",close:"बंद करें",openChat:"चैट खोलें",closeChat:"चैट बंद करें",lightMode:"लाइट मोड",nightMode:"डार्क मोड",refreshChat:"चैट रीफ्रेश करें",copyChat:"चैट कॉपी करें",startChat:"चैट शुरू करें",startingVoiceSession:"वॉयस सत्र शुरू हो रहा है...",allowMicAccess:"माइक्रोफ़ोन एक्सेस की अनुमति दें"},mr:{connectionError:"क्षमस्व, सध्या कनेक्ट होण्यात अडचण येत आहे. कृपया पुन्हा प्रयत्न करा.",micDenied:"आम्ही तुमचा मायक्रोफोन वापरू शकलो नाही. कृपया परवानगी द्या आणि पुन्हा प्रयत्न करा.",micNotFound:"मायक्रोफोन आढळला नाही. कृपया एक जोडा आणि पुन्हा प्रयत्न करा.",voiceUnavailable:"व्हॉइस सध्या उपलब्ध नाही. कृपया पुन्हा प्रयत्न करा.",chooseTopicLabel:"सुरू करण्यासाठी एक विषय निवडा:",categoryTopicsHeading:"कृपया तुमचा **{category}** प्रश्न खाली विचारा.",quickQuestionsHeadingLabel:"किंवा एक झटपट प्रश्न विचारा:",typeYourMessage:"तुमचा संदेश टाइप करा...",agentIsLoading:"एजंट लोड होत आहे...",conversationResolved:"संभाषण समाप्त",howWasYourExperience:"तुमचा अनुभव कसा होता?",feedbackPrompt:"आम्हाला सुधारण्यास मदत करण्यासाठी कृपया आमच्या समर्थनाला रेट करा.",feedbackPlaceholder:"तुमच्या अनुभवाबद्दल आम्हाला अधिक सांगा...",submitFeedback:"फीडबॅक सबमिट करा",submitting:"सबमिट करत आहे...",selectRatingFirst:"प्रथम रेटिंग निवडा",pleaseSubmitRatingFirst:"कृपया प्रथम आपले रेटिंग सबमिट करा.",completeOnboardingToEnableVoice:"व्हॉइस सक्षम करण्यासाठी ऑनबोर्डिंग पूर्ण करा",sendMessageToCompleteOnboarding:"ऑनबोर्डिंग पूर्ण करून व्हॉइस सक्षम करण्यासाठी संदेश पाठवा.",resolve:"समाप्त",scrollLeft:"डावीकडे स्क्रोल करा",scrollRight:"उजवीकडे स्क्रोल करा",sendMessage:"संदेश पाठवा",voiceSessionLive:"व्हॉइस सत्र सक्रिय - बोला किंवा टाइप करा.",connectingVoice:"व्हॉइस सत्रास जोडत आहे...",poweredBy:"Powered by",poweredByBefore:"",poweredByAfter:"द्वारे समर्थित",menu:"मेनू",close:"बंद करा",openChat:"चॅट उघडा",closeChat:"चॅट बंद करा",lightMode:"लाइट मोड",nightMode:"डार्क मोड",refreshChat:"चॅट रीफ्रेश करा",copyChat:"चॅट कॉपी करा",startChat:"चॅट सुरू करा",startingVoiceSession:"व्हॉइस सत्र सुरू होत आहे...",allowMicAccess:"मायक्रोफोन प्रवेशास परवानगी द्या"},hu:{connectionError:"Sajnáljuk, jelenleg kapcsolódási problémám van. Kérjük, próbálja újra.",micDenied:"Nem sikerült hozzáférni a mikrofonjához. Engedélyezze a hozzáférést, és próbálja újra.",micNotFound:"Nem található mikrofon. Csatlakoztasson egyet, és próbálja újra.",voiceUnavailable:"A hang jelenleg nem elérhető. Kérjük, próbálja újra.",chooseTopicLabel:"Válassz egy témát a kezdéshez:",categoryTopicsHeading:"Kérjük, tedd fel **{category}** kérdésedet alább.",quickQuestionsHeadingLabel:"Vagy tegyél fel egy gyors kérdést:",typeYourMessage:"Írja be az üzenetét...",agentIsLoading:"Az ügynök betöltődik...",conversationResolved:"Beszélgetés befejezve",howWasYourExperience:"Milyen volt az élménye?",feedbackPrompt:"Kérjük, értékelje támogatásunkat, hogy segítsen nekünk fejlődni.",feedbackPlaceholder:"Meséljen többet az élményéről...",submitFeedback:"Visszajelzés küldése",submitting:"Küldés...",selectRatingFirst:"Először válasszon értékelést",pleaseSubmitRatingFirst:"Kérjük, először küldje el értékelését.",completeOnboardingToEnableVoice:"Fejezze be a beállítást a hang engedélyezéséhez",sendMessageToCompleteOnboarding:"Küldjön üzenetet a beállítás befejezéséhez és a hang engedélyezéséhez.",resolve:"Befejezés",scrollLeft:"Balra görgetés",scrollRight:"Jobbra görgetés",sendMessage:"Üzenet küldése",voiceSessionLive:"Hangmenet aktív - beszéljen vagy írjon.",connectingVoice:"Csatlakozás hangmenet...",poweredBy:"Működteti",menu:"Menü",close:"Bezárás",openChat:"Csevegés megnyitása",closeChat:"Csevegés bezárása",lightMode:"Világos mód",nightMode:"Sötét mód",refreshChat:"Csevegés frissítése",copyChat:"Csevegés másolása",startChat:"Csevegés indítása",startingVoiceSession:"Hangmenet indítása...",allowMicAccess:"Mikrofon hozzáférés engedélyezése"},is:{connectionError:"Því miður næ ég ekki sambandi núna. Vinsamlegast prófaðu aftur.",micDenied:"Við fengum ekki aðgang að hljóðnemanum þínum. Leyfðu aðgang og prófaðu aftur.",micNotFound:"Enginn hljóðnemi fannst. Tengdu hljóðnema og prófaðu aftur.",voiceUnavailable:"Tal er ekki í boði núna. Vinsamlegast prófaðu aftur.",chooseTopicLabel:"Veldu efni til að byrja:",categoryTopicsHeading:"Vinsamlegast spurðu spurningu þinnar um **{category}** hér að neðan.",quickQuestionsHeadingLabel:"Eða spurðu fljótlegrar spurningar:",typeYourMessage:"Sláðu inn skilaboð...",agentIsLoading:"Fulltrúi hleðst...",conversationResolved:"Samtali lokið",howWasYourExperience:"Hvernig var upplifun þín?",feedbackPrompt:"Vinsamlegast metið þjónustu okkar til að hjálpa okkur að bæta okkur.",feedbackPlaceholder:"Segðu okkur meira um upplifun þína...",submitFeedback:"Senda umsögn",submitting:"Sendir...",selectRatingFirst:"Veldu fyrst einkunn",pleaseSubmitRatingFirst:"Vinsamlegast sendu inn einkunn þína fyrst.",completeOnboardingToEnableVoice:"Ljúktu kynningu til að virkja rödd",sendMessageToCompleteOnboarding:"Sendu skilaboð til að ljúka kynningu og virkja rödd.",resolve:"Ljúka",scrollLeft:"Skruna til vinstri",scrollRight:"Skruna til hægri",sendMessage:"Senda skilaboð",voiceSessionLive:"Raddsamtal virkt - talaðu eða skrifaðu.",connectingVoice:"Tengist raddsamtali...",poweredBy:"Knúið af",menu:"Valmynd",close:"Loka",openChat:"Opna spjall",closeChat:"Loka spjalli",lightMode:"Ljóst þema",nightMode:"Dökkt þema",refreshChat:"Endurnýja spjall",copyChat:"Afrita spjall",startChat:"Byrja spjall",startingVoiceSession:"Byrjar raddsamtal...",allowMicAccess:"Leyfa aðgang að hljóðnema"},id:{connectionError:"Maaf, saya sedang mengalami masalah koneksi. Silakan coba lagi.",micDenied:"Kami tidak dapat mengakses mikrofon Anda. Izinkan akses dan coba lagi.",micNotFound:"Mikrofon tidak ditemukan. Hubungkan mikrofon dan coba lagi.",voiceUnavailable:"Fitur suara tidak tersedia saat ini. Silakan coba lagi.",chooseTopicLabel:"Pilih topik untuk memulai:",categoryTopicsHeading:"Silakan ajukan pertanyaan **{category}** Anda di bawah.",quickQuestionsHeadingLabel:"Atau ajukan pertanyaan cepat:",typeYourMessage:"Ketik pesan Anda...",agentIsLoading:"Agen sedang dimuat...",conversationResolved:"Percakapan selesai",howWasYourExperience:"Bagaimana pengalaman Anda?",feedbackPrompt:"Silakan nilai dukungan kami untuk membantu kami berkembang.",feedbackPlaceholder:"Ceritakan lebih banyak tentang pengalaman Anda...",submitFeedback:"Kirim umpan balik",submitting:"Mengirim...",selectRatingFirst:"Pilih peringkat terlebih dahulu",pleaseSubmitRatingFirst:"Silakan kirim peringkat Anda terlebih dahulu.",completeOnboardingToEnableVoice:"Selesaikan pengenalan untuk mengaktifkan suara",sendMessageToCompleteOnboarding:"Kirim pesan untuk menyelesaikan pengenalan dan mengaktifkan suara.",resolve:"Selesai",scrollLeft:"Gulir kiri",scrollRight:"Gulir kanan",sendMessage:"Kirim pesan",voiceSessionLive:"Sesi suara aktif - bicara atau ketik untuk berbincang.",connectingVoice:"Menghubungkan ke sesi suara...",poweredBy:"Didukung oleh",menu:"Menu",close:"Tutup",openChat:"Buka obrolan",closeChat:"Tutup obrolan",lightMode:"Mode terang",nightMode:"Mode gelap",refreshChat:"Segarkan obrolan",copyChat:"Salin obrolan",startChat:"Mulai obrolan",startingVoiceSession:"Memulai sesi suara...",allowMicAccess:"Izinkan akses mikrofon"},it:{connectionError:"Spiacenti, al momento ho problemi di connessione. Riprova.",micDenied:"Non siamo riusciti ad accedere al tuo microfono. Consenti l'accesso e riprova.",micNotFound:"Nessun microfono rilevato. Collegane uno e riprova.",voiceUnavailable:"La voce non è disponibile al momento. Riprova.",chooseTopicLabel:"Scegli un argomento per iniziare:",categoryTopicsHeading:"Per favore, poni la tua domanda su **{category}** qui sotto.",quickQuestionsHeadingLabel:"Oppure fai una domanda rapida:",typeYourMessage:"Scrivi il tuo messaggio...",agentIsLoading:"L'agente sta caricando...",conversationResolved:"Conversazione conclusa",howWasYourExperience:"Com'è stata la tua esperienza?",feedbackPrompt:"Valuta il nostro supporto per aiutarci a migliorare.",feedbackPlaceholder:"Raccontaci di più sulla tua esperienza...",submitFeedback:"Invia feedback",submitting:"Invio in corso...",selectRatingFirst:"Seleziona prima una valutazione",pleaseSubmitRatingFirst:"Invia prima la tua valutazione.",completeOnboardingToEnableVoice:"Completa l'onboarding per abilitare la voce",sendMessageToCompleteOnboarding:"Invia un messaggio per completare l'onboarding e abilitare la voce.",resolve:"Concludi",scrollLeft:"Scorri a sinistra",scrollRight:"Scorri a destra",sendMessage:"Invia messaggio",voiceSessionLive:"Sessione vocale attiva - parla o scrivi per conversare.",connectingVoice:"Connessione alla sessione vocale...",poweredBy:"Fornito da",menu:"Menu",close:"Chiudi",openChat:"Apri chat",closeChat:"Chiudi chat",lightMode:"Modalità chiara",nightMode:"Modalità scura",refreshChat:"Aggiorna chat",copyChat:"Copia chat",startChat:"Inizia chat",startingVoiceSession:"Avvio sessione vocale...",allowMicAccess:"Consenti l'accesso al microfono"},ja:{connectionError:"申し訳ありません。現在接続に問題が発生しています。もう一度お試しください。",micDenied:"マイクにアクセスできませんでした。アクセスを許可してもう一度お試しください。",micNotFound:"マイクが見つかりません。マイクを接続してもう一度お試しください。",voiceUnavailable:"音声機能は現在利用できません。もう一度お試しください。",chooseTopicLabel:"始めるにはトピックを選択してください:",categoryTopicsHeading:"**{category}** に関するご質問を以下にお書きください。",quickQuestionsHeadingLabel:"または、簡単な質問をどうぞ:",typeYourMessage:"メッセージを入力してください...",agentIsLoading:"エージェントを読み込んでいます...",conversationResolved:"会話が終了しました",howWasYourExperience:"ご体験はいかがでしたか?",feedbackPrompt:"サポート向上のため、評価をお願いします。",feedbackPlaceholder:"体験について詳しく教えてください...",submitFeedback:"フィードバックを送信",submitting:"送信中...",selectRatingFirst:"最初に評価を選択してください",pleaseSubmitRatingFirst:"最初に評価を送信してください。",completeOnboardingToEnableVoice:"音声を有効にするにはオンボーディングを完了してください",sendMessageToCompleteOnboarding:"オンボーディングを完了して音声を有効にするにはメッセージを送信してください。",resolve:"終了",scrollLeft:"左へスクロール",scrollRight:"右へスクロール",sendMessage:"メッセージを送信",voiceSessionLive:"音声セッション中 - 話すか入力してください。",connectingVoice:"音声セッションに接続中...",poweredBy:"提供元",menu:"メニュー",close:"閉じる",openChat:"チャットを開く",closeChat:"チャットを閉じる",lightMode:"ライトモード",nightMode:"ダークモード",refreshChat:"チャットを更新",copyChat:"チャットをコピー",startChat:"チャットを開始",startingVoiceSession:"音声セッションを開始しています...",allowMicAccess:"マイクへのアクセスを許可"},ko:{connectionError:"죄송합니다. 현재 연결에 문제가 있습니다. 다시 시도해 주세요.",micDenied:"마이크에 접근할 수 없습니다. 접근을 허용한 후 다시 시도해 주세요.",micNotFound:"마이크를 찾을 수 없습니다. 마이크를 연결한 후 다시 시도해 주세요.",voiceUnavailable:"음성 기능을 현재 사용할 수 없습니다. 다시 시도해 주세요.",chooseTopicLabel:"시작하려면 주제를 선택하세요:",categoryTopicsHeading:"**{category}** 에 대한 질문을 아래에 작성해 주세요.",quickQuestionsHeadingLabel:"또는 간단한 질문을 해보세요:",typeYourMessage:"메시지를 입력하세요...",agentIsLoading:"상담원을 불러오는 중...",conversationResolved:"대화가 종료되었습니다",howWasYourExperience:"경험은 어떠셨나요?",feedbackPrompt:"개선을 위해 저희 지원 서비스를 평가해주세요.",feedbackPlaceholder:"경험에 대해 더 알려주세요...",submitFeedback:"피드백 제출",submitting:"제출 중...",selectRatingFirst:"먼저 평점을 선택해주세요",pleaseSubmitRatingFirst:"먼저 평점을 제출해주세요.",completeOnboardingToEnableVoice:"음성을 사용하려면 온보딩을 완료하세요",sendMessageToCompleteOnboarding:"온보딩을 완료하고 음성을 사용하려면 메시지를 보내세요.",resolve:"종료",scrollLeft:"왼쪽으로 스크롤",scrollRight:"오른쪽으로 스크롤",sendMessage:"메시지 보내기",voiceSessionLive:"음성 세션 활성화 - 말하거나 입력하세요.",connectingVoice:"음성 세션에 연결 중...",poweredBy:"제공",menu:"메뉴",close:"닫기",openChat:"채팅 열기",closeChat:"채팅 닫기",lightMode:"라이트 모드",nightMode:"다크 모드",refreshChat:"채팅 새로고침",copyChat:"채팅 복사",startChat:"채팅 시작",startingVoiceSession:"음성 세션 시작 중...",allowMicAccess:"마이크 액세스 허용"},lv:{connectionError:"Atvainojiet, šobrīd ir savienojuma problēmas. Lūdzu, mēģiniet vēlreiz.",micDenied:"Neizdevās piekļūt mikrofonam. Lūdzu, atļaujiet piekļuvi un mēģiniet vēlreiz.",micNotFound:"Mikrofons nav atrasts. Lūdzu, pievienojiet mikrofonu un mēģiniet vēlreiz.",voiceUnavailable:"Balss funkcija šobrīd nav pieejama. Lūdzu, mēģiniet vēlreiz.",chooseTopicLabel:"Izvēlieties tēmu, lai sāktu:",categoryTopicsHeading:"Lūdzu, uzdodiet savu jautājumu par **{category}** zemāk.",quickQuestionsHeadingLabel:"Vai uzdodiet ātru jautājumu:",typeYourMessage:"Ierakstiet savu ziņu...",agentIsLoading:"Aģents tiek ielādēts...",conversationResolved:"Saruna pabeigta",howWasYourExperience:"Kāda bija jūsu pieredze?",feedbackPrompt:"Lūdzu, novērtējiet mūsu atbalstu, lai palīdzētu mums uzlabot.",feedbackPlaceholder:"Pastāstiet mums vairāk par savu pieredzi...",submitFeedback:"Nosūtīt atsauksmes",submitting:"Sūta...",selectRatingFirst:"Vispirms izvēlieties vērtējumu",pleaseSubmitRatingFirst:"Lūdzu, vispirms nosūtiet savu vērtējumu.",completeOnboardingToEnableVoice:"Pabeidziet ievadu, lai iespējotu balsi",sendMessageToCompleteOnboarding:"Nosūtiet ziņu, lai pabeigtu ievadu un iespējotu balsi.",resolve:"Pabeigt",scrollLeft:"Ritināt pa kreisi",scrollRight:"Ritināt pa labi",sendMessage:"Nosūtīt ziņu",voiceSessionLive:"Balss sesija aktīva - runājiet vai rakstiet.",connectingVoice:"Pieslēdzas balss sesijai...",poweredBy:"Darbina",menu:"Izvēlne",close:"Aizvērt",openChat:"Atvērt tērzēšanu",closeChat:"Aizvērt tērzēšanu",lightMode:"Gaišais režīms",nightMode:"Tumšais režīms",refreshChat:"Atsvaidzināt tērzēšanu",copyChat:"Kopēt tērzēšanu",startChat:"Sākt tērzēšanu",startingVoiceSession:"Sāk balss sesiju...",allowMicAccess:"Atļaut piekļuvi mikrofonam"},lt:{connectionError:"Atsiprašome, šiuo metu kyla ryšio problemų. Bandykite dar kartą.",micDenied:"Nepavyko pasiekti jūsų mikrofono. Leiskite prieigą ir bandykite dar kartą.",micNotFound:"Mikrofonas nerastas. Prijunkite mikrofoną ir bandykite dar kartą.",voiceUnavailable:"Balso funkcija šiuo metu nepasiekiama. Bandykite dar kartą.",chooseTopicLabel:"Pasirinkite temą, kad pradėtumėte:",categoryTopicsHeading:"Prašome užduoti savo klausimą apie **{category}** žemiau.",quickQuestionsHeadingLabel:"Arba užduokite greitą klausimą:",typeYourMessage:"Įveskite pranešimą...",agentIsLoading:"Agentas kraunamas...",conversationResolved:"Pokalbis baigtas",howWasYourExperience:"Kokia buvo jūsų patirtis?",feedbackPrompt:"Įvertinkite mūsų pagalbą, kad padėtumėte mums tobulėti.",feedbackPlaceholder:"Papasakokite daugiau apie savo patirtį...",submitFeedback:"Pateikti atsiliepimą",submitting:"Siunčiama...",selectRatingFirst:"Pirmiausia pasirinkite įvertinimą",pleaseSubmitRatingFirst:"Pirmiausia pateikite įvertinimą.",completeOnboardingToEnableVoice:"Užbaikite įvadą, kad įjungtumėte balsą",sendMessageToCompleteOnboarding:"Išsiųskite pranešimą, kad užbaigtumėte įvadą ir įjungtumėte balsą.",resolve:"Baigti",scrollLeft:"Slinkti į kairę",scrollRight:"Slinkti į dešinę",sendMessage:"Siųsti pranešimą",voiceSessionLive:"Balso sesija aktyvi - kalbėkite arba rašykite.",connectingVoice:"Jungiamasi prie balso sesijos...",poweredBy:"Veikia",menu:"Meniu",close:"Uždaryti",openChat:"Atidaryti pokalbį",closeChat:"Uždaryti pokalbį",lightMode:"Šviesus režimas",nightMode:"Tamsus režimas",refreshChat:"Atnaujinti pokalbį",copyChat:"Kopijuoti pokalbį",startChat:"Pradėti pokalbį",startingVoiceSession:"Pradedama balso sesija...",allowMicAccess:"Leisti prieigą prie mikrofono"},mk:{connectionError:"Извинете, моментално имам проблеми со поврзувањето. Обидете се повторно.",micDenied:"Не можевме да пристапиме до вашиот микрофон. Дозволете пристап и обидете се повторно.",micNotFound:"Не е најден микрофон. Поврзете микрофон и обидете се повторно.",voiceUnavailable:"Гласовната функција моментално не е достапна. Обидете се повторно.",chooseTopicLabel:"Изберете тема за да започнете:",categoryTopicsHeading:"Ве молиме поставете го вашето прашање за **{category}** подолу.",quickQuestionsHeadingLabel:"Или поставете брзо прашање:",typeYourMessage:"Напишете ја вашата порака...",agentIsLoading:"Агентот се вчитува...",conversationResolved:"Разговорот е завршен",howWasYourExperience:"Какво беше вашето искуство?",feedbackPrompt:"Оценете ја нашата поддршка за да ни помогнете да се подобриме.",feedbackPlaceholder:"Кажете ни повеќе за вашето искуство...",submitFeedback:"Испрати повратна информација",submitting:"Испраќање...",selectRatingFirst:"Прво изберете оценка",pleaseSubmitRatingFirst:"Прво испратете ја вашата оценка.",completeOnboardingToEnableVoice:"Завршете го воведот за да овозможите глас",sendMessageToCompleteOnboarding:"Испратете порака за да го завршите воведот и овозможите глас.",resolve:"Заврши",scrollLeft:"Скролај лево",scrollRight:"Скролај десно",sendMessage:"Испрати порака",voiceSessionLive:"Гласовната сесија е активна - зборувајте или пишувајте.",connectingVoice:"Поврзување со гласовна сесија...",poweredBy:"Поддржано од",menu:"Мени",close:"Затвори",openChat:"Отвори разговор",closeChat:"Затвори разговор",lightMode:"Светол режим",nightMode:"Темен режим",refreshChat:"Освежи разговор",copyChat:"Копирај разговор",startChat:"Започни разговор",startingVoiceSession:"Започнува гласовна сесија...",allowMicAccess:"Дозволи пристап до микрофонот"},ms:{connectionError:"Maaf, saya menghadapi masalah sambungan sekarang. Sila cuba lagi.",micDenied:"Kami tidak dapat mengakses mikrofon anda. Sila benarkan akses dan cuba lagi.",micNotFound:"Tiada mikrofon ditemui. Sila sambungkan mikrofon dan cuba lagi.",voiceUnavailable:"Ciri suara tidak tersedia sekarang. Sila cuba lagi.",chooseTopicLabel:"Pilih topik untuk memulakan:",categoryTopicsHeading:"Sila ajukan soalan **{category}** anda di bawah.",quickQuestionsHeadingLabel:"Atau ajukan soalan ringkas:",typeYourMessage:"Taip mesej anda...",agentIsLoading:"Ejen sedang dimuatkan...",conversationResolved:"Perbualan selesai",howWasYourExperience:"Bagaimanakah pengalaman anda?",feedbackPrompt:"Sila nilaikan sokongan kami untuk membantu kami menambah baik.",feedbackPlaceholder:"Beritahu kami lebih lanjut tentang pengalaman anda...",submitFeedback:"Hantar maklum balas",submitting:"Menghantar...",selectRatingFirst:"Pilih penilaian dahulu",pleaseSubmitRatingFirst:"Sila hantar penilaian anda dahulu.",completeOnboardingToEnableVoice:"Lengkapkan pengenalan untuk mendayakan suara",sendMessageToCompleteOnboarding:"Hantar mesej untuk melengkapkan pengenalan dan mendayakan suara.",resolve:"Selesai",scrollLeft:"Tatal ke kiri",scrollRight:"Tatal ke kanan",sendMessage:"Hantar mesej",voiceSessionLive:"Sesi suara aktif - bercakap atau taip untuk berbual.",connectingVoice:"Menyambung ke sesi suara...",poweredBy:"Dikuasakan oleh",menu:"Menu",close:"Tutup",openChat:"Buka sembang",closeChat:"Tutup sembang",lightMode:"Mod terang",nightMode:"Mod gelap",refreshChat:"Muat semula sembang",copyChat:"Salin sembang",startChat:"Mula sembang",startingVoiceSession:"Memulakan sesi suara...",allowMicAccess:"Benarkan akses mikrofon"},no:{connectionError:"Beklager, jeg har problemer med tilkoblingen akkurat nå. Prøv igjen.",micDenied:"Vi fikk ikke tilgang til mikrofonen din. Gi tilgang og prøv igjen.",micNotFound:"Ingen mikrofon funnet. Koble til en mikrofon og prøv igjen.",voiceUnavailable:"Tale er ikke tilgjengelig akkurat nå. Prøv igjen.",chooseTopicLabel:"Velg et emne for å komme i gang:",categoryTopicsHeading:"Vennligst still spørsmålet ditt om **{category}** nedenfor.",quickQuestionsHeadingLabel:"Eller still et raskt spørsmål:",typeYourMessage:"Skriv meldingen din...",agentIsLoading:"Agenten laster...",conversationResolved:"Samtale avsluttet",howWasYourExperience:"Hvordan var opplevelsen din?",feedbackPrompt:"Vennligst vurder vår støtte for å hjelpe oss med å bli bedre.",feedbackPlaceholder:"Fortell oss mer om opplevelsen din...",submitFeedback:"Send tilbakemelding",submitting:"Sender...",selectRatingFirst:"Velg en vurdering først",pleaseSubmitRatingFirst:"Vennligst send inn vurderingen din først.",completeOnboardingToEnableVoice:"Fullfør introduksjonen for å aktivere tale",sendMessageToCompleteOnboarding:"Send en melding for å fullføre introduksjonen og aktivere tale.",resolve:"Avslutt",scrollLeft:"Bla til venstre",scrollRight:"Bla til høyre",sendMessage:"Send melding",voiceSessionLive:"Talesesjon aktiv - snakk eller skriv for å samtale.",connectingVoice:"Kobler til talesesjon...",poweredBy:"Drevet av",menu:"Meny",close:"Lukk",openChat:"Åpne chat",closeChat:"Lukk chat",lightMode:"Lys modus",nightMode:"Mørk modus",refreshChat:"Oppdater chat",copyChat:"Kopier chat",startChat:"Start chat",startingVoiceSession:"Starter talesesjon...",allowMicAccess:"Tillat mikrofontilgang"},fa:{connectionError:"متأسفیم، در حال حاضر در اتصال مشکل دارم. لطفاً دوباره تلاش کنید.",micDenied:"نتوانستیم به میکروفون شما دسترسی پیدا کنیم. لطفاً دسترسی را اجازه دهید و دوباره تلاش کنید.",micNotFound:"میکروفونی یافت نشد. لطفاً یک میکروفون وصل کنید و دوباره تلاش کنید.",voiceUnavailable:"قابلیت صدا در حال حاضر در دسترس نیست. لطفاً دوباره تلاش کنید.",chooseTopicLabel:"برای شروع، یک موضوع را انتخاب کنید:",categoryTopicsHeading:"لطفاً سؤال خود درباره **{category}** را در زیر مطرح کنید.",quickQuestionsHeadingLabel:"یا یک سؤال سریع بپرسید:",typeYourMessage:"پیام خود را تایپ کنید...",agentIsLoading:"در حال بارگذاری نماینده...",conversationResolved:"مکالمه به پایان رسید",howWasYourExperience:"تجربه شما چگونه بود؟",feedbackPrompt:"لطفاً برای کمک به بهبود ما، پشتیبانی ما را ارزیابی کنید.",feedbackPlaceholder:"درباره تجربه خود بیشتر به ما بگویید...",submitFeedback:"ارسال بازخورد",submitting:"در حال ارسال...",selectRatingFirst:"ابتدا یک امتیاز انتخاب کنید",pleaseSubmitRatingFirst:"لطفاً ابتدا امتیاز خود را ارسال کنید.",completeOnboardingToEnableVoice:"برای فعالسازی صدا، راهاندازی را تکمیل کنید",sendMessageToCompleteOnboarding:"برای تکمیل راهاندازی و فعالسازی صدا، پیام ارسال کنید.",resolve:"پایان",scrollLeft:"پیمایش به چپ",scrollRight:"پیمایش به راست",sendMessage:"ارسال پیام",voiceSessionLive:"جلسه صوتی فعال - صحبت کنید یا تایپ کنید.",connectingVoice:"اتصال به جلسه صوتی...",poweredBy:"قدرت گرفته از",menu:"منو",close:"بستن",openChat:"باز کردن چت",closeChat:"بستن چت",lightMode:"حالت روشن",nightMode:"حالت تاریک",refreshChat:"تازهسازی چت",copyChat:"کپی چت",startChat:"شروع چت",startingVoiceSession:"شروع جلسه صوتی...",allowMicAccess:"اجازه دسترسی به میکروفون"},pl:{connectionError:"Przepraszamy, mam teraz problem z połączeniem. Spróbuj ponownie.",micDenied:"Nie udało się uzyskać dostępu do mikrofonu. Zezwól na dostęp i spróbuj ponownie.",micNotFound:"Nie znaleziono mikrofonu. Podłącz mikrofon i spróbuj ponownie.",voiceUnavailable:"Funkcja głosowa jest obecnie niedostępna. Spróbuj ponownie.",chooseTopicLabel:"Wybierz temat, aby rozpocząć:",categoryTopicsHeading:"Proszę zadać pytanie dotyczące **{category}** poniżej.",quickQuestionsHeadingLabel:"Lub zadaj szybkie pytanie:",typeYourMessage:"Wpisz wiadomość...",agentIsLoading:"Agent się ładuje...",conversationResolved:"Rozmowa zakończona",howWasYourExperience:"Jakie było Twoje doświadczenie?",feedbackPrompt:"Oceń proszę naszą obsługę, aby pomóc nam się rozwijać.",feedbackPlaceholder:"Opowiedz nam więcej o swoim doświadczeniu...",submitFeedback:"Wyślij opinię",submitting:"Wysyłanie...",selectRatingFirst:"Najpierw wybierz ocenę",pleaseSubmitRatingFirst:"Najpierw prześlij swoją ocenę.",completeOnboardingToEnableVoice:"Zakończ wprowadzenie, aby włączyć głos",sendMessageToCompleteOnboarding:"Wyślij wiadomość, aby zakończyć wprowadzenie i włączyć głos.",resolve:"Zakończ",scrollLeft:"Przewiń w lewo",scrollRight:"Przewiń w prawo",sendMessage:"Wyślij wiadomość",voiceSessionLive:"Sesja głosowa aktywna - mów lub pisz.",connectingVoice:"Łączenie z sesją głosową...",poweredBy:"Napędzane przez",menu:"Menu",close:"Zamknij",openChat:"Otwórz czat",closeChat:"Zamknij czat",lightMode:"Tryb jasny",nightMode:"Tryb ciemny",refreshChat:"Odśwież czat",copyChat:"Kopiuj czat",startChat:"Rozpocznij czat",startingVoiceSession:"Uruchamianie sesji głosowej...",allowMicAccess:"Zezwól na dostęp do mikrofonu"},pt:{connectionError:"Desculpe, estou com problemas de conexão neste momento. Tente novamente.",micDenied:"Não foi possível acessar o seu microfone. Permita o acesso e tente novamente.",micNotFound:"Nenhum microfone encontrado. Conecte um e tente novamente.",voiceUnavailable:"A voz não está disponível neste momento. Tente novamente.",chooseTopicLabel:"Escolha um tópico para começar:",categoryTopicsHeading:"Por favor, faça sua pergunta sobre **{category}** abaixo.",quickQuestionsHeadingLabel:"Ou faça uma pergunta rápida:",typeYourMessage:"Digite sua mensagem...",agentIsLoading:"O agente está carregando...",conversationResolved:"Conversa encerrada",howWasYourExperience:"Como foi sua experiência?",feedbackPrompt:"Avalie nosso suporte para nos ajudar a melhorar.",feedbackPlaceholder:"Conte-nos mais sobre sua experiência...",submitFeedback:"Enviar feedback",submitting:"Enviando...",selectRatingFirst:"Selecione uma avaliação primeiro",pleaseSubmitRatingFirst:"Envie sua avaliação primeiro.",completeOnboardingToEnableVoice:"Complete a integração para ativar a voz",sendMessageToCompleteOnboarding:"Envie uma mensagem para completar a integração e ativar a voz.",resolve:"Encerrar",scrollLeft:"Rolar para a esquerda",scrollRight:"Rolar para a direita",sendMessage:"Enviar mensagem",voiceSessionLive:"Sessão de voz ativa - fale ou digite para conversar.",connectingVoice:"Conectando à sessão de voz...",poweredBy:"Desenvolvido por",menu:"Menu",close:"Fechar",openChat:"Abrir chat",closeChat:"Fechar chat",lightMode:"Modo claro",nightMode:"Modo escuro",refreshChat:"Atualizar chat",copyChat:"Copiar chat",startChat:"Iniciar chat",startingVoiceSession:"Iniciando sessão de voz...",allowMicAccess:"Permitir acesso ao microfone"},ro:{connectionError:"Ne pare rău, întâmpin probleme de conexiune în acest moment. Încercați din nou.",micDenied:"Nu am putut accesa microfonul. Permiteți accesul și încercați din nou.",micNotFound:"Nu a fost găsit niciun microfon. Conectați unul și încercați din nou.",voiceUnavailable:"Funcția vocală nu este disponibilă momentan. Încercați din nou.",chooseTopicLabel:"Alegeți un subiect pentru a începe:",categoryTopicsHeading:"Vă rugăm să adresați întrebarea dvs. despre **{category}** mai jos.",quickQuestionsHeadingLabel:"Sau puneți o întrebare rapidă:",typeYourMessage:"Scrieți mesajul dvs...",agentIsLoading:"Agentul se încarcă...",conversationResolved:"Conversație încheiată",howWasYourExperience:"Cum a fost experiența dvs.?",feedbackPrompt:"Vă rugăm să evaluați asistența noastră pentru a ne ajuta să ne îmbunătățim.",feedbackPlaceholder:"Spuneți-ne mai multe despre experiența dvs...",submitFeedback:"Trimite feedback",submitting:"Se trimite...",selectRatingFirst:"Selectați mai întâi o evaluare",pleaseSubmitRatingFirst:"Vă rugăm să trimiteți mai întâi evaluarea.",completeOnboardingToEnableVoice:"Finalizați procesul pentru a activa vocea",sendMessageToCompleteOnboarding:"Trimiteți un mesaj pentru a finaliza procesul și a activa vocea.",resolve:"Închide",scrollLeft:"Derulați la stânga",scrollRight:"Derulați la dreapta",sendMessage:"Trimite mesaj",voiceSessionLive:"Sesiune vocală activă - vorbiți sau tastați.",connectingVoice:"Se conectează la sesiunea vocală...",poweredBy:"Oferit de",menu:"Meniu",close:"Închide",openChat:"Deschide chat",closeChat:"Închide chat",lightMode:"Mod luminos",nightMode:"Mod întunecat",refreshChat:"Reîmprospătează chat",copyChat:"Copiază chat",startChat:"Începe chat",startingVoiceSession:"Începe sesiunea vocală...",allowMicAccess:"Permiteți accesul la microfon"},ru:{connectionError:"Извините, сейчас возникли проблемы с подключением. Попробуйте снова.",micDenied:"Не удалось получить доступ к микрофону. Разрешите доступ и попробуйте снова.",micNotFound:"Микрофон не найден. Подключите микрофон и попробуйте снова.",voiceUnavailable:"Голосовая функция сейчас недоступна. Попробуйте снова.",chooseTopicLabel:"Выберите тему, чтобы начать:",categoryTopicsHeading:"Пожалуйста, задайте свой вопрос о **{category}** ниже.",quickQuestionsHeadingLabel:"Или задайте быстрый вопрос:",typeYourMessage:"Введите ваше сообщение...",agentIsLoading:"Агент загружается...",conversationResolved:"Разговор завершен",howWasYourExperience:"Как прошел ваш опыт?",feedbackPrompt:"Пожалуйста, оцените нашу поддержку, чтобы помочь нам улучшиться.",feedbackPlaceholder:"Расскажите нам больше о вашем опыте...",submitFeedback:"Отправить отзыв",submitting:"Отправка...",selectRatingFirst:"Сначала выберите оценку",pleaseSubmitRatingFirst:"Пожалуйста, сначала отправьте свою оценку.",completeOnboardingToEnableVoice:"Завершите знакомство, чтобы включить голос",sendMessageToCompleteOnboarding:"Отправьте сообщение, чтобы завершить знакомство и включить голос.",resolve:"Завершить",scrollLeft:"Прокрутить влево",scrollRight:"Прокрутить вправо",sendMessage:"Отправить сообщение",voiceSessionLive:"Голосовая сессия активна - говорите или пишите.",connectingVoice:"Подключение к голосовой сессии...",poweredBy:"Работает на",menu:"Меню",close:"Закрыть",openChat:"Открыть чат",closeChat:"Закрыть чат",lightMode:"Светлый режим",nightMode:"Темный режим",refreshChat:"Обновить чат",copyChat:"Копировать чат",startChat:"Начать чат",startingVoiceSession:"Запуск голосовой сессии...",allowMicAccess:"Разрешить доступ к микрофону"},sr:{connectionError:"Извините, тренутно имам проблема са повезивањем. Пробајте поново.",micDenied:"Нисмо могли да приступимо вашем микрофону. Дозволите приступ и пробајте поново.",micNotFound:"Микрофон није пронађен. Прикључите микрофон и пробајте поново.",voiceUnavailable:"Гласовна функција тренутно није доступна. Пробајте поново.",chooseTopicLabel:"Изаберите тему да бисте започели:",categoryTopicsHeading:"Молимо поставите своје питање о **{category}** испод.",quickQuestionsHeadingLabel:"Или поставите брзо питање:",typeYourMessage:"Укуцајте вашу поруку...",agentIsLoading:"Агент се учитава...",conversationResolved:"Разговор је завршен",howWasYourExperience:"Какво је било ваше искуство?",feedbackPrompt:"Молимо оцените нашу подршку да бисмо се побољшали.",feedbackPlaceholder:"Реците нам више о свом искуству...",submitFeedback:"Пошаљи повратне информације",submitting:"Слање...",selectRatingFirst:"Прво одаберите оцену",pleaseSubmitRatingFirst:"Молимо прво пошаљите оцену.",completeOnboardingToEnableVoice:"Завршите увод да омогућите глас",sendMessageToCompleteOnboarding:"Пошаљите поруку да завршите увод и омогућите глас.",resolve:"Заврши",scrollLeft:"Скроловати лево",scrollRight:"Скроловати десно",sendMessage:"Пошаљи поруку",voiceSessionLive:"Гласовна сесија активна - говорите или куцајте.",connectingVoice:"Повезивање са гласовном сесијом...",poweredBy:"Покреће",menu:"Мени",close:"Затвори",openChat:"Отвори ћаскање",closeChat:"Затвори ћаскање",lightMode:"Светли режим",nightMode:"Тамни режим",refreshChat:"Освежи ћаскање",copyChat:"Копирај ћаскање",startChat:"Започни ћаскање",startingVoiceSession:"Покретање гласовне сесије...",allowMicAccess:"Дозволи приступ микрофону"},sk:{connectionError:"Ľutujeme, momentálne mám problém s pripojením. Skúste to znova.",micDenied:"Nepodarilo sa získať prístup k mikrofónu. Povoľte prístup a skúste to znova.",micNotFound:"Mikrofón sa nenašiel. Pripojte ho a skúste to znova.",voiceUnavailable:"Hlasová funkcia momentálne nie je dostupná. Skúste to znova.",chooseTopicLabel:"Vyberte tému, aby ste začali:",categoryTopicsHeading:"Prosím, položte svoju otázku o **{category}** nižšie.",quickQuestionsHeadingLabel:"Alebo položte rýchlu otázku:",typeYourMessage:"Napíšte svoju správu...",agentIsLoading:"Agent sa načítava...",conversationResolved:"Konverzácia ukončená",howWasYourExperience:"Aká bola vaša skúsenosť?",feedbackPrompt:"Ohodnoťte prosím našu podporu, aby sme sa mohli zlepšiť.",feedbackPlaceholder:"Povedzte nám viac o svojej skúsenosti...",submitFeedback:"Odoslať spätnú väzbu",submitting:"Odosielanie...",selectRatingFirst:"Najprv vyberte hodnotenie",pleaseSubmitRatingFirst:"Najprv odošlite svoje hodnotenie.",completeOnboardingToEnableVoice:"Dokončite úvod pre zapnutie hlasu",sendMessageToCompleteOnboarding:"Pošlite správu na dokončenie úvodu a zapnutie hlasu.",resolve:"Ukončiť",scrollLeft:"Posunúť doľava",scrollRight:"Posunúť doprava",sendMessage:"Odoslať správu",voiceSessionLive:"Hlasová relácia aktívna - hovorte alebo píšte.",connectingVoice:"Pripájanie k hlasovej relácii...",poweredBy:"Prevádzkuje",menu:"Ponuka",close:"Zavrieť",openChat:"Otvoriť chat",closeChat:"Zavrieť chat",lightMode:"Svetlý režim",nightMode:"Tmavý režim",refreshChat:"Obnoviť chat",copyChat:"Kopírovať chat",startChat:"Začať chat",startingVoiceSession:"Spúšťanie hlasovej relácie...",allowMicAccess:"Povoliť prístup k mikrofónu"},sl:{connectionError:"Oprostite, trenutno imam težave s povezavo. Poskusite znova.",micDenied:"Do mikrofona ni bilo mogoče dostopati. Dovolite dostop in poskusite znova.",micNotFound:"Mikrofona ni bilo mogoče najti. Priključite ga in poskusite znova.",voiceUnavailable:"Glasovna funkcija trenutno ni na voljo. Poskusite znova.",chooseTopicLabel:"Izberite temo za začetek:",categoryTopicsHeading:"Prosimo, postavite vprašanje o **{category}** spodaj.",quickQuestionsHeadingLabel:"Ali postavite hitro vprašanje:",typeYourMessage:"Vnesite svoje sporočilo...",agentIsLoading:"Agent se nalaga...",conversationResolved:"Pogovor je končan",howWasYourExperience:"Kakšna je bila vaša izkušnja?",feedbackPrompt:"Prosimo, ocenite našo podporo, da nam pomagate izboljšati.",feedbackPlaceholder:"Povejte nam več o svoji izkušnji...",submitFeedback:"Pošlji povratne informacije",submitting:"Pošiljanje...",selectRatingFirst:"Najprej izberite oceno",pleaseSubmitRatingFirst:"Prosimo, najprej pošljite svojo oceno.",completeOnboardingToEnableVoice:"Zaključite uvodne korake za omogočanje glasu",sendMessageToCompleteOnboarding:"Pošljite sporočilo, da zaključite uvod in omogočite glas.",resolve:"Končaj",scrollLeft:"Premakni levo",scrollRight:"Premakni desno",sendMessage:"Pošlji sporočilo",voiceSessionLive:"Glasovna seja aktivna - govorite ali tipkajte.",connectingVoice:"Povezovanje z glasovno sejo...",poweredBy:"Poganja",menu:"Meni",close:"Zapri",openChat:"Odpri klepet",closeChat:"Zapri klepet",lightMode:"Svetli način",nightMode:"Temni način",refreshChat:"Osveži klepet",copyChat:"Kopiraj klepet",startChat:"Začni klepet",startingVoiceSession:"Začetek glasovne seje...",allowMicAccess:"Dovoli dostop do mikrofona"},sv:{connectionError:"Ursäkta, jag har anslutningsproblem just nu. Försök igen.",micDenied:"Vi kunde inte komma åt din mikrofon. Tillåt åtkomst och försök igen.",micNotFound:"Ingen mikrofon hittades. Anslut en mikrofon och försök igen.",voiceUnavailable:"Röst är inte tillgängligt just nu. Försök igen.",chooseTopicLabel:"Välj ett ämne för att komma igång:",categoryTopicsHeading:"Ställ gärna din **{category}**-fråga nedan.",quickQuestionsHeadingLabel:"Eller ställ en snabb fråga:",typeYourMessage:"Skriv ditt meddelande...",agentIsLoading:"Agenten laddas...",conversationResolved:"Konversation avslutad",howWasYourExperience:"Hur var din upplevelse?",feedbackPrompt:"Betygsätt vår support för att hjälpa oss att bli bättre.",feedbackPlaceholder:"Berätta mer om din upplevelse...",submitFeedback:"Skicka feedback",submitting:"Skickar...",selectRatingFirst:"Välj först ett betyg",pleaseSubmitRatingFirst:"Vänligen skicka in ditt betyg först.",completeOnboardingToEnableVoice:"Slutför introduktionen för att aktivera röst",sendMessageToCompleteOnboarding:"Skicka ett meddelande för att slutföra introduktionen och aktivera röst.",resolve:"Avsluta",scrollLeft:"Bläddra åt vänster",scrollRight:"Bläddra åt höger",sendMessage:"Skicka meddelande",voiceSessionLive:"Röstsession aktiv - tala eller skriv för att samtala.",connectingVoice:"Ansluter till röstsession...",poweredBy:"Drivs av",menu:"Meny",close:"Stäng",openChat:"Öppna chatt",closeChat:"Stäng chatt",lightMode:"Ljust läge",nightMode:"Mörkt läge",refreshChat:"Uppdatera chatt",copyChat:"Kopiera chatt",startChat:"Starta chatt",startingVoiceSession:"Startar röstsession...",allowMicAccess:"Tillåt mikrofonåtkomst"},th:{connectionError:"ขออภัย ขณะนี้เกิดปัญหาในการเชื่อมต่อ โปรดลองอีกครั้ง",micDenied:"เราไม่สามารถเข้าถึงไมโครโฟนของคุณได้ โปรดอนุญาตการเข้าถึงแล้วลองอีกครั้ง",micNotFound:"ไม่พบไมโครโฟน โปรดเชื่อมต่อไมโครโฟนแล้วลองอีกครั้ง",voiceUnavailable:"ฟีเจอร์เสียงไม่พร้อมใช้งานในขณะนี้ โปรดลองอีกครั้ง",chooseTopicLabel:"เลือกหัวข้อเพื่อเริ่มต้น:",categoryTopicsHeading:"โปรดถามคำถามเกี่ยวกับ **{category}** ด้านล่าง",quickQuestionsHeadingLabel:"หรือถามคำถามด่วน:",typeYourMessage:"พิมพ์ข้อความของคุณ...",agentIsLoading:"กำลังโหลดตัวแทน...",conversationResolved:"การสนทนาสิ้นสุดลง",howWasYourExperience:"ประสบการณ์ของคุณเป็นอย่างไร?",feedbackPrompt:"โปรดให้คะแนนการสนับสนุนของเราเพื่อช่วยให้เราปรับปรุง",feedbackPlaceholder:"บอกเราเพิ่มเติมเกี่ยวกับประสบการณ์ของคุณ...",submitFeedback:"ส่งความคิดเห็น",submitting:"กำลังส่ง...",selectRatingFirst:"โปรดเลือกคะแนนก่อน",pleaseSubmitRatingFirst:"โปรดส่งคะแนนของคุณก่อน",completeOnboardingToEnableVoice:"ทำการเริ่มต้นให้เสร็จเพื่อเปิดใช้งานเสียง",sendMessageToCompleteOnboarding:"ส่งข้อความเพื่อทำการเริ่มต้นให้เสร็จและเปิดใช้งานเสียง",resolve:"สิ้นสุด",scrollLeft:"เลื่อนไปทางซ้าย",scrollRight:"เลื่อนไปทางขวา",sendMessage:"ส่งข้อความ",voiceSessionLive:"เซสชันเสียงใช้งานอยู่ - พูดหรือพิมพ์เพื่อสนทนา",connectingVoice:"กำลังเชื่อมต่อกับเซสชันเสียง...",poweredBy:"ขับเคลื่อนโดย",menu:"เมนู",close:"ปิด",openChat:"เปิดแชท",closeChat:"ปิดแชท",lightMode:"โหมดสว่าง",nightMode:"โหมดมืด",refreshChat:"รีเฟรชแชท",copyChat:"คัดลอกแชท",startChat:"เริ่มแชท",startingVoiceSession:"กำลังเริ่มเซสชันเสียง...",allowMicAccess:"อนุญาตการเข้าถึงไมโครโฟน"},tr:{connectionError:"Üzgünüz, şu anda bağlantı sorunu yaşıyorum. Lütfen tekrar deneyin.",micDenied:"Mikrofonunuza erişemedik. Lütfen erişime izin verin ve tekrar deneyin.",micNotFound:"Mikrofon bulunamadı. Lütfen bir mikrofon bağlayın ve tekrar deneyin.",voiceUnavailable:"Sesli özellik şu anda kullanılamıyor. Lütfen tekrar deneyin.",chooseTopicLabel:"Başlamak için bir konu seçin:",categoryTopicsHeading:"Lütfen **{category}** sorunuzu aşağıya yazın.",quickQuestionsHeadingLabel:"Veya hızlı bir soru sorun:",typeYourMessage:"Mesajınızı yazın...",agentIsLoading:"Temsilci yükleniyor...",conversationResolved:"Görüşme sonlandırıldı",howWasYourExperience:"Deneyiminiz nasıldı?",feedbackPrompt:"Gelişmemize yardımcı olmak için lütfen desteğimizi değerlendirin.",feedbackPlaceholder:"Deneyiminiz hakkında bize daha fazla bilgi verin...",submitFeedback:"Geri bildirim gönder",submitting:"Gönderiliyor...",selectRatingFirst:"Önce bir değerlendirme seçin",pleaseSubmitRatingFirst:"Lütfen önce değerlendirmenizi gönderin.",completeOnboardingToEnableVoice:"Sesi etkinleştirmek için tanıtımı tamamlayın",sendMessageToCompleteOnboarding:"Tanıtımı tamamlamak ve sesi etkinleştirmek için bir mesaj gönderin.",resolve:"Bitir",scrollLeft:"Sola kaydır",scrollRight:"Sağa kaydır",sendMessage:"Mesaj gönder",voiceSessionLive:"Sesli oturum aktif - konuşun veya yazın.",connectingVoice:"Sesli oturuma bağlanılıyor...",poweredBy:"Tarafından sağlandı",menu:"Menü",close:"Kapat",openChat:"Sohbeti aç",closeChat:"Sohbeti kapat",lightMode:"Açık mod",nightMode:"Karanlık mod",refreshChat:"Sohbeti yenile",copyChat:"Sohbeti kopyala",startChat:"Sohbete başla",startingVoiceSession:"Sesli oturum başlatılıyor...",allowMicAccess:"Mikrofon erişimine izin ver"},uk:{connectionError:"Вибачте, зараз виникли проблеми з підключенням. Спробуйте ще раз.",micDenied:"Не вдалося отримати доступ до мікрофона. Дозвольте доступ і спробуйте ще раз.",micNotFound:"Мікрофон не знайдено. Підключіть мікрофон і спробуйте ще раз.",voiceUnavailable:"Голосова функція зараз недоступна. Спробуйте ще раз.",chooseTopicLabel:"Виберіть тему, щоб почати:",categoryTopicsHeading:"Будь ласка, поставте своє запитання щодо **{category}** нижче.",quickQuestionsHeadingLabel:"Або поставте швидке запитання:",typeYourMessage:"Введіть ваше повідомлення...",agentIsLoading:"Агент завантажується...",conversationResolved:"Розмову завершено",howWasYourExperience:"Яким був ваш досвід?",feedbackPrompt:"Будь ласка, оцініть нашу підтримку, щоб допомогти нам вдосконалюватися.",feedbackPlaceholder:"Розкажіть нам більше про свій досвід...",submitFeedback:"Надіслати відгук",submitting:"Надсилання...",selectRatingFirst:"Спочатку оберіть оцінку",pleaseSubmitRatingFirst:"Будь ласка, спочатку надішліть оцінку.",completeOnboardingToEnableVoice:"Завершіть вступ, щоб увімкнути голос",sendMessageToCompleteOnboarding:"Надішліть повідомлення, щоб завершити вступ та увімкнути голос.",resolve:"Завершити",scrollLeft:"Прокрутити ліворуч",scrollRight:"Прокрутити праворуч",sendMessage:"Надіслати повідомлення",voiceSessionLive:"Голосовий сеанс активний - говоріть або пишіть.",connectingVoice:"Підключення до голосового сеансу...",poweredBy:"Працює на",menu:"Меню",close:"Закрити",openChat:"Відкрити чат",closeChat:"Закрити чат",lightMode:"Світлий режим",nightMode:"Темний режим",refreshChat:"Оновити чат",copyChat:"Копіювати чат",startChat:"Почати чат",startingVoiceSession:"Запуск голосового сеансу...",allowMicAccess:"Дозволити доступ до мікрофона"},ur:{connectionError:"معذرت، اس وقت رابطہ قائم کرنے میں دشواری ہو رہی ہے۔ براہ کرم دوبارہ کوشش کریں۔",micDenied:"ہم آپ کے مائیکروفون تک رسائی حاصل نہیں کر سکے۔ براہ کرم رسائی کی اجازت دیں اور دوبارہ کوشش کریں۔",micNotFound:"کوئی مائیکروفون نہیں ملا۔ براہ کرم ایک منسلک کریں اور دوبارہ کوشش کریں۔",voiceUnavailable:"صوتی سہولت اس وقت دستیاب نہیں ہے۔ براہ کرم دوبارہ کوشش کریں۔",chooseTopicLabel:"شروع کرنے کے لیے ایک موضوع منتخب کریں:",categoryTopicsHeading:"براہ کرم اپنا **{category}** سوال نیچے پوچھیں۔",quickQuestionsHeadingLabel:"یا کوئی فوری سوال پوچھیں:",typeYourMessage:"اپنا پیغام ٹائپ کریں...",agentIsLoading:"ایجنٹ لوڈ ہو رہا ہے...",conversationResolved:"گفتگو مکمل",howWasYourExperience:"آپ کا تجربہ کیسا تھا؟",feedbackPrompt:"براہ کرم ہماری بہتری میں مدد کے لیے ہماری معاونت کی درجہ بندی کریں۔",feedbackPlaceholder:"ہمیں اپنے تجربے کے بارے میں مزید بتائیں...",submitFeedback:"رائے جمع کروائیں",submitting:"جمع ہو رہا ہے...",selectRatingFirst:"پہلے درجہ بندی منتخب کریں",pleaseSubmitRatingFirst:"براہ کرم پہلے اپنی درجہ بندی جمع کروائیں۔",completeOnboardingToEnableVoice:"آواز کو فعال کرنے کے لیے ابتدائی مراحل مکمل کریں",sendMessageToCompleteOnboarding:"ابتدائی مراحل مکمل کرنے اور آواز فعال کرنے کے لیے پیغام بھیجیں۔",resolve:"مکمل کریں",scrollLeft:"بائیں اسکرول کریں",scrollRight:"دائیں اسکرول کریں",sendMessage:"پیغام بھیجیں",voiceSessionLive:"صوتی سیشن فعال - بات کریں یا ٹائپ کریں۔",connectingVoice:"صوتی سیشن سے جڑ رہا ہے...",poweredBy:"پاور بذریعہ",menu:"مینو",close:"بند کریں",openChat:"چیٹ کھولیں",closeChat:"چیٹ بند کریں",lightMode:"ہلکا موڈ",nightMode:"تاریک موڈ",refreshChat:"چیٹ ریفریش کریں",copyChat:"چیٹ کاپی کریں",startChat:"چیٹ شروع کریں",startingVoiceSession:"صوتی سیشن شروع ہو رہا ہے...",allowMicAccess:"مائیکروفون تک رسائی کی اجازت دیں"},vi:{connectionError:"Xin lỗi, hiện tôi đang gặp sự cố kết nối. Vui lòng thử lại.",micDenied:"Chúng tôi không thể truy cập micrô của bạn. Vui lòng cho phép truy cập và thử lại.",micNotFound:"Không tìm thấy micrô. Vui lòng kết nối micrô và thử lại.",voiceUnavailable:"Tính năng giọng nói hiện không khả dụng. Vui lòng thử lại.",chooseTopicLabel:"Chọn một chủ đề để bắt đầu:",categoryTopicsHeading:"Vui lòng đặt câu hỏi của bạn về **{category}** bên dưới.",quickQuestionsHeadingLabel:"Hoặc đặt một câu hỏi nhanh:",typeYourMessage:"Nhập tin nhắn của bạn...",agentIsLoading:"Đang tải trợ lý...",conversationResolved:"Cuộc trò chuyện đã kết thúc",howWasYourExperience:"Trải nghiệm của bạn như thế nào?",feedbackPrompt:"Vui lòng đánh giá hỗ trợ của chúng tôi để giúp chúng tôi cải thiện.",feedbackPlaceholder:"Hãy cho chúng tôi biết thêm về trải nghiệm của bạn...",submitFeedback:"Gửi phản hồi",submitting:"Đang gửi...",selectRatingFirst:"Vui lòng chọn đánh giá trước",pleaseSubmitRatingFirst:"Vui lòng gửi đánh giá của bạn trước.",completeOnboardingToEnableVoice:"Hoàn thành hướng dẫn để bật giọng nói",sendMessageToCompleteOnboarding:"Gửi tin nhắn để hoàn thành hướng dẫn và bật giọng nói.",resolve:"Kết thúc",scrollLeft:"Cuộn sang trái",scrollRight:"Cuộn sang phải",sendMessage:"Gửi tin nhắn",voiceSessionLive:"Phiên giọng nói đang hoạt động - hãy nói hoặc gõ.",connectingVoice:"Đang kết nối phiên giọng nói...",poweredBy:"Được cung cấp bởi",menu:"Menu",close:"Đóng",openChat:"Mở trò chuyện",closeChat:"Đóng trò chuyện",lightMode:"Chế độ sáng",nightMode:"Chế độ tối",refreshChat:"Làm mới trò chuyện",copyChat:"Sao chép trò chuyện",startChat:"Bắt đầu trò chuyện",startingVoiceSession:"Đang bắt đầu phiên giọng nói...",allowMicAccess:"Cho phép truy cập micrô"}},kd={en:{onboardingNamePlaceholder:"Please enter your name",onboardingEmailPlaceholder:"Please enter your email address",onboardingPhonePlaceholder:"Please enter your phone number"},ar:{onboardingNamePlaceholder:"الرجاء إدخال اسمك",onboardingEmailPlaceholder:"الرجاء إدخال بريدك الإلكتروني",onboardingPhonePlaceholder:"الرجاء إدخال رقم هاتفك"},es:{onboardingNamePlaceholder:"Introduce tu nombre",onboardingEmailPlaceholder:"Introduce tu correo electrónico",onboardingPhonePlaceholder:"Introduce tu número de teléfono"},be:{onboardingNamePlaceholder:"Калі ласка, увядзіце ваша імя",onboardingEmailPlaceholder:"Калі ласка, увядзіце адрас электроннай пошты",onboardingPhonePlaceholder:"Калі ласка, увядзіце нумар тэлефона"},bs:{onboardingNamePlaceholder:"Unesite svoje ime",onboardingEmailPlaceholder:"Unesite svoju email adresu",onboardingPhonePlaceholder:"Unesite svoj broj telefona"},bg:{onboardingNamePlaceholder:"Моля, въведете вашето име",onboardingEmailPlaceholder:"Моля, въведете имейл адреса си",onboardingPhonePlaceholder:"Моля, въведете телефонния си номер"},my:{onboardingNamePlaceholder:"ကျေးဇူးပြု၍ သင့်အမည်ကို ထည့်ပါ",onboardingEmailPlaceholder:"ကျေးဇူးပြု၍ သင့်အီးမေးလ်လိပ်စာကို ထည့်ပါ",onboardingPhonePlaceholder:"ကျေးဇူးပြု၍ သင့်ဖုန်းနံပါတ်ကို ထည့်ပါ"},ca:{onboardingNamePlaceholder:"Introdueix el teu nom",onboardingEmailPlaceholder:"Introdueix el teu correu electrònic",onboardingPhonePlaceholder:"Introdueix el teu número de telèfon"},zh:{onboardingNamePlaceholder:"请输入您的姓名",onboardingEmailPlaceholder:"请输入您的电子邮箱地址",onboardingPhonePlaceholder:"请输入您的电话号码"},hr:{onboardingNamePlaceholder:"Unesite svoje ime",onboardingEmailPlaceholder:"Unesite svoju adresu e-pošte",onboardingPhonePlaceholder:"Unesite svoj broj telefona"},cs:{onboardingNamePlaceholder:"Zadejte své jméno",onboardingEmailPlaceholder:"Zadejte svou e-mailovou adresu",onboardingPhonePlaceholder:"Zadejte své telefonní číslo"},da:{onboardingNamePlaceholder:"Indtast dit navn",onboardingEmailPlaceholder:"Indtast din e-mailadresse",onboardingPhonePlaceholder:"Indtast dit telefonnummer"},nl:{onboardingNamePlaceholder:"Voer uw naam in",onboardingEmailPlaceholder:"Voer uw e-mailadres in",onboardingPhonePlaceholder:"Voer uw telefoonnummer in"},et:{onboardingNamePlaceholder:"Sisestage oma nimi",onboardingEmailPlaceholder:"Sisestage oma e-posti aadress",onboardingPhonePlaceholder:"Sisestage oma telefoninumber"},fi:{onboardingNamePlaceholder:"Anna nimesi",onboardingEmailPlaceholder:"Anna sähköpostiosoitteesi",onboardingPhonePlaceholder:"Anna puhelinnumerosi"},fr:{onboardingNamePlaceholder:"Veuillez saisir votre nom",onboardingEmailPlaceholder:"Veuillez saisir votre adresse e-mail",onboardingPhonePlaceholder:"Veuillez saisir votre numéro de téléphone"},de:{onboardingNamePlaceholder:"Bitte geben Sie Ihren Namen ein",onboardingEmailPlaceholder:"Bitte geben Sie Ihre E-Mail-Adresse ein",onboardingPhonePlaceholder:"Bitte geben Sie Ihre Telefonnummer ein"},el:{onboardingNamePlaceholder:"Παρακαλώ εισαγάγετε το όνομά σας",onboardingEmailPlaceholder:"Παρακαλώ εισαγάγετε τη διεύθυνση email σας",onboardingPhonePlaceholder:"Παρακαλώ εισαγάγετε τον αριθμό τηλεφώνου σας"},hi:{onboardingNamePlaceholder:"कृपया अपना नाम दर्ज करें",onboardingEmailPlaceholder:"कृपया अपना ईमेल पता दर्ज करें",onboardingPhonePlaceholder:"कृपया अपना फ़ोन नंबर दर्ज करें"},mr:{onboardingNamePlaceholder:"कृपया आपले नाव प्रविष्ट करा",onboardingEmailPlaceholder:"कृपया आपला ईमेल पत्ता प्रविष्ट करा",onboardingPhonePlaceholder:"कृपया आपला फोन नंबर प्रविष्ट करा"},hu:{onboardingNamePlaceholder:"Adja meg a nevét",onboardingEmailPlaceholder:"Adja meg az e-mail-címét",onboardingPhonePlaceholder:"Adja meg a telefonszámát"},is:{onboardingNamePlaceholder:"Sláðu inn nafn þitt",onboardingEmailPlaceholder:"Sláðu inn netfangið þitt",onboardingPhonePlaceholder:"Sláðu inn símanúmerið þitt"},id:{onboardingNamePlaceholder:"Masukkan nama Anda",onboardingEmailPlaceholder:"Masukkan alamat email Anda",onboardingPhonePlaceholder:"Masukkan nomor telepon Anda"},it:{onboardingNamePlaceholder:"Inserisci il tuo nome",onboardingEmailPlaceholder:"Inserisci il tuo indirizzo email",onboardingPhonePlaceholder:"Inserisci il tuo numero di telefono"},ja:{onboardingNamePlaceholder:"お名前を入力してください",onboardingEmailPlaceholder:"メールアドレスを入力してください",onboardingPhonePlaceholder:"電話番号を入力してください"},ko:{onboardingNamePlaceholder:"이름을 입력해 주세요",onboardingEmailPlaceholder:"이메일 주소를 입력해 주세요",onboardingPhonePlaceholder:"전화번호를 입력해 주세요"},lv:{onboardingNamePlaceholder:"Lūdzu, ievadiet savu vārdu",onboardingEmailPlaceholder:"Lūdzu, ievadiet savu e-pasta adresi",onboardingPhonePlaceholder:"Lūdzu, ievadiet savu tālruņa numuru"},lt:{onboardingNamePlaceholder:"Įveskite savo vardą",onboardingEmailPlaceholder:"Įveskite savo el. pašto adresą",onboardingPhonePlaceholder:"Įveskite savo telefono numerį"},mk:{onboardingNamePlaceholder:"Внесете го вашето име",onboardingEmailPlaceholder:"Внесете ја вашата е-пошта",onboardingPhonePlaceholder:"Внесете го вашиот телефонски број"},ms:{onboardingNamePlaceholder:"Masukkan nama anda",onboardingEmailPlaceholder:"Masukkan alamat e-mel anda",onboardingPhonePlaceholder:"Masukkan nombor telefon anda"},no:{onboardingNamePlaceholder:"Skriv inn navnet ditt",onboardingEmailPlaceholder:"Skriv inn e-postadressen din",onboardingPhonePlaceholder:"Skriv inn telefonnummeret ditt"},fa:{onboardingNamePlaceholder:"لطفاً نام خود را وارد کنید",onboardingEmailPlaceholder:"لطفاً ایمیل خود را وارد کنید",onboardingPhonePlaceholder:"لطفاً شماره تلفن خود را وارد کنید"},pl:{onboardingNamePlaceholder:"Wpisz swoje imię",onboardingEmailPlaceholder:"Wpisz swój adres e-mail",onboardingPhonePlaceholder:"Wpisz swój numer telefonu"},pt:{onboardingNamePlaceholder:"Insira o seu nome",onboardingEmailPlaceholder:"Insira o seu endereço de e-mail",onboardingPhonePlaceholder:"Insira o seu número de telefone"},ro:{onboardingNamePlaceholder:"Introduceți numele dvs.",onboardingEmailPlaceholder:"Introduceți adresa dvs. de e-mail",onboardingPhonePlaceholder:"Introduceți numărul dvs. de telefon"},ru:{onboardingNamePlaceholder:"Введите ваше имя",onboardingEmailPlaceholder:"Введите адрес электронной почты",onboardingPhonePlaceholder:"Введите номер телефона"},sr:{onboardingNamePlaceholder:"Унесите своје име",onboardingEmailPlaceholder:"Унесите своју адресу е-поште",onboardingPhonePlaceholder:"Унесите свој број телефона"},sk:{onboardingNamePlaceholder:"Zadajte svoje meno",onboardingEmailPlaceholder:"Zadajte svoju e-mailovú adresu",onboardingPhonePlaceholder:"Zadajte svoje telefónne číslo"},sl:{onboardingNamePlaceholder:"Vnesite svoje ime",onboardingEmailPlaceholder:"Vnesite svoj e-poštni naslov",onboardingPhonePlaceholder:"Vnesite svojo telefonsko številko"},sv:{onboardingNamePlaceholder:"Ange ditt namn",onboardingEmailPlaceholder:"Ange din e-postadress",onboardingPhonePlaceholder:"Ange ditt telefonnummer"},th:{onboardingNamePlaceholder:"กรุณากรอกชื่อของคุณ",onboardingEmailPlaceholder:"กรุณากรอกอีเมลของคุณ",onboardingPhonePlaceholder:"กรุณากรอกหมายเลขโทรศัพท์ของคุณ"},tr:{onboardingNamePlaceholder:"Lütfen adınızı girin",onboardingEmailPlaceholder:"Lütfen e-posta adresinizi girin",onboardingPhonePlaceholder:"Lütfen telefon numaranızı girin"},uk:{onboardingNamePlaceholder:"Введіть ваше ім’я",onboardingEmailPlaceholder:"Введіть вашу адресу електронної пошти",onboardingPhonePlaceholder:"Введіть ваш номер телефону"},ur:{onboardingNamePlaceholder:"براہ کرم اپنا نام درج کریں",onboardingEmailPlaceholder:"براہ کرم اپنا ای میل پتہ درج کریں",onboardingPhonePlaceholder:"براہ کرم اپنا فون نمبر درج کریں"},vi:{onboardingNamePlaceholder:"Vui lòng nhập tên của bạn",onboardingEmailPlaceholder:"Vui lòng nhập địa chỉ email của bạn",onboardingPhonePlaceholder:"Vui lòng nhập số điện thoại của bạn"}},xd=new Set(["ar","fa","he","ur","iw","prs"]);function Sd(e){if(!e||"string"!=typeof e)return"en";const t=e.toLowerCase().split(/[-_]/)[0];return wd[t]?t:"en"}function Cd(e){const t=(e||"").toLowerCase().split(/[-_]/)[0];return xd.has(t)}const Md=/[\u0590-\u05ff\u0600-\u06ff\u0700-\u074f\u0750-\u077f\u08a0-\u08ff\ufb1d-\ufb4f\ufb50-\ufdff\ufe70-\ufeff]/,Pd=/[A-Za-z\u00c0-\u024f\u0370-\u03ff\u0400-\u04ff]/;function zd(e,t=!1){if("string"!=typeof e||0===e.length)return t;for(const t of e){if(Md.test(t))return!0;if(Pd.test(t))return!1}return t}function Ed(e,t){const n=Sd(e),r=wd[n]||vd,o=kd[n];return o?.[t]??r[t]??kd.en[t]??vd[t]??t}function jd(e){const t=Sd(e);return e=>Ed(t,e)}const Td=new Set(["NotAllowedError","PermissionDeniedError","SecurityError"]),Nd=new Set(["NotFoundError","DevicesNotFoundError","OverconstrainedError"]);function Fd(e){try{const t="string"==typeof e?.name?e.name:"";if(Td.has(t))return"micDenied";if(Nd.has(t))return"micNotFound";const n="string"==typeof e?.message?e.message.toLowerCase():"";if(n.includes("permission denied")||n.includes("permission dismissed"))return"micDenied";if(n.includes("device not found")||n.includes("no microphone"))return"micNotFound"}catch{}return"voiceUnavailable"}const Ld=e=>e.replace(/([\u3000-\u303f\u3040-\u30ff\u3400-\u4dbf\u4e00-\u9fff\uff00-\uffef])\s+([\u3000-\u303f\u3040-\u30ff\u3400-\u4dbf\u4e00-\u9fff\uff00-\uffef])/g,"$1$2"),Rd=/^(https?|mailto|tel):/i,Ad=e=>{const t=(e||"").trim();return t?/^https?:\/\//i.test(t)||Rd.test(t)?t:/^[a-z][a-z0-9+.-]*:/i.test(t)?"":`https://${t.replace(/^\/+/,"")}`:""},_d=(...e)=>e.filter(Boolean).join(" "),Id={fullname:0,name:0,username:0,email:1,phone:2,mobileno:2},Bd=e=>{if(!e)return 99;const t=String(e).toLowerCase();return Id[t]??99},Dd="eshal_chat_session",Od="eshal_chat_session_messages";function $d(e,t=200,n=50){if(!Array.isArray(e))return[];("number"!=typeof t||t<=0)&&(t=200),("number"!=typeof n||n<=0||n>=t)&&(n=Math.min(50,t-1));let r=e;for(;r.length>t;)r=r.slice(n);return r}const Vd=(e,t,n,r)=>{if(e&&t)try{const o=r?.cap,a=r?.trimBatch,i=function(e){return Array.isArray(e)?e.filter(e=>e&&!e.isWelcome&&(e.content||Array.isArray(e.sources)&&e.sources.length>0||Array.isArray(e.attachments)&&e.attachments.length>0)).map(e=>({id:e.id,role:e.role,content:e.content,timestamp:e.timestamp instanceof Date?e.timestamp.toISOString():"string"==typeof e.timestamp?e.timestamp:(new Date).toISOString(),type:e.type??null,...Array.isArray(e.sources)&&e.sources.length>0?{sources:e.sources}:{},...void 0!==e.feedback?{feedback:e.feedback}:{},...Array.isArray(e.prompts)&&e.prompts.length>0?{prompts:e.prompts}:{},...Array.isArray(e.attachments)&&e.attachments.length>0?{attachments:e.attachments.filter(e=>e&&(e.filename||e.storageKey)).map(e=>({filename:e.filename,mimeType:e.mimeType,size:e.size,storageKey:e.storageKey,url:e.url}))}:{}})):[]}($d(n,o,a));localStorage.setItem(`${Od}_${e}_${t}`,JSON.stringify(i))}catch{}},Ud=(e,t)=>{if(e&&t)try{localStorage.removeItem(`${Od}_${e}_${t}`)}catch{}},Hd=(e,t)=>{if(null==e||!t)return null;const n={MINUTES:6e4,HOURS:36e5,DAYS:864e5}[t.toUpperCase()];return void 0===n?null:Number(e)*n},Wd=e=>{try{const t=localStorage.getItem(`${Dd}_${e}`);return t?JSON.parse(t):null}catch{return null}},qd=(e,t,n)=>{if(!e||!e.lastActivity)return!1;if(null==t||0===t)return!0;if(null!==t&&null!==n){const r=JSON.stringify({value:t,unit:n?.toUpperCase()});if(e.settingsSnapshot&&e.settingsSnapshot!==r)return!1}if(null===e.firstInteractionAt)return!0;const r=Hd(t,n);if(!r)return!0;const o=new Date(e.lastActivity).getTime(),a=Date.now()-o<r;return a},Qd=(e,t,n={})=>{try{const r=(new Date).toISOString();localStorage.setItem(`${Dd}_${e}`,JSON.stringify({conversationId:t,lastActivity:r,createdAt:r,firstInteractionAt:null,...n}))}catch{}},Kd=e=>{try{const t=Wd(e);if(!t)return;const n=(new Date).toISOString();t.lastActivity=n,t.firstInteractionAt||(t.firstInteractionAt=n),localStorage.setItem(`${Dd}_${e}`,JSON.stringify(t))}catch{}},Yd=e=>{try{return Wd(e)?.onboardingName??""}catch{return""}},Gd=(e,t)=>{try{if(!e)return;if(!Array.isArray(t)||0===t.length)return void localStorage.removeItem(`${Dd}_prompts_${e}`);localStorage.setItem(`${Dd}_prompts_${e}`,JSON.stringify(t))}catch{}};function Jd(e,t){const n=null==e?"":String(e),r=String(t??"").trim();if(!r||!n.trim())return n;const o=function(e){return String(e??"").trim().split(/\s+/).filter(Boolean).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}(r);if(new RegExp(`^\\s*(?:hi|hey|hello)\\s+${o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`,"i").test(n))return n;const a=n.match(/^\s*(hi|hey|hello)(?:\s+there)?\s*([-,!.:;]+)?\s*/i);if(a){const e=a[1],t=a[2]??",",r=n.slice(a[0].length);return`${e} ${o}${t}${r?` ${r}`:""}`}return`Hi ${o}, ${n}`}const Xd=new Set(["fullname","name","username"]);const Zd=({id:e,role:t,content:n,isProcessing:r=!1,isError:o=!1,metadata:a,attachments:i})=>({id:e,role:t,content:n,timestamp:new Date,isProcessing:r,...o?{isError:!0}:{},metadata:a,...Array.isArray(i)&&i.length>0?{attachments:i}:{}}),ep=(e,t)=>{const n=[...e.map(e=>({...e,metadata:e.metadata||{source:"sse"}})),...t];return Array.from(new Map(n.map(e=>[e.id,e])).values()).sort((e,t)=>(e.timestamp instanceof Date?e.timestamp.getTime():new Date(e.timestamp).getTime())-(t.timestamp instanceof Date?t.timestamp.getTime():new Date(t.timestamp).getTime()))};function tp(){return`widget-session-${"undefined"!=typeof crypto&&crypto.randomUUID?crypto.randomUUID():`${Date.now()}-${Math.random().toString(36).slice(2)}`}`}const np=e=>e&&e.length>0?e:[],rp=({welcomeMessage:e,fallbackMessage:t,quickQuestions:n=[],apiBaseUrl:r,wsBaseUrl:o,apiKey:a,organizationId:i,getAuthToken:s,autoOpen:l,openDelay:c,darkMode:u,enableVoiceInteraction:d=!1,provideCitations:p=!0,onboardingQuestions:g=[],onboardingEnabled:f=!1,collectionPrompt:h,inactivityTimeoutValue:m,inactivityTimeoutUnit:b,messageLimits:y,locale:v="en"})=>{const w=I.useMemo(()=>jd(v),[v]),k=I.useMemo(()=>({cap:"number"==typeof y?.cap&&y.cap>0?y.cap:200,trimBatch:"number"==typeof y?.trimBatch&&y.trimBatch>0?y.trimBatch:50}),[y?.cap,y?.trimBatch]),[x,S]=I.useState(l),[C,M]=I.useState(!1),[P,z]=I.useState(u),[E,j]=I.useState(()=>{try{const e=Wd(i);if(void 0!==m&&e&&qd(e,m,b))return[]}catch{}if(!e)return[];let t=e;try{t=Jd(e,Yd(i))}catch{}return[{...Zd({id:Date.now().toString(),role:"assistant",content:t}),isWelcome:!0}]}),[T,N]=I.useState(""),F=I.useRef(""),L=I.useCallback(e=>{const t="function"==typeof e?e(F.current):e;F.current=t,N(t)},[]),[R,A]=I.useState(!1),_=I.useRef(null),B=I.useRef(null),D=I.useRef(1),[O,$]=I.useState(null),[V,U]=I.useState(null),H=I.useRef(null);I.useEffect(()=>{H.current=V},[V]);const[W,q]=I.useState(null),Q=I.useRef(null);I.useEffect(()=>{Q.current=W},[W]);const[K,Y]=I.useState(!1),[G,J]=I.useState(()=>{try{const e=Wd(i);if(e&&e.onboardingCompleted)return!0}catch{}return!1}),[X,Z]=I.useState(()=>{try{return Yd(i)||""}catch{return""}}),ee=I.useMemo(()=>Jd(e,X),[e,X]),[te,ne]=I.useState(null),[re,oe]=I.useState({}),ae=I.useRef(!1),ie=I.useRef(!1),se=I.useRef(0),[le,ce]=I.useState(!1),[ue,de]=I.useState(!1),[pe,ge]=I.useState([]),[fe,he]=I.useState("idle"),[me,be]=I.useState(null),[ye,ve]=I.useState(!1),[we,ke]=I.useState(()=>{try{const e=Wd(i);if(void 0!==m&&e&&qd(e,m,b))return e.conversationId}catch{}return tp()}),xe=I.useRef(null),[Se,Ce]=I.useState(!1),Me=I.useRef(!1),Pe=I.useCallback(()=>{Me.current=!0,Ce(!0)},[]),ze=I.useRef(null),Ee=I.useRef(null),je=I.useRef(null),Te=I.useRef(null),Ne=I.useRef(null),Fe=I.useRef(null),Le=I.useRef(null),Re=I.useRef(null),Ae=I.useRef(null),_e=I.useRef(!1),Ie=I.useRef(!1);I.useRef(null);const Be=I.useRef(null);I.useRef(null);const De=I.useRef(!1),Oe=I.useRef(null),$e=I.useRef(!1),Ve=I.useRef(!1),Ue=I.useRef(null),He=I.useRef(null),We=I.useRef(null),qe=I.useRef(null),Qe=I.useRef(null),Ke=I.useCallback(e=>{if(!e)return;const t=new Date(e).getTime();if(!Number.isFinite(t))return;t>(Qe.current?new Date(Qe.current).getTime():-1/0)&&(Qe.current=new Date(t).toISOString())},[]),Ye=I.useCallback(e=>{if(Array.isArray(e)&&0!==e.length){for(const t of e)Ke(t?.createdAt);j(t=>{const n=new Set(t.map(e=>e.id)),r=e.filter(e=>e&&e.id&&!n.has(e.id)).map(e=>({...Zd({id:e.id,role:e.role||"assistant",content:e.content,isProcessing:!1,metadata:{senderName:e.senderName}}),timestamp:e.createdAt?new Date(e.createdAt):new Date}));if(0===r.length)return t;const o=e=>{const t=e.timestamp instanceof Date?e.timestamp.getTime():new Date(e.timestamp).getTime();return Number.isFinite(t)?t:0},a=[...t,...r];return a.sort((e,t)=>o(e)-o(t)),a})}},[Ke]),Ge=I.useCallback(async()=>{if(r&&we)try{const e={};if("function"==typeof s){const t=await s();t&&(e.Authorization=`Bearer ${t}`)}const t=Qe.current,n=`${r.replace(/\/$/,"")}/api/v1/widget/history/${encodeURIComponent(we)}`+(t?`?since=${encodeURIComponent(t)}`:""),o=await fetch(n,{headers:e,credentials:"include"});if(!o.ok)return;const a=await o.json(),i=Array.isArray(a?.messages)?a.messages:[];Ye(i.filter(e=>"human_reply"===e?.contentType||"handoff_ack"===e?.contentType))}catch{}},[r,we,s,Ye]),Je=I.useCallback(async e=>{if(xe.current)return void(e&&e());if(!r||!we)return;let t=`${r.replace(/\/$/,"")}/api/v1/widget/events/${encodeURIComponent(we)}`;if("function"==typeof s)try{const e=await s();e&&(t+=`${t.includes("?")?"&":"?"}token=${encodeURIComponent(e)}`)}catch{}if(xe.current)return void(e&&e());const n=new EventSource(t);n.onmessage=e=>{try{const t=JSON.parse(e.data);"message_created"===t.type&&t.message&&(Ke(t.message.createdAt),j(e=>e.some(e=>e.id===t.message.id)?e:[...e,Zd({id:t.message.id,role:t.message.role||"assistant",content:t.message.content,isProcessing:!1,metadata:{senderName:t.message.senderName}})]))}catch{}},n.onopen=()=>{Ge(),e&&e()},n.onerror=()=>{},xe.current=n},[r,we,s,Ge]);I.useEffect(()=>()=>{xe.current&&(xe.current.close(),xe.current=null)},[]);const Xe=I.useMemo(()=>{if(!i)return null;const e=((e,t)=>{if(t)return t.replace(/\/$/,"");if(!e)return"wss://dev.eshal.ai/voice/ws";try{const t=new URL(e);return t.protocol=t.protocol.replace(/^http/,"ws"),t.pathname="/voice/ws",t.toString().replace(/\/$/,"")}catch(e){return"wss://dev.eshal.ai/voice/ws"}})(r,o);return`${e}/${i}/${we}`},[r,o,i,we]),Ze=I.useCallback(()=>{const e=`msg-${D.current}`;return D.current+=1,e},[]);I.useEffect(()=>{if(l&&c>0){const e=setTimeout(()=>S(!0),c);return()=>clearTimeout(e)}},[l,c]),I.useEffect(()=>{let e=!1;return(async()=>{try{const{default:t}=await Promise.resolve().then(function(){return bh}),n=new t({cache:!0,geoFromBrowser:!0,preferredProvider:"ipwho.is",onError:()=>{}}),r=await n.init();if(e)return;if(r?.fingerprintId&&(We.current=r.fingerprintId),r?.geo||r?.ip){const e=r.geo||{};qe.current={ip:r.ip||e.ip||null,country:e.country||null,countryCode:e.countryCode||null,region:e.region||null,city:e.city||null,timezone:e.timezone||null}}}catch{}})(),()=>{e=!0}},[]),I.useEffect(()=>{z(u)},[u]);const et=I.useRef(!1),tt=I.useRef(!1),nt=I.useRef(!1),rt=I.useRef({value:null,unit:null}),[ot,at]=I.useState(!1);I.useEffect(()=>{if(!i||!we||void 0===m)return;const t=Wd(i);if(t&&qd(t,m,b)){if(we!==t.conversationId)return void ke(t.conversationId);if(!et.current){et.current=!0;const t=((e,t)=>{if(!e||!t)return[];try{const n=localStorage.getItem(`${Od}_${e}_${t}`);if(!n)return[];const r=JSON.parse(n);return Array.isArray(r)?r.map(e=>({...e,timestamp:e.timestamp?new Date(e.timestamp):new Date})):[]}catch{return[]}})(i,we);if(t.length>0){if(tt.current=!0,e){const e=t[0]?.timestamp,n=e instanceof Date?e.getTime():e?new Date(e).getTime():Date.now(),r={...Zd({id:"welcome-restored",role:"assistant",content:ee}),isWelcome:!0,timestamp:new Date(n-1)};j([r,...t])}else j(t);const n=t.some(e=>"assistant"===e.role&&Array.isArray(e.prompts)&&e.prompts.length>0);if(!n){const e=(e=>{try{const t=localStorage.getItem(`${Dd}_prompts_${e}`);return t&&JSON.parse(t)||[]}catch{return[]}})(i);e.length>0&&j(t=>{const n=[...t];for(let t=n.length-1;t>=0;t-=1)if("assistant"===n[t].role){n[t]={...n[t],prompts:e};break}return n})}}}}else if(et.current||(et.current=!0),t&&we===t.conversationId){const e=tp();Ud(i,we),ke(e)}else t?.conversationId&&t.conversationId!==we&&Ud(i,t.conversationId),t&&t.conversationId===we||Qd(i,we,{settingsSnapshot:JSON.stringify({value:m,unit:b?.toUpperCase()})})},[i,we,r,m,b]);const it=I.useRef(null);I.useEffect(()=>{if(!r||!i||!we)return;if(it.current===we)return;it.current=we;let e=!1;return(async()=>{try{const t={};if("function"==typeof s){const e=await s();e&&(t.Authorization=`Bearer ${e}`)}const n=await fetch(`${r.replace(/\/$/,"")}/api/v1/widget/history/${encodeURIComponent(we)}`,{headers:t,credentials:"include"});if(!n.ok||e)return;const o=await n.json(),a=(Array.isArray(o?.messages)?o.messages:[]).filter(e=>"human_reply"===e?.contentType||"handoff_ack"===e?.contentType);e||Ye(a),e||"human"!==o?.responder||(Pe(),Je())}catch{}})(),()=>{e=!0}},[r,i,we,s,Je,Pe,Ye]),I.useEffect(()=>{if(i&&E&&0!==E.length)for(let e=E.length-1;e>=0;e-=1){const t=E[e];if("assistant"===t?.role&&Array.isArray(t.prompts)&&t.prompts.length>0)return void Gd(i,t.prompts)}},[E,i]),I.useEffect(()=>{le||R||E.length<=k.cap||j(e=>$d(e,k.cap,k.trimBatch))},[E.length,le,R,k.cap,k.trimBatch]),I.useEffect(()=>{i&&we&&(le||R||Vd(i,we,ep(E,pe),k))},[E,pe,i,we,le,R,k]),I.useEffect(()=>{if(!f||G)return;np(g).length>0&&Y(!0)},[f,G,g]),I.useEffect(()=>{e&&!tt.current&&j(e=>{if(!e.length)return[{...Zd({id:Date.now().toString(),role:"assistant",content:ee}),isWelcome:!0}];const[t,...n]=e;return t.isWelcome?[{...t,content:ee},...n]:e})},[e,ee]),I.useCallback(e=>{j(t=>t.map(t=>t.id===e.id?{...t,...e.update(t)}:t))},[]);const st=I.useCallback((e,t={})=>{if(!e)return;const n=t.replaceMarker||null;j(t=>{const r=n?(t||[]).filter(e=>e?.metadata?.synthesizedKind!==n):t||[];return[...r,Zd({id:Ze(),role:"assistant",content:e,metadata:n?{synthesizedKind:n}:void 0})]})},[Ze]),lt=I.useCallback(()=>{try{_.current&&_.current.abort()}catch{}},[]),ct=I.useCallback(async(e,n,o)=>{const a=String(e??"").trim(),l=Array.isArray(o?.attachments)?o.attachments:[];if(!a&&0===l.length)return{success:!1,error:"Message cannot be empty"};if(ie.current)return{success:!1,error:"A message is already being sent"};ie.current=!0;const c=se.current+=1,u=()=>{se.current===c&&(A(!1),ie.current=!1)};if("Connect with a human representative"===a){const e=async()=>{if(r&&we){const e={"Content-Type":"application/json"};if("function"==typeof s){const t=await s();t&&(e.Authorization=`Bearer ${t}`)}fetch(`${r.replace(/\/$/,"")}/api/v1/widget/handoff/${encodeURIComponent(we)}`,{method:"POST",headers:e,credentials:"include",body:JSON.stringify({reason:"User clicked handoff button"})}).catch(()=>{})}};Pe(),Je(e)}if(n&&!["inquiry","complaint","technical"].includes((n||"").toLowerCase())||(Q.current=a,q(a)),!r)return ie.current=!1,j(e=>[...e||[],Zd({id:Ze(),role:"assistant",content:w("connectionError"),isProcessing:!1,isError:!0})]),{success:!1,error:"API base URL is required"};const d=["inquiry","complaint","technical","userName","email","phone","fullname","mobileno"];let g="inquiry";if(n){const e=n.toLowerCase();"fullname"===e||"name"===e?g="userName":"email"===e?g="email":"phone"===e||"mobileno"===e?g="phone":d.includes(e)&&(g=e)}let f=null;const h=(e,t)=>{null!=e&&j(n=>(n||[]).map(n=>n.id===e?{...n,status:t}:n))};if("inquiry"===g||"complaint"===g||"technical"===g){f=Ze();const e=Zd({id:f,role:"user",content:a,...l.length?{attachments:l}:{}});j(t=>{const n=(t||[]).map(e=>"assistant"===e.role&&e.prompts?.length?{...e,prompts:void 0}:e);return o&&o.skipUserAppend?n:[...n,e]}),L(""),Me.current||A(!0)}else L("");try{const e={message:a,type:g,conversationId:we,enable_citation:p??!0,channel:"WIDGET",...We.current?{fingerprintId:We.current}:{},...qe.current?{visitor:qe.current}:{},...O&&(O.category||O.tags&&O.tags.length)?{filter:O}:{},...H.current?{routing:H.current}:{},...l.length?{attachments:l}:{},messageHistory:E.filter(e=>!e.isProcessing&&e.content&&e.content.trim()&&!["userName","email","phone"].includes(e.type)).map(e=>{let t;return t=e.timestamp instanceof Date?e.timestamp.toISOString():"string"==typeof e.timestamp?e.timestamp:e.timestamp?new Date(e.timestamp).toISOString():(new Date).toISOString(),{id:e.id,role:e.role,content:e.content,timestamp:t,isProcessing:!1}})},t=[500,1500];if("userName"===g||"email"===g||"phone"===g){const t=(await td(e,r,s)).getReader(),n=new TextDecoder;for(;;){const{done:e,value:r}=await t.read();if(e)break;n.decode(r)}return{success:!0}}if(Me.current&&("inquiry"===g||"complaint"===g||"technical"===g)){try{const t=(await td(e,r,s)).getReader();for(;;){const{done:e}=await t.read();if(e)break}}catch(e){return h(f,"failed"),{success:!1,error:e instanceof Error?e.message:"Failed to send message"}}return h(f,"sent"),Kd(i),{success:!0}}if("inquiry"===g||"complaint"===g||"technical"===g){let n;for(let o=0;o<=t.length;o+=1)try{_.current=new AbortController;const t=await td(e,r,s,_.current.signal);return await ud(t,j,u),h(f,"sent"),Kd(i),{success:!0}}catch(e){if(n=e,e&&"AbortError"===e.name)return j(e=>(e||[]).filter(e=>!e.isProcessing)),h(f,"sent"),{success:!0,stopped:!0};if(e instanceof ed&&o<t.length){j(e=>(e||[]).filter(e=>!e.isProcessing));const e=t[o];await new Promise(t=>setTimeout(t,e));continue}throw e}throw n}return await td(e,r,s),Kd(i),{success:!0}}catch(e){return"inquiry"!==g&&"complaint"!==g&&"technical"!==g||(A(!1),h(f,"failed"),j(e=>[...(e||[]).filter(e=>!e.isProcessing),Zd({id:Ze(),role:"assistant",content:t?.trim()||w("connectionError"),isProcessing:!1,isError:!0})])),{success:!1,error:e instanceof Error?e.message:"Failed to send message"}}finally{u()}},[r,a,Ze,s,E,we,V,O,p]),ut=I.useCallback(e=>e&&"failed"===e.status?(j(t=>(t||[]).filter(t=>t.id!==e.id)),ct(e.content,void 0,{attachments:e.attachments})):Promise.resolve({success:!1,error:"Nothing to retry"}),[ct]),dt=I.useCallback(async e=>{const t=np(g);if(0===t.length)return;const n=function(e,t){if(!Array.isArray(e)||!t)return"";for(const n of e){const e=String(n?.fieldType??"").toLowerCase();if(!Xd.has(e))continue;const r=t[n?.fieldType??""];if("string"!=typeof r)continue;const o=r.trim();if(o)return o}return""}(t,e);Y(!1),J(!0),((e,t)=>{try{const n=Wd(e);if(!n)return;n.onboardingCompleted=!0;const r=(t??"").trim();r&&(n.onboardingName=r),localStorage.setItem(`${Dd}_${e}`,JSON.stringify(n))}catch{}})(i,n),n&&Z(n),oe(t=>({...t,...e})),te&&!ae.current&&(ae.current=!0,L(te),ne(null));const o=[...t].sort((e,t)=>Bd(e.fieldType)-Bd(t.fieldType)),a={};for(const t of o){const n=t.fieldType||"question",r=(e[n]??"").trim();r&&(a[n]=r)}if(Object.keys(a).length>0&&r&&we)try{await(async(e,{conversationId:t,organizationId:n},r,o)=>{const a={"Content-Type":"application/json"};if("function"==typeof o){const e=await o();e&&(a.Authorization=`Bearer ${e}`)}const i=await fetch(`${r.replace(/\/$/,"")}/api/v1/support/onboarding`,{method:"POST",headers:a,credentials:"include",body:JSON.stringify({conversationId:t,organizationId:n,answers:e})});if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);return i.json()})(a,{conversationId:we,organizationId:i},r,s)}catch(e){}},[g,te,i,r,we,s]),pt=I.useRef(null);I.useEffect(()=>{if(R||ie.current||!pt.current)return;const{text:e,attachments:t}=pt.current;pt.current=null;const n=Array.isArray(t)&&t.length>0;ct(e,void 0,n?{attachments:t}:void 0)},[R,ct]);const gt=I.useCallback(async(e,t)=>{const n=String(e??F.current).trim(),r=Array.isArray(t)&&t.length>0;if(n||r)return ie.current?(pt.current={text:n,attachments:r?t:void 0},void L("")):void await ct(n,void 0,r?{attachments:t}:void 0)},[ct,L]),ft=I.useCallback(async(e,t)=>{await gt(e,t)},[gt]),ht=I.useCallback(async e=>{const t=e?.trim();t&&await ct(t)},[ct]),mt=I.useCallback(async(e,t,n)=>{if(j(t=>t.filter(t=>t.decisionData?.decisionId!==e)),"routing-clarification"===e){const e=String(n||"").toLowerCase(),r="database"===t||"knowledge"===t?t:"database"===e||"knowledge"===e?e:null;if(r){H.current=r,U(r);const e=Q.current;Q.current=null,q(null),e&&e.trim()&&setTimeout(()=>{ct(e,"inquiry",{skipUserAppend:!0}).catch(e=>{})},0)}return}if("connect_agent"===n){const e=Zd({id:Ze(),role:"assistant",content:"Great! I'm setting up a connection with a live customer service agent. Please hold on for a moment while I transfer you."});j(t=>[...t,e])}else if("decline"===n){const e=Zd({id:Ze(),role:"assistant",content:"I understand. I apologize that I don't have specific information about your query in my knowledge base. Is there anything else I can help you with?"});j(t=>[...t,e])}},[Ze,ct,W]);I.useCallback(()=>{Re.current&&(ge(e=>e.map(e=>e.id===Re.current?{...e,isProcessing:!1}:e)),Re.current=null)},[]);const bt=I.useCallback((e,t=!1)=>{if($e.current=!0,!e||"string"==typeof e&&!e.trim())return void(t&&Re.current&&(ge(e=>e.map(e=>e.id===Re.current?{...e,isProcessing:!1}:e)),Re.current=null));const n=Ld(e);ge(e=>{const r=e.length;let o=[...e];if(Re.current){const e=o.some(e=>e.id===Re.current);if(e)o=o.map(e=>{if(e.id!==Re.current)return e;const r=Ld(`${e.content||""}${n}`);return{...e,content:r,isProcessing:!t,metadata:{...e.metadata,transcriptionType:"input"}}});else{const e=`bidi-input-${Date.now()}`;Re.current=e;const r=Zd({id:e,role:"user",content:n,isProcessing:!t,metadata:{source:"bidi",transcriptionType:"input"}});o=[...o,r]}}else{const r=`bidi-input-${Date.now()}`,a=e.filter(e=>"assistant"===e.role&&"bidi"===e.metadata?.source).sort((e,t)=>{const n=e.timestamp instanceof Date?e.timestamp.getTime():new Date(e.timestamp).getTime();return(t.timestamp instanceof Date?t.timestamp.getTime():new Date(t.timestamp).getTime())-n})[0];a&&(a.timestamp instanceof Date?a.timestamp.getTime():new Date(a.timestamp).getTime());const i=Zd({id:r,role:"user",content:n,isProcessing:!t,metadata:{source:"bidi",transcriptionType:"input"}}),s=o.some(e=>e.id===r);s?(Re.current=r,o=o.map(e=>e.id===r?{...e,content:`${e.content||""}${n}`,isProcessing:!t}:e)):(o=[...o,i],Re.current=r)}return o.length<r?e:o}),t&&(Re.current=null,A(!0))},[]),yt=I.useCallback((e,t=!1)=>{if(A(!1),!e||"string"==typeof e&&!e.trim())return void(t&&Ae.current&&(ge(e=>e.map(e=>e.id!==Ae.current?e:{...e,isProcessing:!1})),Ae.current=null,Be.current=null));const n=`${Ae.current||"new"}-${e.substring(0,100)}-${t}`;if(De.current&&Oe.current===n)return;De.current=!0,Oe.current=n;const r=Re.current;if(ge(n=>{const o=n.length;let a=[...n];if(r){const e=a.some(e=>e.id===r);e&&(a=a.map(e=>e.id===r?{...e,isProcessing:!1}:e))}if(Ae.current){const n=a.some(e=>e.id===Ae.current);if(n)a=a.map(n=>{if(n.id!==Ae.current)return n;const r=`${n.content||""}${e}`;return{...n,content:r,isProcessing:!t,...Array.isArray(He.current)&&He.current.length>0?{sources:He.current}:{}}}),Array.isArray(He.current)&&He.current.length>0&&(He.current=null);else{const n=`bidi-assistant-${Date.now()}`;Ae.current=n;const r=Zd({id:n,role:"assistant",content:e,isProcessing:!t,metadata:{source:"bidi"}});Array.isArray(He.current)&&He.current.length>0&&(r.sources=He.current,He.current=null),a=[...a,r]}}else{const n=`bidi-assistant-${Date.now()}`,r=Zd({id:n,role:"assistant",content:e,isProcessing:!t,metadata:{source:"bidi"}});Array.isArray(He.current)&&He.current.length>0&&(r.sources=He.current,He.current=null);const o=a.some(e=>e.id===n);o?(a=a.map(r=>r.id===n?{...r,content:`${r.content||""}${e}`,isProcessing:!t,...Array.isArray(He.current)&&He.current.length>0?{sources:He.current}:{}}:r),Array.isArray(He.current)&&He.current.length>0&&(He.current=null),Ae.current=n):(a=[...a,r],Ae.current=n)}return a.length<o?n:a}),r&&(Re.current=null),t)Ae.current=null,Be.current=null;else{const e=updateKey;Promise.resolve().then(()=>{Be.current===e&&(Be.current=null)})}},[]),vt=I.useCallback((e,t=!1,n=!1)=>{if(!e||!Array.isArray(e))return;let r="";e.forEach((e,t)=>{e.inlineData?.data&&e.inlineData.mimeType?.startsWith("audio/pcm")&&Ee.current&&Ee.current.port.postMessage((e=>{if("undefined"==typeof window)return new ArrayBuffer(0);let t=e.replace(/-/g,"+").replace(/_/g,"/");for(;t.length%4!=0;)t+="=";const n=window.atob(t),r=n.length,o=new Uint8Array(r);for(let e=0;e<r;e+=1)o[e]=n.charCodeAt(e);return o.buffer})(e.inlineData.data)),!n&&e.text&&(r+=e.text)}),r&&yt(r,t)},[yt]),wt=I.useCallback(()=>{A(!1),ge(e=>e.map(e=>"bidi"===e.metadata?.source&&e.isProcessing?{...e,isProcessing:!1}:e)),Ae.current=null,Re.current=null,Ve.current=!1,He.current=null},[]),kt=I.useCallback(()=>{A(!1),Ee.current&&Ee.current.port.postMessage({command:"endOfAudio"}),Ae.current=null,Re.current=null,He.current=null,ge(e=>e.map(e=>"bidi"===e.metadata?.source?{...e,isProcessing:!1,metadata:{...e.metadata,interrupted:!0}}:e))},[]),xt=I.useCallback(()=>{de(!1),A(!1),Ie.current=!1,he("idle"),be(null),$e.current=!1,He.current=null,ze.current&&ze.current.readyState===WebSocket.OPEN&&ze.current.close(),ze.current=null,Ee.current?.disconnect(),je.current?.close(),Ee.current=null,je.current=null,Te.current?.disconnect(),Ne.current?.close(),Te.current=null,Ne.current=null,pd(Fe.current),Fe.current=null,Le.current?.reset(),Le.current=null,_e.current=!1},[]),St=I.useCallback(e=>{if(!e)return;e.error&&be("voiceUnavailable");const t=e.conclusion_detected??e.conclusionDetected;if("boolean"==typeof t&&t&&(Ue.current?.(),ve(!0)),"boolean"==typeof t&&t)return xt(),void ge(e=>{const t=[...e];for(let e=t.length-1;e>=0;e--)if("assistant"===t[e].role){t[e]={...t[e],conclusionDetected:!0};break}return t});if(e.interrupted)return void kt();if(e.inputTranscription){const t=e.inputTranscription.text||"",n=Boolean(e.inputTranscription.finished);(t||n)&&(Kd(i),bt(t,n))}const n=e.sources??e.Sources;if(Array.isArray(n)&&n.length>0){const e=n.map(e=>({source_type:e.source_type??e.sourceType??"file",source_id:e.source_id??e.sourceid??e.sourceId,source_name:e.source_name??e.sourceName??"",url:e.url,citation_indices:e.citation_indices??e.citationIndices})).filter(e=>e.source_id||e.url||"database"===e.source_type);if(0===e.length)return;ge(t=>{const n=[...t];let r=!1;for(let t=n.length-1;t>=0;t--)if("assistant"===n[t].role){n[t]={...n[t],sources:e},r=!0;break}return r||(He.current=e),n})}const r=e.finalTranscript??e.finaltranscript;if(r&&"string"==typeof r.text){const e=r.text;return void(e&&ge(t=>{const n=[...t];for(let t=n.length-1;t>=0;t--)if("assistant"===n[t].role){n[t]={...n[t],content:e,isProcessing:!1};break}return n}))}if($e.current||!e.outputTranscription?.text&&!e.content?.parts){if(e.outputTranscription?.text&&(Ve.current=!0,yt(e.outputTranscription.text,Boolean(e.outputTranscription.finished))),e.content?.parts){const t=e.content?.finished||e.finished||!1;vt(e.content.parts,t,Ve.current)}if(e.prompts&&Array.isArray(e.prompts)&&e.prompts.length>0){ge(t=>{const n=[...t];for(let t=n.length-1;t>=0;t--)if("assistant"===n[t].role){n[t]={...n[t],prompts:e.prompts};break}return n});try{Gd(i,e.prompts)}catch(e){}}e.turnComplete?wt():e.interrupted||e.inputTranscription||e.outputTranscription||e.content||e.prompts}else e.turnComplete&&wt()},[yt,bt,vt,kt,wt,xt]),Ct=I.useCallback(e=>{if(!Ie.current)return;const t=Le.current;if(t)return void t.process(e);const n=ze.current;n&&n.readyState===WebSocket.OPEN&&n.send(e)},[]),Mt=I.useCallback(async()=>{if(!_e.current&&"undefined"!=typeof window)try{const[e,t]=await async function(){if("undefined"==typeof window)throw new Error("Audio player can only be initialized in the browser");const e=new AudioContext({sampleRate:24e3}),t=new Blob(["\n class PCMPlayerProcessor extends AudioWorkletProcessor {\n constructor() {\n super();\n this.bufferSize = 24000 * 180;\n this.buffer = new Float32Array(this.bufferSize);\n this.writeIndex = 0;\n this.readIndex = 0;\n this.port.onmessage = (event) => {\n if (event.data?.command === 'endOfAudio') {\n this.readIndex = this.writeIndex;\n return;\n }\n const int16Samples = new Int16Array(event.data);\n this.enqueue(int16Samples);\n };\n }\n\n enqueue(samples) {\n for (let i = 0; i < samples.length; i += 1) {\n const floatVal = samples[i] / 32768;\n this.buffer[this.writeIndex] = floatVal;\n this.writeIndex = (this.writeIndex + 1) % this.bufferSize;\n if (this.writeIndex === this.readIndex) {\n this.readIndex = (this.readIndex + 1) % this.bufferSize;\n }\n }\n }\n\n process(inputs, outputs) {\n const output = outputs[0];\n const framesPerBlock = output[0].length;\n for (let frame = 0; frame < framesPerBlock; frame += 1) {\n output[0][frame] = this.buffer[this.readIndex];\n if (output.length > 1) {\n output[1][frame] = this.buffer[this.readIndex];\n }\n if (this.readIndex !== this.writeIndex) {\n this.readIndex = (this.readIndex + 1) % this.bufferSize;\n }\n }\n return true;\n }\n }\n\n registerProcessor('pcm-player-processor', PCMPlayerProcessor);\n "],{type:"application/javascript"}),n=URL.createObjectURL(t);await e.audioWorklet.addModule(n);const r=new AudioWorkletNode(e,"pcm-player-processor");return r.connect(e.destination),URL.revokeObjectURL(n),[r,e]}();Ee.current=e,je.current=t,await t.resume();const n=e=>{const t=ze.current;t&&t.readyState===WebSocket.OPEN&&t.send(e)};Le.current=yd({sampleRate:16e3},{onSpeechStart:()=>{Ee.current?.port.postMessage({command:"endOfAudio"});const e=ze.current;e&&e.readyState===WebSocket.OPEN&&e.send(JSON.stringify({type:"interrupt"}))},onVoiceFrame:n,onSpeechEnd:()=>{const e=ze.current;e&&e.readyState===WebSocket.OPEN&&e.send(JSON.stringify({type:"audio_end"}))}});const[r,o,a]=await dd(Ct);Te.current=r,Ne.current=o,Fe.current=a,await o.resume(),_e.current=!0}catch(e){throw e}},[Ct]),Pt=I.useCallback(async()=>{if("undefined"==typeof window||!Xe)return;if(ze.current&&ze.current.readyState===WebSocket.OPEN)return;let e;he("connecting"),be(null);try{const t={"Content-Type":"application/json"};if("function"==typeof s){const e=await s();e&&(t.Authorization=`Bearer ${e}`)}const n=await fetch(`${r.replace(/\/$/,"")}/api/v1/widget/voice-ticket`,{method:"POST",headers:t,credentials:"include",body:JSON.stringify({sessionId:we})});if(!n.ok)throw new Error(`voice-ticket ${n.status}`);if(e=(await n.json())?.ticket,!e)throw new Error("voice-ticket returned no ticket")}catch(e){return he("error"),void be(Fd(e))}try{const t=new WebSocket(`${Xe}?ticket=${encodeURIComponent(e)}`);ze.current=t,t.onopen=()=>{he("connected")},t.onmessage=e=>{try{"string"==typeof e.data&&e.data.substring(0,200);const t=JSON.parse(e.data);St(t)}catch(e){}},t.onerror=()=>{he("error"),be("voiceUnavailable"),A(!1)},t.onclose=()=>{ze.current=null,he("idle"),A(!1),Ie.current&&setTimeout(()=>{Pt()},5e3)}}catch(e){he("error"),be(Fd(e))}},[St,Xe,r,we,s]),zt=I.useCallback(async()=>{if(d&&i){be(null),he(e=>"connected"===e?e:"connecting"),de(!0),Ie.current=!0,ve(!1),$e.current=!1,ge(t=>{if(t.length>0||E.length>0)return t;if(!e||""===e.trim())return[];return[Zd({id:`bidi-welcome-${Date.now()}`,role:"assistant",content:ee,metadata:{source:"bidi"}})]}),Pt();try{await Mt()}catch(e){be(Fd(e)),he("error")}}},[d,i,e,ee,Pt,Mt,E]),Et=I.useCallback(()=>{ue?xt():"connecting"!==fe&&zt()},[ue,zt,xt,fe]),jt=I.useCallback(e=>{const t=e.trim();if(!t)return;$e.current=!0;const n=ze.current;if(!n||n.readyState!==WebSocket.OPEN)return void be("voiceUnavailable");n.send(JSON.stringify({type:"text",text:t})),Kd(i),A(!0);const r=Zd({id:`bidi-user-${Date.now()}`,role:"user",content:t,metadata:{source:"bidi"}});ge(e=>[...e,r]),L("")},[]);I.useEffect(()=>{Ie.current=ue},[ue]),I.useEffect(()=>()=>{ze.current&&ze.current.readyState===WebSocket.OPEN&&ze.current.close(),Ee.current?.disconnect(),je.current?.close(),Te.current?.disconnect(),Ne.current?.close(),pd(Fe.current),Fe.current=null,_e.current=!1},[]);const Tt=I.useCallback(()=>{(e=>{try{const t=Wd(e);localStorage.removeItem(`${Dd}_${e}`),t?.conversationId&&Ud(e,t.conversationId)}catch{}})(i),Gd(i,[]),$(null),U(null),q(null),H.current=null,Q.current=null,j([]),ge([]),Ud(i,we),Y(!1),J(!1),oe({}),Z(""),ne(null),ae.current=!1,$e.current=!1,et.current=!1,tt.current=!1,Me.current=!1,Ce(!1),it.current=null,Qe.current=null,xe.current&&(xe.current.close(),xe.current=null);const t=tp();if(Qd(i,t,{settingsSnapshot:JSON.stringify({value:m,unit:b?.toUpperCase()})}),ke(t),e&&""!==e.trim()&&j([{...Zd({id:Date.now().toString(),role:"assistant",content:e}),isWelcome:!0}]),f){np(g).length>0&&Y(!0)}},[i,we,e,f,g,m,b]),Nt=I.useRef(Tt);I.useEffect(()=>{Nt.current=Tt},[Tt]),I.useEffect(()=>{nt.current=!1,rt.current={value:null,unit:null}},[i]),I.useEffect(()=>{if(!i||!m)return;const e=Hd(m,b);if(!e)return;const t=rt.current,n=nt.current&&(t.value!==m||t.unit!==b);if(nt.current=!0,rt.current={value:m,unit:b},n)return at(!1),void Nt.current();let r=null;const o=()=>{const t=Wd(i);if(!t)return;if(!t.firstInteractionAt)return void(r=setTimeout(o,e));const n=new Date(t.lastActivity).getTime(),a=Date.now()-n,s=e-a;if(s<=0)return at(!1),void Nt.current();const l=Math.max(1e4,Math.min(12e4,.1*e));at(s<=l);r=setTimeout(o,s<=l?1e3:s-l)};return o(),()=>{r&&clearTimeout(r)}},[i,m,b,we]);const Ft=I.useMemo(()=>n,[n]),Lt=I.useMemo(()=>ep(E,pe),[pe,E]);I.useEffect(()=>{},[pe,ue]);const Rt=I.useCallback((e,t)=>{j(n=>n.map(n=>"assistant"===n.role&&n.content===e?{...n,feedback:t}:n))},[]);return{conversationId:we,isOpen:x,isMinimized:C,isDark:P,messages:Lt,inputValue:T,isLoading:R,isConversationLoading:le,widgetRef:B,quickQuestions:Ft,isVoiceSessionActive:ue,voiceStatus:fe,voiceError:me,voiceConclusionForCsat:ye,onboardingQuestions:g,onboardingActive:K,onboardingCompleted:G,handleOnboardingFormSubmit:dt,widgetFilter:O,setWidgetFilter:$,addAssistantMessage:st,setInputValue:L,handleSend:ft,stopGeneration:lt,handleQuickQuestion:ht,sendMessage:ct,retryMessage:ut,toggleChat:()=>{S(e=>!e),M(!1)},toggleTheme:()=>{z(e=>!e)},toggleMinimize:()=>{M(e=>!e)},closeChat:()=>{S(!1)},handleDecision:mt,handleVoiceToggle:Et,sendBidiTextMessage:jt,sessionExpiringSoon:ot,resetConversation:Tt,updateMessageFeedback:Rt}},op=(...e)=>e.filter((e,t,n)=>Boolean(e)&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim(),ap=e=>{const t=(e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()))(e);return t.charAt(0).toUpperCase()+t.slice(1)};
|
|
21
21
|
/**
|
|
22
22
|
* @license lucide-react v0.575.0 - ISC
|
|
23
23
|
*
|
|
24
24
|
* This source code is licensed under the ISC license.
|
|
25
25
|
* See the LICENSE file in the root directory of this source tree.
|
|
26
26
|
*/
|
|
27
|
-
var
|
|
27
|
+
var ip={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};
|
|
28
28
|
/**
|
|
29
29
|
* @license lucide-react v0.575.0 - ISC
|
|
30
30
|
*
|
|
31
31
|
* This source code is licensed under the ISC license.
|
|
32
32
|
* See the LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/const
|
|
33
|
+
*/const sp=e=>{for(const t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1},lp=I.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:a,iconNode:i,...s},l)=>I.createElement("svg",{ref:l,...ip,width:t,height:t,stroke:e,strokeWidth:r?24*Number(n)/Number(t):n,className:op("lucide",o),...!a&&!sp(s)&&{"aria-hidden":"true"},...s},[...i.map(([e,t])=>I.createElement(e,t)),...Array.isArray(a)?a:[a]])),cp=(e,t)=>{const n=I.forwardRef(({className:n,...r},o)=>{return I.createElement(lp,{ref:o,iconNode:t,className:op(`lucide-${a=ap(e),a.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,n),...r});var a});return n.displayName=ap(e),n},up=cp("audio-lines",[["path",{d:"M2 10v3",key:"1fnikh"}],["path",{d:"M6 6v11",key:"11sgs0"}],["path",{d:"M10 3v18",key:"yhl04a"}],["path",{d:"M14 8v7",key:"3a1oy3"}],["path",{d:"M18 5v13",key:"123xd1"}],["path",{d:"M22 10v3",key:"154ddg"}]]),dp=cp("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),pp=cp("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),gp=cp("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),fp=cp("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]),hp=cp("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]),mp=cp("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]),bp=cp("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]),yp=cp("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),vp=cp("message-circle",[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]]),wp=cp("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]),kp=cp("paperclip",[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]]),xp=cp("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]),Sp=cp("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]),Cp=cp("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]),Mp=cp("star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]),Pp=cp("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]),zp=cp("thumbs-down",[["path",{d:"M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z",key:"m61m77"}],["path",{d:"M17 14V2",key:"8ymqnk"}]]),Ep=cp("thumbs-up",[["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",key:"emmmcr"}],["path",{d:"M7 10v12",key:"1qc93n"}]]),jp=cp("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Tp="undefined"!=typeof window,Np=new Set(["Arial","Helvetica","Times New Roman","Georgia","Courier New","Verdana","Trebuchet MS","Palatino","Garamond","Tahoma","Lucida Sans","Lucida Grande","Lucida Console","Gill Sans","Impact","Comic Sans MS","system-ui"].map(e=>e.toLowerCase())),Fp=["sans-serif","serif","monospace","cursive","fantasy"],Lp=new Set;
|
|
34
34
|
/**
|
|
35
35
|
* @license lucide-react v0.575.0 - ISC
|
|
36
36
|
*
|
|
37
37
|
* This source code is licensed under the ISC license.
|
|
38
38
|
* See the LICENSE file in the root directory of this source tree.
|
|
39
|
-
*/let Lp=null;function Rp(e){I.useEffect(()=>{if(!jp||!e)return;const t=e.split(",")[0]?.trim();if(!t||Fp.has(t))return;if((e=>{const t=e.trim().toLowerCase();return!t||!!Tp.has(t)||Np.some(e=>t.includes(e))})(t))return void Fp.add(t);let n=!0;return(async()=>{try{Lp||(Lp=Promise.resolve().then(function(){return gh}));const e=await Lp,r=e&&"default"in e?e.default:e,o=(e=>e.trim().replace(/\s+/g,"+"))(t);r.load({google:{families:[`${o}:300,400,500,600,700`]},fontactive:e=>{n&&Fp.add(e)},fontinactive:e=>{n&&Fp.add(e)}})}catch(e){}})(),()=>{n=!1}},[e])}const Ap="__eshalChatWidgetCitationContext",_p="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:void 0,Ip=_p?_p[Ap]||(_p[Ap]=I.createContext(null)):I.createContext(null),Bp="chat-widget-markdown-chunk.min.js",Dp="undefined"!=typeof document?document.currentScript?.src:void 0;let Op=null;function $p(){return"undefined"!=typeof window&&window.__eshalChatWidgetChunks?.MarkdownRenderer?Promise.resolve({default:window.__eshalChatWidgetChunks.MarkdownRenderer}):Op||(Op=new Promise((e,t)=>{const n=document.createElement("script");n.src=function(){if(Dp)return new URL(Bp,Dp).toString();const e=Array.from(document.getElementsByTagName("script")).find(e=>/chat-widget(\.min)?\.js(\?.*)?$/.test(e.src));return e?new URL(Bp,e.src).toString():Bp}(),n.async=!0,n.onload=()=>{window.__eshalChatWidgetChunks?.MarkdownRenderer?e({default:window.__eshalChatWidgetChunks.MarkdownRenderer}):(Op=null,t(new Error("[widget] markdown chunk loaded but did not register itself")))},n.onerror=()=>{Op=null,t(new Error(`[widget] failed to load markdown chunk from ${n.src}`))},document.head.appendChild(n)}),Op)}function Vp(){return $p()}var Up={exports:{}},Hp={},Wp=I,qp=Symbol.for("react.element"),Qp=Symbol.for("react.fragment"),Yp=Object.prototype.hasOwnProperty,Kp=Wp.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Gp={key:!0,ref:!0,__self:!0,__source:!0};function Xp(e,t,n){var r,o={},a=null,i=null;for(r in void 0!==n&&(a=""+n),void 0!==t.key&&(a=""+t.key),void 0!==t.ref&&(i=t.ref),t)Yp.call(t,r)&&!Gp.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===o[r]&&(o[r]=t[r]);return{$$typeof:qp,type:e,key:a,ref:i,props:o,_owner:Kp.current}}Hp.Fragment=Qp,Hp.jsx=Xp,Hp.jsxs=Xp,Up.exports=Hp;var Jp=Up.exports;const Zp=I.lazy(Vp);class eg extends I.Component{state={failed:!1};static getDerivedStateFromError(){return{failed:!0}}componentDidCatch(e){}render(){return this.state.failed?this.props.fallback:this.props.children}}const tg=/(```|`[^`]+`|(^|\n)\s{0,3}#{1,6}\s|(^|\n)\s*[-*+]\s|(^|\n)\s*\d+\.\s|(^|\n)\s*>\s|\[[^\]]*\]\([^)]*\)|\*\*|__|~~|(^|\n)\s*\||\[\d+\])/;const ng=({content:e,isDark:t,textColor:n,fontFamily:r,fontSize:o})=>Jp.jsx("p",{className:"leading-relaxed [&:first-child]:!mt-0 whitespace-pre-wrap break-words",style:{color:n||(t?"#f3f4f6":"#1A1A1A"),fontFamily:r||"Inter",fontSize:o||"14px",margin:0,lineHeight:"1.6",padding:0,overflowWrap:"break-word"},children:e}),rg=({content:e,isStreaming:t,isDark:n=!1,isRtl:r=!1,textColor:o,fontFamily:a,fontSize:i,onButtonClick:s,provideCitations:l=!0})=>{const[c,u]=I.useState(""),[d,p]=I.useState(!1),g=I.useRef(e),f=I.useRef(0),h=I.useRef(null),m=I.useRef(0);I.useEffect(()=>{if(e!==g.current){if(g.current=e,f.current>=e.length)return u(e),void p(!1);e.length<c.length&&(f.current=0,u(""))}if(!t)return u(e),p(!1),void(h.current&&cancelAnimationFrame(h.current));p(!0);const n=t=>{if(t-m.current<16)h.current=requestAnimationFrame(n);else if(m.current=t,f.current<e.length){const t=Math.max(2,Math.floor(4*Math.random())),r=Math.min(f.current+t,e.length);u(e.slice(0,r)),f.current=r,h.current=requestAnimationFrame(n)}else p(!1)};return h.current=requestAnimationFrame(n),()=>{h.current&&cancelAnimationFrame(h.current)}},[e,t]);const b="string"==typeof(y=c)&&0!==y.length&&tg.test(y);var y;return Jp.jsxs("div",{className:"relative",dir:"auto",style:{textAlign:r?"right":"left",color:o||(n?"#f3f4f6":"#1A1A1A"),fontFamily:a||"Inter",fontSize:i||"14px",margin:0,padding:0},children:[b?Jp.jsx(eg,{fallback:Jp.jsx(ng,{content:c,isDark:n,textColor:o,fontFamily:a,fontSize:i}),children:Jp.jsx(I.Suspense,{fallback:Jp.jsx(ng,{content:c,isDark:n,textColor:o,fontFamily:a,fontSize:i}),children:Jp.jsx(Zp,{content:c,isStreaming:t,isDark:n,isRtl:r,textColor:o,fontFamily:a,fontSize:i,onButtonClick:s,provideCitations:l})})}):Jp.jsx(ng,{content:c,isDark:n,textColor:o,fontFamily:a,fontSize:i}),d&&Jp.jsx("span",{className:"inline-block w-1.5 h-4 bg-blue-500 ms-0.5 animate-pulse align-text-bottom",style:{animationDuration:"0.8s"}})]})},og=({isDark:e,t:t})=>Jp.jsxs("div",{className:"flex gap-1.5",role:"status","aria-label":t("agentIsTyping"),children:[Jp.jsx("div",{className:`w-2 h-2 rounded-full ${e?"bg-gray-500":"bg-gray-400"} animate-bounce`,style:{animationDelay:"0ms"},"aria-hidden":"true"}),Jp.jsx("div",{className:`w-2 h-2 rounded-full ${e?"bg-gray-500":"bg-gray-400"} animate-bounce`,style:{animationDelay:"150ms"},"aria-hidden":"true"}),Jp.jsx("div",{className:`w-2 h-2 rounded-full ${e?"bg-gray-500":"bg-gray-400"} animate-bounce`,style:{animationDelay:"300ms"},"aria-hidden":"true"})]}),ag=({question:e,options:t,onDecision:n,disabled:r,isDark:o=!1})=>Jp.jsxs("div",{className:"mt-3 p-3 rounded-lg border "+(o?"bg-blue-900/30 border-blue-700/50":"bg-blue-50 border-blue-200"),children:[Jp.jsx("p",{className:"text-sm font-medium mb-2 "+(o?"text-gray-100":"text-gray-900"),children:e}),Jp.jsx("div",{className:"space-y-2",children:t.map(e=>Jp.jsx("button",{onClick:()=>n(e.id,e.label),disabled:r,className:"w-full text-left px-3 py-2 text-sm rounded transition-all "+(o?"bg-gray-800 border border-gray-700 hover:bg-blue-900/50 hover:border-blue-600 disabled:opacity-50 disabled:cursor-not-allowed":"bg-white border border-gray-300 hover:bg-blue-50 hover:border-blue-400 disabled:opacity-50 disabled:cursor-not-allowed"),children:e.label},e.id))})]});function ig({content:e,isDark:t}){const[n,r]=I.useState(!1),o=I.useCallback(()=>{e&&(navigator.clipboard?.writeText(e).catch(()=>{}),r(!0),setTimeout(()=>r(!1),1500))},[e]);return Jp.jsx("button",{type:"button",onClick:o,className:"p-0.5 rounded transition-colors "+(t?"text-gray-500 hover:text-gray-300":"text-gray-400 hover:text-gray-600"),style:{border:"none",background:"transparent",appearance:"none",WebkitAppearance:"none",cursor:"pointer"},"aria-label":n?"Copied":"Copy message",title:n?"Copied":"Copy message",children:n?Jp.jsx(up,{className:"w-3 h-3 text-green-500"}):Jp.jsx(fp,{className:"w-3 h-3"})})}const sg=({message:e,formatTime:t,isDark:n,primaryColor:r,agentMessageBubbleColor:o,resolvedAgentBubbleColor:a,textColor:i,assistantTextColor:s,fontFamily:l,agentMessageBubbleFontFamily:c,agentMessageBubbleFontSize:u,fontSize:d,isRtl:p,onDecision:g,companyLogo:f,conciergeName:h,companyName:m,apiBaseUrl:b,getAuthToken:y,onPromptSuggestionClick:v,allowFeedback:w=!0,provideCitations:k=!0,onFeedback:x,headerTextColor:S,t:C})=>{const M="string"==typeof e.content?e.content:"",P=e.isProcessing&&(!M||0===M.length),z=zd(M,p),[E,j]=I.useState(()=>e?.feedback??null),[T,N]=I.useState(!1),[F,L]=I.useState(null),[R,A]=I.useState(""),_=I.useRef(null),B=I.useCallback(e=>{if(x&&M){if(E===e)return j(null),N(!1),L(null),A(""),void x(M,null);if("like"===e)return j("like"),N(!1),L(null),A(""),void x(M,"like");j(null),L("dislike"),N(!0),A(""),setTimeout(()=>_.current?.focus(),100)}},[E,x,M]),D=I.useCallback(()=>{x&&M&&F&&(j(F),x(M,F,R.trim()||void 0),N(!1),A(""),L(null))},[x,M,F,R]),O=I.useCallback(()=>{N(!1),A(""),L(null)},[]),$=!0===e?.isError,V=$?n?"rgba(239,68,68,0.15)":"#fee2e2":null!=a?a:null!=o?o:n?"#1f2937":"#FFFFFF",U=null!=o&&"#ffffff"!==o&&"#FFFFFF"!==o&&"#1f2937"!==o,H=$?n?"#fca5a5":"#991b1b":null!=s?s:null!=i?i:n?"#f3f4f6":"#1A1A1A",W=null!=c?c:null!=l?l:"Inter",q=null!=u?u:null!=d?d:"14px";Rp(W);const{onSourceActivate:Q,downloadingKey:Y}=function({apiBaseUrl:e,getAuthToken:t}){const[n,r]=I.useState(null),o=I.useCallback(async n=>{if(!n)return;const o=n.url||n.source_id||n.sourceid||n.source_name||"",a=String(n.source_id||n.sourceid||"").startsWith("attachment:"),i="string"==typeof n.url&&n.url.includes("/api/v1/sharepoint/file/");if(!("file"===n.source_type||i||a||(n.source_id||n.sourceid)&&!n.url)){const e=function(e){return"string"==typeof e&&/^https?:\/\//i.test(e)?e:void 0}(n.url);if(e)try{window.open(e,"_blank","noopener,noreferrer")}catch{}return}if(e||a){r(o);try{let r;if(a){if(!n.url)throw new Error("attachment has no URL");const e={};if("function"==typeof t){const n=await t();n&&(e.Authorization=`Bearer ${n}`)}r=await fetch(n.url,{method:"GET",headers:e,credentials:"include"})}else if(i){const o=n.url.startsWith("http")?n.url:`${e.replace(/\/$/,"")}${n.url}`,a={};if("function"==typeof t){const e=await t();e&&(a.Authorization=`Bearer ${e}`)}r=await fetch(o,{method:"GET",headers:a,credentials:"include"})}else{const o=`${e.replace(/\/$/,"")}/api/v1/support/file-download`,a={"Content-Type":"application/json"};if("function"==typeof t){const e=await t();e&&(a.Authorization=`Bearer ${e}`)}r=await fetch(o,{method:"POST",headers:a,credentials:"include",body:JSON.stringify({source_id:n.source_id||n.sourceid,file_name:n.url||"",source_name:n.source_name||""})})}if(!r.ok){const e=await r.json().catch(()=>({}));throw new Error(e.details||e.error||r.statusText)}const o=await r.blob(),s=r.headers.get("content-disposition");let l=n.source_name||"download";if(!a){const e=s&&/filename\*?=(?:UTF-8'')?["']?([^"'\s;]+)["']?/i.exec(s);if(e)try{l=decodeURIComponent(e[1].replace(/\\"/g,'"'))}catch{}}const c=document.createElement("a"),u=URL.createObjectURL(o);c.href=u,c.download=l,document.body.appendChild(c),c.click(),c.remove(),URL.revokeObjectURL(u)}catch(e){}finally{r(null)}}},[e,t]);return{onSourceActivate:o,downloadingKey:n}}({apiBaseUrl:b,getAuthToken:y}),K=I.useMemo(()=>({sources:e.sources||[],sourcesPreliminary:!!e.sourcesPreliminary,onSourceActivate:Q,downloadingKey:Y,textColor:H}),[e.sources,e.sourcesPreliminary,Q,Y,H]);return Jp.jsx(Ip.Provider,{value:K,children:Jp.jsxs("div",{className:"flex gap-3 flex-row animate-in min-w-0",children:[Jp.jsx("div",{className:"flex-shrink-0 mt-1",children:Jp.jsx("div",{className:"w-8 h-8 rounded-full overflow-hidden flex items-center justify-center",style:{backgroundColor:r||"#2563eb"},children:f?Jp.jsx("div",{className:"w-full h-full bg-white/10 flex items-center justify-center",children:Jp.jsx("img",{src:f,alt:h||m||"Assistant avatar",className:"object-contain rounded-full",style:{width:"100%",height:"100%"}})}):Jp.jsx("div",{className:"w-full h-full flex items-center justify-center",style:{fontSize:"18px",fontFamily:l||"Inter",color:S||"#FFFFFF"},children:(h||"A").charAt(0).toUpperCase()})})}),Jp.jsxs("div",{className:"flex flex-col items-start min-w-0 max-w-[75%]",children:[Jp.jsx("div",{className:"rounded-2xl px-4 py-2.5 shadow-sm border rounded-tl-sm rtl:rounded-tl-2xl rtl:rounded-tr-sm min-w-0 max-w-full overflow-hidden "+(U?"border-transparent":n?"border-gray-700":"border-gray-200"),style:{backgroundColor:V,color:H,fontFamily:W,fontSize:q,direction:z?"rtl":"ltr",textAlign:z?"right":"left",...U?{borderColor:`${V}33`}:{}},children:P?Jp.jsx(og,{isDark:n,t:C}):Jp.jsx(Jp.Fragment,{children:e.requiresDecision&&e.decisionData&&g?Jp.jsxs("div",{children:[M&&Jp.jsx("div",{className:"mb-3",children:Jp.jsx(rg,{content:M,isStreaming:e.isProcessing,isDark:n,isRtl:z,textColor:H,fontFamily:W,fontSize:q,onButtonClick:v,provideCitations:k})}),Jp.jsx(ag,{question:e.decisionData.question,options:e.decisionData.options,onDecision:(t,n)=>g(e.decisionData.decisionId,t,n),disabled:!!e.decisionResponse,isDark:n}),e.decisionResponse&&Jp.jsxs("div",{className:"mt-2 text-xs "+(n?"text-gray-400":"text-gray-500"),children:["Selected: ",e.decisionResponse.selectedOption]})]}):M?Jp.jsx(Jp.Fragment,{children:Jp.jsx(rg,{content:M,isStreaming:e.isProcessing,isDark:n,isRtl:z,textColor:H,fontFamily:W,fontSize:q,onButtonClick:v,provideCitations:k})}):null})}),Jp.jsxs("div",{className:"flex items-center gap-1.5 mt-1.5 px-1",children:[Jp.jsx("p",{className:"text-xs leading-none "+(n?"text-gray-400":"text-gray-500"),dir:"auto",children:t(e.timestamp)}),!P&&!e.isProcessing&&M&&Jp.jsx(ig,{content:M,isDark:n}),!1!==w&&x&&!P&&!e.isProcessing&&M&&"welcome"!==e.type&&!e.isWelcome&&Jp.jsxs("div",{className:"flex items-center gap-0.5 ms-0.5",children:[Jp.jsx("button",{type:"button",onClick:()=>B("like"),className:"p-0.5 rounded transition-colors "+("like"===E||"like"===F?"text-green-500":n?"text-gray-500 hover:text-gray-300":"text-gray-400 hover:text-gray-600"),style:{border:"none",background:"transparent",appearance:"none",WebkitAppearance:"none",cursor:"pointer"},"aria-label":"Like",children:Jp.jsx(zp,{className:"w-3 h-3"})}),Jp.jsx("button",{type:"button",onClick:()=>B("dislike"),className:"p-0.5 rounded transition-colors "+("dislike"===E||"dislike"===F?"text-red-500":n?"text-gray-500 hover:text-gray-300":"text-gray-400 hover:text-gray-600"),style:{border:"none",background:"transparent",appearance:"none",WebkitAppearance:"none",cursor:"pointer"},"aria-label":"Dislike",children:Jp.jsx(Pp,{className:"w-3 h-3"})})]})]}),T&&"dislike"===F&&Jp.jsxs("div",{className:"mt-2 w-full rounded-xl border p-3 shadow "+(n?"bg-gray-800 border-gray-700":"bg-white border-gray-200"),style:{direction:p?"rtl":"ltr"},children:[Jp.jsx("textarea",{ref:_,value:R,onChange:e=>A(e.target.value),onKeyDown:e=>{(e.metaKey||e.ctrlKey)&&"Enter"===e.key?(e.preventDefault(),D()):"Escape"===e.key&&(e.preventDefault(),O())},placeholder:C("feedbackPlaceholder"),"aria-label":C("feedbackPlaceholder"),rows:2,className:"w-full resize-none rounded-lg border px-2 py-1.5 text-xs focus:outline-none focus:ring-1 "+(n?"bg-gray-900 border-gray-700 text-gray-100 placeholder-gray-500 focus:ring-gray-600":"bg-white border-gray-200 text-gray-900 placeholder-gray-400 focus:ring-gray-300"),style:{fontFamily:W,textAlign:p?"right":"left"}}),Jp.jsxs("div",{className:"flex items-center justify-end gap-1.5 mt-1.5",children:[Jp.jsx("button",{type:"button",onClick:O,className:"text-xs px-2 py-1 rounded transition-colors "+(n?"text-gray-400 hover:text-gray-200":"text-gray-500 hover:text-gray-700"),style:{border:"none",background:"transparent",cursor:"pointer"},children:C("cancel")}),Jp.jsx("button",{type:"button",onClick:D,className:"text-xs px-2.5 py-1 rounded text-white transition-opacity hover:opacity-90",style:{backgroundColor:r||"#2563eb",border:"none",cursor:"pointer"},children:C("submit")})]})]})]})]})})},lg=({message:e,formatTime:t,userMessageBoxColor:n,primaryColor:r,resolvedUserMessageColor:o,textColor:a,userTextColor:i,fontFamily:s,userMessageBubbleFontFamily:l,userMessageBubbleFontSize:c,fontSize:u,isDark:d,isRtl:p,t:g,onRetryMessage:f})=>{const h=null!=o?o:null!=n?n:null!=r?r:"#2563eb",m=null!=i?i:null!=a?a:"#FFFFFF",b=null!=l?l:null!=s?s:"Inter",y=null!=c?c:null!=u?u:"14px",v=zd("string"==typeof e?.content?e.content:"",p);Rp(b);const w=Array.isArray(e.attachments)?e.attachments:[];return Jp.jsx("div",{className:"flex gap-3 flex-row-reverse animate-in",children:Jp.jsxs("div",{className:"flex flex-col items-end max-w-[75%]",children:[w.length>0&&Jp.jsx("div",{className:"mb-1.5 flex flex-wrap justify-end gap-1.5",children:w.map((e,t)=>String(e.mimeType||"").startsWith("image/")&&e.url?Jp.jsx("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",className:"block rounded-md overflow-hidden",style:{maxWidth:160},title:e.filename,children:Jp.jsx("img",{src:e.url,alt:e.filename||"attachment",style:{maxWidth:160,maxHeight:160,display:"block"}})},e.storageKey||t):Jp.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-xs",style:{backgroundColor:d?"#1f2937":"#f3f4f6",color:d?"#e5e7eb":"#374151",border:"1px solid "+(d?"#374151":"#e5e7eb"),maxWidth:200},title:e.filename,children:[Jp.jsx(mp,{size:12}),Jp.jsx("span",{className:"truncate",style:{maxWidth:140,direction:"ltr"},children:e.filename})]},e.storageKey||t))}),e.content&&""!==e.content.trim()&&Jp.jsx("div",{className:"rounded-2xl px-4 py-2.5 shadow-lg "+(v?"rounded-tl-sm":"rounded-tr-sm"),dir:"auto",style:{background:`linear-gradient(135deg, ${h} 0%, ${h}dd 100%)`,fontFamily:b,direction:v?"rtl":"ltr",textAlign:v?"right":"left"},children:Jp.jsx("p",{className:"whitespace-pre-wrap break-words",dir:"auto",style:{color:m,fontFamily:b,fontSize:y,lineHeight:"1.5",textAlign:v?"right":"left",overflowWrap:"break-word",margin:0,padding:0},children:e.content})}),Jp.jsxs("div",{className:"flex items-center gap-1.5 mt-1.5 px-1",children:[Jp.jsx("p",{className:"text-xs leading-none "+(d?"text-gray-400":"text-gray-500"),dir:"auto",children:t(e.timestamp)}),e.content&&""!==e.content.trim()&&Jp.jsx(ig,{content:e.content,isDark:d})]}),"failed"===e.status&&Jp.jsxs("div",{className:"flex items-center gap-1.5 mt-1 px-1","data-testid":"message-failed-state",children:[Jp.jsx("span",{className:"text-xs leading-none",style:{color:"#dc2626"},dir:"auto",children:g("messageNotDelivered")}),"function"==typeof f&&Jp.jsx("button",{type:"button",onClick:()=>f(e),className:"text-xs leading-none font-medium underline",style:{color:"#dc2626"},dir:"auto",children:g("retrySend")})]})]})})},cg=({message:e,isDark:t,primaryColor:n,agentMessageBubbleColor:r,userMessageBoxColor:o,resolvedUserMessageColor:a,resolvedAgentBubbleColor:i,textColor:s,assistantTextColor:l,userTextColor:c,fontFamily:u,agentMessageBubbleFontFamily:d,agentMessageBubbleFontSize:p,userMessageBubbleFontFamily:g,userMessageBubbleFontSize:f,fontSize:h,formatTime:m,isRtl:b,onDecision:y,companyLogo:v,conciergeName:w,companyName:k,apiBaseUrl:x,getAuthToken:S,onPromptSuggestionClick:C,allowFeedback:M,provideCitations:P,onFeedback:z,headerTextColor:E,onRetryMessage:j,defaultLanguage:T="en"})=>{const N=I.useMemo(()=>Ed(T),[T]);return e?"user"===e.role?Jp.jsx(lg,{message:e,formatTime:m,userMessageBoxColor:o,primaryColor:n,resolvedUserMessageColor:a,textColor:s,userTextColor:c,fontFamily:u,userMessageBubbleFontFamily:g,userMessageBubbleFontSize:f,fontSize:h,isDark:t,isRtl:b,t:N,onRetryMessage:j}):Jp.jsx(sg,{message:e,formatTime:m,isDark:t,primaryColor:n,agentMessageBubbleColor:r,resolvedAgentBubbleColor:i,textColor:s,assistantTextColor:l,fontFamily:u,agentMessageBubbleFontFamily:d,agentMessageBubbleFontSize:p,fontSize:h,isRtl:b,onDecision:y,companyLogo:v,conciergeName:w,companyName:k,apiBaseUrl:x,getAuthToken:S,onPromptSuggestionClick:C,allowFeedback:M,provideCitations:P,onFeedback:z,headerTextColor:E,t:N}):null};var ug=I.memo(cg);const dg=(e,t,n)=>Number.isNaN(e)?t:Math.min(Math.max(e,t),n),pg=e=>{if(!e)return null;const t=(e=>e?.trim().toLowerCase()??"")(e),n=(e=>{const t=e.match(/^#?([0-9a-f]{3}|[0-9a-f]{6})$/i);if(!t)return null;let n=t[1];3===n.length&&(n=n.split("").map(e=>`${e}${e}`).join(""));const r=parseInt(n.slice(0,2),16),o=parseInt(n.slice(2,4),16),a=parseInt(n.slice(4,6),16);return[r,o,a].some(e=>Number.isNaN(e))?null:{r:r,g:o,b:a}})(t);if(n)return n;const r=(e=>{const t=e.match(/^rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})(?:\s*,\s*(\d*\.?\d+))?\s*\)$/i);return t?{r:dg(Number.parseInt(t[1],10),0,255),g:dg(Number.parseInt(t[2],10),0,255),b:dg(Number.parseInt(t[3],10),0,255)}:null})(t);return r||null},gg=({r:e,g:t,b:n})=>{const r=e=>{const t=dg(Math.round(e),0,255).toString(16);return 1===t.length?`0${t}`:t};return`#${r(e)}${r(t)}${r(n)}`},fg=(e,t,n)=>{const r=dg(n,0,1);return{r:Math.round(e.r+(t.r-e.r)*r),g:Math.round(e.g+(t.g-e.g)*r),b:Math.round(e.b+(t.b-e.b)*r)}},hg=(e,t)=>{const n=dg(t,0,1);return`rgba(${dg(Math.round(e.r),0,255)}, ${dg(Math.round(e.g),0,255)}, ${dg(Math.round(e.b),0,255)}, ${n})`},mg={background:"#f8fafc",hoverBackground:"#f1f5f9",border:"#e2e8f0",hoverBorder:"#cbd5f5",shadow:"0 4px 12px rgba(15, 23, 42, 0.08)",hoverShadow:"0 6px 20px rgba(15, 23, 42, 0.14)"},bg={background:"#1f2937",hoverBackground:"#27364a",border:"#334155",hoverBorder:"#3b4c63",shadow:"0 4px 12px rgba(15, 23, 42, 0.45)",hoverShadow:"0 6px 20px rgba(15, 23, 42, 0.55)"},yg=(e,t)=>{const n=pg(e);if(!n)return(e=>e?bg:mg)(t);const r=(({r:e,g:t,b:n})=>{const r=[e,t,n].map(e=>{const t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4});return.2126*r[0]+.7152*r[1]+.0722*r[2]})(n),o=pg("#0f172a")??{r:15,g:23,b:42},a=pg(t?"#f8fafc":"#f9fafb")??{r:249,g:250,b:251},i=pg(t?"#334155":"#e2e8f0")??{r:226,g:232,b:240};let s,l;if(r>=.6){const e=t?.5:.7,r=Math.min(1,e+.15);s=fg(n,o,e),l=fg(n,o,r)}else if(r<=.35){const e=t?.9:.8,r=Math.min(1,e+(t?.05:.12));s=fg(n,a,e),l=fg(n,a,r)}else{const e=t?.45:.6,r=Math.min(1,e+.1);s=fg(n,i,e),l=fg(n,i,r)}const c=fg(n,s,.65),u=fg(n,l,.7),d=`0 4px 12px ${hg(n,t?.28:.12)}`,p=`0 6px 20px ${hg(n,t?.35:.18)}`;return{background:gg(s),hoverBackground:gg(l),border:gg(c),hoverBorder:gg(u),shadow:d,hoverShadow:p}},vg=({questions:e,isDark:t,palette:n,resolvedTextColor:r,fontFamily:o,fontSize:a,isRtl:i,onQuestionClick:s,applyHoverState:l,headingLabel:c})=>{const u=I.useRef(null),[d,p]=I.useState(!1),[g,f]=I.useState(!1),h=I.useCallback(()=>{const e=u.current;if(!e)return;const{scrollLeft:t,scrollWidth:n,clientWidth:r}=e;p(Math.abs(t)>1),f(Math.abs(t)+r<n-1)},[]);I.useEffect(()=>{h();const e=u.current;if(!e)return;const t=new ResizeObserver(h);return t.observe(e),()=>t.disconnect()},[h,e]);const m=I.useCallback(e=>{const t=u.current;if(!t)return;const n="left"===e?-150:150;t.scrollBy({left:i?-n:n,behavior:"smooth"})},[i]),b=t?"rgba(31,41,55,0.85)":"rgba(255,255,255,0.85)",y=t?"#e5e7eb":"#374151",v=t?"#4b5563":"#d1d5db";return Jp.jsxs("div",{className:"px-4 py-4 border-t "+(t?"border-gray-700/50":"border-gray-200/60"),children:[Jp.jsxs("div",{className:"text-xs mb-3 font-semibold tracking-wide uppercase "+(t?"text-gray-400":"text-gray-500"),children:[c||"Quick questions",":"]}),Jp.jsxs("div",{className:"flex items-center gap-1.5",children:[Jp.jsx("button",{onClick:()=>m("left"),disabled:!d,"aria-label":"Scroll left",className:"flex-shrink-0 flex items-center justify-center w-7 h-7 rounded-full shadow-sm transition-all duration-200 hover:shadow-md active:scale-95",style:{backgroundColor:b,border:`1px solid ${v}`,color:y,backdropFilter:"blur(4px)",opacity:d?1:.35,cursor:d?"pointer":"default"},children:Jp.jsx(dp,{size:16})}),Jp.jsx("div",{ref:u,onScroll:h,className:"flex-1 flex gap-3 overflow-x-auto pb-2",style:{scrollBehavior:"smooth",WebkitOverflowScrolling:"touch",scrollbarWidth:"none",msOverflowStyle:"none"},children:e.map((e,t)=>{const c=zd(e,i);return Jp.jsxs("button",{onClick:()=>s?.(e),className:"group relative text-sm px-5 py-2.5 rounded-full font-medium transition-all duration-300 hover:scale-105 active:scale-95 whitespace-nowrap flex-shrink-0 overflow-hidden backdrop-blur-sm "+(c?"text-right":"text-left"),style:{direction:c?"rtl":"ltr",backgroundColor:n.background,border:`1.5px solid ${n.border}`,boxShadow:n.shadow},onMouseEnter:e=>{l(e.currentTarget,!0),e.currentTarget.style.transform="translateY(-2px)"},onMouseLeave:e=>{l(e.currentTarget,!1),e.currentTarget.style.transform="translateY(0)"},children:[Jp.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-white/0 via-white/5 to-white/10 opacity-0 group-hover:opacity-100 transition-opacity duration-300 rounded-xl"}),Jp.jsx("span",{className:"relative z-10",style:{direction:c?"rtl":"ltr",color:r,fontFamily:o,fontSize:a,textAlign:c?"right":"left"},children:e})]},t)})}),Jp.jsx("button",{onClick:()=>m("right"),disabled:!g,"aria-label":"Scroll right",className:"flex-shrink-0 flex items-center justify-center w-7 h-7 rounded-full shadow-sm transition-all duration-200 hover:shadow-md active:scale-95",style:{backgroundColor:b,border:`1px solid ${v}`,color:y,backdropFilter:"blur(4px)",opacity:g?1:.35,cursor:g?"pointer":"default"},children:Jp.jsx(pp,{size:16})})]})]})},wg=({questions:e=[],isDark:t=!1,primaryColor:n="#2563eb",onQuestionClick:r,isTyping:o=!1,layout:a="vertical",fontFamily:i="Inter",fontSize:s="14px",textColor:l,isRtl:c=!1,questionTextColor:u,questionBoxColor:d,headingLabel:p})=>{if(!e.length||o)return null;const g=u??l??(t?"#f3f4f6":"#111827"),f=I.useMemo(()=>yg(g,t),[g,t]),h=(e,t)=>{e.style.backgroundColor=t?f.hoverBackground:f.background,e.style.borderColor=t?f.hoverBorder:f.border,e.style.boxShadow=t?f.hoverShadow:f.shadow};return"horizontal"===a?Jp.jsx(vg,{questions:e,isDark:t,palette:f,resolvedTextColor:g,fontFamily:i,fontSize:s,isRtl:c,onQuestionClick:r,applyHoverState:h,headingLabel:p}):Jp.jsxs("div",{style:{paddingInlineStart:"50px"},children:[p?Jp.jsx("div",{className:"mb-2",style:{color:t?"#9ca3af":"#6b7280",fontFamily:i,fontSize:`calc(${s} - 1px)`},children:p}):null,Jp.jsx("div",{className:"flex flex-wrap gap-2",children:e.map((e,o)=>{const a=zd(e,c);return Jp.jsx("button",{onClick:()=>r?.(e),className:"transition-all duration-200 active:scale-[0.97]",style:{direction:a?"rtl":"ltr",fontFamily:i,fontSize:s,color:n,backgroundColor:t?"transparent":"#ffffff",border:`1.5px solid ${n}`,borderRadius:"9999px",padding:"5px 14px",fontWeight:500,lineHeight:"1.4",whiteSpace:"normal",textAlign:a?"right":"left"},onMouseEnter:e=>{e.currentTarget.style.backgroundColor=`${n}14`},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=t?"transparent":"#ffffff"},children:e},o)})})]})},kg=({active:e=!1,processing:t=!1,deviceId:n,barWidth:r=3,barGap:o=1,barRadius:a=1.5,barColor:i,fadeEdges:s=!0,fadeWidth:l=24,barHeight:c=4,height:u=64,sensitivity:d=1,smoothingTimeConstant:p=.8,fftSize:g=256,historySize:f=60,updateRate:h=30,mode:m="static",onError:b,onStreamReady:y,onStreamEnd:v,className:w,...k})=>{const x=I.useRef(null),S=I.useRef(null),C=I.useRef([]),M=I.useRef(null),P=I.useRef(null),z=I.useRef(null),E=I.useRef(0),j=I.useRef(0),T=I.useRef(null),N=I.useRef([]),F=I.useRef(0),L=I.useRef([]),R=I.useRef(!0),A=I.useRef(null),_=I.useRef(0),B="number"==typeof u?`${u}px`:u;return I.useEffect(()=>{const e=x.current,t=S.current;if(!e||!t)return;const n=new ResizeObserver(()=>{const n=t.getBoundingClientRect(),r=window.devicePixelRatio||1;e.width=n.width*r,e.height=n.height*r,e.style.width=`${n.width}px`,e.style.height=`${n.height}px`;const o=e.getContext("2d");o&&o.scale(r,r),A.current=null,_.current=n.width,R.current=!0});return n.observe(t),()=>n.disconnect()},[]),I.useEffect(()=>{if(t&&!e){let e=0;F.current=0;const t=()=>{e+=.03,F.current=Math.min(1,F.current+.02);const n=[],a=Math.floor((S.current?.getBoundingClientRect().width||200)/(r+o));if("static"===m){const t=Math.floor(a/2);for(let r=0;r<a;r++){const o=(r-t)/t,a=1-.4*Math.abs(o),i=(.2+(.25*Math.sin(1.5*e+3*o)+.2*Math.sin(.8*e-2*o)+.15*Math.cos(2*e+o)))*a;let s=i;if(N.current.length>0&&F.current<1){const e=Math.min(r,N.current.length-1);s=(N.current[e]||0)*(1-F.current)+i*F.current}n.push(Math.max(.05,Math.min(1,s)))}}else for(let t=0;t<a;t++){const r=(t-a/2)/(a/2),o=1-.4*Math.abs(r),i=(.2+(.25*Math.sin(1.5*e+.15*t)+.2*Math.sin(.8*e-.1*t)+.15*Math.cos(2*e+.05*t)))*o;let s=i;if(N.current.length>0&&F.current<1){const e=Math.floor(t/a*N.current.length);s=(N.current[e]||0)*(1-F.current)+i*F.current}n.push(Math.max(.05,Math.min(1,s)))}"static"===m?L.current=n:C.current=n,R.current=!0,T.current=requestAnimationFrame(t)};return t(),()=>{T.current&&cancelAnimationFrame(T.current)}}if(!e&&!t){if("static"===m?L.current.length>0:C.current.length>0){let e=0;const t=()=>{e+=.03,e<1?("static"===m?L.current=L.current.map(t=>t*(1-e)):C.current=C.current.map(t=>t*(1-e)),R.current=!0,requestAnimationFrame(t)):"static"===m?L.current=[]:C.current=[]};t()}}},[t,e,r,o,m]),I.useEffect(()=>{if(!e)return z.current&&(z.current.getTracks().forEach(e=>e.stop()),z.current=null,v?.()),P.current&&"closed"!==P.current.state&&(P.current.close(),P.current=null),void(E.current&&(cancelAnimationFrame(E.current),E.current=0));return(async()=>{try{const e=await navigator.mediaDevices.getUserMedia({audio:n?{deviceId:{exact:n},echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}});z.current=e,y?.(e);const t=new(window.AudioContext||window.webkitAudioContext),r=t.createAnalyser();r.fftSize=g,r.smoothingTimeConstant=p;t.createMediaStreamSource(e).connect(r),P.current=t,M.current=r,C.current=[]}catch(e){b?.(e)}})(),()=>{z.current&&(z.current.getTracks().forEach(e=>e.stop()),z.current=null,v?.()),P.current&&"closed"!==P.current.state&&(P.current.close(),P.current=null),E.current&&(cancelAnimationFrame(E.current),E.current=0)}},[e,n,g,p,b,y,v]),I.useEffect(()=>{const n=x.current;if(!n)return;const u=n.getContext("2d");if(!u)return;let p;const g=b=>{const y=n.getBoundingClientRect();if(e&&b-j.current>h&&(j.current=b,M.current)){const e=new Uint8Array(M.current.frequencyBinCount);if(M.current.getByteFrequencyData(e),"static"===m){const t=Math.floor(.05*e.length),n=Math.floor(.4*e.length),a=e.slice(t,n),i=Math.floor(y.width/(r+o)),s=Math.floor(i/2),l=[];for(let e=s-1;e>=0;e--){const t=Math.floor(e/s*a.length),n=Math.min(1,a[t]/255*d);l.push(Math.max(.05,n))}for(let e=0;e<s;e++){const t=Math.floor(e/s*a.length),n=Math.min(1,a[t]/255*d);l.push(Math.max(.05,n))}L.current=l,N.current=l}else{let t=0;const n=Math.floor(.05*e.length),r=Math.floor(.4*e.length),o=e.slice(n,r);for(let e=0;e<o.length;e++)t+=o[e];const a=t/o.length/255*d;C.current.push(Math.min(1,Math.max(.05,a))),N.current=[...C.current],C.current.length>f&&C.current.shift()}R.current=!0}if(!R.current&&!e)return void(p=requestAnimationFrame(g));R.current=e,u.clearRect(0,0,y.width,y.height);const v=i||getComputedStyle(n).color||"#000",w=r+o,k=Math.floor(y.width/w),x=y.height/2;if("static"===m){const n=t||e||L.current.length>0?L.current:[];for(let e=0;e<k&&e<n.length;e++){const t=n[e]||.1,o=e*w,i=Math.max(c,t*y.height*.8),s=x-i/2;u.fillStyle=v,u.globalAlpha=.4+.6*t,a>0?(u.beginPath(),u.roundRect(o,s,r,i,a),u.fill()):u.fillRect(o,s,r,i)}}else for(let e=0;e<k&&e<C.current.length;e++){const t=C.current.length-1-e,n=C.current[t]||.1,o=y.width-(e+1)*w,i=Math.max(c,n*y.height*.8),s=x-i/2;u.fillStyle=v,u.globalAlpha=.4+.6*n,a>0?(u.beginPath(),u.roundRect(o,s,r,i,a),u.fill()):u.fillRect(o,s,r,i)}if(s&&l>0&&y.width>0){if(!A.current||_.current!==y.width){const e=u.createLinearGradient(0,0,y.width,0),t=Math.min(.3,l/y.width);e.addColorStop(0,"rgba(255,255,255,1)"),e.addColorStop(t,"rgba(255,255,255,0)"),e.addColorStop(1-t,"rgba(255,255,255,0)"),e.addColorStop(1,"rgba(255,255,255,1)"),A.current=e,_.current=y.width}u.globalCompositeOperation="destination-out",u.fillStyle=A.current,u.fillRect(0,0,y.width,y.height),u.globalCompositeOperation="source-over"}u.globalAlpha=1,p=requestAnimationFrame(g)};return p=requestAnimationFrame(g),()=>{p&&cancelAnimationFrame(p)}},[e,t,d,h,f,r,c,o,a,i,s,l,m]),Jp.jsxs("div",{className:Ad("relative h-full w-full",w),ref:S,style:{height:B},"aria-label":e?"Live audio waveform":t?"Processing audio":"Audio waveform idle",role:"img",...k,children:[!e&&!t&&Jp.jsx("div",{className:"border-muted-foreground/20 absolute top-1/2 right-0 left-0 -translate-y-1/2 border-t-2 border-dotted"}),Jp.jsx("canvas",{className:"block h-full w-full",ref:x,"aria-hidden":"true"})]})},xg=({messages:e=[],isDark:t,primaryColor:n,isLoading:r,agentMessageBubbleColor:o,userMessageBoxColor:a,textColor:i,assistantTextColor:s,userTextColor:l,fontFamily:c,agentMessageBubbleFontFamily:u,agentMessageBubbleFontSize:d,userMessageBubbleFontFamily:p,userMessageBubbleFontSize:g,fontSize:f,formatTime:h,isRtl:m=!1,defaultLanguage:b="en",quickQuestions:y=[],shouldShowQuickQuestions:v=!1,onQuickQuestion:w,quickQuestionsLayout:k="vertical",onDecision:x,disclaimerEnabled:S=!1,disclaimerText:C,disclaimerPosition:M="top",disclaimerLinkUrl:P,disclaimerLinkLabel:z,resolvedAgentBubbleColor:E,resolvedUserMessageColor:j,resolvedTextColor:T,isVoiceSessionActive:N=!1,voiceStatus:F="idle",messagesContainerRef:L,companyLogo:R,chatbotAvatarEnabled:A,chatbotAvatar:_,conciergeName:B,companyName:D,apiBaseUrl:O,getAuthToken:$,onPromptSuggestionClick:V,conversationResetKey:U,allowFeedback:H,provideCitations:W,onFeedback:q,headerTextColor:Q,onRetryMessage:Y,beforePromptsSlot:K=null,promptsSlot:G=null,quickQuestionsHeadingLabel:X})=>{const J=I.useRef(null),Z=I.useRef(!0),ee=I.useRef(!1),te=I.useMemo(()=>e.map(e=>`${e.id}:${e.content?.length??0}:${e.isProcessing?1:0}`).join("|"),[e]),ne=I.useCallback(()=>{const e=L?.current;if(!e)return;const t=e.scrollHeight-e.scrollTop-e.clientHeight;Z.current=t<160},[L]);I.useEffect(()=>{const e=L?.current;if(e)return e.addEventListener("scroll",ne,{passive:!0}),ne(),()=>{e.removeEventListener("scroll",ne)}},[ne,L]),I.useEffect(()=>{U&&(Z.current=!0,ee.current=!1)},[U]),I.useEffect(()=>{if(ee.current||0===e.length||"undefined"==typeof window)return;ee.current=!0;let t,n=!1;const r=window.requestAnimationFrame(()=>{n||(t=window.requestAnimationFrame(()=>{n||(J.current?.scrollIntoView({behavior:"instant",block:"end"}),Z.current=!0)}))});return()=>{n=!0,window.cancelAnimationFrame(r),window.cancelAnimationFrame(t)}},[0===e.length]),I.useEffect(()=>{if(!Z.current)return;if("undefined"==typeof window)return;let e=!1;const t=window.requestAnimationFrame(()=>{e||J.current?.scrollIntoView({behavior:"smooth",block:"end"})});return()=>{e=!0,window.cancelAnimationFrame(t)}},[te,r]),I.useEffect(()=>{if(!N||"connected"!==F)return;if("undefined"==typeof window)return;let e=!1;const t=window.requestAnimationFrame(()=>{e||J.current?.scrollIntoView({behavior:"smooth",block:"end"})});return()=>{e=!0,window.cancelAnimationFrame(t)}},[N,F]);const re=I.useMemo(()=>Rd(P),[P]),oe=I.useMemo(()=>zd(C,m),[C,m]);return Jp.jsxs(Jp.Fragment,{children:[S&&C&&"top"===M&&Jp.jsx("div",{className:"flex justify-center",children:Jp.jsx("div",{className:"rounded-lg px-2 py-1 ",style:{color:t?"#d1d5db":"#6b7280",fontFamily:null!=c?c:"Inter",fontSize:null!=f?`calc(${f} - 2px)`:"12px",direction:oe?"rtl":"ltr",textAlign:"center",borderColor:t?"#374151":"#e5e7eb"},children:Jp.jsxs("p",{className:"leading-relaxed whitespace-pre-wrap break-words inline",dir:oe?"rtl":"ltr",style:{color:t?"#d1d5db":"#6b7280",fontFamily:null!=c?c:"Inter",fontSize:null!=f?`calc(${f} - 2px)`:"12px"},children:[C,re&&z&&Jp.jsx("a",{href:re,target:"_blank",rel:"noopener noreferrer",title:re,style:{color:t?"#93c5fd":"#2563eb",marginInlineStart:"4px",verticalAlign:"middle",display:"inline-flex",alignItems:"center"},children:z})]})})}),e.map(e=>Jp.jsx(ug,{message:e,isDark:t,primaryColor:n,agentMessageBubbleColor:o,userMessageBoxColor:a,resolvedUserMessageColor:j,resolvedAgentBubbleColor:E,textColor:i,assistantTextColor:s,userTextColor:l,fontFamily:c,agentMessageBubbleFontFamily:u,agentMessageBubbleFontSize:d,userMessageBubbleFontFamily:p,userMessageBubbleFontSize:g,fontSize:f,formatTime:h,isRtl:zd(e.content,m),onDecision:x,onPromptSuggestionClick:V,companyLogo:A&&_?_:R,conciergeName:B,companyName:D,apiBaseUrl:O,getAuthToken:$,allowFeedback:H,provideCitations:W,onFeedback:q,headerTextColor:Q,onRetryMessage:Y,defaultLanguage:b},e.id)),(()=>{const y=e[e.length-1],v=r&&"user"===y?.role,w=e.some(e=>"assistant"===e.role&&(e.isProcessing||!e.content));return v&&!w?Jp.jsx(ug,{message:nd(),isDark:t,primaryColor:n,agentMessageBubbleColor:o,resolvedAgentBubbleColor:E,userMessageBoxColor:a,textColor:i,assistantTextColor:s,userTextColor:l,fontFamily:c,agentMessageBubbleFontFamily:u,agentMessageBubbleFontSize:d,userMessageBubbleFontFamily:p,userMessageBubbleFontSize:g,fontSize:f,formatTime:h,isRtl:m,onDecision:x,companyLogo:A&&_?_:R,conciergeName:B,companyName:D,apiBaseUrl:O,getAuthToken:$,headerTextColor:Q,defaultLanguage:b},"skeleton-waiting"):null})(),K,G?Jp.jsx("div",{className:"pt-1",children:G}):v&&y.length>0&&Jp.jsx("div",{className:"pt-1",children:Jp.jsx(wg,{questions:y,isDark:t,primaryColor:n,onQuestionClick:w,isTyping:r,layout:k,fontFamily:c,fontSize:f,textColor:i,isRtl:m,questionTextColor:s,questionBoxColor:o,headingLabel:X})}),N&&"connected"===F&&!r&&Jp.jsx("div",{className:"flex gap-3 flex-row-reverse animate-in",children:Jp.jsx("div",{className:"flex flex-col items-end max-w-[75%] w-full",children:Jp.jsxs("div",{className:"rounded-2xl px-4 py-2.5 shadow-lg rounded-tr-sm w-full",style:{background:`linear-gradient(135deg, ${j||n||"#2563eb"} 0%, ${j||n||"#2563eb"}dd 100%)`,width:"100px"},children:[Jp.jsx("span",{className:"sr-only",children:"Listening for voice input"}),Jp.jsx(kg,{active:!0,barWidth:2,barHeight:4,barGap:2,barColor:l||T||"#FFFFFF",height:20,fadeEdges:!0,className:"min-w-[60px]","aria-hidden":"true"})]})})}),Jp.jsx("div",{ref:J,className:"h-px"})]})};function Sg(e,t){return String(e||"").replace(/\/+$/,"")+(t.startsWith("/")?t:`/${t}`)}function Cg({apiEndpoint:e,conversationId:t,size:n,authHeader:r}){fetch(Sg(e,"/api/v1/chat-attachments/release"),{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({conversationId:t,size:n})}).catch(()=>{})}function Mg({orgId:e,conversationId:t,config:n,apiEndpoint:r,authHeader:o,onError:a}){const[i,s]=I.useState([]),l=I.useRef(new Map),c=I.useRef(0),u=I.useRef(i);u.current=i;const d=I.useRef({conversationId:t,bytes:0});d.current.conversationId!==t&&(d.current={conversationId:t,bytes:0});const p=I.useCallback(()=>(c.current+=1,`att-${Date.now()}-${c.current}`),[]),g=I.useCallback((e,t)=>{s(n=>n.map(n=>n.id===e?{...n,...t}:n))},[]),f=I.useCallback((e,t,n)=>{const r={status:"error",error:{code:t,message:n}};s(t=>{const n=t.map(t=>t.id===e?{...t,...r}:t),o=n.find(t=>t.id===e);return o&&a&&a(o),n})},[a]),h=I.useCallback((e,t)=>{if(!n?.fileUploadEnabled)return{ok:!1,code:"feature_disabled",message:"File uploads are not enabled for this organization."};if(t>=n.fileUploadMaxFiles)return{ok:!1,code:"too_many_files",message:`Max ${n.fileUploadMaxFiles} files per message.`};const r=1024*n.fileUploadMaxSizeMB*1024;if(d.current.bytes+e.size>r){return{ok:!1,code:"size_exceeded",message:`This conversation has already used ${(d.current.bytes/1048576).toFixed(1)} MB of its ${n.fileUploadMaxSizeMB} MB upload limit - this file won't fit.`}}const o=(e.type||"").toLowerCase(),a=new Set((n.fileUploadAllowedMimes||[]).map(e=>String(e).toLowerCase()));return a.size>0&&!a.has(o)?{ok:!1,code:"mime_not_allowed",message:`File type "${e.type||"unknown"}" is not allowed.`}:{ok:!0}},[n]),m=I.useCallback(async(e,n)=>{let a;try{a=await fetch(Sg(r,"/api/v1/chat-attachments/presign"),{method:"POST",credentials:"include",headers:{"Content-Type":"application/json",...o?{Authorization:o}:{}},body:JSON.stringify({filename:n.name,mimeType:n.type,size:n.size,conversationId:t})})}catch(t){return d.current.bytes=Math.max(0,d.current.bytes-n.size),void f(e,"network","Network error while requesting upload.")}if(!a.ok){let t="Upload rejected by the server.",r="unknown";try{const e=await a.json();e?.error&&(t=e.error),e?.code&&(r=function(e){switch(e){case"feature_disabled":case"size_exceeded":case"mime_not_allowed":case"storage_unavailable":return e;default:return"unknown"}}(e.code))}catch{}return d.current.bytes=Math.max(0,d.current.bytes-n.size),void f(e,r,t)}let i=0;const s=()=>{i>0&&(Cg({apiEndpoint:r,conversationId:t,size:i,authHeader:o}),i=0,g(e,{reservedBytes:0}))},c=()=>{d.current.bytes=Math.max(0,d.current.bytes-n.size)};let u;try{u=await a.json()}catch{return Cg({apiEndpoint:r,conversationId:t,size:n.size,authHeader:o}),c(),g(e,{reservedBytes:0}),void f(e,"unknown","Malformed presign response.")}let p,h;("boolean"==typeof u.reserved?u.reserved:!u.useMultipart)&&(i=n.size,g(e,{reservedBytes:n.size}));try{if(u.useMultipart){const a=await function({url:e,file:t,conversationId:n,authHeader:r,onProgress:o,registerXhr:a}){return new Promise((r,i)=>{const s=new XMLHttpRequest;a(s),s.open("POST",e,!0),s.withCredentials=!0;const l=new FormData;l.append("conversationId",n),l.append("file",t,t.name),s.upload.onprogress=e=>{e.lengthComputable&&o(Math.round(e.loaded/e.total*100))},s.onload=()=>{if(s.status>=200&&s.status<300)try{const e=JSON.parse(s.responseText);r({url:"string"==typeof e?.url?e.url:void 0,storageKey:"string"==typeof e?.storageKey?e.storageKey:void 0})}catch{r({})}else i(new Error(`upload_status_${s.status}`))},s.onerror=()=>i(new Error("network")),s.onabort=()=>i({aborted:!0}),s.send(l)})}({url:Sg(r,"/api/v1/chat-attachments/multipart"),file:n,conversationId:t,authHeader:o,onProgress:t=>g(e,{progress:t}),registerXhr:t=>l.current.set(e,t)});p=a.url,h=a.storageKey,i=n.size,g(e,{reservedBytes:n.size})}else{if(!u.uploadUrl)throw new Error("presign_missing_target");{await function({url:e,file:t,onProgress:n,registerXhr:r}){return new Promise((o,a)=>{const i=new XMLHttpRequest;r(i),i.open("PUT",e,!0),i.setRequestHeader("x-ms-blob-type","BlockBlob"),t.type&&i.setRequestHeader("Content-Type",t.type),i.upload.onprogress=e=>{e.lengthComputable&&n(Math.round(e.loaded/e.total*100))},i.onload=()=>{i.status>=200&&i.status<300?o():a(new Error(`upload_status_${i.status}`))},i.onerror=()=>a(new Error("network")),i.onabort=()=>a({aborted:!0}),i.send(t)})}({url:u.uploadUrl,file:n,onProgress:t=>g(e,{progress:t}),registerXhr:t=>l.current.set(e,t)});const t=await async function({apiEndpoint:e,storageKey:t,filename:n,mimeType:r,authHeader:o}){let a;try{a=await fetch(Sg(e,"/api/v1/chat-attachments/confirm"),{method:"POST",credentials:"include",headers:{"Content-Type":"application/json",...o?{Authorization:o}:{}},body:JSON.stringify({storageKey:t,filename:n,mimeType:r})})}catch{return{ok:!1,code:"network",message:"Network error while verifying upload."}}if(a.ok)return{ok:!0};let i="Upload rejected - file content did not match its declared type.",s="content_mismatch";try{const e=await a.json();e?.error&&(i=e.error),"password_protected"===e?.code&&(s="password_protected")}catch{}return{ok:!1,code:s,message:i}}({apiEndpoint:r,storageKey:u.storageKey,filename:n.name,mimeType:n.type,authHeader:o});if(!t.ok)return l.current.delete(e),s(),c(),void f(e,t.code,t.message)}}}catch(t){if(l.current.delete(e),t&&t.aborted)return;return s(),c(),void f(e,"network","Upload failed. Please retry.")}l.current.delete(e),g(e,{status:"ready",progress:100,storageKey:h||u.storageKey,...p?{url:p}:{}})},[r,o,t,f,g]),b=I.useCallback(async e=>{const t=Array.from(e);for(const e of t){const t=u.current.filter(e=>"error"!==e.status).length,n=h(e,t),r=p();if(!n.ok){const t={id:r,filename:e.name,size:e.size,mimeType:e.type,status:"error",error:{code:n.code,message:n.message}};s(e=>(a&&a(t),[...e,t]));continue}const o={id:r,filename:e.name,size:e.size,mimeType:e.type,status:"uploading",progress:0,reservedBytes:0};s(e=>[...e,o]),d.current.bytes+=e.size,m(r,e)}},[h,m,p,a]),y=I.useCallback(e=>{const n=l.current.get(e);n&&(n.abort(),l.current.delete(e));const a=u.current.find(t=>t.id===e);a&&a.reservedBytes>0&&(Cg({apiEndpoint:r,conversationId:t,size:a.reservedBytes,authHeader:o}),d.current.bytes=Math.max(0,d.current.bytes-a.reservedBytes)),s(t=>t.filter(t=>t.id!==e))},[r,o,t]),v=I.useCallback(()=>{for(const e of l.current.values())e.abort();l.current.clear(),s([])},[]),w=I.useMemo(()=>i.some(e=>"validating"===e.status||"uploading"===e.status),[i]),k=I.useCallback(()=>i.filter(e=>"ready"===e.status&&"string"==typeof e.storageKey).map(e=>({filename:e.filename,mimeType:e.mimeType,size:e.size,storageKey:e.storageKey,url:e.url})),[i]);return{attachments:i,addFiles:b,removeAttachment:y,clearAll:v,isBusy:w,toSendPayload:k}}function Pg(e){if(!e||e<1024)return`${e||0} B`;const t=["KB","MB","GB"];let n=e/1024,r=0;for(;n>=1024&&r<t.length-1;)n/=1024,r+=1;return`${n.toFixed(n>=10?0:1)} ${t[r]}`}function zg({attachment:e,onRemove:t,isDark:n}){const r="error"===e.status,o="uploading"===e.status,a="ready"===e.status,i=r?n?"rgba(239,68,68,0.15)":"#fee2e2":n?"#1f2937":"#f3f4f6",s=r?n?"#b91c1c":"#fca5a5":n?"#374151":"#e5e7eb",l=r?n?"#fca5a5":"#b91c1c":n?"#e5e7eb":"#374151",c=r?`${e.filename} - ${e.error?.message||"error"}`:o?`${e.filename} - uploading`:`${e.filename} - ready`;return Jp.jsxs("div",{className:"inline-flex items-center gap-2 rounded-full pl-2 pr-1 py-1 text-xs",style:{backgroundColor:i,border:`1px solid ${s}`,color:l,maxWidth:240},title:r?e.error?.message:e.filename,"aria-label":c,children:[r?Jp.jsx(gp,{size:12,"aria-hidden":"true"}):o?Jp.jsx(bp,{size:12,className:"animate-spin","aria-hidden":"true"}):Jp.jsx(mp,{size:12,"aria-hidden":"true"}),Jp.jsx("span",{className:"truncate",style:{maxWidth:140,direction:"ltr"},children:e.filename}),a&&Jp.jsx("span",{className:"opacity-70 text-chip",children:Pg(e.size)}),o&&"number"==typeof e.progress&&Jp.jsxs("span",{className:"opacity-70 text-chip",children:[e.progress,"%"]}),Jp.jsx("button",{type:"button",onClick:()=>t(e.id),className:"w-4 h-4 rounded-full inline-flex items-center justify-center",style:{backgroundColor:"transparent",border:"none",color:l,cursor:"pointer"},"aria-label":"Remove attachment",children:Jp.jsx(Ep,{size:12})})]})}const Eg=({suggestions:e,onSuggestionClick:t,promptPrimary:n,promptTextColor:r,promptFontFamily:o,promptFontSize:a,isRtl:i,t:s,questionDisplay:l=!0})=>Jp.jsx("div",{className:"mb-2 px-5",children:Jp.jsx("div",{className:"flex flex-col gap-2",role:"group","aria-label":s("suggestedQuestions"),children:e.map((e,s)=>{const c=((e,t=!0)=>{if(!e||"string"==typeof e)return e||"";const n="string"==typeof e.text?e.text:"";if(!t)return n;const r="string"==typeof e.submitText?e.submitText.trim():"";return r&&r!==n?r:n})(e,l),u=zd(c,i);return Jp.jsx("button",{type:"button",onClick:()=>t(e.submitText||e.text||e,e,s),dir:u?"rtl":"ltr",className:"block w-full rounded-2xl px-4 py-2 border-0 transition-transform duration-150 active:scale-[0.99] "+(u?"text-right":"text-left"),style:{direction:u?"rtl":"ltr",textAlign:u?"right":"left",background:`linear-gradient(135deg, ${n} 0%, ${n}dd 100%)`,color:r,fontFamily:o,fontSize:a},children:c},`${e.text||e}-${s}`)})})}),jg=({onStopGeneration:e,inputValue:t,setInputValue:n,onSend:r,isDark:o,primaryColor:a,isOpen:i,isMinimized:s,isLoading:l,isConversationLoading:c=!1,placeholder:u,textColor:d,fontFamily:p,fontSize:g,isRtl:f=!1,csatVisible:h=!1,enableVoiceInteraction:m=!1,isVoiceSessionActive:b=!1,voiceStatus:y="idle",voiceError:v=null,onVoiceToggle:w,onBidiSubmit:k,disclaimerEnabled:x=!1,disclaimerText:S,disclaimerPosition:C="top",disclaimerLinkUrl:M,disclaimerLinkLabel:P,showPoweredBy:z=!0,onboardingQuestions:E=[],onboardingActive:j=!1,onboardingCompleted:T=!1,userMessageBubbleFontFamily:N,onboardingEnabled:F=!1,userMessageBubbleFontSize:L,userMessageBoxColor:R,resolvedUserMessageColor:A,userTextColor:_,promptSuggestions:B,onPromptSuggestionClick:D,autoPromptQuestionDisplay:O=!0,tagSelectorNode:$=null,showResolveButton:V=!1,onResolve:U,defaultLanguage:H="en",chatFeatures:W,apiEndpoint:q,organizationId:Q,conversationId:Y})=>{const K=I.useMemo(()=>Ed(H),[H]),G=I.useMemo(()=>function(e){const t=Sd(e),n=wd[t]||vd;return{beforeBrand:n.poweredByBefore??n.poweredBy??vd.poweredByBefore,afterBrand:n.poweredByAfter??""}}(H),[H]),X=I.useMemo(()=>zd(t,f),[t,f]),[J,Z]=I.useState(!1),[ee,te]=I.useState(!1),ne=I.useMemo(()=>({fileUploadEnabled:W?.fileUploadEnabled??!1,fileUploadMaxSizeMB:W?.fileUploadMaxSizeMB??10,fileUploadMaxFiles:W?.fileUploadMaxFiles??3,fileUploadAllowedMimes:W?.fileUploadAllowedMimes??[]}),[W]),{attachments:re,addFiles:oe,removeAttachment:ae,clearAll:ie,isBusy:se,toSendPayload:le}=Mg({orgId:Q,conversationId:Y,config:ne,apiEndpoint:q,authHeader:void 0}),ce=I.useRef(null),ue=!!ne.fileUploadEnabled&&!!q,de=re.length>=ne.fileUploadMaxFiles,pe=`Max ${ne.fileUploadMaxFiles} files per message.`,ge=I.useMemo(()=>ne.fileUploadAllowedMimes.length>0?ne.fileUploadAllowedMimes.join(","):void 0,[ne.fileUploadAllowedMimes]),[fe,he]=I.useState({top:0,left:0,placement:"top",arrowOffset:0}),[me,be]=I.useState(!1),ye=I.useRef(null),ve=I.useRef(null),we=I.useRef(null),ke=I.useRef(null);Rp(p),Rp(N),I.useEffect(()=>{i&&!s&&ve.current?.focus()},[i,s]),I.useEffect(()=>{const e=ve.current;if(e){e.style.height="auto";const n=e.scrollHeight,r=t.trim().length>0?20:48,o=Math.max(r,Math.min(n,120));e.style.height=`${o}px`}},[t]);const xe=I.useCallback(()=>{const e=le();e.length>0?(r(void 0,e),ie()):r()},[le,ie,r]),Se=re.some(e=>"ready"===e.status),Ce=!t.trim()&&!Se||l||c||se,Me=o?"#374151":"#e5e7eb",Pe=E&&E.length>0,ze=h||c||F&&(Pe&&!T)||"connecting"===y,Ee=h?K("pleaseSubmitRatingFirst"):Pe?j?K("completeOnboardingToEnableVoice"):T?"":K("sendMessageToCompleteOnboarding"):"",je=()=>{if(!we.current)return;const e=we.current.getBoundingClientRect(),t=220,n=e.top,r=window.innerHeight-e.bottom;let o="top",a=0,i=0;n>=73?(o="top",a=e.top-60-5-8,i=e.right-t,i<10&&(i=10),i+t>window.innerWidth-10&&(i=window.innerWidth-t-10)):r>=68?(o="bottom",a=e.bottom+8,i=e.right-t,i<10&&(i=10),i+t>window.innerWidth-10&&(i=window.innerWidth-t-10)):(o="top",a=Math.max(10,e.top-60-5-8),i=e.right-t,i<10&&(i=10),i+t>window.innerWidth-10&&(i=window.innerWidth-t-10));return{top:a,left:i,placement:o,arrowOffset:e.left+e.width/2-i}};I.useEffect(()=>{if(ee&&Ee){const e=()=>{const e=je();he(e)};return window.addEventListener("scroll",e,!0),window.addEventListener("resize",e),()=>{window.removeEventListener("scroll",e,!0),window.removeEventListener("resize",e)}}},[ee,Ee]),I.useEffect(()=>()=>{ye.current&&clearTimeout(ye.current)},[]);const Te=null!=A?A:null!=R?R:null!=a?a:"#2563eb",Ne=null!=_?_:null!=d?d:"#FFFFFF",Fe=null!=N?N:null!=p?p:"Inter",Le=null!=L?L:null!=g?g:null,Re=Le?`calc(${Le} - 2px)`:"12px",Ae=Rd(M);return Jp.jsxs("div",{className:"py-4 flex-shrink-0 relative "+(o?"bg-gray-900":"bg-white"),style:{overflow:"visible"},children:[$||B.length>0&&D&&Jp.jsx(Eg,{suggestions:B,onSuggestionClick:D,questionDisplay:O,promptPrimary:Te,promptTextColor:Ne,promptFontFamily:Fe,promptFontSize:Re,isRtl:f,t:K}),Jp.jsx("div",{className:"my-4",style:{height:"1px",backgroundColor:Me}}),ue&&re.length>0&&Jp.jsx("div",{className:"px-5 mb-2 flex flex-wrap gap-1.5",children:re.map(e=>Jp.jsx(zg,{attachment:e,onRemove:ae,isDark:o},e.id))}),Jp.jsxs("div",{className:"flex items-center px-5 gap-1.5",children:[ue&&Jp.jsx("input",{ref:ce,type:"file",multiple:!0,accept:ge,"aria-label":K("uploadFile"),className:"hidden",style:{display:"none"},onChange:e=>{const t=e.target.files;t&&t.length&&!de&&oe(t),e.currentTarget.value=""}}),Jp.jsxs("div",{className:`flex-1 flex items-center gap-1 px-1 min-h-[48px] ${o?"bg-gray-800":"bg-gray-50"} rounded-2xl transition-all duration-200`,style:{borderStyle:"solid",borderColor:t&&t.trim().length>0?a||"#2563eb":Me,borderWidth:t&&t.trim().length>0?"2px":"1px"},children:[ue&&Jp.jsxs("div",{className:"relative group shrink-0",children:[Jp.jsx("button",{type:"button",onClick:()=>ce.current&&ce.current.click(),disabled:h||c||l||de,"aria-label":de?pe:"Attach file",title:de?pe:"Attach file",className:`h-8 w-8 rounded-lg flex items-center justify-center transition-colors duration-200 ${o?"text-gray-300 hover:bg-gray-700":"text-gray-500 hover:bg-gray-200"} disabled:opacity-40 disabled:cursor-not-allowed`,style:{border:"none"},children:Jp.jsx(wp,{className:"w-4 h-4"})}),de&&Jp.jsx("div",{role:"tooltip",className:"pointer-events-none absolute bottom-full left-1/2 -translate-x-1/2 mb-2 opacity-0 group-hover:opacity-100 transition-opacity px-3 py-1.5 text-xs rounded-lg whitespace-nowrap shadow-lg "+(o?"bg-gray-700 text-gray-100":"bg-gray-800 text-white"),children:pe})]}),Jp.jsx("div",{className:"relative flex-1 flex items-center min-w-0",children:Jp.jsx("textarea",{id:"chat-widget-input",ref:ve,"aria-label":u||K("typeYourMessage"),value:t,onChange:e=>{n(e.target.value)},onFocus:()=>Z(!0),onBlur:()=>Z(!1),onKeyDown:e=>{if("Enter"===e.key&&!e.shiftKey){if(e.preventDefault(),b&&k&&!Se)return void k();if(Ce)return;xe()}},placeholder:c?K("agentIsLoading"):u||K("typeYourMessage"),rows:1,disabled:h||c||l||b&&"connected"!==y,dir:X?"rtl":"ltr",className:`w-full px-3 bg-transparent rounded-xl leading-normal ${o?"text-gray-100":"text-gray-900"} placeholder-gray-400 resize-none outline-none scrollbar-hide break-words`,style:{height:"auto",maxHeight:"120px",minHeight:"48px",paddingTop:t.trim().length>0?"12px":"0px",paddingBottom:t.trim().length>0?"12px":"0px",lineHeight:t.trim().length>0?"1.4":"48px",fontFamily:N||p||"Inter",fontSize:g||"14px",color:o?"#F3F4F6":"#1F2937",textAlign:X?"right":"left",direction:X?"rtl":"ltr",wordSpacing:"0",letterSpacing:"0"}})}),m&&Jp.jsxs("div",{className:"relative shrink-0",onMouseEnter:()=>{if(ze&&Ee){ye.current&&(clearTimeout(ye.current),ye.current=null);const e=je();he(e),te(!0)}},onMouseLeave:()=>{ye.current&&(clearTimeout(ye.current),ye.current=null),te(!1)},children:[Jp.jsx("button",{style:{border:"none"},ref:we,type:"button",onClick:w,"aria-label":K(b?"stopVoiceInput":"startVoiceInput"),className:`h-8 w-8 rounded-lg flex items-center justify-center transition-colors duration-200 ${b?"bg-red-500 text-white hover:bg-red-600":o?"text-gray-300 hover:bg-gray-700":"text-gray-500 hover:bg-gray-200"} ${ze?"opacity-60 cursor-not-allowed":""}`,disabled:ze,children:"connecting"===y?Jp.jsx(bp,{className:"w-4 h-4 animate-spin"}):Jp.jsx(cp,{className:"w-4 h-4"})}),ee&&Ee&&"undefined"!=typeof document&&Hu.createPortal(Jp.jsxs("div",{ref:ke,className:"px-3 py-1.5 text-xs shadow-md pointer-events-none",style:{position:"fixed",top:`${fe.top}px`,left:`${fe.left}px`,maxWidth:"220px",whiteSpace:"normal",wordWrap:"break-word",minWidth:"180px",zIndex:999999,backgroundColor:o?"#1f2937":"#ffffff",color:o?"#f3f4f6":"#111827",border:o?"1px solid #374151":"1px solid #e5e7eb",borderRadius:"top"===fe.placement?"6px 6px 6px 6px":"6px",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",overflow:"visible"},children:[Jp.jsx("div",{className:"text-left leading-relaxed",children:Ee}),"top"===fe.placement&&Jp.jsxs(Jp.Fragment,{children:[Jp.jsx("div",{style:{position:"absolute",top:"100%",left:`${fe.arrowOffset}px`,transform:"translateX(-50%)",width:0,height:0,borderLeft:"6px solid transparent",borderRight:"6px solid transparent",borderTop:o?"6px solid #374151":"6px solid #e5e7eb",pointerEvents:"none"}}),Jp.jsx("div",{style:{position:"absolute",top:"100%",left:`${fe.arrowOffset}px`,transform:"translateX(-50%)",marginTop:"-1px",width:0,height:0,borderLeft:"5px solid transparent",borderRight:"5px solid transparent",borderTop:o?"5px solid #1f2937":"5px solid #ffffff",pointerEvents:"none"}})]}),"bottom"===fe.placement&&Jp.jsxs(Jp.Fragment,{children:[Jp.jsx("div",{className:"absolute bottom-full",style:{left:`${fe.arrowOffset}px`,transform:"translateX(-50%)",width:0,height:0,borderLeft:"5px solid transparent",borderRight:"5px solid transparent",borderBottom:o?"5px solid #374151":"5px solid #e5e7eb"}}),Jp.jsx("div",{className:"absolute bottom-full -mb-px",style:{left:`${fe.arrowOffset}px`,transform:"translateX(-50%)",width:0,height:0,borderLeft:"4px solid transparent",borderRight:"4px solid transparent",borderBottom:o?"4px solid #1f2937":"4px solid #ffffff"}})]})]}),document.body)]})]}),l&&!b&&"function"==typeof e?Jp.jsx("button",{onClick:e,className:"h-10 w-10 flex-shrink-0 rounded-xl transition-all duration-200 flex items-center justify-center shadow-md scale-100",style:{backgroundColor:a,color:"white",border:"none"},"aria-label":K("stopGenerating"),children:Jp.jsx(Sp,{className:"w-3.5 h-3.5",fill:"currentColor"})}):Jp.jsx("button",{onClick:b&&k&&!Se?k:xe,disabled:h||Ce||b&&"connected"!==y,className:"h-10 w-10 flex-shrink-0 rounded-xl transition-all duration-200 flex items-center justify-center shadow-md disabled:opacity-40 disabled:cursor-not-allowed disabled:shadow-none "+(t.trim()?"scale-100":"scale-95"),style:{backgroundColor:t.trim()?a:o?"#374151":"#e5e7eb",color:t.trim()?"white":"#9ca3af",border:"none"},"aria-label":K("sendMessage"),children:Jp.jsx(xp,{className:"w-4 h-4 transition-transform",style:f?{transform:"rotate(-90deg)"}:void 0})})]}),b&&Jp.jsxs("p",{"aria-live":"polite",className:`text-xs mt-2 px-5 ${"connected"===y?"text-status-success":"text-gray-500"} flex items-center gap-1`,children:[Jp.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-current inline-flex"}),K("connected"===y?"voiceSessionLive":"connectingVoice")]}),v&&Jp.jsx("p",{role:"alert",className:"text-xs mt-1 px-5 text-status-error",children:K(v)===v?K("voiceUnavailable"):K(v)}),x&&S&&"footer"===C&&Jp.jsxs("p",{className:"text-xs mt-2 px-5 text-center",style:{color:o?"#d1d5db":"#6b7280",fontFamily:p||"Inter",fontSize:g?`calc(${g} - 2px)`:"12px",direction:f?"rtl":"ltr"},dir:f?"rtl":"ltr",children:[S,Ae&&P&&Jp.jsx("a",{href:Ae,target:"_blank",rel:"noopener noreferrer",title:Ae,style:{color:o?"#93c5fd":"#2563eb",marginInlineStart:"4px",verticalAlign:"middle",display:"inline-flex",alignItems:"center"},children:P})]}),z&&Jp.jsx("div",{className:"mt-1.5 flex justify-center",children:Jp.jsx("a",{href:"https://eshal.ai",target:"_blank",rel:"noopener noreferrer",className:"no-underline",children:Jp.jsxs("span",{dir:"ltr",className:"inline-flex items-center gap-1.5 py-1.5 px-3",children:[G.beforeBrand&&Jp.jsx("span",{className:Ad("font-sans text-[10px] font-medium",o?"text-gray-400":"text-gray-500"),children:G.beforeBrand}),me?Jp.jsx("span",{className:Ad("font-sans text-[10px] font-semibold",o?"text-gray-300":"text-gray-600"),children:"ESHAL"}):Jp.jsx("img",{src:o?"data:image/svg+xml,%3csvg width='219' height='54' xmlns='http://www.w3.org/2000/svg' version='1.0'%3e%3cg class='layer'%3e%3ctitle%3eEshal Logo%3c/title%3e%3cg clip-path='url(%23a)' transform='translate(-.708 -1.076)'%3e%3cg clip-path='url(%23b)'%3e%3cpath d='M21.79 54.75h4.5l3.93-.56 4.49-1.4 3.38-1.97 2.81-2.25 2.24-2.81 2.25-3.93 1.13-3.09v-.85l-3.65-1.12h-.57l-1.96 4.5-1.97 3.09-2.81 2.53-3.93 1.96-3.38.85-2.81.28h-2.81l-4.21-.57-3.94-1.4-2.81-1.97-2.25-2.24-1.96-3.38-1.41-4.21-.56-3.37-.28-3.1v-3.65l.56-5.06 1.12-4.21 1.97-3.94 2.53-2.81 2.25-1.68 2.81-1.41 3.37-.84 2.25-.28H26l4.78.84 4.5 2.25 2.53 2.53 1.4 2.53.56 2.53-.28 3.65-1.12 2.25-1.41 1.69-1.4.55-1.13-4.21-1.68-2.81-1.97-1.97-3.09-1.4-1.12-.28h-5.34l-3.09 1.12-2.25 1.69-1.41 1.97-.84 3.09.28 3.08 1.4 2.82 1.97 1.96 2.81 1.41 2.25.56 4.78.28 3.09-.28.84-.28-1.12 3.09-1.69 1.97-2.25.84h-3.65l-2.81-1.12-1.68-1.41-3.38 2.25.56 1.13 1.13 1.4 2.81 1.69 2.81.84h4.78l2.81-.84 2.53-1.69 1.96-2.25L35 34.8l.84-4.5 3.65-2.24 2.53-2.53 1.69-3.09.56-2.25.28-2.81-.56-3.93-1.12-2.82-2.25-3.09-3.09-2.81-4.22-2.25-4.5-1.12-2.52-.28h-4.5l-3.93.56-4.5 1.41-3.38 1.96-3.37 3.1-2.52 3.65-1.97 4.49-1.13 4.78-.28 2.25v9.27l.84 5.06 1.69 4.78 1.69 3.09 2.25 2.81 2.8 2.53 2.82 1.69 5.06 1.68zm1.12-27.54-2.53-.84-1.4-1.12-.84-1.69.28-2.53 1.12-1.4 2.25-1.13H26l2.81 1.41 1.41 1.97.84 2.8v2.25l-1.12.28zm0 0' fill='white'/%3e%3c/g%3e%3c/g%3e%3cpath d='M82.381 38.435v6.48h-27.06V9.965h26.41v6.5h-18.36v7.57h16.22v6.3h-16.22v8.1zm16.432 7.07c-2.77 0-5.44-.37-8.02-1.11-2.57-.75-4.65-1.72-6.22-2.92l2.75-6.09c1.5 1.09 3.28 1.98 5.34 2.64 2.07.67 4.13 1 6.19 1q3.45 0 5.1-1.02t1.65-2.73c0-.83-.33-1.52-.98-2.06-.65-.55-1.48-1-2.5-1.33-1.01-.33-2.39-.7-4.11-1.1-2.67-.63-4.85-1.26-6.55-1.89s-3.15-1.64-4.37-3.04c-1.21-1.41-1.82-3.27-1.82-5.6 0-2.03.55-3.86 1.64-5.51 1.11-1.66 2.76-2.96 4.97-3.92 2.22-.97 4.93-1.46 8.13-1.46 2.22 0 4.4.27 6.53.8s4 1.3 5.59 2.3l-2.5 6.14c-3.23-1.82-6.45-2.74-9.67-2.74-2.27 0-3.95.37-5.03 1.1-1.07.73-1.61 1.69-1.61 2.89q0 1.8 1.86 2.67c1.25.59 3.16 1.16 5.72 1.72 2.66.63 4.85 1.27 6.55 1.9 1.69.63 3.14 1.63 4.36 2.99 1.21 1.37 1.82 3.21 1.82 5.55 0 2-.56 3.82-1.67 5.46q-1.68 2.475-5.01 3.93c-2.23.95-4.95 1.43-8.14 1.43m50.913-35.54v34.95h-8.08v-14.33h-15.88v14.33h-8.09V9.965h8.09v13.78h15.88V9.965zm29.811 27.47h-16.22l-3.1 7.48h-8.29l15.58-34.95h7.98l15.62 34.95h-8.48zm-2.55-6.15-5.55-13.37-5.53 13.37zm16.274-21.32h8.09v28.36h17.52v6.59h-25.61zm0 0' fill='white'/%3e%3c/g%3e%3c/svg%3e":"data:image/svg+xml,%3csvg width='219' height='54' xmlns='http://www.w3.org/2000/svg' version='1.0'%3e%3cg class='layer'%3e%3ctitle%3eEshal Logo%3c/title%3e%3cg clip-path='url(%23a)' transform='translate(-.708 -1.076)'%3e%3cg clip-path='url(%23b)'%3e%3cpath d='M21.79 54.75h4.5l3.93-.56 4.49-1.4 3.38-1.97 2.81-2.25 2.24-2.81 2.25-3.93 1.13-3.09v-.85l-3.65-1.12h-.57l-1.96 4.5-1.97 3.09-2.81 2.53-3.93 1.96-3.38.85-2.81.28h-2.81l-4.21-.57-3.94-1.4-2.81-1.97-2.25-2.24-1.96-3.38-1.41-4.21-.56-3.37-.28-3.1v-3.65l.56-5.06 1.12-4.21 1.97-3.94 2.53-2.81 2.25-1.68 2.81-1.41 3.37-.84 2.25-.28H26l4.78.84 4.5 2.25 2.53 2.53 1.4 2.53.56 2.53-.28 3.65-1.12 2.25-1.41 1.69-1.4.55-1.13-4.21-1.68-2.81-1.97-1.97-3.09-1.4-1.12-.28h-5.34l-3.09 1.12-2.25 1.69-1.41 1.97-.84 3.09.28 3.08 1.4 2.82 1.97 1.96 2.81 1.41 2.25.56 4.78.28 3.09-.28.84-.28-1.12 3.09-1.69 1.97-2.25.84h-3.65l-2.81-1.12-1.68-1.41-3.38 2.25.56 1.13 1.13 1.4 2.81 1.69 2.81.84h4.78l2.81-.84 2.53-1.69 1.96-2.25L35 34.8l.84-4.5 3.65-2.24 2.53-2.53 1.69-3.09.56-2.25.28-2.81-.56-3.93-1.12-2.82-2.25-3.09-3.09-2.81-4.22-2.25-4.5-1.12-2.52-.28h-4.5l-3.93.56-4.5 1.41-3.38 1.96-3.37 3.1-2.52 3.65-1.97 4.49-1.13 4.78-.28 2.25v9.27l.84 5.06 1.69 4.78 1.69 3.09 2.25 2.81 2.8 2.53 2.82 1.69 5.06 1.68zm1.12-27.54-2.53-.84-1.4-1.12-.84-1.69.28-2.53 1.12-1.4 2.25-1.13H26l2.81 1.41 1.41 1.97.84 2.8v2.25l-1.12.28zm0 0' fill='black'/%3e%3c/g%3e%3c/g%3e%3cpath d='M82.381 38.435v6.48h-27.06V9.965h26.41v6.5h-18.36v7.57h16.22v6.3h-16.22v8.1zm16.432 7.07c-2.77 0-5.44-.37-8.02-1.11-2.57-.75-4.65-1.72-6.22-2.92l2.75-6.09c1.5 1.09 3.28 1.98 5.34 2.64 2.07.67 4.13 1 6.19 1q3.45 0 5.1-1.02t1.65-2.73c0-.83-.33-1.52-.98-2.06-.65-.55-1.48-1-2.5-1.33-1.01-.33-2.39-.7-4.11-1.1-2.67-.63-4.85-1.26-6.55-1.89s-3.15-1.64-4.37-3.04c-1.21-1.41-1.82-3.27-1.82-5.6 0-2.03.55-3.86 1.64-5.51 1.11-1.66 2.76-2.96 4.97-3.92 2.22-.97 4.93-1.46 8.13-1.46 2.22 0 4.4.27 6.53.8s4 1.3 5.59 2.3l-2.5 6.14c-3.23-1.82-6.45-2.74-9.67-2.74-2.27 0-3.95.37-5.03 1.1-1.07.73-1.61 1.69-1.61 2.89q0 1.8 1.86 2.67c1.25.59 3.16 1.16 5.72 1.72 2.66.63 4.85 1.27 6.55 1.9 1.69.63 3.14 1.63 4.36 2.99 1.21 1.37 1.82 3.21 1.82 5.55 0 2-.56 3.82-1.67 5.46q-1.68 2.475-5.01 3.93c-2.23.95-4.95 1.43-8.14 1.43m50.913-35.54v34.95h-8.08v-14.33h-15.88v14.33h-8.09V9.965h8.09v13.78h15.88V9.965zm29.811 27.47h-16.22l-3.1 7.48h-8.29l15.58-34.95h7.98l15.62 34.95h-8.48zm-2.55-6.15-5.55-13.37-5.53 13.37zm16.274-21.32h8.09v28.36h17.52v6.59h-25.61zm0 0' fill='black'/%3e%3c/g%3e%3c/svg%3e",alt:"ESHAL",className:Ad("h-3",o?"opacity-60":"opacity-50"),onError:()=>be(!0)}),G.afterBrand&&Jp.jsx("span",{className:Ad("font-sans text-[10px] font-medium",o?"text-gray-400":"text-gray-500"),children:G.afterBrand})]})})})]})},Tg=["sun","mon","tue","wed","thu","fri","sat"];function Ng(e){if(!e||"string"!=typeof e)return null;const t=e.match(/^(\d{1,2}):(\d{2})/);if(!t)return null;const n=parseInt(t[1],10),r=parseInt(t[2],10);return Number.isNaN(n)||Number.isNaN(r)?null:60*n+r}function Fg(e,t=new Date,n={}){if(!e||!e.showStatus)return null;const r=n.online||"Online now",o=n.officeOpen||"Online now",a=n.offlineFallback||"Offline";if("officeHours"!==e.statusMode)return{online:!0,label:r};const i=e.officeHours||{},{dayKey:s,minutes:l}=function(e,t){try{const n=new Intl.DateTimeFormat("en-US",{timeZone:e||void 0,weekday:"short",hour:"2-digit",minute:"2-digit",hour12:!1}).formatToParts(t),r=(n.find(e=>"weekday"===e.type)||{}).value||"";let o=parseInt((n.find(e=>"hour"===e.type)||{}).value||"0",10);const a=parseInt((n.find(e=>"minute"===e.type)||{}).value||"0",10);return 24===o&&(o=0),{dayKey:r.slice(0,3).toLowerCase(),minutes:60*o+a}}catch{return{dayKey:Tg[t.getDay()],minutes:60*t.getHours()+t.getMinutes()}}}(i.timezone,t),c=Array.isArray(i.days)?i.days.map(e=>String(e).slice(0,3).toLowerCase()):[],u=Ng(i.open),d=Ng(i.close);if(c.includes(s)&&(null!=u&&null!=d&&(u<=d?l>=u&&l<d:l>=u||l<d))){return{online:!0,label:(i.onlineMessage||"").trim()||o}}return{online:!1,label:(i.offlineMessage||"").trim()||a}}const Lg=({conciergeName:e,companyName:t,companyLogo:n,primaryColor:r,isDark:o,isMinimized:a=!1,textColor:i,fontFamily:s,fontSize:l,onToggleTheme:c,onMinimize:u,onClose:d,headerTextBold:p=!1,headerTextItalic:g=!1,headerTextColor:f,headerFontFamily:h,headerFontSize:m,subtitle:b=null,showStatus:y=!1,statusMode:v="always",officeHours:w=null,onRefreshChat:k,onCopyChat:x,defaultLanguage:S="en"})=>{const C=r,M=f||"#FFFFFF",P=h||s||"Inter",z=m||l;Rp(P);const E=I.useMemo(()=>Ed(S),[S]),j=Cd(S),T=I.useMemo(()=>zd(b,j),[b,j]),N=I.useMemo(()=>Fg({showStatus:y,statusMode:v,officeHours:w}),[y,v,w]),[F,L]=I.useState(!1),R=I.useRef(null),A=I.useRef(null);I.useEffect(()=>{if(!F)return;const e=e=>{R.current&&!e.composedPath().includes(R.current)&&L(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[F]);const _=I.useRef(!1);I.useEffect(()=>{if(F){_.current=!0;const e=R.current?.querySelector('[role="menuitem"]');e?.focus()}else _.current&&(_.current=!1,A.current?.focus())},[F]);const B=M;return Jp.jsxs("div",{className:`text-white ${a?"px-4 py-2.5":"px-3 py-4"} flex items-center justify-between relative overflow-visible rounded-t-2xl z-[60]`,style:{background:C,fontFamily:P},children:[Jp.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0 pl-1",children:[Jp.jsxs("div",{className:"relative w-11 h-11 flex-shrink-0",children:[Jp.jsx("div",{className:"w-full h-full rounded-full overflow-hidden flex items-center justify-center bg-white/20",children:n?Jp.jsx("img",{src:n,alt:"Logo",style:{display:"block",width:"100%",height:"100%",objectFit:"contain"},loading:"lazy"}):Jp.jsx("span",{className:"text-lg font-semibold leading-none",style:{color:B},children:(e||t||"")?.charAt(0)?.toUpperCase()})}),N?Jp.jsx("span",{title:N.label,className:Ad("absolute bottom-0 h-3 w-3 rounded-full ring-2 ring-white",j?"left-0":"right-0"),style:{backgroundColor:N.online?"#22c55e":"#9ca3af",boxShadow:N.online?"0 0 0 3px rgba(34,197,94,0.25)":"none"},"aria-hidden":"true"}):null]}),Jp.jsxs("div",{className:"flex flex-col justify-center min-w-0",style:{fontFamily:P},children:[Jp.jsx("h3",{title:e,className:Ad("font-semibold leading-snug truncate",p&&"font-bold",g&&"italic"),style:{fontSize:z?`calc(${z} + 2px)`:"15px",color:B},children:e}),b?Jp.jsx("p",{title:b,className:"leading-snug truncate opacity-75",dir:T?"rtl":"ltr",style:{fontSize:"12px",color:B,textAlign:T?"right":"left"},children:b}):null]})]}),Jp.jsxs("div",{className:"flex items-center gap-0 relative z-10 text-white flex-shrink-0 ml-1",children:[Jp.jsxs("div",{className:"relative",ref:R,children:[Jp.jsx("button",{type:"button",ref:A,"aria-label":E("menu"),"aria-expanded":F,"aria-haspopup":"true",onClick:()=>L(e=>!e),onKeyDown:e=>{"Escape"===e.key&&F&&(e.preventDefault(),L(!1))},className:"inline-flex h-7 w-7 items-center justify-center cursor-pointer transition-opacity duration-200 hover:opacity-80 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/40 rounded-full border-0 bg-transparent p-0",style:{color:B},children:Jp.jsx(hp,{className:"w-4 h-4",strokeWidth:1.6})}),F&&Jp.jsxs("div",{role:"menu","aria-label":E("menu"),dir:j?"rtl":"ltr",onKeyDown:e=>{if("Escape"===e.key)return e.preventDefault(),void L(!1);if("Tab"===e.key){const t=R.current?Array.from(R.current.querySelectorAll('[role="menuitem"]')):[];if(0===t.length)return;const n=t[0],r=t[t.length-1],o=document.activeElement;e.shiftKey&&o===n?(e.preventDefault(),r.focus()):e.shiftKey||o!==r||(e.preventDefault(),n.focus())}},className:`absolute top-full mt-1 w-44 rounded-xl border shadow-lg py-1 z-[9999] animate-in fade-in slide-in-from-top-1 duration-150 ${j?"left-0":"right-0"} ${o?"bg-gray-800 border-gray-700":"bg-white border-gray-200"}`,style:{fontFamily:P},children:[Jp.jsxs("button",{role:"menuitem",onClick:()=>{L(!1),k?.()},className:"flex items-center gap-2.5 w-full px-3 py-2 text-sm leading-5 transition-colors cursor-pointer "+(o?"text-gray-200 hover:bg-gray-700":"text-gray-700 hover:bg-gray-50"),style:{fontFamily:P,fontSize:"14px",border:"none",background:"transparent",appearance:"none",WebkitAppearance:"none",textAlign:j?"right":"left"},children:[Jp.jsx(kp,{className:"w-3.5 h-3.5 flex-shrink-0"}),E("refreshChat")]}),Jp.jsxs("button",{role:"menuitem",onClick:()=>{L(!1),x?.()},className:"flex items-center gap-2.5 w-full px-3 py-2 text-sm leading-5 transition-colors cursor-pointer "+(o?"text-gray-200 hover:bg-gray-700":"text-gray-700 hover:bg-gray-50"),style:{fontFamily:P,fontSize:"14px",border:"none",background:"transparent",appearance:"none",WebkitAppearance:"none",textAlign:j?"right":"left"},children:[Jp.jsx(fp,{className:"w-3.5 h-3.5 flex-shrink-0"}),E("copyChat")]}),Jp.jsxs("button",{role:"menuitem",onClick:()=>{L(!1),c?.()},className:"flex items-center gap-2.5 w-full px-3 py-2 text-sm leading-5 transition-colors cursor-pointer "+(o?"text-gray-200 hover:bg-gray-700":"text-gray-700 hover:bg-gray-50"),style:{fontFamily:P,fontSize:"14px",border:"none",background:"transparent",appearance:"none",WebkitAppearance:"none",textAlign:j?"right":"left"},children:[o?Jp.jsx(Mp,{className:"w-3.5 h-3.5 flex-shrink-0"}):Jp.jsx(vp,{className:"w-3.5 h-3.5 flex-shrink-0"}),E(o?"lightMode":"nightMode")]})]})]}),Jp.jsx("button",{type:"button","aria-label":E("close"),onClick:d,className:"inline-flex h-7 w-7 items-center justify-center cursor-pointer transition-opacity duration-200 hover:opacity-80 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/40 rounded-full border-0 bg-transparent p-0",style:{color:B},children:Jp.jsx(Ep,{className:"w-3.5 h-3.5",strokeWidth:1.6})})]})]})},Rg=({questions:e=[],collapsiblePrompt:t,onSubmit:n,primaryColor:r="#2563eb",isRtl:o=!1,isDark:a=!1,defaultLanguage:i="en"})=>{const s=I.useMemo(()=>Ed(i),[i]),[l,c]=I.useState({}),[u,d]=I.useState({}),[p,g]=I.useState(!1),f=I.useRef({}),h=[...e].sort((e,t)=>Id(e.fieldType)-Id(t.fieldType));return Jp.jsx("div",{className:"flex flex-col items-center justify-center p-5 h-full min-h-0 z-50 relative ",style:a?{backgroundColor:"#10141C"}:void 0,children:Jp.jsxs("div",{className:"w-full max-w-sm rounded-3xl shadow-xl border p-8 transition-colors duration-300 bg-white border-gray-100",style:a?{backgroundColor:"#1E232B",border:"1px solid #2A303C",borderRadius:"14px"}:void 0,children:[t&&Jp.jsx("div",{className:"mb-5 text-left",children:Jp.jsx("h3",{className:"transition-colors duration-300 text-h4 font-semibold "+(a?"text-white":"text-[#4A5568]"),children:t})}),Jp.jsxs("form",{onSubmit:async e=>{e.preventDefault();const t=(()=>{const e={};return h.forEach(t=>{const n=t.fieldType||"question",r=(l[n]??"").trim(),o=t.collectionPrompt||t.askToType||t.question||t.label||n,a=!0===t.required||"true"===t.required;r?("fullName"!==n&&"name"!==n||r.length<2&&(e[n]=s("nameInvalid")),"email"!==n||/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(r)||(e[n]=s("emailInvalid")),"phone"!==n&&"mobileno"!==n||/^[+]?[\d\s-]{8,15}$/.test(r)||(e[n]=s("phoneInvalid"))):a&&(e[n]="email"===n?s("emailRequired"):"fullName"===n||"name"===n?s("nameRequired"):"phone"===n||"mobileno"===n?s("phoneRequired"):`${o} ${s("fieldRequiredSuffix")}`)}),d(e),e})();if(Object.keys(t).length>0){const e=h.map((e,t)=>e.fieldType||`question_${t}`).find(e=>t[e]);return void f.current[e]?.focus()}g(!0);try{await n(l)}finally{g(!1)}},className:"space-y-4",noValidate:!0,children:[h.map((e,t)=>{const n=e.fieldType||`question_${t}`,r=e.collectionPrompt||e.askToType||e.question||e.label;if(!r?.trim())return null;let i="text";"email"===n&&(i="email"),"phone"!==n&&"mobileno"!==n||(i="tel");const p=(n||"").toLowerCase(),g="fullname"===p||"name"===p||"username"===p,h="phone"===p||"mobileno"===p,m="email"===p?s("onboardingEmailPlaceholder"):g?s("onboardingNamePlaceholder"):h?s("onboardingPhonePlaceholder"):r,b=u[n],y="w-full h-12 rounded-lg text-sm px-4 outline-none border transition-colors focus:ring-0 "+(a?"text-white placeholder:text-[#A2A9B2] focus:border-[#5A6069]":"bg-white text-gray-900 placeholder:text-[#8C8C8C] focus:border-[#B0B0B0]"),v=b?"!border-status-error focus:!border-status-error":"",w=`onboarding-field-${n}`,k=`${w}-error`;return Jp.jsxs("div",{className:"space-y-1",children:[Jp.jsx("label",{htmlFor:w,className:"sr-only",children:r}),Jp.jsx("input",{id:w,ref:e=>{f.current[n]=e},placeholder:m,type:i,value:l[n]??"",onChange:e=>((e,t)=>{c(n=>({...n,[e]:t})),u[e]&&d(t=>{const n={...t};return delete n[e],n})})(n,e.target.value),className:`${y} ${v}`,"aria-invalid":b?"true":"false","aria-describedby":b?k:void 0,style:{direction:o?"rtl":"ltr",...a?{backgroundColor:"#272C35",borderWidth:"1px",borderStyle:"solid",borderColor:b?void 0:"#3F444C"}:{borderWidth:"1px",borderStyle:"solid",borderColor:b?void 0:"#E0E0E0"}}}),b&&Jp.jsx("p",{id:k,role:"alert",className:"text-xs text-status-error px-1",children:u[n]})]},n)}),Jp.jsx("button",{type:"submit",disabled:p,"aria-busy":p,"aria-label":p?s("submitting"):void 0,className:"w-full h-12 text-sm border-none font-semibold shadow-xl hover:shadow-xl hover:scale-[1.02] active:scale-[0.98] transition-all rounded-xl mt-4 text-white",style:{backgroundColor:r},children:p?Jp.jsx(bp,{className:"w-5 h-5 animate-spin","aria-hidden":"true"}):s("startChat")})]})]})})},Ag=({categories:e=[],selectedCategoryId:t=null,onSelect:n,isDark:r=!1,primaryColor:o="#2563eb",fontFamily:a="Inter",isRtl:i=!1})=>{const s=I.useRef(null),[l,c]=I.useState(!1),[u,d]=I.useState(!1),p=I.useCallback(()=>{const e=s.current;if(!e)return;const{scrollLeft:t,scrollWidth:n,clientWidth:r}=e;c(Math.abs(t)>1),d(Math.abs(t)+r<n-1)},[]);I.useEffect(()=>{p();const e=s.current;if(!e)return;const t=new ResizeObserver(p);return t.observe(e),()=>t.disconnect()},[p,e]);const g=I.useCallback(e=>{const t=s.current;if(!t)return;const n="left"===e?-150:150;t.scrollBy({left:i?-n:n,behavior:"smooth"})},[i]);if(!Array.isArray(e)||0===e.length)return null;const f=r?"rgba(31,41,55,0.85)":"rgba(255,255,255,0.95)",h=r?"#e5e7eb":"#374151",m=r?"#4b5563":"#d1d5db",b=r?"#111827":"#ffffff",y=r?"#374151":"#e5e7eb";return Jp.jsxs("div",{className:"flex-shrink-0 px-2 py-2 border-b flex items-center gap-1",style:{backgroundColor:b,borderColor:y,fontFamily:a,direction:i?"rtl":"ltr"},role:"region","aria-label":"Filter by category",children:[Jp.jsx("button",{type:"button",onClick:()=>g("left"),disabled:!l,"aria-label":"Scroll categories left",className:"flex-shrink-0 flex items-center justify-center w-6 h-6 rounded-full transition-all duration-200",style:{backgroundColor:f,border:`1px solid ${m}`,color:h,opacity:l?1:.3,cursor:l?"pointer":"default"},children:Jp.jsx(dp,{size:14})}),Jp.jsx("div",{ref:s,onScroll:p,className:"flex-1 flex gap-2 overflow-x-auto",style:{scrollBehavior:"smooth",WebkitOverflowScrolling:"touch",scrollbarWidth:"none",msOverflowStyle:"none"},children:e.map(e=>{const i=t===e.id;return Jp.jsx("button",{type:"button",onClick:()=>n?.(i?null:e.id),"aria-pressed":i,className:"flex-shrink-0 inline-flex items-center gap-1.5 px-3 py-1.5 rounded-full text-xs font-medium transition-all duration-150 whitespace-nowrap",style:{backgroundColor:r?"#1f2937":"#ffffff",border:i?`1.5px solid ${o}`:"1px solid "+(r?"#374151":"#e5e7eb"),color:i?o:r?"#e5e7eb":"#374151",fontFamily:a},children:Jp.jsx("span",{children:e.label})},e.id)})}),Jp.jsx("button",{type:"button",onClick:()=>g("right"),disabled:!u,"aria-label":"Scroll categories right",className:"flex-shrink-0 flex items-center justify-center w-6 h-6 rounded-full transition-all duration-200",style:{backgroundColor:f,border:`1px solid ${m}`,color:h,opacity:u?1:.3,cursor:u?"pointer":"default"},children:Jp.jsx(pp,{size:14})})]})},_g=({categories:e=[],selectedCategoryId:t=null,onSelect:n,isDark:r=!1,primaryColor:o="#2563eb",fontFamily:a="Inter",fontSize:i="14px",isRtl:s=!1,label:l="Choose a topic to get started:"})=>{if(!Array.isArray(e)||0===e.length)return null;const c=r?"#9ca3af":"#6b7280";return Jp.jsxs("div",{className:"pl-[50px] pt-1",style:{direction:s?"rtl":"ltr",paddingLeft:s?0:50,paddingRight:s?50:void 0},role:"region","aria-label":"Category filter",children:[Jp.jsx("div",{className:"mb-2",style:{color:c,fontFamily:a,fontSize:`calc(${i} - 1px)`},children:l}),Jp.jsx("div",{className:"flex flex-wrap gap-2",children:e.map(e=>{const s=t===e.id;return Jp.jsx("button",{type:"button",onClick:()=>n?.(s?null:e.id),"aria-pressed":s,className:"inline-flex items-center gap-1.5 px-3 py-1.5 rounded-full transition-all duration-150 hover:scale-[1.02] active:scale-[0.98]",style:{backgroundColor:r?"#1f2937":"#ffffff",border:s?`1.5px solid ${o}`:"1px solid "+(r?"#374151":"#e5e7eb"),color:s?o:r?"#e5e7eb":"#374151",fontFamily:a,fontSize:`calc(${i} - 1px)`,fontWeight:500},children:e.label},e.id)})})]})};const Ig=[{value:"😡",label:"😡",bg:"bg-red-200"},{value:"😕",label:"😕",bg:"bg-orange-200"},{value:"😐",label:"😐",bg:"bg-yellow-200"},{value:"😊",label:"😊",bg:"bg-green-200"},{value:"😍",label:"😍",bg:"bg-pink-200"}],Bg=[{value:"positive",label:"👍"},{value:"negative",label:"👎"}],Dg=[{value:"1",label:"1"},{value:"2",label:"2"},{value:"3",label:"3"},{value:"4",label:"4"},{value:"5",label:"5"}],Og=[{value:"1",label:"⭐"},{value:"2",label:"⭐"},{value:"3",label:"⭐"},{value:"4",label:"⭐"},{value:"5",label:"⭐"}],$g=({format:e="EMOJI",prompt:t="How was your experience?",onRating:n,disabled:r=!1,isDark:o=!1,primaryColor:a="#2563eb",defaultLanguage:i="en"})=>{const s=I.useMemo(()=>Ed(i),[i]),[l,c]=I.useState(null),[u,d]=I.useState(null),[p,g]=I.useState(!1),f=async t=>{if(!r&&!p){c(t),g(!0);try{n&&n(t,e)}finally{g(!1)}}},h=(()=>{switch(e){case"THUMBS":return Bg;case"NUMERIC":return Dg;case"STARS":return Og;default:return Ig}})();return Jp.jsxs("div",{className:Ad("transition-all duration-200 rounded-xl px-4",o?"bg-slate-800/50":"bg-slate-50/50"),children:[Jp.jsx("p",{className:Ad("text-sm font-semibold text-center mb-3",o?"text-gray-300":"text-gray-500/80"),children:t}),Jp.jsxs("div",{className:"flex justify-center items-center",children:["EMOJI"===e&&Jp.jsx("div",{className:"flex gap-2 justify-center items-center",children:h.map(e=>Jp.jsx("button",{onClick:()=>f(e.value),disabled:r||p,className:Ad("flex items-center justify-center text-2xl transition-transform","bg-transparent border-0 p-0 cursor-pointer","hover:scale-110 active:scale-95 disabled:opacity-50 disabled:cursor-not-allowed","focus:outline-none focus:ring-0",l===e.value?"":"opacity-80"),children:Jp.jsx("span",{role:"img","aria-label":`${s("rate")} ${e.value}`,children:e.label})},e.value))}),"THUMBS"===e&&Jp.jsx("div",{className:"flex gap-6 justify-center items-center",role:"group","aria-label":s("rateExperience"),children:h.map(e=>Jp.jsx("button",{"aria-label":1===e.value?s("thumbsUp"):s("thumbsDown"),onClick:()=>f(e.value),disabled:r||p,className:Ad("w-10 h-10 rounded-xl border flex items-center justify-center shadow-md text-2xl transition-all","hover:scale-105 active:scale-95 disabled:opacity-50 disabled:cursor-not-allowed","drop-shadow-md",o?"bg-gray-700 border-gray-600 hover:bg-gray-600":"bg-white border-gray-100 hover:bg-gray-50",l===e.value&&"ring-2 ring-primary/40 scale-110"),style:{borderColor:l===e.value?a:void 0},children:Jp.jsx("span",{className:"drop-shadow-md","aria-hidden":"true",children:e.label})},e.value))}),"NUMERIC"===e&&Jp.jsx("div",{className:"flex gap-2 justify-center items-center",role:"group","aria-label":s("rateExperience"),children:h.map(e=>Jp.jsx("button",{"aria-label":`${s("rate")} ${e.value}`,onClick:()=>f(e.value),disabled:r||p,className:Ad("w-10 h-10 rounded-lg flex items-center justify-center text-sm font-semibold transition-all","hover:scale-105 active:scale-95 disabled:opacity-50 disabled:cursor-not-allowed",l===e.value?"ring-2 ring-primary/40 scale-110 shadow-md text-white":o?"bg-gray-700 border border-gray-600 text-gray-300 hover:bg-gray-600":"bg-white border border-gray-200 text-gray-700 hover:bg-gray-50"),style:{backgroundColor:l===e.value?a:void 0,borderColor:l===e.value?a:void 0},children:e.label},e.value))}),"STARS"===e&&Jp.jsx("div",{className:"flex gap-2 justify-center items-center",onMouseLeave:()=>d(null),children:h.map(e=>{const t=u===e.value;return Jp.jsx("button",{onClick:()=>f(e.value),onMouseEnter:()=>d(e.value),disabled:r||p,className:Ad("flex items-center justify-center text-2xl","bg-transparent border-0 p-0 cursor-pointer focus:outline-none","disabled:opacity-50 disabled:cursor-not-allowed"),style:{transform:t?"scale(1.25)":"scale(1)",filter:t?"brightness(1.1) drop-shadow(0 2px 4px rgba(0,0,0,0.15))":"none",opacity:t?1:.6,transition:"all 0.2s ease"},"aria-label":`${s("rate")} ${e.value}`,children:Jp.jsx("span",{"aria-hidden":"true",children:e.label})},e.value)})})]}),p&&Jp.jsx("p",{"aria-live":"polite",className:Ad("text-xs mt-3 text-center",o?"text-slate-400":"text-slate-500"),children:s("submittingFeedback")})]})};async function Vg({apiBaseUrl:e,conversationId:t,chip:n,submitText:r,position:o,source:a="widget",getAuthToken:i,enabled:s=!0}={}){try{if(!1===s)return!1;if(!e||"string"!=typeof e)return!1;if(!t||"string"!=typeof t)return!1;const l=function({chip:e,submitText:t,position:n,conversationId:r,source:o="widget"}={}){const a=e&&"object"==typeof e,i=a&&"string"==typeof e.text?e.text:"",s="string"==typeof t&&t?t:a&&"string"==typeof e.submitText?e.submitText:"string"==typeof e?e:"",l=i||s;if(!l)return null;const c={conversationId:r,chipText:l,submitText:s||void 0,position:Number.isInteger(n)?n:void 0,source:o},u=a?e?.promptId:void 0;return"string"==typeof u&&u&&(c.promptId=u),c}({chip:n,submitText:r,position:o,conversationId:t,source:a});if(!l)return!1;const c=`${e.replace(/\/$/,"")}/api/v1/support/chip-click`,u=JSON.stringify(l);let d;if("function"==typeof i)try{d=await i()}catch{d=void 0}if(!d&&"undefined"!=typeof navigator&&"function"==typeof navigator.sendBeacon&&"undefined"!=typeof Blob)try{if(navigator.sendBeacon(c,new Blob([u],{type:"application/json"})))return!0}catch{}if("function"!=typeof fetch)return!1;const p={"Content-Type":"application/json"};return d&&(p.Authorization=`Bearer ${d}`),await fetch(c,{method:"POST",headers:p,credentials:"include",keepalive:!0,body:u}),!0}catch{return!1}}const Ug="#ffffff",Hg="#f5f5f5",Wg="#000000",qg="#1f2937",Qg="#f3f4f6",Yg="#2563eb",Kg="eshal:widget:size",Gg=(e,t)=>!e||(e=>e?.trim().toLowerCase())(e)===t,Xg=e=>(e instanceof Date?e:new Date(e)).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!0}).replace(/am|pm/i,e=>e.toUpperCase()),Jg=e=>{const t=(e||"EMOJI").toString().trim().toUpperCase();return"THUMBS"===t||"THUMB"===t?"THUMBS":"STARS"===t||"STAR"===t?"STARS":"NUMERIC"===t||"NUMBER"===t?"NUMERIC":"EMOJI"},Zg=({isOpen:e,isMinimized:t,isDark:n,onStopGeneration:r,primaryColor:o,textColor:a,conciergeName:i,companyName:s,companyLogo:l,chatbotAvatarEnabled:c,chatbotAvatar:u,messages:d,isLoading:p,isConversationLoading:g=!1,inputValue:f,setInputValue:h,onSend:m,onDirectSend:b,onToggleTheme:y,onMinimize:v,onClose:w,quickQuestions:k=[],quickQuestionsEnabled:x,onQuickQuestion:S,quickQuestionsLayout:C="vertical",agentMessageBubbleColor:M,userMessageBoxColor:P,assistantTextColor:z,userTextColor:E,fontFamily:j="Inter",agentMessageBubbleFontFamily:T,agentMessageBubbleFontSize:N,userMessageBubbleFontFamily:F,userMessageBubbleFontSize:L,fontSize:R="14px",defaultLanguage:A="en",onDecision:_,headerTextBold:B=!1,headerTextItalic:D=!1,headerTextColor:O,headerFontFamily:$,headerFontSize:V,subtitle:U=null,showStatus:H=!1,statusMode:W="always",officeHours:q=null,enableVoiceInteraction:Q=!1,isVoiceSessionActive:Y=!1,voiceStatus:K="idle",voiceError:G=null,voiceConclusionForCsat:X=!1,onVoiceToggle:J,onBidiSubmit:Z,disclaimerEnabled:ee=!1,disclaimerText:te,disclaimerPosition:ne="top",disclaimerLinkUrl:re,disclaimerLinkLabel:oe,showPoweredBy:ae=!0,apiBaseUrl:ie,apiKey:se,getAuthToken:le,conversationId:ce,conciergeId:ue,onboardingQuestions:de=[],onboardingActive:pe=!1,onboardingCompleted:ge=!1,onOnboardingFormSubmit:fe,collectionPrompt:he,csatEnabled:me=!1,csatFormat:be="EMOJI",csatPrompt:ye="How was your experience?",onPromptSuggestionClick:ve,onboardingEnabled:we=!1,onResetConversation:ke,sessionExpiringSoon:xe=!1,autoPromptEnabled:Se=!0,autoPromptQuestionDisplay:Ce=!0,autoPromptClickTelemetry:Me=!0,allowFeedback:Pe=!0,provideCitations:ze=!0,onFeedback:Ee,onRetryMessage:je,onRefreshChat:Te,onCopyChat:Ne,filterCategories:Fe=[],showFilterStep:Le=!1,widgetFilter:Re=null,onWidgetFilterChange:Ae,onSynthesizeAssistantMessage:_e,launcherPosition:Ie="bottom-right",chatFeatures:Be,organizationId:De})=>{Rp(j);const Oe=I.useRef(null),$e=I.useRef(null),Ve=I.useMemo(()=>Ed(A),[A]);I.useEffect(()=>{$e.current?.focus()},[]);const Ue=I.useCallback((e,t,n)=>{Vg({apiBaseUrl:ie,conversationId:ce,chip:t,submitText:null==e?void 0:String(e),position:n,source:"widget",getAuthToken:le,enabled:Me})},[ie,le,ce,Me]),He=I.useCallback((e,t,n)=>{t&&"object"==typeof t&&Ue(e,t,n),ve?ve(e):b?.(e)},[ve,b,Ue]),We=Ie.includes("right"),qe=Ie.includes("bottom"),[Qe,Ye]=I.useState(()=>{if("undefined"==typeof window)return null;try{const e=window.localStorage.getItem(Kg);if(!e)return null;const t=JSON.parse(e);if("number"==typeof t?.width&&"number"==typeof t?.height&&t.width>=320&&t.height>=400)return t}catch{}return null}),Ke=I.useRef(null),Ge=I.useRef({x:0,y:0}),Xe=I.useRef({width:380,height:650});I.useEffect(()=>{const e=e=>{const t=Ke.current;if(!t)return;const n=e.clientX-Ge.current.x,r=e.clientY-Ge.current.y,o={...Xe.current},a=.92*window.innerWidth,i=.85*window.innerHeight;if("corner"===t||"horizontal"===t){const e=We?Xe.current.width-n:Xe.current.width+n;o.width=Math.min(Math.max(320,e),a)}if("corner"===t||"vertical"===t){const e=qe?Xe.current.height-r:Xe.current.height+r;o.height=Math.min(Math.max(400,e),i)}Ye(o)},t=()=>{Ke.current&&(Ke.current=null,document.body.style.cursor="",document.body.style.userSelect="")};return window.addEventListener("mousemove",e),window.addEventListener("mouseup",t),()=>{window.removeEventListener("mousemove",e),window.removeEventListener("mouseup",t)}},[We,qe]),I.useEffect(()=>{if(Qe)try{window.localStorage.setItem(Kg,JSON.stringify(Qe))}catch{}},[Qe]);const Je=(e,t)=>{t.preventDefault(),t.stopPropagation(),Ke.current=e,Ge.current={x:t.clientX,y:t.clientY},Xe.current=Qe??{width:380,height:650};const n={corner:We===qe?"nwse-resize":"nesw-resize",horizontal:"ew-resize",vertical:"ns-resize"};document.body.style.cursor=n[e],document.body.style.userSelect="none"},[Ze,et]=I.useState(!1),[tt,nt]=I.useState(()=>{try{return Hd(De)?.csatSubmitted??!1}catch{return!1}}),[rt,ot]=I.useState(!1),[at,it]=I.useState(!1),[st,lt]=I.useState(0),[ct,ut]=I.useState(""),[dt,pt]=I.useState(!1);I.useEffect(()=>{try{const e=Hd(De)?.csatSubmitted??!1;nt(e),e&&et(!1)}catch{}},[ce]),function(e,t=[],n={}){const{enabled:r=!0,threshold:o=30,behavior:a="smooth",delay:i=0}=n,s=I.useRef(!0);I.useRef(0),I.useEffect(()=>{if(!r||!e.current)return;const t=e.current,n=()=>{const e=t.scrollHeight-t.scrollTop-t.clientHeight;s.current=e<o},l=()=>{n()};t.addEventListener("scroll",l,{passive:!0}),n();const c=setTimeout(()=>{s.current&&t&&t.scrollTo({top:t.scrollHeight,behavior:a})},i);return()=>{t.removeEventListener("scroll",l),clearTimeout(c)}},[e,r,o,a,i,...t])}(Oe,[d,p],{enabled:!0,threshold:30,behavior:"smooth",delay:0});const gt=Cd(A),ft=I.useMemo(()=>n?Gg(M,Ug)?qg:M||qg:M||Ug,[M,n]),ht=I.useMemo(()=>n?Gg(a,Wg)?Qg:a||Qg:a||Wg,[n,a]),mt=I.useMemo(()=>n?Gg(P,Hg)?o||Yg:P||o||Yg:P||Hg,[n,o,P]),bt=Ve(at?"conversationResolved":"typeYourMessage"),yt=d?.some?.(e=>"user"===e.role),vt=I.useMemo(()=>(d||[]).filter(e=>"user"===e.role).length,[d]),[wt,kt]=I.useState(0),xt=Re?.category?(Fe||[]).find(e=>e.id===Re.category):null,St=I.useCallback(e=>{if(!Ae)return;const t=Re?.category||null;if(e){if(Ae({category:e,tags:[]}),kt(vt),!yt&&e!==t&&_e){const t=(Fe||[]).find(t=>t.id===e),n=t?.label||e,r=Ve("categoryTopicsHeading").replace("{category}",n);_e(r,{replaceMarker:"category-intro"})}}else Ae(null)},[Ae,Re,vt,Fe,yt,_e,Ve]);I.useCallback(e=>{const t=Re?.category||xt?.id;t&&Ae&&Ae({category:t,tags:[e]}),b&&b(e)},[Re,xt,Ae,b]);const Ct=Array.isArray(Fe)&&Fe.length>0,Mt=Ct&&!yt&&!Re?.category,Pt=!yt&&k.length>0&&x&&!Re?.category,zt=de&&de.length>0,Et=Boolean(me),jt=we&&zt&&!ge,Tt=I.useCallback(async()=>{if(Et&&!dt&&!at&&0!==st){pt(!0);try{const e={"Content-Type":"application/json"};if("function"==typeof le){const t=await le();t&&(e.Authorization=`Bearer ${t}`)}const t=Jg(be);(await fetch(`${ie.replace(/\/$/,"")}/api/v1/support/csat`,{method:"POST",headers:e,credentials:"include",body:JSON.stringify({conversationId:ce,rating:String(st),ratingFormat:t,conciergeId:ue,feedback:ct||void 0})})).ok&&(ot(!1),lt(0),ut(""),Ae&&Ae(null),Te?Te():ke&&ke())}catch(e){}finally{pt(!1)}}},[Et,dt,at,st,ct,ce,le,ue,ie,be,ke,Te,Ae]),Nt=I.useCallback(()=>{if(!Et||!ce||!yt)return Ae&&Ae(null),Te?Te():ke&&ke(),void w?.();rt?(ot(!1),w?.()):at?w?.():ot(!0)},[Et,ce,yt,rt,at,w,Ae,Te,ke]);I.useEffect(()=>{Et||(rt&&ot(!1),at&&it(!1),0!==st&<(0),ct&&ut(""))},[Et,rt,at,st,ct]);const Ft=I.useMemo(()=>{if(!d||!Array.isArray(d))return[];for(let e=d.length-1;e>=0;e-=1)if("assistant"===d[e]?.role){const t=d[e].prompts;return Array.isArray(t)?t:[]}return[]},[d]),Lt=I.useRef([]);I.useEffect(()=>{Ft.length>0?Lt.current=Ft:d&&0!==d.length&&d.some(e=>"user"===e.role)||(Lt.current=[])},[Ft,d]);const Rt=I.useRef(vt);I.useEffect(()=>{vt!==Rt.current&&(Rt.current=vt,Lt.current=[])},[vt]);const At=Ft.length>0?Ft:Lt.current;I.useEffect(()=>{if(!me)return;if(!Ze)return;if(tt)return;const e=Oe.current;if(!e)return;const t=window.requestAnimationFrame(()=>{e.scrollTo({top:e.scrollHeight,behavior:"smooth"})});return()=>{window.cancelAnimationFrame(t)}},[Ze,me,tt]);const _t=()=>{const e=Jg(be);if("STARS"===e)return Jp.jsx("div",{className:"flex justify-center gap-2 mb-5",role:"group","aria-label":Ve("rateExperience"),children:[1,2,3,4,5].map(e=>Jp.jsx("button",{"aria-label":`${Ve("rate")} ${e}`,onClick:()=>lt(e),className:"transition-all duration-150 hover:scale-110 active:scale-95 bg-transparent border-0 p-0 cursor-pointer",disabled:dt,children:Jp.jsx(Cp,{className:Ad("w-8 h-8 transition-colors",e<=st?"text-yellow-400 drop-shadow-sm":n?"text-gray-600":"text-gray-300"),fill:e<=st?"#FBBF24":"none"})},e))});if("THUMBS"===e)return Jp.jsx("div",{className:"flex gap-4 justify-center mb-5",role:"group","aria-label":Ve("rateExperience"),children:[{value:"positive",emoji:"👍"},{value:"negative",emoji:"👎"}].map(e=>Jp.jsx("button",{"aria-label":"positive"===e.value?Ve("thumbsUp"):Ve("thumbsDown"),onClick:()=>lt(e.value),disabled:dt,className:Ad("w-12 h-12 rounded-xl border flex items-center justify-center text-2xl transition-all hover:scale-105 active:scale-95",st===e.value?"ring-2 ring-blue-300 scale-110 shadow-lg":"",n?"bg-gray-700 border-gray-600 hover:bg-gray-600":"bg-white border-gray-200 hover:bg-gray-50"),children:Jp.jsx("span",{className:"drop-shadow-md",children:e.emoji})},e.value))});return Jp.jsx("div",{className:"flex gap-2 justify-center items-center mb-5",role:"group","aria-label":Ve("rateExperience"),children:[{value:1,emoji:"😡"},{value:2,emoji:"😕"},{value:3,emoji:"😐"},{value:4,emoji:"😊"},{value:5,emoji:"😍"}].map(e=>Jp.jsx("button",{"aria-label":`${Ve("rate")} ${e.value}`,onClick:()=>lt(e.value),disabled:dt,className:Ad("rounded-full w-10 h-10 flex items-center justify-center text-xl transition-all hover:scale-110 active:scale-95 bg-transparent border-0 p-0 cursor-pointer",st===e.value?"ring-2 ring-blue-100 scale-125 bg-gradient-to-b from-yellow-200 to-yellow-400 shadow-md":"grayscale-[0.3] opacity-80 hover:grayscale-0"),children:Jp.jsx("span",{role:"img","aria-label":`${Ve("rate")} ${e.value}`,className:"drop-shadow-sm filter",children:e.emoji})},e.value))})};if(!e)return null;const It=!t&&Qe?{width:Qe.width,height:Qe.height,maxWidth:"92vw",maxHeight:"85vh"}:void 0;return Jp.jsxs("div",{dir:gt?"rtl":"ltr",className:"relative flex-shrink-0 z-50 "+(t?"w-80 h-auto":""),style:It,children:[!t&&Jp.jsxs(Jp.Fragment,{children:[Jp.jsx("div",{onMouseDown:e=>Je("horizontal",e),className:"absolute top-0 h-full w-1.5 cursor-ew-resize hover:bg-blue-500/20 transition-colors z-[70] "+(We?"left-0":"right-0"),"aria-hidden":!0}),Jp.jsx("div",{onMouseDown:e=>Je("vertical",e),className:"absolute left-0 w-full h-1.5 cursor-ns-resize hover:bg-blue-500/20 transition-colors z-[70] "+(qe?"top-0":"bottom-0"),"aria-hidden":!0})]}),Jp.jsxs("div",{id:"chat-window-panel",ref:$e,role:"dialog","aria-modal":"true","aria-label":Ve("openChat"),tabIndex:-1,className:`relative focus:outline-none ${Qe||t?"":"w-[380px]"} ${Qe||t?"":"h-[650px]"} ${t?"w-80 h-auto":""} ${Qe&&!t?"w-full h-full":""} max-w-[92vw] border rounded-2xl shadow-2xl bg-white border-gray-200 flex flex-col ${t?"":"max-h-[85vh]"} overflow-hidden ${n?"bg-gray-900 border-gray-700":""}`,children:[!t&&Jp.jsx("div",{onMouseDown:e=>Je("corner",e),"aria-hidden":"true",className:`absolute w-4 h-4 ${We===qe?"cursor-nwse-resize":"cursor-nesw-resize"} text-gray-400 hover:text-blue-500 transition-colors z-[71] flex p-0.5 ${qe?"top-0 items-start":"bottom-0 items-end"} ${We?"left-0 justify-start":"right-0 justify-end"}`,children:Jp.jsx("svg",{viewBox:"0 0 12 12",className:"w-3 h-3 "+(qe&&We?"rotate-180":qe?"-rotate-90":We?"rotate-90":""),"aria-hidden":!0,children:Jp.jsx("path",{d:"M11 1 L1 11 M11 5 L5 11 M11 9 L9 11",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round"})})}),Jp.jsx(Lg,{conciergeName:i,companyName:s,companyLogo:l,primaryColor:o,isDark:n,isMinimized:t,textColor:ht,fontFamily:j,fontSize:R,onToggleTheme:y,onMinimize:v,onClose:Nt,headerTextBold:B,headerTextItalic:D,headerTextColor:O,headerFontFamily:$,headerFontSize:V,subtitle:U,showStatus:H,statusMode:W,officeHours:q,onRefreshChat:Te,onCopyChat:Ne,defaultLanguage:A}),!t&&Ct&&!Mt&&!(rt&&!at)&&!(pe&&!ge)&&Jp.jsx(Ag,{categories:Fe,selectedCategoryId:Re?.category||null,onSelect:St,isDark:n,primaryColor:o,fontFamily:j,isRtl:gt}),!t&&Jp.jsxs(Jp.Fragment,{children:[Jp.jsx("div",{ref:Oe,role:"log","aria-live":"polite",className:`chat-messages flex-1 overflow-y-auto px-3 py-4 space-y-4 ${n?"bg-gray-900":"bg-gradient-to-b from-gray-50/50 to-white"} break-words`,children:rt&&!at?Jp.jsx("div",{className:"animate-in slide-in-from-top-4 fade-in duration-300 mt-4 mx-2",children:Jp.jsxs("div",{className:Ad("w-full rounded-3xl p-6 shadow-lg",n?"bg-gray-800 shadow-black/20":"bg-white shadow-gray-200/80"),children:[Jp.jsx("p",{className:Ad("text-sm font-medium text-center mb-5 [font-family:inherit]",n?"text-gray-300":"text-gray-500"),children:ye||Ve("feedbackPrompt")}),_t(),Jp.jsx("textarea",{"aria-label":Ve("feedbackPlaceholder"),value:ct,onChange:e=>{e.target.value.length<=1e3&&ut(e.target.value)},maxLength:1e3,placeholder:Ve("feedbackPlaceholder"),rows:4,disabled:dt,className:Ad("w-full rounded-xl border px-4 py-3 text-sm [font-family:inherit] resize-none outline-none transition-colors mb-5",n?"bg-gray-700 border-gray-600 text-gray-100 placeholder-gray-400":"bg-gray-50 border-gray-200 text-gray-900 placeholder-gray-400")}),Jp.jsxs("div",{className:"relative group",children:[Jp.jsx("button",{onClick:Tt,disabled:0===st||dt,"aria-describedby":0===st?"resolve-rating-hint":void 0,className:Ad("w-full py-3.5 rounded-xl text-sm font-semibold [font-family:inherit] transition-all duration-200 border-none outline-none focus:outline-none active:outline-none focus:ring-0 active:ring-0","disabled:opacity-50 disabled:cursor-not-allowed",n?"bg-gray-700 text-gray-100 hover:bg-gray-600":"bg-gray-100 text-gray-700 hover:bg-gray-200"),children:Ve(dt?"submitting":"submitFeedback")}),0===st&&!dt&&Jp.jsx("div",{id:"resolve-rating-hint",role:"tooltip",className:"absolute -top-8 left-1/2 -translate-x-1/2 whitespace-nowrap px-2 py-1 rounded-md text-xs bg-gray-800 text-white opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none",children:Ve("selectRatingFirst")})]})]})}):pe&&!ge&&fe?Jp.jsx(Rg,{questions:de,onPromptSuggestionClick:He,collapsiblePrompt:he,onSubmit:fe,primaryColor:o,isRtl:gt,isDark:n,defaultLanguage:A}):Jp.jsxs(Jp.Fragment,{children:[xe&&Jp.jsx("div",{role:"status",className:"mx-3 mt-1 mb-2 rounded-lg px-3 py-2 text-xs font-medium "+(n?"bg-amber-900/40 text-amber-200 border border-amber-700/50":"bg-amber-50 text-amber-800 border border-amber-200"),children:Ve("sessionExpiringSoon")}),Jp.jsx(xg,{messages:d,isDark:n,primaryColor:o,isLoading:p,agentMessageBubbleColor:M,userMessageBoxColor:P,textColor:a,assistantTextColor:z,userTextColor:E,fontFamily:j,agentMessageBubbleFontFamily:T,agentMessageBubbleFontSize:N,userMessageBubbleFontFamily:F,userMessageBubbleFontSize:L,fontSize:R,formatTime:Xg,isRtl:gt,defaultLanguage:A,quickQuestions:k,shouldShowQuickQuestions:Pt,onQuickQuestion:S??b,quickQuestionsLayout:C,onDecision:_,disclaimerEnabled:ee,disclaimerText:te,disclaimerPosition:ne,disclaimerLinkUrl:re,disclaimerLinkLabel:oe,resolvedAgentBubbleColor:ft,resolvedUserMessageColor:mt,resolvedTextColor:ht,isVoiceSessionActive:Y,voiceStatus:K,messagesContainerRef:Oe,companyLogo:l,chatbotAvatarEnabled:c,chatbotAvatar:u,conciergeName:i,companyName:s,apiBaseUrl:ie,getAuthToken:le,onPromptSuggestionClick:He,conversationResetKey:ce,allowFeedback:Pe,provideCitations:ze,onFeedback:Ee,onRetryMessage:je,headerTextColor:O,beforePromptsSlot:Mt?Jp.jsx(_g,{categories:Fe,selectedCategoryId:Re?.category||null,onSelect:St,isDark:n,primaryColor:o,fontFamily:j,fontSize:R,isRtl:gt,label:Ve("chooseTopicLabel")}):null,quickQuestionsHeadingLabel:Ct?Ve("quickQuestionsHeadingLabel"):void 0}),Ze&&me&&!tt&&Jp.jsx("div",{className:"",children:Jp.jsx($g,{format:Jg(be),prompt:ye||Ve("howWasYourExperience"),onRating:async(e,t)=>{nt(!0),et(!1),(e=>{try{const t=Hd(e);if(!t)return;t.csatSubmitted=!0,localStorage.setItem(`${Bd}_${e}`,JSON.stringify(t))}catch{}})(void 0);try{const n={"Content-Type":"application/json"};if("function"==typeof le){const e=await le();e&&(n.Authorization=`Bearer ${e}`)}(await fetch(`${ie.replace(/\/$/,"")}/api/v1/support/csat`,{method:"POST",headers:n,credentials:"include",body:JSON.stringify({conversationId:ce,rating:e,ratingFormat:t,conciergeId:ue})})).ok}catch(e){}},disabled:!1,isDark:n,primaryColor:o,defaultLanguage:A})})]})}),!(pe&&!ge)&&Jp.jsx(jg,{onStopGeneration:r,inputValue:f,setInputValue:h,onSend:m,isDark:n,primaryColor:o,isOpen:e,isMinimized:t,isLoading:p,isConversationLoading:g,placeholder:bt,textColor:ht,fontFamily:j,userMessageBubbleFontFamily:F,userMessageBubbleFontSize:L,fontSize:R,isRtl:gt,csatVisible:Ze&&me&&!tt||Et&&(rt||at),enableVoiceInteraction:Q,isVoiceSessionActive:Y,voiceStatus:K,voiceError:G,onVoiceToggle:J,onBidiSubmit:Z,disclaimerEnabled:ee,disclaimerText:te,disclaimerPosition:ne,disclaimerLinkUrl:re,disclaimerLinkLabel:oe,showPoweredBy:ae,defaultLanguage:A,onboardingQuestions:de,onboardingActive:pe,onboardingCompleted:ge,onboardingEnabled:we,userMessageBoxColor:P,resolvedUserMessageColor:mt,userTextColor:E,promptSuggestions:rt||at||!1===Se||p?[]:At,onPromptSuggestionClick:He,autoPromptQuestionDisplay:Ce,tagSelectorNode:null,showResolveButton:Et&&yt&&!at&&!rt&&!Ze&&!jt,onResolve:()=>{Et&&ot(!0)},chatFeatures:Be,apiEndpoint:ie,organizationId:De,conversationId:ce})]})]})]})},ef=new Map;const tf=I.forwardRef(({isDark:e,primaryColor:t,onToggle:n,textColor:r,headerTextColor:o,defaultLanguage:a="en",isOpen:i=!1,className:s},l)=>{const c=I.useMemo(()=>Ed(a),[a]),u=t,d=o||"#FFFFFF";return Jp.jsxs("button",{ref:l,onClick:n,className:`group relative w-16 h-16 rounded-full shadow-2xl transition-all duration-300 flex items-center justify-center text-white overflow-hidden hover:scale-110 ${s||""}`,style:{background:`linear-gradient(135deg, ${u} 0%, ${u}dd 100%)`,boxShadow:`0 10px 30px ${u}40`,border:"none"},"aria-label":c(i?"closeChat":"openChat"),"aria-expanded":i,"aria-controls":"chat-window-panel",children:[Jp.jsx("div",{className:"absolute inset-0 rounded-full bg-white/20 scale-0 group-hover:scale-100 transition-transform duration-500"}),Jp.jsx("div",{className:"relative z-10 transition-transform duration-300",children:Jp.jsx(yp,{className:"w-7 h-7",style:{color:d}})})]})});tf.displayName="ToggleButton";const nf="0.2.12",rf=({getAuthToken:e,apiBaseUrl:t,darkMode:n,primaryColor:r,position:o,companyName:a,conciergeName:i,companyLogo:s,welcomeMessage:l,quickQuestions:c,quickQuestionsEnabled:u,quickQuestionsLayout:d="vertical",textColor:p,agentMessageBubbleColor:g,userMessageBoxColor:f,assistantTextColor:h,userTextColor:m,fontFamily:b,fontSize:y,defaultLanguage:v,apiKey:w,agentMessageBubbleFontFamily:k,agentMessageBubbleFontSize:x,userMessageBubbleFontFamily:S,userMessageBubbleFontSize:C,autoOpen:M=!1,openDelay:P=0,locale:z,className:E="",headerTextBold:j,headerTextItalic:T,enableVoiceInteraction:N,disclaimerEnabled:F,disclaimerText:L,disclaimerPosition:R,disclaimerLinkUrl:A,disclaimerLinkLabel:_,showPoweredBy:B,onboardingQuestions:D,collectionPrompt:O,allowedDomains:$,onboardingEnabled:V,wsBaseUrl:U})=>{const[H,W]=I.useState(null),[q,Q]=I.useState(!0),[Y,K]=I.useState(null),[G,X]=I.useState(!1),J=I.useRef(!1);I.useEffect(()=>{if(J.current)return;(async()=>{if(!t)return K("apiBaseUrl is required"),void Q(!1);try{Q(!0);const n=await(async(e,t)=>{if(!e)throw new Error("apiBaseUrl is required");try{const n=e.replace(/\/$/,""),r=nf?`${n}/api/v1/deploy-agent?wv=${encodeURIComponent(nf)}`:`${n}/api/v1/deploy-agent`,o={"Content-Type":"application/json"};if("function"==typeof t){const e=await t();e&&(o.Authorization=`Bearer ${e}`)}const a=await fetch(r,{method:"GET",headers:o,credentials:"include"});if(404===a.status)return null;if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);return await a.json()}catch(e){throw e}})(t,e);if(null===n)return J.current=!0,X(!0),W(null),void K(null);W(n),K(null)}catch(e){K(e.message||"Failed to load configuration")}finally{Q(!1)}})()},[t,e]);const Z=I.useMemo(()=>{if(!H)return null;const e=H.config??{},t=e.identity??{},d=e.branding??{},w=e.typography??{},M=e.messages??{},P=e.voice??{},z=e.onboarding??{},E=e.disclaimer??{},I=e.csat??{},U=e.inactivity??{},W=e.behavior??{},q=e.security??{},Q=e.layout??{},Y=v??M.defaultLocale??"en",K=M.bundles?.[Y]??{},G=M.bundles?.en??{},X={welcome:K.welcome||G.welcome,fallback:K.fallback||G.fallback,quickQuestions:Array.isArray(K.quickQuestions)&&K.quickQuestions.length>0?K.quickQuestions:G.quickQuestions},J=$??q.allowedDomains??(q.domains??[]).map(e=>"string"==typeof e?e:e.domain).filter(Boolean)??[];return{darkMode:n??!1,primaryColor:r??d.brandColor??"#2563eb",companyName:a??t.companyName??"Support Team",conciergeName:i??t.conciergeName,companyLogo:s??d.avatar??null,chatbotAvatarEnabled:d.chatbotAvatarEnabled??!1,chatbotAvatar:d.chatbotAvatar??null,welcomeMessage:l??X.welcome??"Hi! How can we help?",fallbackMessage:X.fallback,quickQuestions:c??X.quickQuestions??[],quickQuestionsEnabled:u??M.quickQuestionsEnabled,textColor:p??"#000000",agentMessageBubbleColor:g??w.agentMessageBubbleColor,userMessageBoxColor:f??w.userMessageBoxColor,assistantTextColor:h??w.assistantTextColor??"#000000",userTextColor:m??w.userTextColor??"#000000",fontFamily:b??w.agentMessageBubbleFontFamily??"Inter",fontSize:y??w.agentMessageBubbleFontSize??"14px",defaultLanguage:Y,headerTextBold:j??w.headerTextBold??!1,headerTextItalic:T??w.headerTextItalic??!1,headerTextColor:w.headerTextColor??"#FFFFFF",headerFontFamily:w.headerFontFamily,headerFontSize:w.headerFontSize,subtitle:t.subtitle??null,showStatus:t.showStatus??!1,statusMode:t.statusMode??"always",officeHours:t.officeHours??null,enableVoiceInteraction:N??P.enableVoiceInteraction??!1,disclaimerEnabled:F??E.enabled??!1,disclaimerText:L??E.text,disclaimerPosition:R??(Z=E.position,Z?Z.toLowerCase():"top"),disclaimerLinkUrl:Rd(A??E.linkUrl),disclaimerLinkLabel:_??E.linkLabel,showPoweredBy:B??d.showPoweredBy??!0,onboardingQuestions:D??z.questions??[],collectionPrompt:O??z.collapsiblePrompt??"Before we begin, I need to verify your details.",allowedDomains:J,launcherPosition:o??(e=>e?e.toLowerCase().replace(/_/g,"-"):"bottom-right")(Q.launcherPosition),onboardingEnabled:V??z.enabled??!1,inactivityTimeoutValue:U.timeoutValue??null,inactivityTimeoutUnit:U.timeoutUnit??null,agentMessageBubbleFontFamily:k??w.agentMessageBubbleFontFamily??b??"Inter",agentMessageBubbleFontSize:x??w.agentMessageBubbleFontSize??y??"14px",userMessageBubbleFontFamily:S??w.userMessageBubbleFontFamily??b??"Inter",userMessageBubbleFontSize:C??w.userMessageBubbleFontSize??y??"14px",csatEnabled:I.enabled??!1,csatFormat:I.format??"EMOJI",csatPrompt:I.prompt??"How was your experience?",autoPromptEnabled:W.autoPromptEnabled??!0,autoPromptQuestionDisplay:W.autoPromptQuestionDisplay??!0,autoPromptClickTelemetry:W.autoPromptClickTelemetry??!0,allowFeedback:W.allowFeedback??!0,provideCitations:W.provideCitations??!0,organizationId:H.organizationId??null,chatFeatures:e.chatFeatures??null};var Z},[H,n,r,o,a,i,s,l,c,u,p,g,f,h,m,b,y,v,j,T,N,F,L,R,_,A,B,D,V,O,$,k,x,S,C]),ee=I.useMemo(()=>!Z||((e=[])=>{if("undefined"==typeof window)return!1;const t=window.location.hostname.toLowerCase(),n=window.location.host.toLowerCase();return!(!e||0===e.length)&&e.some(e=>{const r=e.toLowerCase().trim();return r.includes(":")?n===r:t===r||t.endsWith("."+r)})})(Z.allowedDomains),[Z]),te=I.useMemo(()=>({welcomeMessage:"Hi! How can we help?",quickQuestions:[],apiBaseUrl:t||"",apiKey:w||"",getAuthToken:e,autoOpen:!1,openDelay:0,darkMode:!1,enableVoiceInteraction:!1,onboardingQuestions:[],onboardingEnabled:!1,collectionPrompt:void 0}),[t,w,e]),{isOpen:ne,isMinimized:re,isDark:oe,messages:ae,inputValue:ie,isLoading:se,widgetRef:le,setInputValue:ce,handleSend:ue,stopGeneration:de,handleQuickQuestion:pe,sendMessage:ge,retryMessage:fe,toggleChat:he,toggleTheme:me,toggleMinimize:be,closeChat:ye,handleDecision:ve,isVoiceSessionActive:we,voiceStatus:ke,voiceError:xe,voiceConclusionForCsat:Se,handleVoiceToggle:Ce,sendBidiTextMessage:Me,onboardingActive:Pe,onboardingCompleted:ze,handleOnboardingFormSubmit:Ee,conversationId:je,resetConversation:Te,sessionExpiringSoon:Ne,updateMessageFeedback:Fe,widgetFilter:Le,setWidgetFilter:Re,addAssistantMessage:Ae}=np(Z?{welcomeMessage:Z.welcomeMessage,fallbackMessage:Z.fallbackMessage,quickQuestions:Z.quickQuestions,apiBaseUrl:t,wsBaseUrl:U??H?.wsBaseUrl,apiKey:w,locale:Z.defaultLanguage||z,organizationId:Z.organizationId,getAuthToken:e,autoOpen:M,openDelay:P,darkMode:Z.darkMode,enableVoiceInteraction:Z.enableVoiceInteraction,onboardingQuestions:Z.onboardingQuestions,onboardingEnabled:Z.onboardingEnabled,collectionPrompt:Z.collectionPrompt,provideCitations:Z.provideCitations,inactivityTimeoutValue:Z.inactivityTimeoutValue,inactivityTimeoutUnit:Z.inactivityTimeoutUnit,messageLimits:H?.messageLimits}:te),_e=I.useRef(null),Ie=I.useRef(ne);I.useEffect(()=>{Ie.current&&!ne&&_e.current?.focus(),Ie.current=ne},[ne]);const Be=I.useCallback((n,r,o)=>{if(Fe(n,r),!je||!t)return;const a=t.replace(/\/$/,"");(async()=>{try{const t={"Content-Type":"application/json"};if("function"==typeof e){const n=await e();n&&(t.Authorization=`Bearer ${n}`)}await fetch(`${a}/api/v1/support/feedback`,{method:"POST",headers:t,credentials:"include",body:JSON.stringify({messageContent:n,conversationId:je,feedback:r,feedbackText:o})})}catch(e){}})()},[je,t,e,Fe]),De=I.useCallback(()=>{Te&&Te()},[Te]),{categories:Oe,hasFilters:$e}=function(e,t){const n=!!e,[r,o]=I.useState({categories:[],loading:n,error:null});I.useEffect(()=>{if(!e)return void o({categories:[],loading:!1,error:null});const n=t?`${e}|__session__`:`${e}|__proxy__`,r=ef.get(n);if(r)return void o({categories:r,loading:!1,error:null});let a=!1;o(e=>({...e,loading:!0,error:null}));const i=`${e.replace(/\/$/,"")}/api/v1/widget/filters`;return(async()=>{try{const e={Accept:"application/json"};if("function"==typeof t){const n=await t();n&&(e.Authorization=`Bearer ${n}`)}const r=await fetch(i,{method:"GET",headers:e});if(!r.ok)throw new Error(`filter catalog HTTP ${r.status}`);const s=await r.json(),l=Array.isArray(s?.categories)?s.categories:[];if(a)return;ef.set(n,l),o({categories:l,loading:!1,error:null})}catch(e){if(a)return;o({categories:[],loading:!1,error:e})}})(),()=>{a=!0}},[e,t]);const a=I.useMemo(()=>Array.isArray(r.categories)&&r.categories.length>0,[r.categories]);return{...r,hasFilters:a}}(t,e),Ve=I.useCallback(()=>{const e=ae.filter(e=>e.content&&""!==e.content.trim()).map(e=>`${"user"===e.role?"You":Z?.conciergeName||"Assistant"}: ${e.content}`).join("\n\n");e&&navigator.clipboard.writeText(e).catch(()=>{})},[ae,Z?.conciergeName]);if(I.useEffect(()=>{le.current&&Z&&(le.current.style.setProperty("--cw-primary",Z.primaryColor),Z.fontFamily&&le.current.style.setProperty("--cw-font-family",Z.fontFamily),Z.textColor&&le.current.style.setProperty("--cw-text-color",Z.textColor))},[Z,le]),q)return null;if(G)return null;if(Y||!Z)return null;if(!ee)return null;const Ue={"bottom-right":"bottom-5 right-5","bottom-left":"bottom-5 left-5","top-right":"top-5 right-5","top-left":"top-5 left-5"};return Jp.jsx("div",{id:"chat-widget-root",children:Jp.jsxs("div",{ref:le,className:`chat-widget-root fixed flex flex-col ${Z.launcherPosition?.includes("left")?"items-start":"items-end"} z-[999999] ${oe?"dark":""} ${E} ${Ue[Z.launcherPosition]||Ue["bottom-right"]}`,children:[Jp.jsx(Zg,{isOpen:ne,isMinimized:re,isDark:oe,launcherPosition:Z.launcherPosition,primaryColor:Z.primaryColor,textColor:Z.textColor,companyName:Z.companyName,conciergeName:Z.conciergeName,companyLogo:Z.companyLogo,chatbotAvatarEnabled:Z.chatbotAvatarEnabled,chatbotAvatar:Z.chatbotAvatar,messages:ae,isLoading:se,inputValue:ie,setInputValue:ce,onSend:ue,onStopGeneration:de,onDirectSend:ge,onToggleTheme:me,onMinimize:be,onClose:ye,quickQuestions:Z.quickQuestions,quickQuestionsEnabled:Z.quickQuestionsEnabled,onQuickQuestion:pe,quickQuestionsLayout:d,agentMessageBubbleColor:Z.agentMessageBubbleColor,userMessageBoxColor:Z.userMessageBoxColor,assistantTextColor:Z.assistantTextColor,userTextColor:Z.userTextColor,fontFamily:Z.fontFamily,agentMessageBubbleFontFamily:Z.agentMessageBubbleFontFamily,agentMessageBubbleFontSize:Z.agentMessageBubbleFontSize,userMessageBubbleFontFamily:Z.userMessageBubbleFontFamily,userMessageBubbleFontSize:Z.userMessageBubbleFontSize,fontSize:Z.fontSize,defaultLanguage:Z.defaultLanguage||z,onDecision:ve,headerTextBold:Z.headerTextBold,headerTextItalic:Z.headerTextItalic,headerTextColor:Z.headerTextColor,headerFontFamily:Z.headerFontFamily,headerFontSize:Z.headerFontSize,subtitle:Z.subtitle,showStatus:Z.showStatus,statusMode:Z.statusMode,officeHours:Z.officeHours,enableVoiceInteraction:Z.enableVoiceInteraction,isVoiceSessionActive:we,voiceStatus:ke,voiceError:xe,voiceConclusionForCsat:Se,onVoiceToggle:Ce,onBidiSubmit:()=>Me(ie),disclaimerEnabled:Z.disclaimerEnabled,disclaimerText:Z.disclaimerText,disclaimerPosition:Z.disclaimerPosition,disclaimerLinkUrl:Z.disclaimerLinkUrl,disclaimerLinkLabel:Z.disclaimerLinkLabel,showPoweredBy:Z.showPoweredBy,apiBaseUrl:t,apiKey:w,getAuthToken:e,conversationId:je,conciergeId:H?.conciergeId??H?.id,onboardingQuestions:Z.onboardingQuestions,onboardingActive:Pe,onboardingCompleted:ze,onOnboardingFormSubmit:Ee,collectionPrompt:Z.collectionPrompt,csatEnabled:Z.csatEnabled,csatFormat:Z.csatFormat,csatPrompt:Z.csatPrompt,onboardingEnabled:Z.onboardingEnabled,onResetConversation:Te,sessionExpiringSoon:Ne,autoPromptEnabled:Z.autoPromptEnabled,autoPromptQuestionDisplay:Z.autoPromptQuestionDisplay,autoPromptClickTelemetry:Z.autoPromptClickTelemetry,allowFeedback:Z.allowFeedback,provideCitations:Z.provideCitations,onFeedback:Be,onRetryMessage:fe,onRefreshChat:De,onCopyChat:Ve,filterCategories:Oe,showFilterStep:$e,widgetFilter:Le,onWidgetFilterChange:Re,onSynthesizeAssistantMessage:Ae,chatFeatures:Z.chatFeatures,organizationId:Z.organizationId}),Jp.jsx(tf,{ref:_e,isDark:oe,primaryColor:Z.primaryColor,onToggle:he,textColor:Z.textColor,headerTextColor:Z.headerTextColor,defaultLanguage:Z.defaultLanguage||z,isOpen:ne,className:ne?"hidden":void 0})]})})};class of extends I.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,t){}render(){return this.state.hasError?Jp.jsx("div",{role:"alert",style:{position:"fixed",bottom:"20px",right:"20px",maxWidth:"280px",padding:"10px 14px",borderRadius:"10px",background:"#1f2937",color:"#f3f4f6",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif',fontSize:"13px",lineHeight:1.4,boxShadow:"0 4px 12px rgba(0,0,0,0.15)",zIndex:2147483647},children:"Chat is temporarily unavailable. Please refresh the page to try again."}):this.props.children}}"undefined"!=typeof window&&(window.__eshalChatWidgetReact=I),function(){let e=null,t=null,n=null,r={},o=null;const a={darkMode:!1,primaryColor:"#2563eb",position:"bottom-right",companyName:"Support Team",conciergeName:null,companyLogo:null,welcomeMessage:"Hi! How can we help?",quickQuestions:[],quickQuestionsLayout:"vertical",textColor:"#fcfcfc",agentMessageBubbleColor:void 0,userMessageBoxColor:void 0,assistantTextColor:void 0,userTextColor:void 0,fontFamily:"Inter",fontSize:"14px",defaultLanguage:"en",autoOpen:!1,openDelay:0,apiBaseUrl:null,wsBaseUrl:null,apiKey:null,organizationId:null,sessionUrl:null,userId:null,userName:null,userEmail:null,locale:"en",headerTextBold:!1,headerTextItalic:!1,enableVoiceInteraction:!1,disclaimerEnabled:!1,disclaimerText:void 0,disclaimerPosition:"top",showPoweredBy:!0,onboardingQuestions:[],onboardingEnabled:!1,collectionPrompt:void 0,allowedDomains:[],onOpen:null,onClose:null},i={init:async function(s={}){if(r={...a,...s},r.sessionUrl&&!o&&(o=await(async e=>{if(e.sessionUrl)try{const t=await fetch(e.sessionUrl,{method:"POST",headers:{"Content-Type":"application/json",...e.apiKey&&{Authorization:`Bearer ${e.apiKey}`}},body:JSON.stringify({userId:e.userId,userName:e.userName,userEmail:e.userEmail}),credentials:"include"});return(await t.json()).sessionId}catch(e){return null}return null})(r)),n||(n=document.createElement("div"),n.id="chat-widget-host",document.body.appendChild(n)),!n.shadowRoot){const e=n.attachShadow({mode:"open"}),r=document.createElement("style");r.textContent=":host { all: initial; display: block; }",e.appendChild(r);const o=document.createElement("style");o.textContent='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.chat-widget-root{--cw-primary:#1d4ed8;--cw-primary-hover:#1e40af;--cw-status-success:160 84% 39%;--cw-status-success-bg:152 81% 96%;--cw-status-warning:35 100% 50%;--cw-status-warning-bg:34 100% 95%;--cw-status-error:350 89% 60%;--cw-status-error-bg:356 100% 97%;--cw-status-info:199 89% 48%;--cw-status-info-bg:204 100% 97%;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif}.chat-widget-root.dark{--cw-status-success:158 64% 52%;--cw-status-success-bg:152 36% 14%;--cw-status-warning:38 92% 60%;--cw-status-warning-bg:36 33% 14%;--cw-status-error:350 89% 65%;--cw-status-error-bg:356 33% 16%;--cw-status-info:199 89% 58%;--cw-status-info-bg:204 33% 14%}.\\!container{width:100%!important}.container{width:100%}@media (min-width:640px){.\\!container{max-width:640px!important}.container{max-width:640px}}@media (min-width:768px){.\\!container{max-width:768px!important}.container{max-width:768px}}@media (min-width:1024px){.\\!container{max-width:1024px!important}.container{max-width:1024px}}@media (min-width:1280px){.\\!container{max-width:1280px!important}.container{max-width:1280px}}@media (min-width:1536px){.\\!container{max-width:1536px!important}.container{max-width:1536px}}#chat-widget-root .chat-widget-root *{box-sizing:border-box;margin:0;padding:0}#chat-widget-root .chat-messages::-webkit-scrollbar{width:6px}#chat-widget-root .chat-messages::-webkit-scrollbar-track{background:transparent}#chat-widget-root .chat-messages::-webkit-scrollbar-thumb{background:rgba(156,163,175,.5);border-radius:10px}#chat-widget-root .chat-messages::-webkit-scrollbar-thumb:hover{background:rgba(156,163,175,.7)}#chat-widget-root .dark .chat-messages::-webkit-scrollbar-thumb{background:rgba(75,85,99,.5)}#chat-widget-root .dark .chat-messages::-webkit-scrollbar-thumb:hover{background:rgba(75,85,99,.7)}#chat-widget-root .sr-only{clip:rect(0,0,0,0);border-width:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}#chat-widget-root .pointer-events-none{pointer-events:none}#chat-widget-root .visible{visibility:visible}#chat-widget-root .collapse{visibility:collapse}#chat-widget-root .static{position:static}#chat-widget-root .fixed{position:fixed}#chat-widget-root .absolute{position:absolute}#chat-widget-root .relative{position:relative}#chat-widget-root .sticky{position:sticky}#chat-widget-root .inset-0{inset:0}#chat-widget-root .-top-8{top:-2rem}#chat-widget-root .bottom-0{bottom:0}#chat-widget-root .bottom-5{bottom:1.25rem}#chat-widget-root .bottom-full{bottom:100%}#chat-widget-root .left-0{left:0}#chat-widget-root .left-1\\/2{left:50%}#chat-widget-root .left-5{left:1.25rem}#chat-widget-root .right-0{right:0}#chat-widget-root .right-5{right:1.25rem}#chat-widget-root .top-0{top:0}#chat-widget-root .top-1\\/2{top:50%}#chat-widget-root .top-5{top:1.25rem}#chat-widget-root .top-full{top:100%}#chat-widget-root .isolate{isolation:isolate}#chat-widget-root .z-10{z-index:10}#chat-widget-root .z-50{z-index:50}#chat-widget-root .z-\\[60\\]{z-index:60}#chat-widget-root .z-\\[70\\]{z-index:70}#chat-widget-root .z-\\[71\\]{z-index:71}#chat-widget-root .z-\\[999999\\]{z-index:999999}#chat-widget-root .z-\\[9999\\]{z-index:9999}#chat-widget-root .m-0{margin:0}#chat-widget-root .mx-2{margin-left:.5rem;margin-right:.5rem}#chat-widget-root .mx-3{margin-left:.75rem;margin-right:.75rem}#chat-widget-root .my-3{margin-bottom:.75rem;margin-top:.75rem}#chat-widget-root .my-4{margin-bottom:1rem;margin-top:1rem}#chat-widget-root .-mb-px{margin-bottom:-1px}#chat-widget-root .mb-1{margin-bottom:.25rem}#chat-widget-root .mb-1\\.5{margin-bottom:.375rem}#chat-widget-root .mb-2{margin-bottom:.5rem}#chat-widget-root .mb-3{margin-bottom:.75rem}#chat-widget-root .mb-4{margin-bottom:1rem}#chat-widget-root .mb-5{margin-bottom:1.25rem}#chat-widget-root .ml-1{margin-left:.25rem}#chat-widget-root .ms-0\\.5{margin-inline-start:.125rem}#chat-widget-root .mt-0\\.5{margin-top:.125rem}#chat-widget-root .mt-1{margin-top:.25rem}#chat-widget-root .mt-1\\.5{margin-top:.375rem}#chat-widget-root .mt-2{margin-top:.5rem}#chat-widget-root .mt-3{margin-top:.75rem}#chat-widget-root .mt-4{margin-top:1rem}#chat-widget-root .block{display:block}#chat-widget-root .inline-block{display:inline-block}#chat-widget-root .inline{display:inline}#chat-widget-root .flex{display:flex}#chat-widget-root .inline-flex{display:inline-flex}#chat-widget-root .table{display:table}#chat-widget-root .grid{display:grid}#chat-widget-root .hidden{display:none}#chat-widget-root .h-1\\.5{height:.375rem}#chat-widget-root .h-10{height:2.5rem}#chat-widget-root .h-11{height:2.75rem}#chat-widget-root .h-12{height:3rem}#chat-widget-root .h-16{height:4rem}#chat-widget-root .h-2{height:.5rem}#chat-widget-root .h-3{height:.75rem}#chat-widget-root .h-3\\.5{height:.875rem}#chat-widget-root .h-4{height:1rem}#chat-widget-root .h-5{height:1.25rem}#chat-widget-root .h-6{height:1.5rem}#chat-widget-root .h-7{height:1.75rem}#chat-widget-root .h-8{height:2rem}#chat-widget-root .h-\\[650px\\]{height:650px}#chat-widget-root .h-auto{height:auto}#chat-widget-root .h-full{height:100%}#chat-widget-root .h-px{height:1px}#chat-widget-root .max-h-\\[85vh\\]{max-height:85vh}#chat-widget-root .min-h-0{min-height:0}#chat-widget-root .min-h-\\[48px\\]{min-height:48px}#chat-widget-root .w-1\\.5{width:.375rem}#chat-widget-root .w-10{width:2.5rem}#chat-widget-root .w-11{width:2.75rem}#chat-widget-root .w-12{width:3rem}#chat-widget-root .w-16{width:4rem}#chat-widget-root .w-2{width:.5rem}#chat-widget-root .w-3{width:.75rem}#chat-widget-root .w-3\\.5{width:.875rem}#chat-widget-root .w-4{width:1rem}#chat-widget-root .w-44{width:11rem}#chat-widget-root .w-5{width:1.25rem}#chat-widget-root .w-6{width:1.5rem}#chat-widget-root .w-7{width:1.75rem}#chat-widget-root .w-8{width:2rem}#chat-widget-root .w-80{width:20rem}#chat-widget-root .w-96{width:24rem}#chat-widget-root .w-\\[380px\\]{width:380px}#chat-widget-root .w-full{width:100%}#chat-widget-root .min-w-0{min-width:0}#chat-widget-root .min-w-\\[60px\\]{min-width:60px}#chat-widget-root .min-w-full{min-width:100%}#chat-widget-root .max-w-\\[75\\%\\]{max-width:75%}#chat-widget-root .max-w-\\[92vw\\]{max-width:92vw}#chat-widget-root .max-w-full{max-width:100%}#chat-widget-root .max-w-none{max-width:none}#chat-widget-root .max-w-sm{max-width:24rem}#chat-widget-root .max-w-xs{max-width:20rem}#chat-widget-root .flex-1{flex:1 1 0%}#chat-widget-root .flex-shrink-0,#chat-widget-root .shrink-0{flex-shrink:0}#chat-widget-root .grow{flex-grow:1}#chat-widget-root .border-collapse{border-collapse:collapse}#chat-widget-root .-translate-x-1\\/2{--tw-translate-x:-50%}#chat-widget-root .-translate-x-1\\/2,#chat-widget-root .-translate-y-1\\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#chat-widget-root .-translate-y-1\\/2{--tw-translate-y:-50%}#chat-widget-root .-rotate-90{--tw-rotate:-90deg}#chat-widget-root .-rotate-90,#chat-widget-root .rotate-180{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#chat-widget-root .rotate-180{--tw-rotate:180deg}#chat-widget-root .rotate-90{--tw-rotate:90deg}#chat-widget-root .rotate-90,#chat-widget-root .scale-0{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#chat-widget-root .scale-0{--tw-scale-x:0;--tw-scale-y:0}#chat-widget-root .scale-100{--tw-scale-x:1;--tw-scale-y:1}#chat-widget-root .scale-100,#chat-widget-root .scale-110{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#chat-widget-root .scale-110{--tw-scale-x:1.1;--tw-scale-y:1.1}#chat-widget-root .scale-125{--tw-scale-x:1.25;--tw-scale-y:1.25}#chat-widget-root .scale-125,#chat-widget-root .scale-95{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#chat-widget-root .scale-95{--tw-scale-x:.95;--tw-scale-y:.95}#chat-widget-root .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes bounce{0%,to{animation-timing-function:cubic-bezier(.8,0,1,1);transform:translateY(-25%)}50%{animation-timing-function:cubic-bezier(0,0,.2,1);transform:none}}#chat-widget-root .animate-bounce{animation:bounce 1s infinite}@keyframes pulse{50%{opacity:.5}}#chat-widget-root .animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(1turn)}}#chat-widget-root .animate-spin{animation:spin 1s linear infinite}#chat-widget-root .cursor-ew-resize{cursor:ew-resize}#chat-widget-root .cursor-nesw-resize{cursor:nesw-resize}#chat-widget-root .cursor-not-allowed{cursor:not-allowed}#chat-widget-root .cursor-ns-resize{cursor:ns-resize}#chat-widget-root .cursor-nwse-resize{cursor:nwse-resize}#chat-widget-root .cursor-pointer{cursor:pointer}#chat-widget-root .resize-none{resize:none}#chat-widget-root .resize{resize:both}#chat-widget-root .list-decimal{list-style-type:decimal}#chat-widget-root .list-disc{list-style-type:disc}#chat-widget-root .list-none{list-style-type:none}#chat-widget-root .flex-row{flex-direction:row}#chat-widget-root .flex-row-reverse{flex-direction:row-reverse}#chat-widget-root .flex-col{flex-direction:column}#chat-widget-root .flex-wrap{flex-wrap:wrap}#chat-widget-root .items-start{align-items:flex-start}#chat-widget-root .items-end{align-items:flex-end}#chat-widget-root .items-center{align-items:center}#chat-widget-root .justify-start{justify-content:flex-start}#chat-widget-root .justify-end{justify-content:flex-end}#chat-widget-root .justify-center{justify-content:center}#chat-widget-root .justify-between{justify-content:space-between}#chat-widget-root .gap-0{gap:0}#chat-widget-root .gap-0\\.5{gap:.125rem}#chat-widget-root .gap-1{gap:.25rem}#chat-widget-root .gap-1\\.5{gap:.375rem}#chat-widget-root .gap-2{gap:.5rem}#chat-widget-root .gap-2\\.5{gap:.625rem}#chat-widget-root .gap-3{gap:.75rem}#chat-widget-root .gap-4{gap:1rem}#chat-widget-root .gap-6{gap:1.5rem}#chat-widget-root :is(.space-y-1>:not([hidden])~:not([hidden])){--tw-space-y-reverse:0;margin-bottom:calc(.25rem*var(--tw-space-y-reverse));margin-top:calc(.25rem*(1 - var(--tw-space-y-reverse)))}#chat-widget-root :is(.space-y-2>:not([hidden])~:not([hidden])){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}#chat-widget-root :is(.space-y-4>:not([hidden])~:not([hidden])){--tw-space-y-reverse:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}#chat-widget-root .overflow-hidden{overflow:hidden}#chat-widget-root .overflow-visible{overflow:visible}#chat-widget-root .overflow-x-auto{overflow-x:auto}#chat-widget-root .overflow-y-auto{overflow-y:auto}#chat-widget-root .truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#chat-widget-root .whitespace-nowrap{white-space:nowrap}#chat-widget-root .whitespace-pre-wrap{white-space:pre-wrap}#chat-widget-root .break-words{overflow-wrap:break-word}#chat-widget-root .break-all{word-break:break-all}#chat-widget-root .rounded{border-radius:.25rem}#chat-widget-root .rounded-2xl{border-radius:1rem}#chat-widget-root .rounded-3xl{border-radius:1.5rem}#chat-widget-root .rounded-full{border-radius:9999px}#chat-widget-root .rounded-lg{border-radius:.5rem}#chat-widget-root .rounded-md{border-radius:.375rem}#chat-widget-root .rounded-xl{border-radius:.75rem}#chat-widget-root .rounded-t-2xl{border-top-left-radius:1rem;border-top-right-radius:1rem}#chat-widget-root .rounded-tl-sm{border-top-left-radius:.125rem}#chat-widget-root .rounded-tr-sm{border-top-right-radius:.125rem}#chat-widget-root .border{border-width:1px}#chat-widget-root .border-0{border-width:0}#chat-widget-root .border-b{border-bottom-width:1px}#chat-widget-root .border-l-4{border-left-width:4px}#chat-widget-root .border-t{border-top-width:1px}#chat-widget-root .border-t-2{border-top-width:2px}#chat-widget-root .border-dotted{border-style:dotted}#chat-widget-root .border-none{border-style:none}#chat-widget-root .\\!border-status-error{border-color:hsl(var(--cw-status-error))!important}#chat-widget-root .border-amber-200{--tw-border-opacity:1;border-color:rgb(253 230 138/var(--tw-border-opacity,1))}#chat-widget-root .border-amber-700\\/50{border-color:rgba(180,83,9,.5)}#chat-widget-root .border-blue-200{--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity,1))}#chat-widget-root .border-blue-700\\/50{border-color:rgba(29,78,216,.5)}#chat-widget-root .border-gray-100{--tw-border-opacity:1;border-color:rgb(243 244 246/var(--tw-border-opacity,1))}#chat-widget-root .border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}#chat-widget-root .border-gray-200\\/60{border-color:rgba(229,231,235,.6)}#chat-widget-root .border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}#chat-widget-root .border-gray-600{--tw-border-opacity:1;border-color:rgb(75 85 99/var(--tw-border-opacity,1))}#chat-widget-root .border-gray-700{--tw-border-opacity:1;border-color:rgb(55 65 81/var(--tw-border-opacity,1))}#chat-widget-root .border-gray-700\\/50{border-color:rgba(55,65,81,.5)}#chat-widget-root .border-transparent{border-color:transparent}#chat-widget-root .bg-amber-50{--tw-bg-opacity:1;background-color:rgb(255 251 235/var(--tw-bg-opacity,1))}#chat-widget-root .bg-amber-900\\/40{background-color:rgba(120,53,15,.4)}#chat-widget-root .bg-blue-50{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}#chat-widget-root .bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))}#chat-widget-root .bg-blue-900\\/30{background-color:rgba(30,58,138,.3)}#chat-widget-root .bg-current{background-color:currentColor}#chat-widget-root .bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}#chat-widget-root .bg-gray-400{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity,1))}#chat-widget-root .bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}#chat-widget-root .bg-gray-500{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity,1))}#chat-widget-root .bg-gray-700{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}#chat-widget-root .bg-gray-700\\/50{background-color:rgba(55,65,81,.5)}#chat-widget-root .bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}#chat-widget-root .bg-gray-800\\/50{background-color:rgba(31,41,55,.5)}#chat-widget-root .bg-gray-900{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity,1))}#chat-widget-root .bg-green-200{--tw-bg-opacity:1;background-color:rgb(187 247 208/var(--tw-bg-opacity,1))}#chat-widget-root .bg-orange-200{--tw-bg-opacity:1;background-color:rgb(254 215 170/var(--tw-bg-opacity,1))}#chat-widget-root .bg-pink-200{--tw-bg-opacity:1;background-color:rgb(251 207 232/var(--tw-bg-opacity,1))}#chat-widget-root .bg-red-200{--tw-bg-opacity:1;background-color:rgb(254 202 202/var(--tw-bg-opacity,1))}#chat-widget-root .bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}#chat-widget-root .bg-slate-50\\/50{background-color:rgba(248,250,252,.5)}#chat-widget-root .bg-slate-800\\/50{background-color:rgba(30,41,59,.5)}#chat-widget-root .bg-transparent{background-color:transparent}#chat-widget-root .bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}#chat-widget-root .bg-white\\/10{background-color:hsla(0,0%,100%,.1)}#chat-widget-root .bg-white\\/20{background-color:hsla(0,0%,100%,.2)}#chat-widget-root .bg-yellow-200{--tw-bg-opacity:1;background-color:rgb(254 240 138/var(--tw-bg-opacity,1))}#chat-widget-root .bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}#chat-widget-root .bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}#chat-widget-root .from-gray-50\\/50{--tw-gradient-from:rgba(249,250,251,.5) var(--tw-gradient-from-position);--tw-gradient-to:rgba(249,250,251,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}#chat-widget-root .from-white\\/0{--tw-gradient-from:hsla(0,0%,100%,0) var(--tw-gradient-from-position);--tw-gradient-to:hsla(0,0%,100%,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}#chat-widget-root .from-white\\/10{--tw-gradient-from:hsla(0,0%,100%,.1) var(--tw-gradient-from-position);--tw-gradient-to:hsla(0,0%,100%,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}#chat-widget-root .from-yellow-200{--tw-gradient-from:#fef08a var(--tw-gradient-from-position);--tw-gradient-to:hsla(53,98%,77%,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}#chat-widget-root .via-white\\/5{--tw-gradient-to:hsla(0,0%,100%,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),hsla(0,0%,100%,.05) var(--tw-gradient-via-position),var(--tw-gradient-to)}#chat-widget-root .to-white{--tw-gradient-to:#fff var(--tw-gradient-to-position)}#chat-widget-root .to-white\\/10{--tw-gradient-to:hsla(0,0%,100%,.1) var(--tw-gradient-to-position)}#chat-widget-root .to-yellow-400{--tw-gradient-to:#facc15 var(--tw-gradient-to-position)}#chat-widget-root .object-contain{-o-object-fit:contain;object-fit:contain}#chat-widget-root .p-0{padding:0}#chat-widget-root .p-0\\.5{padding:.125rem}#chat-widget-root .p-3{padding:.75rem}#chat-widget-root .p-5{padding:1.25rem}#chat-widget-root .p-6{padding:1.5rem}#chat-widget-root .p-8{padding:2rem}#chat-widget-root .px-1{padding-left:.25rem;padding-right:.25rem}#chat-widget-root .px-2{padding-left:.5rem;padding-right:.5rem}#chat-widget-root .px-2\\.5{padding-left:.625rem;padding-right:.625rem}#chat-widget-root .px-3{padding-left:.75rem;padding-right:.75rem}#chat-widget-root .px-4{padding-left:1rem;padding-right:1rem}#chat-widget-root .px-5{padding-left:1.25rem;padding-right:1.25rem}#chat-widget-root .py-1{padding-bottom:.25rem;padding-top:.25rem}#chat-widget-root .py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}#chat-widget-root .py-12{padding-bottom:3rem;padding-top:3rem}#chat-widget-root .py-2{padding-bottom:.5rem;padding-top:.5rem}#chat-widget-root .py-2\\.5{padding-bottom:.625rem;padding-top:.625rem}#chat-widget-root .py-3{padding-bottom:.75rem;padding-top:.75rem}#chat-widget-root .py-3\\.5{padding-bottom:.875rem;padding-top:.875rem}#chat-widget-root .py-4{padding-bottom:1rem;padding-top:1rem}#chat-widget-root .pb-1{padding-bottom:.25rem}#chat-widget-root .pb-2{padding-bottom:.5rem}#chat-widget-root .pl-1{padding-left:.25rem}#chat-widget-root .pl-2{padding-left:.5rem}#chat-widget-root .pl-4{padding-left:1rem}#chat-widget-root .pl-\\[50px\\]{padding-left:50px}#chat-widget-root .pr-1{padding-right:.25rem}#chat-widget-root .pt-1{padding-top:.25rem}#chat-widget-root .text-left{text-align:left}#chat-widget-root .text-center{text-align:center}#chat-widget-root .text-right{text-align:right}#chat-widget-root .align-text-bottom{vertical-align:text-bottom}#chat-widget-root .font-sans{font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}#chat-widget-root .text-2xl{font-size:1.5rem;line-height:2rem}#chat-widget-root .text-\\[10px\\]{font-size:10px}#chat-widget-root .text-base{font-size:1rem;line-height:1.5rem}#chat-widget-root .text-chip{font-size:11px;letter-spacing:0;line-height:1.4}#chat-widget-root .text-h4{font-size:18px;letter-spacing:0;line-height:1.3}#chat-widget-root .text-lg{font-size:1.125rem;line-height:1.75rem}#chat-widget-root .text-sm{font-size:.875rem;line-height:1.25rem}#chat-widget-root .text-xl{font-size:1.25rem;line-height:1.75rem}#chat-widget-root .text-xs{font-size:.75rem;line-height:1rem}#chat-widget-root .font-bold{font-weight:700}#chat-widget-root .font-medium{font-weight:500}#chat-widget-root .font-semibold{font-weight:600}#chat-widget-root .uppercase{text-transform:uppercase}#chat-widget-root .lowercase{text-transform:lowercase}#chat-widget-root .italic{font-style:italic}#chat-widget-root .tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}#chat-widget-root .leading-5{line-height:1.25rem}#chat-widget-root .leading-none{line-height:1}#chat-widget-root .leading-normal{line-height:1.5}#chat-widget-root .leading-relaxed{line-height:1.625}#chat-widget-root .leading-snug{line-height:1.375}#chat-widget-root .tracking-wide{letter-spacing:.025em}#chat-widget-root .text-\\[\\#4A5568\\]{--tw-text-opacity:1;color:rgb(74 85 104/var(--tw-text-opacity,1))}#chat-widget-root .text-amber-200{--tw-text-opacity:1;color:rgb(253 230 138/var(--tw-text-opacity,1))}#chat-widget-root .text-amber-800{--tw-text-opacity:1;color:rgb(146 64 14/var(--tw-text-opacity,1))}#chat-widget-root .text-current{color:currentColor}#chat-widget-root .text-gray-100{--tw-text-opacity:1;color:rgb(243 244 246/var(--tw-text-opacity,1))}#chat-widget-root .text-gray-200{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity,1))}#chat-widget-root .text-gray-300{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}#chat-widget-root .text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}#chat-widget-root .text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}#chat-widget-root .text-gray-500\\/80{color:hsla(220,9%,46%,.8)}#chat-widget-root .text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}#chat-widget-root .text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}#chat-widget-root .text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity,1))}#chat-widget-root .text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}#chat-widget-root .text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity,1))}#chat-widget-root .text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}#chat-widget-root .text-slate-400{--tw-text-opacity:1;color:rgb(148 163 184/var(--tw-text-opacity,1))}#chat-widget-root .text-slate-500{--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity,1))}#chat-widget-root .text-status-error{color:hsl(var(--cw-status-error))}#chat-widget-root .text-status-success{color:hsl(var(--cw-status-success))}#chat-widget-root .text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}#chat-widget-root .text-yellow-400{--tw-text-opacity:1;color:rgb(250 204 21/var(--tw-text-opacity,1))}#chat-widget-root .underline{text-decoration-line:underline}#chat-widget-root .no-underline{text-decoration-line:none}#chat-widget-root .placeholder-gray-400::-moz-placeholder{--tw-placeholder-opacity:1;color:rgb(156 163 175/var(--tw-placeholder-opacity,1))}#chat-widget-root .placeholder-gray-400::placeholder{--tw-placeholder-opacity:1;color:rgb(156 163 175/var(--tw-placeholder-opacity,1))}#chat-widget-root .placeholder-gray-500::-moz-placeholder{--tw-placeholder-opacity:1;color:rgb(107 114 128/var(--tw-placeholder-opacity,1))}#chat-widget-root .placeholder-gray-500::placeholder{--tw-placeholder-opacity:1;color:rgb(107 114 128/var(--tw-placeholder-opacity,1))}#chat-widget-root .opacity-0{opacity:0}#chat-widget-root .opacity-50{opacity:.5}#chat-widget-root .opacity-60{opacity:.6}#chat-widget-root .opacity-70{opacity:.7}#chat-widget-root .opacity-75{opacity:.75}#chat-widget-root .opacity-80{opacity:.8}#chat-widget-root .shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}#chat-widget-root .shadow,#chat-widget-root .shadow-2xl{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}#chat-widget-root .shadow-2xl{--tw-shadow:0 25px 50px -12px rgba(0,0,0,.25);--tw-shadow-colored:0 25px 50px -12px var(--tw-shadow-color)}#chat-widget-root .shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}#chat-widget-root .shadow-lg,#chat-widget-root .shadow-md{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}#chat-widget-root .shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}#chat-widget-root .shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}#chat-widget-root .shadow-sm,#chat-widget-root .shadow-xl{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}#chat-widget-root .shadow-xl{--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color)}#chat-widget-root .shadow-black\\/20{--tw-shadow-color:rgba(0,0,0,.2);--tw-shadow:var(--tw-shadow-colored)}#chat-widget-root .shadow-gray-200\\/80{--tw-shadow-color:rgba(229,231,235,.8);--tw-shadow:var(--tw-shadow-colored)}#chat-widget-root .outline-none{outline:2px solid transparent;outline-offset:2px}#chat-widget-root .outline{outline-style:solid}#chat-widget-root .ring{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color)}#chat-widget-root .ring,#chat-widget-root .ring-2{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}#chat-widget-root .ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)}#chat-widget-root .ring-blue-100{--tw-ring-opacity:1;--tw-ring-color:rgb(219 234 254/var(--tw-ring-opacity,1))}#chat-widget-root .ring-blue-300{--tw-ring-opacity:1;--tw-ring-color:rgb(147 197 253/var(--tw-ring-opacity,1))}#chat-widget-root .ring-white{--tw-ring-opacity:1;--tw-ring-color:rgb(255 255 255/var(--tw-ring-opacity,1))}#chat-widget-root .blur{--tw-blur:blur(8px)}#chat-widget-root .blur,#chat-widget-root .drop-shadow{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)}#chat-widget-root .drop-shadow{--tw-drop-shadow:drop-shadow(0 1px 2px rgba(0,0,0,.1)) drop-shadow(0 1px 1px rgba(0,0,0,.06))}#chat-widget-root .drop-shadow-md{--tw-drop-shadow:drop-shadow(0 4px 3px rgba(0,0,0,.07)) drop-shadow(0 2px 2px rgba(0,0,0,.06))}#chat-widget-root .drop-shadow-md,#chat-widget-root .drop-shadow-sm{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#chat-widget-root .drop-shadow-sm{--tw-drop-shadow:drop-shadow(0 1px 1px rgba(0,0,0,.05))}#chat-widget-root .grayscale-\\[0\\.3\\]{--tw-grayscale:grayscale(0.3)}#chat-widget-root .filter,#chat-widget-root .grayscale-\\[0\\.3\\]{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)}#chat-widget-root .backdrop-blur-sm{--tw-backdrop-blur:blur(4px);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}#chat-widget-root .transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}#chat-widget-root .transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}#chat-widget-root .transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}#chat-widget-root .transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}#chat-widget-root .transition-transform{transition-duration:.15s;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}#chat-widget-root .duration-150{transition-duration:.15s}#chat-widget-root .duration-200{transition-duration:.2s}#chat-widget-root .duration-300{transition-duration:.3s}#chat-widget-root .duration-500{transition-duration:.5s}#chat-widget-root :is(#chat-widget-root .animate-in){animation:slideIn .3s ease-out}#chat-widget-root :is(#chat-widget-root .transition-all){transition-duration:.3s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}#chat-widget-root .\\[font-family\\:inherit\\]{font-family:inherit}#chat-widget-root .placeholder\\:text-\\[\\#8C8C8C\\]::-moz-placeholder{--tw-text-opacity:1;color:rgb(140 140 140/var(--tw-text-opacity,1))}#chat-widget-root .placeholder\\:text-\\[\\#8C8C8C\\]::placeholder{--tw-text-opacity:1;color:rgb(140 140 140/var(--tw-text-opacity,1))}#chat-widget-root .placeholder\\:text-\\[\\#A2A9B2\\]::-moz-placeholder{--tw-text-opacity:1;color:rgb(162 169 178/var(--tw-text-opacity,1))}#chat-widget-root .placeholder\\:text-\\[\\#A2A9B2\\]::placeholder{--tw-text-opacity:1;color:rgb(162 169 178/var(--tw-text-opacity,1))}#chat-widget-root .hover\\:scale-105:hover{--tw-scale-x:1.05;--tw-scale-y:1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#chat-widget-root .hover\\:scale-110:hover{--tw-scale-x:1.1;--tw-scale-y:1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#chat-widget-root .hover\\:scale-\\[1\\.02\\]:hover{--tw-scale-x:1.02;--tw-scale-y:1.02;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#chat-widget-root .hover\\:border-blue-400:hover{--tw-border-opacity:1;border-color:rgb(96 165 250/var(--tw-border-opacity,1))}#chat-widget-root .hover\\:border-blue-600:hover{--tw-border-opacity:1;border-color:rgb(37 99 235/var(--tw-border-opacity,1))}#chat-widget-root .hover\\:bg-blue-50:hover{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}#chat-widget-root .hover\\:bg-blue-500\\/20:hover{background-color:rgba(59,130,246,.2)}#chat-widget-root .hover\\:bg-blue-900\\/50:hover{background-color:rgba(30,58,138,.5)}#chat-widget-root .hover\\:bg-gray-200:hover{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}#chat-widget-root .hover\\:bg-gray-50:hover{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}#chat-widget-root .hover\\:bg-gray-600:hover{--tw-bg-opacity:1;background-color:rgb(75 85 99/var(--tw-bg-opacity,1))}#chat-widget-root .hover\\:bg-gray-700:hover{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}#chat-widget-root .hover\\:bg-red-600:hover{--tw-bg-opacity:1;background-color:rgb(220 38 38/var(--tw-bg-opacity,1))}#chat-widget-root .hover\\:bg-transparent:hover{background-color:transparent}#chat-widget-root .hover\\:text-blue-500:hover{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity,1))}#chat-widget-root .hover\\:text-gray-200:hover{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity,1))}#chat-widget-root .hover\\:text-gray-300:hover{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}#chat-widget-root .hover\\:text-gray-600:hover{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}#chat-widget-root .hover\\:text-gray-700:hover{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}#chat-widget-root .hover\\:underline:hover{text-decoration-line:underline}#chat-widget-root .hover\\:opacity-80:hover{opacity:.8}#chat-widget-root .hover\\:opacity-90:hover{opacity:.9}#chat-widget-root .hover\\:shadow-md:hover{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}#chat-widget-root .hover\\:shadow-xl:hover{--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}#chat-widget-root .hover\\:grayscale-0:hover{--tw-grayscale:grayscale(0);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)}#chat-widget-root .focus\\:\\!border-status-error:focus{border-color:hsl(var(--cw-status-error))!important}#chat-widget-root .focus\\:border-\\[\\#5A6069\\]:focus{--tw-border-opacity:1;border-color:rgb(90 96 105/var(--tw-border-opacity,1))}#chat-widget-root .focus\\:border-\\[\\#B0B0B0\\]:focus{--tw-border-opacity:1;border-color:rgb(176 176 176/var(--tw-border-opacity,1))}#chat-widget-root .focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}#chat-widget-root .focus\\:ring-0:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}#chat-widget-root .focus\\:ring-1:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}#chat-widget-root .focus\\:ring-gray-300:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(209 213 219/var(--tw-ring-opacity,1))}#chat-widget-root .focus\\:ring-gray-600:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(75 85 99/var(--tw-ring-opacity,1))}#chat-widget-root .focus-visible\\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}#chat-widget-root .focus-visible\\:ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}#chat-widget-root .focus-visible\\:ring-white\\/40:focus-visible{--tw-ring-color:hsla(0,0%,100%,.4)}#chat-widget-root .active\\:scale-95:active{--tw-scale-x:.95;--tw-scale-y:.95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#chat-widget-root .active\\:scale-\\[0\\.97\\]:active{--tw-scale-x:0.97;--tw-scale-y:0.97;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#chat-widget-root .active\\:scale-\\[0\\.98\\]:active{--tw-scale-x:0.98;--tw-scale-y:0.98;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#chat-widget-root .active\\:scale-\\[0\\.99\\]:active{--tw-scale-x:0.99;--tw-scale-y:0.99;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#chat-widget-root .active\\:outline-none:active{outline:2px solid transparent;outline-offset:2px}#chat-widget-root .active\\:ring-0:active{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}#chat-widget-root .disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}#chat-widget-root .disabled\\:opacity-40:disabled{opacity:.4}#chat-widget-root .disabled\\:opacity-50:disabled{opacity:.5}#chat-widget-root .disabled\\:shadow-none:disabled{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}#chat-widget-root :is(.group:hover .group-hover\\:scale-100){--tw-scale-x:1;--tw-scale-y:1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#chat-widget-root :is(.group:hover .group-hover\\:opacity-100){opacity:1}#chat-widget-root .dark\\:text-gray-300:is(.dark *){--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}#chat-widget-root .dark\\:text-gray-400:is(.dark *){--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}#chat-widget-root .rtl\\:rounded-tl-2xl:where([dir=rtl],[dir=rtl] *){border-top-left-radius:1rem}#chat-widget-root .rtl\\:rounded-tr-sm:where([dir=rtl],[dir=rtl] *){border-top-right-radius:.125rem}#chat-widget-root .\\[\\&\\:first-child\\]\\:\\!mt-0:first-child{margin-top:0!important}#chat-widget-root :is(.\\[\\&\\>\\*\\:first-child\\]\\:\\!mt-0>:first-child){margin-top:0!important}#chat-widget-root :is(.\\[\\&\\>\\*\\:last-child\\]\\:\\!mb-0>:last-child){margin-bottom:0!important}\n.chat-widget-root{position:fixed;z-index:999999}.chat-widget-container{color:var(--cw-text-color,inherit);font-family:var(\n --cw-font-family,-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif\n )}#chat-widget-root .chat-messages p{overflow-wrap:anywhere;word-break:break-word}textarea#chat-widget-input::-moz-placeholder{border:none;line-height:48px;outline:none}textarea#chat-widget-input::placeholder{border:none;line-height:48px;outline:none}textarea#chat-widget-input{border:none;line-height:48px;outline:none}@keyframes slideIn{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}@keyframes bounce{0%,to{transform:translateY(0)}50%{transform:translateY(-5px)}}#chat-widget-root .scrollbar-hide{-ms-overflow-style:none;scrollbar-width:none}#chat-widget-root .scrollbar-hide::-webkit-scrollbar{display:none}#chat-widget-root .slim-scrollbar-x{scrollbar-width:thin}#chat-widget-root .slim-scrollbar-x::-webkit-scrollbar{height:3px!important}#chat-widget-root .slim-scrollbar-x::-webkit-scrollbar-track{background:transparent!important}#chat-widget-root .slim-scrollbar-x::-webkit-scrollbar-thumb{background:#d1d5db!important;border-radius:2px!important}#chat-widget-root .slim-scrollbar-x::-webkit-scrollbar-thumb:hover{background:#9ca3af!important}@media print{.chat-widget-root{display:none!important}}',e.appendChild(o),t=document.createElement("div"),t.id="chat-widget-mount",e.appendChild(t)}e||(e=Uu(t)),void 0===s.darkMode&&(r.darkMode=window.matchMedia("(prefers-color-scheme: dark)").matches);const l=r.apiBaseUrl?{apiBaseUrl:r.apiBaseUrl,...void 0!==s.wsBaseUrl&&{wsBaseUrl:r.wsBaseUrl},...void 0!==s.position&&{position:r.position},...void 0!==s.quickQuestionsLayout&&{quickQuestionsLayout:r.quickQuestionsLayout},...void 0!==s.darkMode&&{darkMode:r.darkMode},...void 0!==s.primaryColor&&{primaryColor:r.primaryColor},...void 0!==s.companyName&&{companyName:r.companyName},...void 0!==s.conciergeName&&{conciergeName:r.conciergeName},...void 0!==s.companyLogo&&{companyLogo:r.companyLogo},...void 0!==s.welcomeMessage&&{welcomeMessage:r.welcomeMessage},...void 0!==s.quickQuestions&&{quickQuestions:r.quickQuestions},...void 0!==s.textColor&&{textColor:r.textColor},...void 0!==s.agentMessageBubbleColor&&{agentMessageBubbleColor:r.agentMessageBubbleColor},...void 0!==s.userMessageBoxColor&&{userMessageBoxColor:r.userMessageBoxColor},...void 0!==s.assistantTextColor&&{assistantTextColor:r.assistantTextColor},...void 0!==s.userTextColor&&{userTextColor:r.userTextColor},...void 0!==s.fontFamily&&{fontFamily:r.fontFamily},...void 0!==s.fontSize&&{fontSize:r.fontSize},...void 0!==s.defaultLanguage&&{defaultLanguage:r.defaultLanguage},...void 0!==s.locale&&{locale:r.locale},...void 0!==s.headerTextBold&&{headerTextBold:r.headerTextBold},...void 0!==s.headerTextItalic&&{headerTextItalic:r.headerTextItalic},...void 0!==s.enableVoiceInteraction&&{enableVoiceInteraction:r.enableVoiceInteraction},...void 0!==s.disclaimerEnabled&&{disclaimerEnabled:r.disclaimerEnabled},...void 0!==s.disclaimerText&&{disclaimerText:r.disclaimerText},...void 0!==s.disclaimerPosition&&{disclaimerPosition:r.disclaimerPosition},...void 0!==s.onboardingQuestions&&{onboardingQuestions:r.onboardingQuestions},...void 0!==s.onboardingEnabled&&{onboardingEnabled:r.onboardingEnabled},...void 0!==s.showPoweredBy&&{showPoweredBy:r.showPoweredBy},...void 0!==s.collectionPrompt&&{collectionPrompt:r.collectionPrompt},...void 0!==s.allowedDomains&&s.allowedDomains.length>0&&{allowedDomains:r.allowedDomains},...void 0!==s.autoOpen&&{autoOpen:r.autoOpen},...void 0!==s.openDelay&&{openDelay:r.openDelay},...void 0!==s.apiKey&&{apiKey:r.apiKey},...void 0!==s.className&&{className:r.className}}:{...r,apiBaseUrl:r.apiBaseUrl,wsBaseUrl:r.wsBaseUrl,organizationId:r.organizationId};try{e.render(I.createElement(of,null,I.createElement(rf,l)))}catch(e){t&&(t.innerHTML='<div role="alert" style="position:fixed;bottom:20px;right:20px;max-width:280px;padding:10px 14px;border-radius:10px;background:#1f2937;color:#f3f4f6;font-family:-apple-system,BlinkMacSystemFont,\'Segoe UI\',Roboto,Arial,sans-serif;font-size:13px;line-height:1.4;box-shadow:0 4px 12px rgba(0,0,0,0.15);z-index:2147483647;">Chat is temporarily unavailable. Please refresh the page to try again.</div>')}return r.onOpen&&r.autoOpen&&setTimeout(()=>r.onOpen(),r.openDelay),i},updateConfig:function(e){return r={...r,...e},this.init(r),i},open:function(){return this.updateConfig({autoOpen:!0,openDelay:0}),r.onOpen&&r.onOpen(),i},close:function(){return this.updateConfig({autoOpen:!1}),r.onClose&&r.onClose(),i},toggleTheme:function(){return r.darkMode=!r.darkMode,this.updateConfig({darkMode:r.darkMode}),i},destroy:function(){return e&&(e.unmount(),e=null),n&&n.parentNode&&(n.parentNode.removeChild(n),n=null),t=null,o=null,r={},i},getConfig:function(){return{...r}}};"undefined"!=typeof window&&(window.ChatWidget=i,window.ChatWidget.version=nf,window.ChatWidgetConfig&&document.addEventListener("DOMContentLoaded",()=>{i.init(window.ChatWidgetConfig)}),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",e=>{(void 0===r.darkMode||r.autoTheme)&&i.updateConfig({darkMode:e.matches})})),"undefined"!=typeof module&&module.exports&&(module.exports=i)}();var af={exports:{}};function sf(e){try{const t=window[e];return t.setItem("__ft__","1"),t.removeItem("__ft__"),"1"}catch{return"0"}}function lf(){try{return Array.from(navigator.plugins||[]).map(e=>`${e.name}::${e.filename}`).sort().join("|")}catch{return""}}function cf(){try{return Array.from(navigator.mimeTypes||[]).map(e=>e.type).sort().join("|")}catch{return""}}function uf(){try{const e=document.createElement("canvas");e.width=240,e.height=60;const t=e.getContext("2d");return t.textBaseline="alphabetic",t.fillStyle="#f60",t.fillRect(125,1,62,20),t.fillStyle="#069",t.font="11pt no-real-font-abc",t.fillText("user-trace:canvas,🔍<canvas>",2,15),t.fillStyle="rgba(102,204,0,0.7)",t.font="18pt Arial",t.fillText("user-trace:canvas,🔍<canvas>",4,45),e.toDataURL().slice(-50)}catch{return"nocanvas"}}function df(){try{const e=document.createElement("canvas"),t=e.getContext("webgl")||e.getContext("experimental-webgl");if(!t)return"nowebgl";const n=t.getExtension("WEBGL_debug_renderer_info"),r=n?t.getParameter(n.UNMASKED_VENDOR_WEBGL):t.getParameter(t.VENDOR);return`${r}::${n?t.getParameter(n.UNMASKED_RENDERER_WEBGL):t.getParameter(t.RENDERER)}`}catch{return"nowebgl"}}function pf(){const e=["Arial","Courier New","Georgia","Times New Roman","Verdana","Helvetica","Comic Sans MS","Impact","Tahoma","Trebuchet MS","Palatino Linotype","Lucida Console","Lucida Sans Unicode","MS Sans Serif","MS Serif","Symbol","Wingdings","Franklin Gothic Medium","Book Antiqua","Garamond","Calibri","Cambria","Consolas","Candara","Optima","Segoe UI","Gill Sans","Century Gothic","Futura"];try{const t=document.createElement("canvas").getContext("2d"),n="monospace",r="mmmmmmmmmmlli",o="72px";t.font=`${o} ${n}`;const a=t.measureText(r).width;return e.filter(e=>(t.font=`${o} '${e}', ${n}`,t.measureText(r).width!==a)).join(",")}catch{return""}}function gf(){try{return window.OfflineAudioContext||window.webkitOfflineAudioContext?"audio-supported":"noaudio"}catch{return"noaudio"}}var ff={generateFingerprint:function(){const e=function(){const e=navigator||{},t=screen||{};return{userAgent:e.userAgent||"",language:e.language||"",languages:(e.languages||[]).join(","),platform:e.platform||"",hardwareConcurrency:e.hardwareConcurrency||0,deviceMemory:e.deviceMemory||0,maxTouchPoints:e.maxTouchPoints||0,cookieEnabled:e.cookieEnabled?"1":"0",doNotTrack:e.doNotTrack||"unknown",screenWidth:t.width||0,screenHeight:t.height||0,colorDepth:t.colorDepth||0,pixelDepth:t.pixelDepth||0,devicePixelRatio:"undefined"!=typeof devicePixelRatio?devicePixelRatio:1,timezoneOffset:(new Date).getTimezoneOffset(),timezone:Intl.DateTimeFormat().resolvedOptions().timeZone||"",sessionStorage:sf("sessionStorage"),localStorage:sf("localStorage"),indexedDB:"undefined"!=typeof indexedDB?"1":"0",cpuClass:e.cpuClass||"unknown",oscpu:e.oscpu||"unknown",vendor:e.vendor||"",vendorSub:e.vendorSub||"",productSub:e.productSub||"",plugins:lf(),mimeTypes:cf(),canvas:uf(),webgl:df(),fonts:pf(),audioContext:gf()}}(),t=function(e){let t=5381;for(let n=0;n<e.length;n++)t=(t<<5)+t^e.charCodeAt(n),t&=t;return(t>>>0).toString(16).padStart(8,"0")}(Object.values(e).join("|||")),n=["nocanvas"!==e.canvas,"nowebgl"!==e.webgl&&""!==e.webgl,""!==e.fonts,""!==e.plugins,e.hardwareConcurrency>0,""!==e.timezone];return{id:t,signals:e,confidence:Math.round(n.filter(Boolean).length/n.length*100)}}};const hf=[{url:"https://api.ipify.org?format=json",parse:e=>e.ip},{url:"https://api64.ipify.org?format=json",parse:e=>e.ip},{url:"https://api.my-ip.io/v2/ip.json",parse:e=>e.ip},{url:"https://ipapi.co/json/",parse:e=>e.ip}];async function mf(e,t=4e3){const n=new AbortController,r=setTimeout(()=>n.abort(),t);try{const t=await fetch(e,{signal:n.signal});if(!t.ok)throw new Error(`HTTP ${t.status}`);return await t.json()}finally{clearTimeout(r)}}function bf(e){return/^(\d{1,3}\.){3}\d{1,3}$/.test(e)||/^[0-9a-f:]{2,39}$/i.test(e)}var yf={detectIP:async function(){for(const e of hf)try{const t=await mf(e.url),n=e.parse(t);if(n&&bf(n))return{ip:n,source:new URL(e.url).hostname}}catch{}return null},getIPVersion:function(e){return e?/^(\d{1,3}\.){3}\d{1,3}$/.test(e)?"v4":/^[0-9a-f:]{2,39}$/i.test(e)?"v6":"unknown":"unknown"}};let vf={apiKeys:{},preferredProvider:null,timeoutMs:5e3};function wf(e={}){const t=[e.ipinfo&&{name:"ipinfo.io",tier:"free-with-key",freeLimit:"50,000 req/month",signup:"https://ipinfo.io/signup",buildUrl:t=>`https://ipinfo.io/${t}/json?token=${e.ipinfo}`,parse:e=>{if(e.error)throw new Error(e.error.message||"Failed");const[t,n]=(e.loc||"0,0").split(",").map(Number);return{ip:e.ip||"",country:e.country||"",countryCode:e.country||"",region:e.region||"",regionCode:"",city:e.city||"",zip:e.postal||"",latitude:t,longitude:n,timezone:e.timezone||"",isp:e.org||"",org:e.org||"",proxy:!1,hosting:!1}}},e.ipgeolocation&&{name:"ipgeolocation.io",tier:"free-with-key",freeLimit:"1,000 req/day",signup:"https://ipgeolocation.io/signup.html",buildUrl:t=>`https://api.ipgeolocation.io/ipgeo?apiKey=${e.ipgeolocation}&ip=${t}`,parse:e=>{if(e.message)throw new Error(e.message);return{ip:e.ip||"",country:e.country_name||"",countryCode:e.country_code2||"",region:e.state_prov||"",regionCode:e.state_code||"",city:e.city||"",zip:e.zipcode||"",latitude:parseFloat(e.latitude)||0,longitude:parseFloat(e.longitude)||0,timezone:e.time_zone?.name||"",isp:e.isp||"",org:e.organization||"",proxy:e.security?.is_proxy||!1,hosting:e.security?.is_hosting||!1}}},e.abstractapi&&{name:"abstractapi.com",tier:"free-with-key",freeLimit:"20,000 req/month",signup:"https://app.abstractapi.com/users/signup?target=/api/ip-geolocation",buildUrl:t=>`https://ipgeolocation.abstractapi.com/v1/?api_key=${e.abstractapi}&ip_address=${t}`,parse:e=>{if(e.error)throw new Error(e.error.message||"Failed");return{ip:e.ip_address||"",country:e.country||"",countryCode:e.country_code||"",region:e.region||"",regionCode:e.region_iso_code||"",city:e.city||"",zip:e.postal_code||"",latitude:e.latitude||0,longitude:e.longitude||0,timezone:e.timezone?.name||"",isp:e.connection?.isp_name||"",org:e.connection?.org_name||"",proxy:e.security?.is_vpn||!1,hosting:e.security?.is_hosting||!1}}},e.ip2location&&{name:"ip2location.io",tier:"free-with-key",freeLimit:"30,000 req/month",signup:"https://www.ip2location.io/sign-up",buildUrl:t=>`https://api.ip2location.io/?key=${e.ip2location}&ip=${t}&format=json`,parse:e=>{if(e.error)throw new Error(e.error.error_message||"Failed");return{ip:e.ip||"",country:e.country_name||"",countryCode:e.country_code||"",region:e.region_name||"",regionCode:"",city:e.city_name||"",zip:e.zip_code||"",latitude:e.latitude||0,longitude:e.longitude||0,timezone:e.time_zone||"",isp:e.isp||"",org:e.domain||"",proxy:e.is_proxy||!1,hosting:!1}}},e.ipstack&&{name:"ipstack.com",tier:"free-with-key",freeLimit:"100 req/month",signup:"https://ipstack.com/product",buildUrl:t=>`https://api.ipstack.com/${t}?access_key=${e.ipstack}`,parse:e=>{if(e.error)throw new Error(e.error.info||"Failed");return{ip:e.ip||"",country:e.country_name||"",countryCode:e.country_code||"",region:e.region_name||"",regionCode:e.region_code||"",city:e.city||"",zip:e.zip||"",latitude:e.latitude||0,longitude:e.longitude||0,timezone:e.time_zone?.id||"",isp:e.connection?.isp||"",org:"",proxy:!1,hosting:!1}}}].filter(Boolean),n=[{name:"ip-api.com",tier:"free",freeLimit:"45 req/min (no key needed)",buildUrl:e=>`https://ip-api.com/json/${e}?fields=status,message,country,countryCode,region,regionName,city,zip,lat,lon,timezone,isp,org,proxy,hosting,query`,parse:e=>{if("success"!==e.status)throw new Error(e.message||"Failed");return{ip:e.query||"",country:e.country||"",countryCode:e.countryCode||"",region:e.regionName||"",regionCode:e.region||"",city:e.city||"",zip:e.zip||"",latitude:e.lat||0,longitude:e.lon||0,timezone:e.timezone||"",isp:e.isp||"",org:e.org||"",proxy:e.proxy||!1,hosting:e.hosting||!1}}},{name:"ipwho.is",tier:"free",freeLimit:"unlimited (fair use, no key needed)",buildUrl:e=>`https://ipwho.is/${e}`,parse:e=>{if(!e.success)throw new Error(e.message||"Failed");return{ip:e.ip||"",country:e.country||"",countryCode:e.country_code||"",region:e.region||"",regionCode:e.region_code||"",city:e.city||"",zip:e.postal||"",latitude:e.latitude||0,longitude:e.longitude||0,timezone:e.timezone?.id||"",isp:e.connection?.isp||"",org:e.connection?.org||"",proxy:!1,hosting:!1}}},{name:"ipapi.co",tier:"free",freeLimit:"1,000 req/day (no key needed)",buildUrl:e=>`https://ipapi.co/${e}/json/`,parse:e=>{if(e.error)throw new Error(e.reason||"Failed");return{ip:e.ip||"",country:e.country_name||"",countryCode:e.country_code||"",region:e.region||"",regionCode:e.region_code||"",city:e.city||"",zip:e.postal||"",latitude:e.latitude||0,longitude:e.longitude||0,timezone:e.timezone||"",isp:e.org||"",org:e.org||"",proxy:!1,hosting:!1}}},{name:"freeipapi.com",tier:"free",freeLimit:"unlimited (fair use, no key needed)",buildUrl:e=>`https://freeipapi.com/api/json/${e}`,parse:e=>({ip:e.ipAddress||"",country:e.countryName||"",countryCode:e.countryCode||"",region:e.regionName||"",regionCode:e.regionCode||"",city:e.cityName||"",zip:e.zipCode||"",latitude:e.latitude||0,longitude:e.longitude||0,timezone:e.timeZone||"",isp:"",org:"",proxy:!1,hosting:!1})}],r=["freeipapi.com","ipwho.is","ipapi.co","ip-api.com"];return n.sort((e,t)=>r.indexOf(e.name)-r.indexOf(t.name)),[...t,...n]}async function kf(e,t=5e3){const n=new AbortController,r=setTimeout(()=>n.abort(),t);try{const t=await fetch(e,{signal:n.signal});if(!t.ok)throw new Error(`HTTP ${t.status}`);return await t.json()}finally{clearTimeout(r)}}const xf={enableHighAccuracy:!0,timeout:8e3,maximumAge:3e5};function Sf(e={}){return new Promise(t=>"undefined"!=typeof navigator&&navigator.geolocation?"undefined"!=typeof window&&!1===window.isSecureContext?t(null):void navigator.geolocation.getCurrentPosition(e=>t({latitude:e.coords.latitude,longitude:e.coords.longitude,accuracy:e.coords.accuracy}),()=>t(null),{...xf,...e}):t(null))}async function Cf(e,t,n={}){if("number"!=typeof e||"number"!=typeof t)return null;const r=n.timeoutMs||vf.timeoutMs||5e3,o=`https://api.bigdatacloud.net/data/reverse-geocode-client?latitude=${e}&longitude=${t}&localityLanguage=${n.localityLanguage||"en"}`;try{const n=await kf(o,r),a=n.city||n.locality||"";return a||n.countryName?{city:a,region:n.principalSubdivision||"",regionCode:(n.principalSubdivisionCode||"").split("-").pop()||"",country:n.countryName||"",countryCode:n.countryCode||"",latitude:e,longitude:t}:null}catch{return null}}var Mf={configureGeo:function(e={}){e.apiKeys&&(vf.apiKeys={...vf.apiKeys,...e.apiKeys}),void 0!==e.preferredProvider&&(vf.preferredProvider=e.preferredProvider),void 0!==e.timeoutMs&&(vf.timeoutMs=e.timeoutMs)},resolveLocation:async function(e,t={}){const n={apiKeys:{...vf.apiKeys,...t.apiKeys||{}},preferredProvider:t.preferredProvider||vf.preferredProvider,timeoutMs:t.timeoutMs||vf.timeoutMs};let r=wf(n.apiKeys);if(n.preferredProvider){const e=r.findIndex(e=>e.name===n.preferredProvider);if(e>0){const[t]=r.splice(e,1);r.unshift(t)}}for(const t of r)try{const r=await kf(t.buildUrl(e),n.timeoutMs);return{...t.parse(r),source:t.name,tier:t.tier}}catch{}return null},listProviders:function(e={}){return wf({...vf.apiKeys,...e}).map(({name:e,tier:t,freeLimit:n,signup:r})=>({name:e,tier:t,freeLimit:n,signup:r||"—"}))},getBrowserGeolocation:Sf,getGeolocationPermission:async function(){try{if("undefined"==typeof navigator||!navigator.permissions||!navigator.permissions.query)return"unsupported";return(await navigator.permissions.query({name:"geolocation"})).state}catch{return"unsupported"}},reverseGeocode:Cf,getBrowserLocation:async function(e={}){const t=await Sf(e);if(!t)return null;const n=await Cf(t.latitude,t.longitude,e),r=!(!n||!n.city&&!n.country);return{...r?n:{},latitude:t.latitude,longitude:t.longitude,accuracy:t.accuracy,...r?{source:"gps"}:{}}},toMapsUrl:function(e,t){return`https://www.google.com/maps?q=${e},${t}`}};const Pf="__ut_sid__",zf="__ut_uid__",Ef="__ut_meta__";function jf(){const e=new Uint8Array(16);crypto.getRandomValues(e),e[6]=15&e[6]|64,e[8]=63&e[8]|128;const t=Array.from(e).map(e=>e.toString(16).padStart(2,"0")).join("");return[t.slice(0,8),t.slice(8,12),t.slice(12,16),t.slice(16,20),t.slice(20)].join("-")}function Tf(e,t){try{return e.getItem(t)}catch{return null}}function Nf(e,t,n){try{return e.setItem(t,n),!0}catch{return!1}}var Ff={getOrCreateUserID:function(){let e=Tf(localStorage,zf),t=!1;return e||(e=jf(),t=!0,Nf(localStorage,zf,e)),{uid:e,isNew:t}},getOrCreateSessionID:function(){let e=Tf(sessionStorage,Pf),t=!1;return e||(e=jf(),t=!0,Nf(sessionStorage,Pf,e)),{sid:e,isNew:t}},saveSessionMeta:function(e){try{const t=JSON.stringify({...e,savedAt:(new Date).toISOString()});Nf(localStorage,Ef,t)}catch{}},loadSessionMeta:function(){try{const e=Tf(localStorage,Ef);return e?JSON.parse(e):null}catch{return null}},clearSession:function(){try{localStorage.removeItem(zf)}catch{}try{localStorage.removeItem(Ef)}catch{}try{sessionStorage.removeItem(Pf)}catch{}},getBrowserContext:function(){return{userAgent:navigator.userAgent,platform:navigator.platform||"unknown",language:navigator.language||"unknown",timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,screenRes:`${screen.width}x${screen.height}`,viewportRes:`${window.innerWidth}x${window.innerHeight}`,colorDepth:screen.colorDepth,touchSupport:navigator.maxTouchPoints>0,cookieEnabled:navigator.cookieEnabled,referrer:document.referrer||null,currentUrl:window.location.href,loadedAt:(new Date).toISOString()}}};const{generateFingerprint:Lf}=ff,{detectIP:Rf,getIPVersion:Af}=yf,{configureGeo:_f,resolveLocation:If,listProviders:Bf,getBrowserGeolocation:Df,getGeolocationPermission:Of,reverseGeocode:$f,getBrowserLocation:Vf,toMapsUrl:Uf}=Mf,{getOrCreateUserID:Hf,getOrCreateSessionID:Wf,saveSessionMeta:qf,loadSessionMeta:Qf,clearSession:Yf,getBrowserContext:Kf}=Ff;af.exports=class{constructor(e={}){this._options={onReady:e.onReady||null,onError:e.onError||null,geoFromBrowser:void 0===e.geoFromBrowser||e.geoFromBrowser,geoApiKeys:e.geoApiKeys||null,geoOptions:e.geoOptions||null,cache:!1!==e.cache,maxAgeMs:e.maxAgeMs||3e5,autoInit:e.autoInit||!1,webhookUrl:e.webhookUrl||null},this.profile=null,this._ready=!1,this._options.autoInit&&this.init().catch(()=>{})}async init(){if(this._options.cache){const e=Qf();if(e&&e.savedAt){if(Date.now()-new Date(e.savedAt).getTime()<this._options.maxAgeMs)return this.profile=e,this._ready=!0,this._options.onReady&&this._options.onReady(this.profile),this.profile}}try{const{uid:e,isNew:t}=Hf(),{sid:n,isNew:r}=Wf(),{id:o,signals:a,confidence:i}=Lf(),s=this._options.geoApiKeys?{apiKeys:this._options.geoApiKeys}:{},[l,c]=await Promise.all([(async()=>{const e=await Rf(),t=e?.ip||"unknown",n="unknown"!==t?await If(t,s):null;return{ip:t,ipVersion:e?Af(t):"unknown",geo:n}})(),this._collectBrowserLocation()]),{ip:u,ipVersion:d}=l;let p=l.geo,g=null;c&&(g={latitude:c.latitude,longitude:c.longitude,accuracy:c.accuracy},"gps"===c.source&&(p={...p||{},...c}));const f=Kf();return this.profile={uid:e,sid:n,isNewUser:t,isNewSession:r,fingerprintId:o,fingerprintConfidence:i,ip:u,ipVersion:d,geo:p||null,browserGeo:g||null,browser:f,raw:a,createdAt:(new Date).toISOString(),...p?{mapsUrl:Uf(p.latitude,p.longitude)}:{}},qf(this.profile),this._options.webhookUrl&&this._sendToWebhook(this.profile),this._ready=!0,this._options.onReady&&this._options.onReady(this.profile),this.profile}catch(e){throw this._options.onError&&this._options.onError(e),e}}async _collectBrowserLocation(){const e=this._options.geoFromBrowser;if(!e)return null;if("auto"===e){if("granted"!==await Of())return null}return Vf(this._options.geoOptions||{})}async captureBrowserLocation(e={}){const t=await Vf({...this._options.geoOptions||{},...e});return t&&this.profile?(this.profile.browserGeo={latitude:t.latitude,longitude:t.longitude,accuracy:t.accuracy},this.profile.mapsUrl=Uf(t.latitude,t.longitude),"gps"===t.source&&(this.profile.geo={...this.profile.geo||{},...t}),qf(this.profile),this._options.onReady&&this._options.onReady(this.profile),this.profile):this.profile}getProfile(){return this.profile}isKnownUser(e){return this.profile?.uid===e}async refresh(){return Yf(),this.profile=null,this._ready=!1,this.init()}clear(){Yf(),this.profile=null,this._ready=!1}getSummary(){if(!this.profile)return null;const{uid:e,sid:t,fingerprintId:n,ip:r,geo:o,browser:a,createdAt:i}=this.profile;return{uid:e,sid:t,fingerprintId:n,ip:r,country:o?.country||"unknown",city:o?.city||"unknown",isp:o?.isp||"unknown",proxy:o?.proxy||!1,timezone:o?.timezone||a.timezone,userAgent:a.userAgent,language:a.language,createdAt:i}}async _sendToWebhook(e){try{await fetch(this._options.webhookUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}catch{}}};var Gf=af.exports.generateFingerprint=Lf,Xf=af.exports.detectIP=Rf,Jf=af.exports.configureGeo=_f,Zf=af.exports.resolveLocation=If,eh=af.exports.listProviders=Bf,th=af.exports.getBrowserGeolocation=Df,nh=af.exports.getGeolocationPermission=Of,rh=af.exports.reverseGeocode=$f,oh=af.exports.getBrowserLocation=Vf,ah=af.exports.getOrCreateUserID=Hf,ih=af.exports.getOrCreateSessionID=Wf,sh=af.exports.clearSession=Yf,lh=af.exports.getBrowserContext=Kf,ch=af.exports,uh=e({__proto__:null,clearSession:sh,configureGeo:Jf,default:ch,detectIP:Xf,generateFingerprint:Gf,getBrowserContext:lh,getBrowserGeolocation:th,getBrowserLocation:oh,getGeolocationPermission:nh,getOrCreateSessionID:ih,getOrCreateUserID:ah,listProviders:eh,resolveLocation:Zf,reverseGeocode:rh},[ch]),dh={exports:{}};!function(e){!function(){function t(e,t,n){return e.call.apply(e.bind,arguments)}function n(e,t,n){if(!e)throw Error();if(2<arguments.length){var r=Array.prototype.slice.call(arguments,2);return function(){var n=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(n,r),e.apply(t,n)}}return function(){return e.apply(t,arguments)}}function r(e,o,a){return(r=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?t:n).apply(null,arguments)}var o=Date.now||function(){return+new Date};function a(e,t){this.a=e,this.o=t||e,this.c=this.o.document}var i=!!window.FontFace;function s(e,t,n,r){if(t=e.c.createElement(t),n)for(var o in n)n.hasOwnProperty(o)&&("style"==o?t.style.cssText=n[o]:t.setAttribute(o,n[o]));return r&&t.appendChild(e.c.createTextNode(r)),t}function l(e,t,n){(e=e.c.getElementsByTagName(t)[0])||(e=document.documentElement),e.insertBefore(n,e.lastChild)}function c(e){e.parentNode&&e.parentNode.removeChild(e)}function u(e,t,n){t=t||[],n=n||[];for(var r=e.className.split(/\s+/),o=0;o<t.length;o+=1){for(var a=!1,i=0;i<r.length;i+=1)if(t[o]===r[i]){a=!0;break}a||r.push(t[o])}for(t=[],o=0;o<r.length;o+=1){for(a=!1,i=0;i<n.length;i+=1)if(r[o]===n[i]){a=!0;break}a||t.push(r[o])}e.className=t.join(" ").replace(/\s+/g," ").replace(/^\s+|\s+$/,"")}function d(e,t){for(var n=e.className.split(/\s+/),r=0,o=n.length;r<o;r++)if(n[r]==t)return!0;return!1}function p(e,t,n){function r(){u&&o&&a&&(u(c),u=null)}t=s(e,"link",{rel:"stylesheet",href:t,media:"all"});var o=!1,a=!0,c=null,u=n||null;i?(t.onload=function(){o=!0,r()},t.onerror=function(){o=!0,c=Error("Stylesheet failed to load"),r()}):setTimeout(function(){o=!0,r()},0),l(e,"head",t)}function g(e,t,n,r){var o=e.c.getElementsByTagName("head")[0];if(o){var a=s(e,"script",{src:t}),i=!1;return a.onload=a.onreadystatechange=function(){i||this.readyState&&"loaded"!=this.readyState&&"complete"!=this.readyState||(i=!0,n&&n(null),a.onload=a.onreadystatechange=null,"HEAD"==a.parentNode.tagName&&o.removeChild(a))},o.appendChild(a),setTimeout(function(){i||(i=!0,n&&n(Error("Script load timeout")))},r||5e3),a}return null}function f(){this.a=0,this.c=null}function h(e){return e.a++,function(){e.a--,b(e)}}function m(e,t){e.c=t,b(e)}function b(e){0==e.a&&e.c&&(e.c(),e.c=null)}function y(e){this.a=e||"-"}function v(e,t){this.c=e,this.f=4,this.a="n";var n=(t||"n4").match(/^([nio])([1-9])$/i);n&&(this.a=n[1],this.f=parseInt(n[2],10))}function w(e){var t=[];e=e.split(/,\s*/);for(var n=0;n<e.length;n++){var r=e[n].replace(/['"]/g,"");-1!=r.indexOf(" ")||/^\d/.test(r)?t.push("'"+r+"'"):t.push(r)}return t.join(",")}function k(e){return e.a+e.f}function x(e){var t="normal";return"o"===e.a?t="oblique":"i"===e.a&&(t="italic"),t}function S(e){var t=4,n="n",r=null;return e&&((r=e.match(/(normal|oblique|italic)/i))&&r[1]&&(n=r[1].substr(0,1).toLowerCase()),(r=e.match(/([1-9]00|normal|bold)/i))&&r[1]&&(/bold/i.test(r[1])?t=7:/[1-9]00/.test(r[1])&&(t=parseInt(r[1].substr(0,1),10)))),n+t}function C(e,t){this.c=e,this.f=e.o.document.documentElement,this.h=t,this.a=new y("-"),this.j=!1!==t.events,this.g=!1!==t.classes}function M(e){if(e.g){var t=d(e.f,e.a.c("wf","active")),n=[],r=[e.a.c("wf","loading")];t||n.push(e.a.c("wf","inactive")),u(e.f,n,r)}P(e,"inactive")}function P(e,t,n){e.j&&e.h[t]&&(n?e.h[t](n.c,k(n)):e.h[t]())}function z(){this.c={}}function E(e,t){this.c=e,this.f=t,this.a=s(this.c,"span",{"aria-hidden":"true"},this.f)}function j(e){l(e.c,"body",e.a)}function T(e){return"display:block;position:absolute;top:-9999px;left:-9999px;font-size:300px;width:auto;height:auto;line-height:normal;margin:0;padding:0;font-variant:normal;white-space:nowrap;font-family:"+w(e.c)+";font-style:"+x(e)+";font-weight:"+e.f+"00;"}function N(e,t,n,r,o,a){this.g=e,this.j=t,this.a=r,this.c=n,this.f=o||3e3,this.h=a||void 0}function F(e,t,n,r,o,a,i){this.v=e,this.B=t,this.c=n,this.a=r,this.s=i||"BESbswy",this.f={},this.w=o||3e3,this.u=a||null,this.m=this.j=this.h=this.g=null,this.g=new E(this.c,this.s),this.h=new E(this.c,this.s),this.j=new E(this.c,this.s),this.m=new E(this.c,this.s),e=T(e=new v(this.a.c+",serif",k(this.a))),this.g.a.style.cssText=e,e=T(e=new v(this.a.c+",sans-serif",k(this.a))),this.h.a.style.cssText=e,e=T(e=new v("serif",k(this.a))),this.j.a.style.cssText=e,e=T(e=new v("sans-serif",k(this.a))),this.m.a.style.cssText=e,j(this.g),j(this.h),j(this.j),j(this.m)}y.prototype.c=function(e){for(var t=[],n=0;n<arguments.length;n++)t.push(arguments[n].replace(/[\W_]+/g,"").toLowerCase());return t.join(this.a)},N.prototype.start=function(){var e=this.c.o.document,t=this,n=o(),r=new Promise(function(r,a){!function i(){o()-n>=t.f?a():e.fonts.load(function(e){return x(e)+" "+e.f+"00 300px "+w(e.c)}(t.a),t.h).then(function(e){1<=e.length?r():setTimeout(i,25)},function(){a()})}()}),a=null,i=new Promise(function(e,n){a=setTimeout(n,t.f)});Promise.race([i,r]).then(function(){a&&(clearTimeout(a),a=null),t.g(t.a)},function(){t.j(t.a)})};var L={D:"serif",C:"sans-serif"},R=null;function A(){if(null===R){var e=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent);R=!!e&&(536>parseInt(e[1],10)||536===parseInt(e[1],10)&&11>=parseInt(e[2],10))}return R}function _(e,t,n){for(var r in L)if(L.hasOwnProperty(r)&&t===e.f[L[r]]&&n===e.f[L[r]])return!0;return!1}function I(e){var t,n=e.g.a.offsetWidth,a=e.h.a.offsetWidth;(t=n===e.f.serif&&a===e.f["sans-serif"])||(t=A()&&_(e,n,a)),t?o()-e.A>=e.w?A()&&_(e,n,a)&&(null===e.u||e.u.hasOwnProperty(e.a.c))?B(e,e.v):B(e,e.B):function(e){setTimeout(r(function(){I(this)},e),50)}(e):B(e,e.v)}function B(e,t){setTimeout(r(function(){c(this.g.a),c(this.h.a),c(this.j.a),c(this.m.a),t(this.a)},e),0)}function D(e,t,n){this.c=e,this.a=t,this.f=0,this.m=this.j=!1,this.s=n}F.prototype.start=function(){this.f.serif=this.j.a.offsetWidth,this.f["sans-serif"]=this.m.a.offsetWidth,this.A=o(),I(this)};var O=null;function $(e){0==--e.f&&e.j&&(e.m?((e=e.a).g&&u(e.f,[e.a.c("wf","active")],[e.a.c("wf","loading"),e.a.c("wf","inactive")]),P(e,"active")):M(e.a))}function V(e){this.j=e,this.a=new z,this.h=0,this.f=this.g=!0}function U(e,t,n,o,a){var i=0==--e.h;(e.f||e.g)&&setTimeout(function(){var e=a||null,s=o||{};if(0===n.length&&i)M(t.a);else{t.f+=n.length,i&&(t.j=i);var l,c=[];for(l=0;l<n.length;l++){var d=n[l],p=s[d.c],g=t.a,f=d;if(g.g&&u(g.f,[g.a.c("wf",f.c,k(f).toString(),"loading")]),P(g,"fontloading",f),g=null,null===O)if(window.FontFace){f=/Gecko.*Firefox\/(\d+)/.exec(window.navigator.userAgent);var h=/OS X.*Version\/10\..*Safari/.exec(window.navigator.userAgent)&&/Apple/.exec(window.navigator.vendor);O=f?42<parseInt(f[1],10):!h}else O=!1;g=O?new N(r(t.g,t),r(t.h,t),t.c,d,t.s,p):new F(r(t.g,t),r(t.h,t),t.c,d,t.s,e,p),c.push(g)}for(l=0;l<c.length;l++)c[l].start()}},0)}function H(e,t){this.c=e,this.a=t}function W(e,t){this.c=e,this.a=t}function q(e,t){this.c=e||Q,this.a=[],this.f=[],this.g=t||""}D.prototype.g=function(e){var t=this.a;t.g&&u(t.f,[t.a.c("wf",e.c,k(e).toString(),"active")],[t.a.c("wf",e.c,k(e).toString(),"loading"),t.a.c("wf",e.c,k(e).toString(),"inactive")]),P(t,"fontactive",e),this.m=!0,$(this)},D.prototype.h=function(e){var t=this.a;if(t.g){var n=d(t.f,t.a.c("wf",e.c,k(e).toString(),"active")),r=[],o=[t.a.c("wf",e.c,k(e).toString(),"loading")];n||r.push(t.a.c("wf",e.c,k(e).toString(),"inactive")),u(t.f,r,o)}P(t,"fontinactive",e),$(this)},V.prototype.load=function(e){this.c=new a(this.j,e.context||this.j),this.g=!1!==e.events,this.f=!1!==e.classes,function(e,t,n){var r=[],o=n.timeout;!function(e){e.g&&u(e.f,[e.a.c("wf","loading")]),P(e,"loading")}(t);r=function(e,t,n){var r,o=[];for(r in t)if(t.hasOwnProperty(r)){var a=e.c[r];a&&o.push(a(t[r],n))}return o}(e.a,n,e.c);var a=new D(e.c,t,o);for(e.h=r.length,t=0,n=r.length;t<n;t++)r[t].load(function(t,n,r){U(e,a,t,n,r)})}(this,new C(this.c,e),e)},H.prototype.load=function(e){function t(){if(a["__mti_fntLst"+r]){var n,o=a["__mti_fntLst"+r](),i=[];if(o)for(var s=0;s<o.length;s++){var l=o[s].fontfamily;null!=o[s].fontStyle&&null!=o[s].fontWeight?(n=o[s].fontStyle+o[s].fontWeight,i.push(new v(l,n))):i.push(new v(l))}e(i)}else setTimeout(function(){t()},50)}var n=this,r=n.a.projectId,o=n.a.version;if(r){var a=n.c.o;g(this.c,(n.a.api||"https://fast.fonts.net/jsapi")+"/"+r+".js"+(o?"?v="+o:""),function(o){o?e([]):(a["__MonotypeConfiguration__"+r]=function(){return n.a},t())}).id="__MonotypeAPIScript__"+r}else e([])},W.prototype.load=function(e){var t,n,r=this.a.urls||[],o=this.a.families||[],a=this.a.testStrings||{},i=new f;for(t=0,n=r.length;t<n;t++)p(this.c,r[t],h(i));var s=[];for(t=0,n=o.length;t<n;t++)if((r=o[t].split(":"))[1])for(var l=r[1].split(","),c=0;c<l.length;c+=1)s.push(new v(r[0],l[c]));else s.push(new v(r[0]));m(i,function(){e(s,a)})};var Q="https://fonts.googleapis.com/css";function Y(e){this.f=e,this.a=[],this.c={}}var K={latin:"BESbswy","latin-ext":"çöüğş",cyrillic:"йяЖ",greek:"αβΣ",khmer:"កខគ",Hanuman:"កខគ"},G={thin:"1",extralight:"2","extra-light":"2",ultralight:"2","ultra-light":"2",light:"3",regular:"4",book:"4",medium:"5","semi-bold":"6",semibold:"6","demi-bold":"6",demibold:"6",bold:"7","extra-bold":"8",extrabold:"8","ultra-bold":"8",ultrabold:"8",black:"9",heavy:"9",l:"3",r:"4",b:"7"},X={i:"i",italic:"i",n:"n",normal:"n"},J=/^(thin|(?:(?:extra|ultra)-?)?light|regular|book|medium|(?:(?:semi|demi|extra|ultra)-?)?bold|black|heavy|l|r|b|[1-9]00)?(n|i|normal|italic)?$/;function Z(e,t){this.c=e,this.a=t}var ee={Arimo:!0,Cousine:!0,Tinos:!0};function te(e,t){this.c=e,this.a=t}function ne(e,t){this.c=e,this.f=t,this.a=[]}Z.prototype.load=function(e){var t=new f,n=this.c,r=new q(this.a.api,this.a.text),o=this.a.families;!function(e,t){for(var n=t.length,r=0;r<n;r++){var o=t[r].split(":");3==o.length&&e.f.push(o.pop());var a="";2==o.length&&""!=o[1]&&(a=":"),e.a.push(o.join(a))}}(r,o);var a=new Y(o);!function(e){for(var t=e.f.length,n=0;n<t;n++){var r=e.f[n].split(":"),o=r[0].replace(/\+/g," "),a=["n4"];if(2<=r.length){var i;if(i=[],s=r[1])for(var s,l=(s=s.split(",")).length,c=0;c<l;c++){var u;if((u=s[c]).match(/^[\w-]+$/))if(null==(d=J.exec(u.toLowerCase())))u="";else{if(u=null==(u=d[2])||""==u?"n":X[u],null==(d=d[1])||""==d)d="4";else var d=G[d]||(isNaN(d)?"4":d.substr(0,1));u=[u,d].join("")}else u="";u&&i.push(u)}0<i.length&&(a=i),3==r.length&&(i=[],0<(r=(r=r[2])?r.split(","):i).length&&(r=K[r[0]])&&(e.c[o]=r))}for(e.c[o]||(r=K[o])&&(e.c[o]=r),r=0;r<a.length;r+=1)e.a.push(new v(o,a[r]))}}(a),p(n,function(e){if(0==e.a.length)throw Error("No fonts to load!");if(-1!=e.c.indexOf("kit="))return e.c;for(var t=e.a.length,n=[],r=0;r<t;r++)n.push(e.a[r].replace(/ /g,"+"));return t=e.c+"?family="+n.join("%7C"),0<e.f.length&&(t+="&subset="+e.f.join(",")),0<e.g.length&&(t+="&text="+encodeURIComponent(e.g)),t}(r),h(t)),m(t,function(){e(a.a,a.c,ee)})},te.prototype.load=function(e){var t=this.a.id,n=this.c.o;t?g(this.c,(this.a.api||"https://use.typekit.net")+"/"+t+".js",function(t){if(t)e([]);else if(n.Typekit&&n.Typekit.config&&n.Typekit.config.fn){t=n.Typekit.config.fn;for(var r=[],o=0;o<t.length;o+=2)for(var a=t[o],i=t[o+1],s=0;s<i.length;s++)r.push(new v(a,i[s]));try{n.Typekit.load({events:!1,classes:!1,async:!0})}catch(e){}e(r)}},2e3):e([])},ne.prototype.load=function(e){var t=this.f.id,n=this.c.o,r=this;t?(n.__webfontfontdeckmodule__||(n.__webfontfontdeckmodule__={}),n.__webfontfontdeckmodule__[t]=function(t,n){for(var o=0,a=n.fonts.length;o<a;++o){var i=n.fonts[o];r.a.push(new v(i.name,S("font-weight:"+i.weight+";font-style:"+i.style)))}e(r.a)},g(this.c,(this.f.api||"https://f.fontdeck.com/s/css/js/")+function(e){return e.o.location.hostname||e.a.location.hostname}(this.c)+"/"+t+".js",function(t){t&&e([])})):e([])};var re=new V(window);re.a.c.custom=function(e,t){return new W(t,e)},re.a.c.fontdeck=function(e,t){return new ne(t,e)},re.a.c.monotype=function(e,t){return new H(t,e)},re.a.c.typekit=function(e,t){return new te(t,e)},re.a.c.google=function(e,t){return new Z(t,e)};var oe={load:r(re.load,re)};e.exports?e.exports=oe:(window.WebFont=oe,window.WebFontConfig&&re.load(window.WebFontConfig))}()}(dh);var ph=dh.exports,gh=e({__proto__:null,default:ph},[ph])}();
|
|
39
|
+
*/let Rp=null;function Ap(e){I.useEffect(()=>{if(!Tp||!e)return;const t=e.split(",")[0]?.trim();if(!t||Lp.has(t))return;if((e=>{const t=e.trim().toLowerCase();return!t||!!Np.has(t)||Fp.some(e=>t.includes(e))})(t))return void Lp.add(t);let n=!0;return(async()=>{try{Rp||(Rp=Promise.resolve().then(function(){return wh}));const e=await Rp,r=e&&"default"in e?e.default:e,o=(e=>e.trim().replace(/\s+/g,"+"))(t);r.load({google:{families:[`${o}:300,400,500,600,700`]},fontactive:e=>{n&&Lp.add(e)},fontinactive:e=>{n&&Lp.add(e)}})}catch(e){}})(),()=>{n=!1}},[e])}const _p="__eshalChatWidgetCitationContext",Ip="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:void 0,Bp=Ip?Ip[_p]||(Ip[_p]=I.createContext(null)):I.createContext(null);function Dp(e,t){return"string"!=typeof e||""===e?"":/^https?:\/\//i.test(e)?e:t?`${String(t).replace(/\/$/,"")}${e.startsWith("/")?"":"/"}${e}`:e}const Op="chat-widget-markdown-chunk.min.js",$p="undefined"!=typeof document?document.currentScript?.src:void 0;let Vp=null;function Up(){return"undefined"!=typeof window&&window.__eshalChatWidgetChunks?.MarkdownRenderer?Promise.resolve({default:window.__eshalChatWidgetChunks.MarkdownRenderer}):Vp||(Vp=new Promise((e,t)=>{const n=document.createElement("script");n.src=function(){if($p)return new URL(Op,$p).toString();const e=Array.from(document.getElementsByTagName("script")).find(e=>/chat-widget(\.min)?\.js(\?.*)?$/.test(e.src));return e?new URL(Op,e.src).toString():Op}(),n.async=!0,n.onload=()=>{window.__eshalChatWidgetChunks?.MarkdownRenderer?e({default:window.__eshalChatWidgetChunks.MarkdownRenderer}):(Vp=null,t(new Error("[widget] markdown chunk loaded but did not register itself")))},n.onerror=()=>{Vp=null,t(new Error(`[widget] failed to load markdown chunk from ${n.src}`))},document.head.appendChild(n)}),Vp)}function Hp(){return Up()}var Wp={exports:{}},qp={},Qp=I,Kp=Symbol.for("react.element"),Yp=Symbol.for("react.fragment"),Gp=Object.prototype.hasOwnProperty,Jp=Qp.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Xp={key:!0,ref:!0,__self:!0,__source:!0};function Zp(e,t,n){var r,o={},a=null,i=null;for(r in void 0!==n&&(a=""+n),void 0!==t.key&&(a=""+t.key),void 0!==t.ref&&(i=t.ref),t)Gp.call(t,r)&&!Xp.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===o[r]&&(o[r]=t[r]);return{$$typeof:Kp,type:e,key:a,ref:i,props:o,_owner:Jp.current}}qp.Fragment=Yp,qp.jsx=Zp,qp.jsxs=Zp,Wp.exports=qp;var eg=Wp.exports;const tg=I.lazy(Hp);class ng extends I.Component{state={failed:!1};static getDerivedStateFromError(){return{failed:!0}}componentDidCatch(e){}render(){return this.state.failed?this.props.fallback:this.props.children}}const rg=/(```|`[^`]+`|(^|\n)\s{0,3}#{1,6}\s|(^|\n)\s*[-*+]\s|(^|\n)\s*\d+\.\s|(^|\n)\s*>\s|\[[^\]]*\]\([^)]*\)|\*\*|__|~~|(^|\n)\s*\||\[\d+\])/;const og=({content:e,isDark:t,textColor:n,fontFamily:r,fontSize:o})=>eg.jsx("p",{className:"leading-relaxed [&:first-child]:!mt-0 whitespace-pre-wrap break-words",style:{color:n||(t?"#f3f4f6":"#1A1A1A"),fontFamily:r||"Inter",fontSize:o||"14px",margin:0,lineHeight:"1.6",padding:0,overflowWrap:"break-word"},children:e}),ag=({content:e,isStreaming:t,isDark:n=!1,isRtl:r=!1,textColor:o,fontFamily:a,fontSize:i,onButtonClick:s,provideCitations:l=!0})=>{const[c,u]=I.useState(""),[d,p]=I.useState(!1),g=I.useRef(e),f=I.useRef(0),h=I.useRef(null),m=I.useRef(0);I.useEffect(()=>{if(e!==g.current){if(g.current=e,f.current>=e.length)return u(e),void p(!1);e.length<c.length&&(f.current=0,u(""))}if(!t)return u(e),p(!1),void(h.current&&cancelAnimationFrame(h.current));p(!0);const n=t=>{if(t-m.current<16)h.current=requestAnimationFrame(n);else if(m.current=t,f.current<e.length){const t=Math.max(2,Math.floor(4*Math.random())),r=Math.min(f.current+t,e.length);u(e.slice(0,r)),f.current=r,h.current=requestAnimationFrame(n)}else p(!1)};return h.current=requestAnimationFrame(n),()=>{h.current&&cancelAnimationFrame(h.current)}},[e,t]);const b="string"==typeof(y=c)&&0!==y.length&&rg.test(y);var y;return eg.jsxs("div",{className:"relative",dir:"auto",style:{textAlign:r?"right":"left",color:o||(n?"#f3f4f6":"#1A1A1A"),fontFamily:a||"Inter",fontSize:i||"14px",margin:0,padding:0},children:[b?eg.jsx(ng,{fallback:eg.jsx(og,{content:c,isDark:n,textColor:o,fontFamily:a,fontSize:i}),children:eg.jsx(I.Suspense,{fallback:eg.jsx(og,{content:c,isDark:n,textColor:o,fontFamily:a,fontSize:i}),children:eg.jsx(tg,{content:c,isStreaming:t,isDark:n,isRtl:r,textColor:o,fontFamily:a,fontSize:i,onButtonClick:s,provideCitations:l})})}):eg.jsx(og,{content:c,isDark:n,textColor:o,fontFamily:a,fontSize:i}),d&&eg.jsx("span",{className:"inline-block w-1.5 h-4 bg-blue-500 ms-0.5 animate-pulse align-text-bottom",style:{animationDuration:"0.8s"}})]})},ig=({isDark:e,t:t})=>eg.jsxs("div",{className:"flex gap-1.5",role:"status","aria-label":t("agentIsTyping"),children:[eg.jsx("div",{className:`w-2 h-2 rounded-full ${e?"bg-gray-500":"bg-gray-400"} animate-bounce`,style:{animationDelay:"0ms"},"aria-hidden":"true"}),eg.jsx("div",{className:`w-2 h-2 rounded-full ${e?"bg-gray-500":"bg-gray-400"} animate-bounce`,style:{animationDelay:"150ms"},"aria-hidden":"true"}),eg.jsx("div",{className:`w-2 h-2 rounded-full ${e?"bg-gray-500":"bg-gray-400"} animate-bounce`,style:{animationDelay:"300ms"},"aria-hidden":"true"})]}),sg=({question:e,options:t,onDecision:n,disabled:r,isDark:o=!1})=>eg.jsxs("div",{className:"mt-3 p-3 rounded-lg border "+(o?"bg-blue-900/30 border-blue-700/50":"bg-blue-50 border-blue-200"),children:[eg.jsx("p",{className:"text-sm font-medium mb-2 "+(o?"text-gray-100":"text-gray-900"),children:e}),eg.jsx("div",{className:"space-y-2",children:t.map(e=>eg.jsx("button",{onClick:()=>n(e.id,e.label),disabled:r,className:"w-full text-left px-3 py-2 text-sm rounded transition-all "+(o?"bg-gray-800 border border-gray-700 hover:bg-blue-900/50 hover:border-blue-600 disabled:opacity-50 disabled:cursor-not-allowed":"bg-white border border-gray-300 hover:bg-blue-50 hover:border-blue-400 disabled:opacity-50 disabled:cursor-not-allowed"),children:e.label},e.id))})]});function lg({content:e,isDark:t}){const[n,r]=I.useState(!1),o=I.useCallback(()=>{e&&(navigator.clipboard?.writeText(e).catch(()=>{}),r(!0),setTimeout(()=>r(!1),1500))},[e]);return eg.jsx("button",{type:"button",onClick:o,className:"p-0.5 rounded transition-colors "+(t?"text-gray-500 hover:text-gray-300":"text-gray-400 hover:text-gray-600"),style:{border:"none",background:"transparent",appearance:"none",WebkitAppearance:"none",cursor:"pointer"},"aria-label":n?"Copied":"Copy message",title:n?"Copied":"Copy message",children:n?eg.jsx(dp,{className:"w-3 h-3 text-green-500"}):eg.jsx(hp,{className:"w-3 h-3"})})}const cg=({message:e,formatTime:t,isDark:n,primaryColor:r,agentMessageBubbleColor:o,resolvedAgentBubbleColor:a,textColor:i,assistantTextColor:s,fontFamily:l,agentMessageBubbleFontFamily:c,agentMessageBubbleFontSize:u,fontSize:d,isRtl:p,onDecision:g,companyLogo:f,conciergeName:h,companyName:m,apiBaseUrl:b,getAuthToken:y,onPromptSuggestionClick:v,allowFeedback:w=!0,provideCitations:k=!0,onFeedback:x,headerTextColor:S,t:C})=>{const M="string"==typeof e.content?e.content:"",P=e.isProcessing&&(!M||0===M.length),z=zd(M,p),[E,j]=I.useState(()=>e?.feedback??null),[T,N]=I.useState(!1),[F,L]=I.useState(null),[R,A]=I.useState(""),_=I.useRef(null),B=I.useCallback(e=>{if(x&&M){if(E===e)return j(null),N(!1),L(null),A(""),void x(M,null);if("like"===e)return j("like"),N(!1),L(null),A(""),void x(M,"like");j(null),L("dislike"),N(!0),A(""),setTimeout(()=>_.current?.focus(),100)}},[E,x,M]),D=I.useCallback(()=>{x&&M&&F&&(j(F),x(M,F,R.trim()||void 0),N(!1),A(""),L(null))},[x,M,F,R]),O=I.useCallback(()=>{N(!1),A(""),L(null)},[]),$=!0===e?.isError,V=$?n?"rgba(239,68,68,0.15)":"#fee2e2":null!=a?a:null!=o?o:n?"#1f2937":"#FFFFFF",U=null!=o&&"#ffffff"!==o&&"#FFFFFF"!==o&&"#1f2937"!==o,H=$?n?"#fca5a5":"#991b1b":null!=s?s:null!=i?i:n?"#f3f4f6":"#1A1A1A",W=null!=c?c:null!=l?l:"Inter",q=null!=u?u:null!=d?d:"14px";Ap(W);const{onSourceActivate:Q,downloadingKey:K}=function({apiBaseUrl:e,getAuthToken:t}){const[n,r]=I.useState(null),o=I.useCallback(async n=>{if(!n)return;const o=n.url||n.source_id||n.sourceid||n.source_name||"",a=String(n.source_id||n.sourceid||"").startsWith("attachment:"),i="string"==typeof n.url&&n.url.includes("/api/v1/sharepoint/file/");if(!("file"===n.source_type||i||a||(n.source_id||n.sourceid)&&!n.url)){const e=function(e){return"string"==typeof e&&/^https?:\/\//i.test(e)?e:void 0}(n.url);if(e)try{window.open(e,"_blank","noopener,noreferrer")}catch{}return}if(e||a){r(o);try{let r;if(a){if(!n.url)throw new Error("attachment has no URL");const o={};if("function"==typeof t){const e=await t();e&&(o.Authorization=`Bearer ${e}`)}r=await fetch(Dp(n.url,e),{method:"GET",headers:o,credentials:"include"})}else if(i){const o=Dp(n.url,e),a={};if("function"==typeof t){const e=await t();e&&(a.Authorization=`Bearer ${e}`)}r=await fetch(o,{method:"GET",headers:a,credentials:"include"})}else{const o=`${e.replace(/\/$/,"")}/api/v1/support/file-download`,a={"Content-Type":"application/json"};if("function"==typeof t){const e=await t();e&&(a.Authorization=`Bearer ${e}`)}r=await fetch(o,{method:"POST",headers:a,credentials:"include",body:JSON.stringify({source_id:n.source_id||n.sourceid,file_name:n.url||"",source_name:n.source_name||""})})}if(!r.ok){const e=await r.json().catch(()=>({}));throw new Error(e.details||e.error||r.statusText)}const o=await r.blob(),s=r.headers.get("content-disposition");let l=n.source_name||"download";if(!a){const e=s&&/filename\*?=(?:UTF-8'')?["']?([^"'\s;]+)["']?/i.exec(s);if(e)try{l=decodeURIComponent(e[1].replace(/\\"/g,'"'))}catch{}}const c=document.createElement("a"),u=URL.createObjectURL(o);c.href=u,c.download=l,document.body.appendChild(c),c.click(),c.remove(),URL.revokeObjectURL(u)}catch(e){}finally{r(null)}}},[e,t]);return{onSourceActivate:o,downloadingKey:n}}({apiBaseUrl:b,getAuthToken:y}),Y=I.useMemo(()=>({sources:e.sources||[],sourcesPreliminary:!!e.sourcesPreliminary,onSourceActivate:Q,downloadingKey:K,textColor:H}),[e.sources,e.sourcesPreliminary,Q,K,H]);return eg.jsx(Bp.Provider,{value:Y,children:eg.jsxs("div",{className:"flex gap-3 flex-row animate-in min-w-0",children:[eg.jsx("div",{className:"flex-shrink-0 mt-1",children:eg.jsx("div",{className:"w-8 h-8 rounded-full overflow-hidden flex items-center justify-center",style:{backgroundColor:r||"#2563eb"},children:f?eg.jsx("div",{className:"w-full h-full bg-white/10 flex items-center justify-center",children:eg.jsx("img",{src:f,alt:h||m||"Assistant avatar",className:"object-contain rounded-full",style:{width:"100%",height:"100%"}})}):eg.jsx("div",{className:"w-full h-full flex items-center justify-center",style:{fontSize:"18px",fontFamily:l||"Inter",color:S||"#FFFFFF"},children:(h||"A").charAt(0).toUpperCase()})})}),eg.jsxs("div",{className:"flex flex-col items-start min-w-0 max-w-[75%]",children:[eg.jsx("div",{className:"rounded-2xl px-4 py-2.5 shadow-sm border rounded-tl-sm rtl:rounded-tl-2xl rtl:rounded-tr-sm min-w-0 max-w-full overflow-hidden "+(U?"border-transparent":n?"border-gray-700":"border-gray-200"),style:{backgroundColor:V,color:H,fontFamily:W,fontSize:q,direction:z?"rtl":"ltr",textAlign:z?"right":"left",...U?{borderColor:`${V}33`}:{}},children:P?eg.jsx(ig,{isDark:n,t:C}):eg.jsx(eg.Fragment,{children:e.requiresDecision&&e.decisionData&&g?eg.jsxs("div",{children:[M&&eg.jsx("div",{className:"mb-3",children:eg.jsx(ag,{content:M,isStreaming:e.isProcessing,isDark:n,isRtl:z,textColor:H,fontFamily:W,fontSize:q,onButtonClick:v,provideCitations:k})}),eg.jsx(sg,{question:e.decisionData.question,options:e.decisionData.options,onDecision:(t,n)=>g(e.decisionData.decisionId,t,n),disabled:!!e.decisionResponse,isDark:n}),e.decisionResponse&&eg.jsxs("div",{className:"mt-2 text-xs "+(n?"text-gray-400":"text-gray-500"),children:["Selected: ",e.decisionResponse.selectedOption]})]}):M?eg.jsx(eg.Fragment,{children:eg.jsx(ag,{content:M,isStreaming:e.isProcessing,isDark:n,isRtl:z,textColor:H,fontFamily:W,fontSize:q,onButtonClick:v,provideCitations:k})}):null})}),eg.jsxs("div",{className:"flex items-center gap-1.5 mt-1.5 px-1",children:[eg.jsx("p",{className:"text-xs leading-none "+(n?"text-gray-400":"text-gray-500"),dir:"auto",children:t(e.timestamp)}),!P&&!e.isProcessing&&M&&eg.jsx(lg,{content:M,isDark:n}),!1!==w&&x&&!P&&!e.isProcessing&&M&&"welcome"!==e.type&&!e.isWelcome&&eg.jsxs("div",{className:"flex items-center gap-0.5 ms-0.5",children:[eg.jsx("button",{type:"button",onClick:()=>B("like"),className:"p-0.5 rounded transition-colors "+("like"===E||"like"===F?"text-green-500":n?"text-gray-500 hover:text-gray-300":"text-gray-400 hover:text-gray-600"),style:{border:"none",background:"transparent",appearance:"none",WebkitAppearance:"none",cursor:"pointer"},"aria-label":"Like",children:eg.jsx(Ep,{className:"w-3 h-3"})}),eg.jsx("button",{type:"button",onClick:()=>B("dislike"),className:"p-0.5 rounded transition-colors "+("dislike"===E||"dislike"===F?"text-red-500":n?"text-gray-500 hover:text-gray-300":"text-gray-400 hover:text-gray-600"),style:{border:"none",background:"transparent",appearance:"none",WebkitAppearance:"none",cursor:"pointer"},"aria-label":"Dislike",children:eg.jsx(zp,{className:"w-3 h-3"})})]})]}),T&&"dislike"===F&&eg.jsxs("div",{className:"mt-2 w-full rounded-xl border p-3 shadow "+(n?"bg-gray-800 border-gray-700":"bg-white border-gray-200"),style:{direction:p?"rtl":"ltr"},children:[eg.jsx("textarea",{ref:_,value:R,onChange:e=>A(e.target.value),onKeyDown:e=>{(e.metaKey||e.ctrlKey)&&"Enter"===e.key?(e.preventDefault(),D()):"Escape"===e.key&&(e.preventDefault(),O())},placeholder:C("feedbackPlaceholder"),"aria-label":C("feedbackPlaceholder"),rows:2,className:"w-full resize-none rounded-lg border px-2 py-1.5 text-xs focus:outline-none focus:ring-1 "+(n?"bg-gray-900 border-gray-700 text-gray-100 placeholder-gray-500 focus:ring-gray-600":"bg-white border-gray-200 text-gray-900 placeholder-gray-400 focus:ring-gray-300"),style:{fontFamily:W,textAlign:p?"right":"left"}}),eg.jsxs("div",{className:"flex items-center justify-end gap-1.5 mt-1.5",children:[eg.jsx("button",{type:"button",onClick:O,className:"text-xs px-2 py-1 rounded transition-colors "+(n?"text-gray-400 hover:text-gray-200":"text-gray-500 hover:text-gray-700"),style:{border:"none",background:"transparent",cursor:"pointer"},children:C("cancel")}),eg.jsx("button",{type:"button",onClick:D,className:"text-xs px-2.5 py-1 rounded text-white transition-opacity hover:opacity-90",style:{backgroundColor:r||"#2563eb",border:"none",cursor:"pointer"},children:C("submit")})]})]})]})]})})},ug=({message:e,formatTime:t,userMessageBoxColor:n,primaryColor:r,resolvedUserMessageColor:o,textColor:a,userTextColor:i,fontFamily:s,userMessageBubbleFontFamily:l,userMessageBubbleFontSize:c,fontSize:u,isDark:d,isRtl:p,t:g,onRetryMessage:f})=>{const h=null!=o?o:null!=n?n:null!=r?r:"#2563eb",m=null!=i?i:null!=a?a:"#FFFFFF",b=null!=l?l:null!=s?s:"Inter",y=null!=c?c:null!=u?u:"14px",v=zd("string"==typeof e?.content?e.content:"",p);Ap(b);const w=Array.isArray(e.attachments)?e.attachments:[];return eg.jsx("div",{className:"flex gap-3 flex-row-reverse animate-in",children:eg.jsxs("div",{className:"flex flex-col items-end max-w-[75%]",children:[w.length>0&&eg.jsx("div",{className:"mb-1.5 flex flex-wrap justify-end gap-1.5",children:w.map((e,t)=>String(e.mimeType||"").startsWith("image/")&&e.url?eg.jsx("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",className:"block rounded-md overflow-hidden",style:{maxWidth:160},title:e.filename,children:eg.jsx("img",{src:e.url,alt:e.filename||"attachment",style:{maxWidth:160,maxHeight:160,display:"block"}})},e.storageKey||t):eg.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-xs",style:{backgroundColor:d?"#1f2937":"#f3f4f6",color:d?"#e5e7eb":"#374151",border:"1px solid "+(d?"#374151":"#e5e7eb"),maxWidth:200},title:e.filename,children:[eg.jsx(bp,{size:12}),eg.jsx("span",{className:"truncate",style:{maxWidth:140,direction:"ltr"},children:e.filename})]},e.storageKey||t))}),e.content&&""!==e.content.trim()&&eg.jsx("div",{className:"rounded-2xl px-4 py-2.5 shadow-lg "+(v?"rounded-tl-sm":"rounded-tr-sm"),dir:"auto",style:{background:`linear-gradient(135deg, ${h} 0%, ${h}dd 100%)`,fontFamily:b,direction:v?"rtl":"ltr",textAlign:v?"right":"left"},children:eg.jsx("p",{className:"whitespace-pre-wrap break-words",dir:"auto",style:{color:m,fontFamily:b,fontSize:y,lineHeight:"1.5",textAlign:v?"right":"left",overflowWrap:"break-word",margin:0,padding:0},children:e.content})}),eg.jsxs("div",{className:"flex items-center gap-1.5 mt-1.5 px-1",children:[eg.jsx("p",{className:"text-xs leading-none "+(d?"text-gray-400":"text-gray-500"),dir:"auto",children:t(e.timestamp)}),e.content&&""!==e.content.trim()&&eg.jsx(lg,{content:e.content,isDark:d})]}),"failed"===e.status&&eg.jsxs("div",{className:"flex items-center gap-1.5 mt-1 px-1","data-testid":"message-failed-state",children:[eg.jsx("span",{className:"text-xs leading-none",style:{color:"#dc2626"},dir:"auto",children:g("messageNotDelivered")}),"function"==typeof f&&eg.jsx("button",{type:"button",onClick:()=>f(e),className:"text-xs leading-none font-medium underline",style:{color:"#dc2626"},dir:"auto",children:g("retrySend")})]})]})})},dg=({message:e,isDark:t,primaryColor:n,agentMessageBubbleColor:r,userMessageBoxColor:o,resolvedUserMessageColor:a,resolvedAgentBubbleColor:i,textColor:s,assistantTextColor:l,userTextColor:c,fontFamily:u,agentMessageBubbleFontFamily:d,agentMessageBubbleFontSize:p,userMessageBubbleFontFamily:g,userMessageBubbleFontSize:f,fontSize:h,formatTime:m,isRtl:b,onDecision:y,companyLogo:v,conciergeName:w,companyName:k,apiBaseUrl:x,getAuthToken:S,onPromptSuggestionClick:C,allowFeedback:M,provideCitations:P,onFeedback:z,headerTextColor:E,onRetryMessage:j,defaultLanguage:T="en"})=>{const N=I.useMemo(()=>jd(T),[T]);return e?"user"===e.role?eg.jsx(ug,{message:e,formatTime:m,userMessageBoxColor:o,primaryColor:n,resolvedUserMessageColor:a,textColor:s,userTextColor:c,fontFamily:u,userMessageBubbleFontFamily:g,userMessageBubbleFontSize:f,fontSize:h,isDark:t,isRtl:b,t:N,onRetryMessage:j}):eg.jsx(cg,{message:e,formatTime:m,isDark:t,primaryColor:n,agentMessageBubbleColor:r,resolvedAgentBubbleColor:i,textColor:s,assistantTextColor:l,fontFamily:u,agentMessageBubbleFontFamily:d,agentMessageBubbleFontSize:p,fontSize:h,isRtl:b,onDecision:y,companyLogo:v,conciergeName:w,companyName:k,apiBaseUrl:x,getAuthToken:S,onPromptSuggestionClick:C,allowFeedback:M,provideCitations:P,onFeedback:z,headerTextColor:E,t:N}):null};var pg=I.memo(dg);const gg=(e,t,n)=>Number.isNaN(e)?t:Math.min(Math.max(e,t),n),fg=e=>{if(!e)return null;const t=(e=>e?.trim().toLowerCase()??"")(e),n=(e=>{const t=e.match(/^#?([0-9a-f]{3}|[0-9a-f]{6})$/i);if(!t)return null;let n=t[1];3===n.length&&(n=n.split("").map(e=>`${e}${e}`).join(""));const r=parseInt(n.slice(0,2),16),o=parseInt(n.slice(2,4),16),a=parseInt(n.slice(4,6),16);return[r,o,a].some(e=>Number.isNaN(e))?null:{r:r,g:o,b:a}})(t);if(n)return n;const r=(e=>{const t=e.match(/^rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})(?:\s*,\s*(\d*\.?\d+))?\s*\)$/i);return t?{r:gg(Number.parseInt(t[1],10),0,255),g:gg(Number.parseInt(t[2],10),0,255),b:gg(Number.parseInt(t[3],10),0,255)}:null})(t);return r||null},hg=({r:e,g:t,b:n})=>{const r=e=>{const t=gg(Math.round(e),0,255).toString(16);return 1===t.length?`0${t}`:t};return`#${r(e)}${r(t)}${r(n)}`},mg=(e,t,n)=>{const r=gg(n,0,1);return{r:Math.round(e.r+(t.r-e.r)*r),g:Math.round(e.g+(t.g-e.g)*r),b:Math.round(e.b+(t.b-e.b)*r)}},bg=(e,t)=>{const n=gg(t,0,1);return`rgba(${gg(Math.round(e.r),0,255)}, ${gg(Math.round(e.g),0,255)}, ${gg(Math.round(e.b),0,255)}, ${n})`},yg={background:"#f8fafc",hoverBackground:"#f1f5f9",border:"#e2e8f0",hoverBorder:"#cbd5f5",shadow:"0 4px 12px rgba(15, 23, 42, 0.08)",hoverShadow:"0 6px 20px rgba(15, 23, 42, 0.14)"},vg={background:"#1f2937",hoverBackground:"#27364a",border:"#334155",hoverBorder:"#3b4c63",shadow:"0 4px 12px rgba(15, 23, 42, 0.45)",hoverShadow:"0 6px 20px rgba(15, 23, 42, 0.55)"},wg=(e,t)=>{const n=fg(e);if(!n)return(e=>e?vg:yg)(t);const r=(({r:e,g:t,b:n})=>{const r=[e,t,n].map(e=>{const t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4});return.2126*r[0]+.7152*r[1]+.0722*r[2]})(n),o=fg("#0f172a")??{r:15,g:23,b:42},a=fg(t?"#f8fafc":"#f9fafb")??{r:249,g:250,b:251},i=fg(t?"#334155":"#e2e8f0")??{r:226,g:232,b:240};let s,l;if(r>=.6){const e=t?.5:.7,r=Math.min(1,e+.15);s=mg(n,o,e),l=mg(n,o,r)}else if(r<=.35){const e=t?.9:.8,r=Math.min(1,e+(t?.05:.12));s=mg(n,a,e),l=mg(n,a,r)}else{const e=t?.45:.6,r=Math.min(1,e+.1);s=mg(n,i,e),l=mg(n,i,r)}const c=mg(n,s,.65),u=mg(n,l,.7),d=`0 4px 12px ${bg(n,t?.28:.12)}`,p=`0 6px 20px ${bg(n,t?.35:.18)}`;return{background:hg(s),hoverBackground:hg(l),border:hg(c),hoverBorder:hg(u),shadow:d,hoverShadow:p}},kg=({questions:e,isDark:t,palette:n,resolvedTextColor:r,fontFamily:o,fontSize:a,isRtl:i,onQuestionClick:s,applyHoverState:l,headingLabel:c})=>{const u=I.useRef(null),[d,p]=I.useState(!1),[g,f]=I.useState(!1),h=I.useCallback(()=>{const e=u.current;if(!e)return;const{scrollLeft:t,scrollWidth:n,clientWidth:r}=e;p(Math.abs(t)>1),f(Math.abs(t)+r<n-1)},[]);I.useEffect(()=>{h();const e=u.current;if(!e)return;const t=new ResizeObserver(h);return t.observe(e),()=>t.disconnect()},[h,e]);const m=I.useCallback(e=>{const t=u.current;if(!t)return;const n="left"===e?-150:150;t.scrollBy({left:i?-n:n,behavior:"smooth"})},[i]),b=t?"rgba(31,41,55,0.85)":"rgba(255,255,255,0.85)",y=t?"#e5e7eb":"#374151",v=t?"#4b5563":"#d1d5db";return eg.jsxs("div",{className:"px-4 py-4 border-t "+(t?"border-gray-700/50":"border-gray-200/60"),children:[eg.jsxs("div",{className:"text-xs mb-3 font-semibold tracking-wide uppercase "+(t?"text-gray-400":"text-gray-500"),children:[c||"Quick questions",":"]}),eg.jsxs("div",{className:"flex items-center gap-1.5",children:[eg.jsx("button",{onClick:()=>m("left"),disabled:!d,"aria-label":"Scroll left",className:"flex-shrink-0 flex items-center justify-center w-7 h-7 rounded-full shadow-sm transition-all duration-200 hover:shadow-md active:scale-95",style:{backgroundColor:b,border:`1px solid ${v}`,color:y,backdropFilter:"blur(4px)",opacity:d?1:.35,cursor:d?"pointer":"default"},children:eg.jsx(pp,{size:16})}),eg.jsx("div",{ref:u,onScroll:h,className:"flex-1 flex gap-3 overflow-x-auto pb-2",style:{scrollBehavior:"smooth",WebkitOverflowScrolling:"touch",scrollbarWidth:"none",msOverflowStyle:"none"},children:e.map((e,t)=>{const c=zd(e,i);return eg.jsxs("button",{onClick:()=>s?.(e),className:"group relative text-sm px-5 py-2.5 rounded-full font-medium transition-all duration-300 hover:scale-105 active:scale-95 whitespace-nowrap flex-shrink-0 overflow-hidden backdrop-blur-sm "+(c?"text-right":"text-left"),style:{direction:c?"rtl":"ltr",backgroundColor:n.background,border:`1.5px solid ${n.border}`,boxShadow:n.shadow},onMouseEnter:e=>{l(e.currentTarget,!0),e.currentTarget.style.transform="translateY(-2px)"},onMouseLeave:e=>{l(e.currentTarget,!1),e.currentTarget.style.transform="translateY(0)"},children:[eg.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-white/0 via-white/5 to-white/10 opacity-0 group-hover:opacity-100 transition-opacity duration-300 rounded-xl"}),eg.jsx("span",{className:"relative z-10",style:{direction:c?"rtl":"ltr",color:r,fontFamily:o,fontSize:a,textAlign:c?"right":"left"},children:e})]},t)})}),eg.jsx("button",{onClick:()=>m("right"),disabled:!g,"aria-label":"Scroll right",className:"flex-shrink-0 flex items-center justify-center w-7 h-7 rounded-full shadow-sm transition-all duration-200 hover:shadow-md active:scale-95",style:{backgroundColor:b,border:`1px solid ${v}`,color:y,backdropFilter:"blur(4px)",opacity:g?1:.35,cursor:g?"pointer":"default"},children:eg.jsx(gp,{size:16})})]})]})},xg=({questions:e=[],isDark:t=!1,primaryColor:n="#2563eb",onQuestionClick:r,isTyping:o=!1,layout:a="vertical",fontFamily:i="Inter",fontSize:s="14px",textColor:l,isRtl:c=!1,questionTextColor:u,questionBoxColor:d,headingLabel:p})=>{if(!e.length||o)return null;const g=u??l??(t?"#f3f4f6":"#111827"),f=I.useMemo(()=>wg(g,t),[g,t]),h=(e,t)=>{e.style.backgroundColor=t?f.hoverBackground:f.background,e.style.borderColor=t?f.hoverBorder:f.border,e.style.boxShadow=t?f.hoverShadow:f.shadow};return"horizontal"===a?eg.jsx(kg,{questions:e,isDark:t,palette:f,resolvedTextColor:g,fontFamily:i,fontSize:s,isRtl:c,onQuestionClick:r,applyHoverState:h,headingLabel:p}):eg.jsxs("div",{style:{paddingInlineStart:"50px"},children:[p?eg.jsx("div",{className:"mb-2",style:{color:t?"#9ca3af":"#6b7280",fontFamily:i,fontSize:`calc(${s} - 1px)`},children:p}):null,eg.jsx("div",{className:"flex flex-wrap gap-2",children:e.map((e,o)=>{const a=zd(e,c);return eg.jsx("button",{onClick:()=>r?.(e),className:"transition-all duration-200 active:scale-[0.97]",style:{direction:a?"rtl":"ltr",fontFamily:i,fontSize:s,color:n,backgroundColor:t?"transparent":"#ffffff",border:`1.5px solid ${n}`,borderRadius:"9999px",padding:"5px 14px",fontWeight:500,lineHeight:"1.4",whiteSpace:"normal",textAlign:a?"right":"left"},onMouseEnter:e=>{e.currentTarget.style.backgroundColor=`${n}14`},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=t?"transparent":"#ffffff"},children:e},o)})})]})},Sg=({active:e=!1,processing:t=!1,deviceId:n,barWidth:r=3,barGap:o=1,barRadius:a=1.5,barColor:i,fadeEdges:s=!0,fadeWidth:l=24,barHeight:c=4,height:u=64,sensitivity:d=1,smoothingTimeConstant:p=.8,fftSize:g=256,historySize:f=60,updateRate:h=30,mode:m="static",onError:b,onStreamReady:y,onStreamEnd:v,className:w,...k})=>{const x=I.useRef(null),S=I.useRef(null),C=I.useRef([]),M=I.useRef(null),P=I.useRef(null),z=I.useRef(null),E=I.useRef(0),j=I.useRef(0),T=I.useRef(null),N=I.useRef([]),F=I.useRef(0),L=I.useRef([]),R=I.useRef(!0),A=I.useRef(null),_=I.useRef(0),B="number"==typeof u?`${u}px`:u;return I.useEffect(()=>{const e=x.current,t=S.current;if(!e||!t)return;const n=new ResizeObserver(()=>{const n=t.getBoundingClientRect(),r=window.devicePixelRatio||1;e.width=n.width*r,e.height=n.height*r,e.style.width=`${n.width}px`,e.style.height=`${n.height}px`;const o=e.getContext("2d");o&&o.scale(r,r),A.current=null,_.current=n.width,R.current=!0});return n.observe(t),()=>n.disconnect()},[]),I.useEffect(()=>{if(t&&!e){let e=0;F.current=0;const t=()=>{e+=.03,F.current=Math.min(1,F.current+.02);const n=[],a=Math.floor((S.current?.getBoundingClientRect().width||200)/(r+o));if("static"===m){const t=Math.floor(a/2);for(let r=0;r<a;r++){const o=(r-t)/t,a=1-.4*Math.abs(o),i=(.2+(.25*Math.sin(1.5*e+3*o)+.2*Math.sin(.8*e-2*o)+.15*Math.cos(2*e+o)))*a;let s=i;if(N.current.length>0&&F.current<1){const e=Math.min(r,N.current.length-1);s=(N.current[e]||0)*(1-F.current)+i*F.current}n.push(Math.max(.05,Math.min(1,s)))}}else for(let t=0;t<a;t++){const r=(t-a/2)/(a/2),o=1-.4*Math.abs(r),i=(.2+(.25*Math.sin(1.5*e+.15*t)+.2*Math.sin(.8*e-.1*t)+.15*Math.cos(2*e+.05*t)))*o;let s=i;if(N.current.length>0&&F.current<1){const e=Math.floor(t/a*N.current.length);s=(N.current[e]||0)*(1-F.current)+i*F.current}n.push(Math.max(.05,Math.min(1,s)))}"static"===m?L.current=n:C.current=n,R.current=!0,T.current=requestAnimationFrame(t)};return t(),()=>{T.current&&cancelAnimationFrame(T.current)}}if(!e&&!t){if("static"===m?L.current.length>0:C.current.length>0){let e=0;const t=()=>{e+=.03,e<1?("static"===m?L.current=L.current.map(t=>t*(1-e)):C.current=C.current.map(t=>t*(1-e)),R.current=!0,requestAnimationFrame(t)):"static"===m?L.current=[]:C.current=[]};t()}}},[t,e,r,o,m]),I.useEffect(()=>{if(!e)return z.current&&(z.current.getTracks().forEach(e=>e.stop()),z.current=null,v?.()),P.current&&"closed"!==P.current.state&&(P.current.close(),P.current=null),void(E.current&&(cancelAnimationFrame(E.current),E.current=0));return(async()=>{try{const e=await navigator.mediaDevices.getUserMedia({audio:n?{deviceId:{exact:n},echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}});z.current=e,y?.(e);const t=new(window.AudioContext||window.webkitAudioContext),r=t.createAnalyser();r.fftSize=g,r.smoothingTimeConstant=p;t.createMediaStreamSource(e).connect(r),P.current=t,M.current=r,C.current=[]}catch(e){b?.(e)}})(),()=>{z.current&&(z.current.getTracks().forEach(e=>e.stop()),z.current=null,v?.()),P.current&&"closed"!==P.current.state&&(P.current.close(),P.current=null),E.current&&(cancelAnimationFrame(E.current),E.current=0)}},[e,n,g,p,b,y,v]),I.useEffect(()=>{const n=x.current;if(!n)return;const u=n.getContext("2d");if(!u)return;let p;const g=b=>{const y=n.getBoundingClientRect();if(e&&b-j.current>h&&(j.current=b,M.current)){const e=new Uint8Array(M.current.frequencyBinCount);if(M.current.getByteFrequencyData(e),"static"===m){const t=Math.floor(.05*e.length),n=Math.floor(.4*e.length),a=e.slice(t,n),i=Math.floor(y.width/(r+o)),s=Math.floor(i/2),l=[];for(let e=s-1;e>=0;e--){const t=Math.floor(e/s*a.length),n=Math.min(1,a[t]/255*d);l.push(Math.max(.05,n))}for(let e=0;e<s;e++){const t=Math.floor(e/s*a.length),n=Math.min(1,a[t]/255*d);l.push(Math.max(.05,n))}L.current=l,N.current=l}else{let t=0;const n=Math.floor(.05*e.length),r=Math.floor(.4*e.length),o=e.slice(n,r);for(let e=0;e<o.length;e++)t+=o[e];const a=t/o.length/255*d;C.current.push(Math.min(1,Math.max(.05,a))),N.current=[...C.current],C.current.length>f&&C.current.shift()}R.current=!0}if(!R.current&&!e)return void(p=requestAnimationFrame(g));R.current=e,u.clearRect(0,0,y.width,y.height);const v=i||getComputedStyle(n).color||"#000",w=r+o,k=Math.floor(y.width/w),x=y.height/2;if("static"===m){const n=t||e||L.current.length>0?L.current:[];for(let e=0;e<k&&e<n.length;e++){const t=n[e]||.1,o=e*w,i=Math.max(c,t*y.height*.8),s=x-i/2;u.fillStyle=v,u.globalAlpha=.4+.6*t,a>0?(u.beginPath(),u.roundRect(o,s,r,i,a),u.fill()):u.fillRect(o,s,r,i)}}else for(let e=0;e<k&&e<C.current.length;e++){const t=C.current.length-1-e,n=C.current[t]||.1,o=y.width-(e+1)*w,i=Math.max(c,n*y.height*.8),s=x-i/2;u.fillStyle=v,u.globalAlpha=.4+.6*n,a>0?(u.beginPath(),u.roundRect(o,s,r,i,a),u.fill()):u.fillRect(o,s,r,i)}if(s&&l>0&&y.width>0){if(!A.current||_.current!==y.width){const e=u.createLinearGradient(0,0,y.width,0),t=Math.min(.3,l/y.width);e.addColorStop(0,"rgba(255,255,255,1)"),e.addColorStop(t,"rgba(255,255,255,0)"),e.addColorStop(1-t,"rgba(255,255,255,0)"),e.addColorStop(1,"rgba(255,255,255,1)"),A.current=e,_.current=y.width}u.globalCompositeOperation="destination-out",u.fillStyle=A.current,u.fillRect(0,0,y.width,y.height),u.globalCompositeOperation="source-over"}u.globalAlpha=1,p=requestAnimationFrame(g)};return p=requestAnimationFrame(g),()=>{p&&cancelAnimationFrame(p)}},[e,t,d,h,f,r,c,o,a,i,s,l,m]),eg.jsxs("div",{className:_d("relative h-full w-full",w),ref:S,style:{height:B},"aria-label":e?"Live audio waveform":t?"Processing audio":"Audio waveform idle",role:"img",...k,children:[!e&&!t&&eg.jsx("div",{className:"border-muted-foreground/20 absolute top-1/2 right-0 left-0 -translate-y-1/2 border-t-2 border-dotted"}),eg.jsx("canvas",{className:"block h-full w-full",ref:x,"aria-hidden":"true"})]})};function Cg(e){if(!e||"user"===e.role)return null;const t=e.metadata?.senderName;return"string"==typeof t&&t.trim()?t.trim():null}const Mg=I.createContext(void 0);function Pg(e,t){for(let n=t+1;n<(e||[]).length;n+=1){const t=e[n];if("user"===t?.role&&!t.sendFailed)return"string"==typeof t.content?t.content:String(t.content??"")}}const zg=({messages:e=[],isDark:t,primaryColor:n,isLoading:r,agentMessageBubbleColor:o,userMessageBoxColor:a,textColor:i,assistantTextColor:s,userTextColor:l,fontFamily:c,agentMessageBubbleFontFamily:u,agentMessageBubbleFontSize:d,userMessageBubbleFontFamily:p,userMessageBubbleFontSize:g,fontSize:f,formatTime:h,isRtl:m=!1,defaultLanguage:b="en",quickQuestions:y=[],shouldShowQuickQuestions:v=!1,onQuickQuestion:w,quickQuestionsLayout:k="vertical",onDecision:x,disclaimerEnabled:S=!1,disclaimerText:C,disclaimerPosition:M="top",disclaimerLinkUrl:P,disclaimerLinkLabel:z,resolvedAgentBubbleColor:E,resolvedUserMessageColor:j,resolvedTextColor:T,isVoiceSessionActive:N=!1,voiceStatus:F="idle",messagesContainerRef:L,companyLogo:R,chatbotAvatarEnabled:A,chatbotAvatar:_,conciergeName:B,companyName:D,apiBaseUrl:O,getAuthToken:$,onPromptSuggestionClick:V,conversationResetKey:U,allowFeedback:H,provideCitations:W,onFeedback:q,headerTextColor:Q,onRetryMessage:K,beforePromptsSlot:Y=null,promptsSlot:G=null,quickQuestionsHeadingLabel:J})=>{const X=I.useRef(null),Z=I.useRef(!0),ee=I.useRef(!1),te=I.useMemo(()=>e.map(e=>`${e.id}:${e.content?.length??0}:${e.isProcessing?1:0}`).join("|"),[e]),ne=I.useCallback(()=>{const e=L?.current;if(!e)return;const t=e.scrollHeight-e.scrollTop-e.clientHeight;Z.current=t<160},[L]);I.useEffect(()=>{const e=L?.current;if(e)return e.addEventListener("scroll",ne,{passive:!0}),ne(),()=>{e.removeEventListener("scroll",ne)}},[ne,L]),I.useEffect(()=>{U&&(Z.current=!0,ee.current=!1)},[U]),I.useEffect(()=>{if(ee.current||0===e.length||"undefined"==typeof window)return;ee.current=!0;let t,n=!1;const r=window.requestAnimationFrame(()=>{n||(t=window.requestAnimationFrame(()=>{n||(X.current?.scrollIntoView({behavior:"instant",block:"end"}),Z.current=!0)}))});return()=>{n=!0,window.cancelAnimationFrame(r),window.cancelAnimationFrame(t)}},[0===e.length]),I.useEffect(()=>{if(!Z.current)return;if("undefined"==typeof window)return;let e=!1;const t=window.requestAnimationFrame(()=>{e||X.current?.scrollIntoView({behavior:"smooth",block:"end"})});return()=>{e=!0,window.cancelAnimationFrame(t)}},[te,r]),I.useEffect(()=>{if(!N||"connected"!==F)return;if("undefined"==typeof window)return;let e=!1;const t=window.requestAnimationFrame(()=>{e||X.current?.scrollIntoView({behavior:"smooth",block:"end"})});return()=>{e=!0,window.cancelAnimationFrame(t)}},[N,F]);const re=I.useMemo(()=>Ad(P),[P]),oe=I.useMemo(()=>function(e){const t=new Map;if(!Array.isArray(e))return t;const n=new Set;for(const r of e){const e=Cg(r);if(!e||!r.id)continue;const o=!n.has(e);n.add(e),t.set(r.id,{name:e,joined:o})}return t}(e),[e]),ae=I.useMemo(()=>zd(C,m),[C,m]);return eg.jsxs(eg.Fragment,{children:[S&&C&&"top"===M&&eg.jsx("div",{className:"flex justify-center",children:eg.jsx("div",{className:"rounded-lg px-2 py-1 ",style:{color:t?"#d1d5db":"#6b7280",fontFamily:null!=c?c:"Inter",fontSize:null!=f?`calc(${f} - 2px)`:"12px",direction:ae?"rtl":"ltr",textAlign:"center",borderColor:t?"#374151":"#e5e7eb"},children:eg.jsxs("p",{className:"leading-relaxed whitespace-pre-wrap break-words inline",dir:ae?"rtl":"ltr",style:{color:t?"#d1d5db":"#6b7280",fontFamily:null!=c?c:"Inter",fontSize:null!=f?`calc(${f} - 2px)`:"12px"},children:[C,re&&z&&eg.jsx("a",{href:re,target:"_blank",rel:"noopener noreferrer",title:re,style:{color:t?"#93c5fd":"#2563eb",marginInlineStart:"4px",verticalAlign:"middle",display:"inline-flex",alignItems:"center"},children:z})]})})}),e.map((r,y)=>{const v=oe.get(r.id);return eg.jsxs(Mg.Provider,{value:"assistant"===r.role?Pg(e,y):void 0,children:[v?.joined&&eg.jsx("div",{role:"status","data-testid":"agent-joined-line",style:{textAlign:"center",fontSize:"12px",opacity:.7,margin:"8px 0"},children:Ed(b,"agentJoinedConversation").replace("{name}",v.name)}),v&&eg.jsx("div",{"data-testid":"agent-sender-name",style:{fontSize:"12px",fontWeight:600,opacity:.8,margin:"0 0 2px 4px",textAlign:m?"right":"left"},children:v.name}),eg.jsx(pg,{message:r,isDark:t,primaryColor:n,agentMessageBubbleColor:o,userMessageBoxColor:a,resolvedUserMessageColor:j,resolvedAgentBubbleColor:E,textColor:i,assistantTextColor:s,userTextColor:l,fontFamily:c,agentMessageBubbleFontFamily:u,agentMessageBubbleFontSize:d,userMessageBubbleFontFamily:p,userMessageBubbleFontSize:g,fontSize:f,formatTime:h,isRtl:zd(r.content,m),onDecision:x,onPromptSuggestionClick:V,companyLogo:A&&_?_:R,conciergeName:B,companyName:D,apiBaseUrl:O,getAuthToken:$,allowFeedback:H,provideCitations:W,onFeedback:q,headerTextColor:Q,onRetryMessage:K,defaultLanguage:b})]},r.id)}),(()=>{const y=e[e.length-1],v=r&&"user"===y?.role,w=e.some(e=>"assistant"===e.role&&(e.isProcessing||!e.content));return v&&!w?eg.jsx(pg,{message:nd(),isDark:t,primaryColor:n,agentMessageBubbleColor:o,resolvedAgentBubbleColor:E,userMessageBoxColor:a,textColor:i,assistantTextColor:s,userTextColor:l,fontFamily:c,agentMessageBubbleFontFamily:u,agentMessageBubbleFontSize:d,userMessageBubbleFontFamily:p,userMessageBubbleFontSize:g,fontSize:f,formatTime:h,isRtl:m,onDecision:x,companyLogo:A&&_?_:R,conciergeName:B,companyName:D,apiBaseUrl:O,getAuthToken:$,headerTextColor:Q,defaultLanguage:b},"skeleton-waiting"):null})(),Y,G?eg.jsx("div",{className:"pt-1",children:G}):v&&y.length>0&&eg.jsx("div",{className:"pt-1",children:eg.jsx(xg,{questions:y,isDark:t,primaryColor:n,onQuestionClick:w,isTyping:r,layout:k,fontFamily:c,fontSize:f,textColor:i,isRtl:m,questionTextColor:s,questionBoxColor:o,headingLabel:J})}),N&&"connected"===F&&!r&&eg.jsx("div",{className:"flex gap-3 flex-row-reverse animate-in",children:eg.jsx("div",{className:"flex flex-col items-end max-w-[75%] w-full",children:eg.jsxs("div",{className:"rounded-2xl px-4 py-2.5 shadow-lg rounded-tr-sm w-full",style:{background:`linear-gradient(135deg, ${j||n||"#2563eb"} 0%, ${j||n||"#2563eb"}dd 100%)`,width:"100px"},children:[eg.jsx("span",{className:"sr-only",children:"Listening for voice input"}),eg.jsx(Sg,{active:!0,barWidth:2,barHeight:4,barGap:2,barColor:l||T||"#FFFFFF",height:20,fadeEdges:!0,className:"min-w-[60px]","aria-hidden":"true"})]})})}),eg.jsx("div",{ref:X,className:"h-px"})]})};function Eg(e,t){return String(e||"").replace(/\/+$/,"")+(t.startsWith("/")?t:`/${t}`)}function jg({apiEndpoint:e,conversationId:t,size:n,authHeader:r}){fetch(Eg(e,"/api/v1/chat-attachments/release"),{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({conversationId:t,size:n})}).catch(()=>{})}function Tg({orgId:e,conversationId:t,config:n,apiEndpoint:r,authHeader:o,onError:a}){const[i,s]=I.useState([]),l=I.useRef(new Map),c=I.useRef(0),u=I.useRef(i);u.current=i;const d=I.useRef({conversationId:t,bytes:0});d.current.conversationId!==t&&(d.current={conversationId:t,bytes:0});const p=I.useCallback(()=>(c.current+=1,`att-${Date.now()}-${c.current}`),[]),g=I.useCallback((e,t)=>{s(n=>n.map(n=>n.id===e?{...n,...t}:n))},[]),f=I.useCallback((e,t,n)=>{const r={status:"error",error:{code:t,message:n}};s(t=>{const n=t.map(t=>t.id===e?{...t,...r}:t),o=n.find(t=>t.id===e);return o&&a&&a(o),n})},[a]),h=I.useCallback((e,t)=>{if(!n?.fileUploadEnabled)return{ok:!1,code:"feature_disabled",message:"File uploads are not enabled for this organization."};if(t>=n.fileUploadMaxFiles)return{ok:!1,code:"too_many_files",message:`Max ${n.fileUploadMaxFiles} files per message.`};const r=1024*n.fileUploadMaxSizeMB*1024;if(d.current.bytes+e.size>r){return{ok:!1,code:"size_exceeded",message:`This conversation has already used ${(d.current.bytes/1048576).toFixed(1)} MB of its ${n.fileUploadMaxSizeMB} MB upload limit - this file won't fit.`}}const o=(e.type||"").toLowerCase(),a=new Set((n.fileUploadAllowedMimes||[]).map(e=>String(e).toLowerCase()));return a.size>0&&!a.has(o)?{ok:!1,code:"mime_not_allowed",message:`File type "${e.type||"unknown"}" is not allowed.`}:{ok:!0}},[n]),m=I.useCallback(async(e,n)=>{let a;try{a=await fetch(Eg(r,"/api/v1/chat-attachments/presign"),{method:"POST",credentials:"include",headers:{"Content-Type":"application/json",...o?{Authorization:o}:{}},body:JSON.stringify({filename:n.name,mimeType:n.type,size:n.size,conversationId:t})})}catch(t){return d.current.bytes=Math.max(0,d.current.bytes-n.size),void f(e,"network","Network error while requesting upload.")}if(!a.ok){let t="Upload rejected by the server.",r="unknown";try{const e=await a.json();e?.error&&(t=e.error),e?.code&&(r=function(e){switch(e){case"feature_disabled":case"size_exceeded":case"mime_not_allowed":case"storage_unavailable":return e;default:return"unknown"}}(e.code))}catch{}return d.current.bytes=Math.max(0,d.current.bytes-n.size),void f(e,r,t)}let i=0;const s=()=>{i>0&&(jg({apiEndpoint:r,conversationId:t,size:i,authHeader:o}),i=0,g(e,{reservedBytes:0}))},c=()=>{d.current.bytes=Math.max(0,d.current.bytes-n.size)};let u;try{u=await a.json()}catch{return jg({apiEndpoint:r,conversationId:t,size:n.size,authHeader:o}),c(),g(e,{reservedBytes:0}),void f(e,"unknown","Malformed presign response.")}let p,h;("boolean"==typeof u.reserved?u.reserved:!u.useMultipart)&&(i=n.size,g(e,{reservedBytes:n.size}));try{if(u.useMultipart){const a=await function({url:e,file:t,conversationId:n,authHeader:r,onProgress:o,registerXhr:a}){return new Promise((r,i)=>{const s=new XMLHttpRequest;a(s),s.open("POST",e,!0),s.withCredentials=!0;const l=new FormData;l.append("conversationId",n),l.append("file",t,t.name),s.upload.onprogress=e=>{e.lengthComputable&&o(Math.round(e.loaded/e.total*100))},s.onload=()=>{if(s.status>=200&&s.status<300)try{const e=JSON.parse(s.responseText);r({url:"string"==typeof e?.url?e.url:void 0,storageKey:"string"==typeof e?.storageKey?e.storageKey:void 0})}catch{r({})}else i(new Error(`upload_status_${s.status}`))},s.onerror=()=>i(new Error("network")),s.onabort=()=>i({aborted:!0}),s.send(l)})}({url:Eg(r,"/api/v1/chat-attachments/multipart"),file:n,conversationId:t,authHeader:o,onProgress:t=>g(e,{progress:t}),registerXhr:t=>l.current.set(e,t)});p=a.url,h=a.storageKey,i=n.size,g(e,{reservedBytes:n.size})}else{if(!u.uploadUrl)throw new Error("presign_missing_target");{await function({url:e,file:t,onProgress:n,registerXhr:r}){return new Promise((o,a)=>{const i=new XMLHttpRequest;r(i),i.open("PUT",e,!0),i.setRequestHeader("x-ms-blob-type","BlockBlob"),t.type&&i.setRequestHeader("Content-Type",t.type),i.upload.onprogress=e=>{e.lengthComputable&&n(Math.round(e.loaded/e.total*100))},i.onload=()=>{i.status>=200&&i.status<300?o():a(new Error(`upload_status_${i.status}`))},i.onerror=()=>a(new Error("network")),i.onabort=()=>a({aborted:!0}),i.send(t)})}({url:u.uploadUrl,file:n,onProgress:t=>g(e,{progress:t}),registerXhr:t=>l.current.set(e,t)});const t=await async function({apiEndpoint:e,storageKey:t,filename:n,mimeType:r,authHeader:o}){let a;try{a=await fetch(Eg(e,"/api/v1/chat-attachments/confirm"),{method:"POST",credentials:"include",headers:{"Content-Type":"application/json",...o?{Authorization:o}:{}},body:JSON.stringify({storageKey:t,filename:n,mimeType:r})})}catch{return{ok:!1,code:"network",message:"Network error while verifying upload."}}if(a.ok)return{ok:!0};let i="Upload rejected - file content did not match its declared type.",s="content_mismatch";try{const e=await a.json();e?.error&&(i=e.error),"password_protected"===e?.code&&(s="password_protected")}catch{}return{ok:!1,code:s,message:i}}({apiEndpoint:r,storageKey:u.storageKey,filename:n.name,mimeType:n.type,authHeader:o});if(!t.ok)return l.current.delete(e),s(),c(),void f(e,t.code,t.message)}}}catch(t){if(l.current.delete(e),t&&t.aborted)return;return s(),c(),void f(e,"network","Upload failed. Please retry.")}l.current.delete(e),g(e,{status:"ready",progress:100,storageKey:h||u.storageKey,...p?{url:p}:{}})},[r,o,t,f,g]),b=I.useCallback(async e=>{const t=Array.from(e);for(const e of t){const t=u.current.filter(e=>"error"!==e.status).length,n=h(e,t),r=p();if(!n.ok){const t={id:r,filename:e.name,size:e.size,mimeType:e.type,status:"error",error:{code:n.code,message:n.message}};s(e=>(a&&a(t),[...e,t]));continue}const o={id:r,filename:e.name,size:e.size,mimeType:e.type,status:"uploading",progress:0,reservedBytes:0};s(e=>[...e,o]),d.current.bytes+=e.size,m(r,e)}},[h,m,p,a]),y=I.useCallback(e=>{const n=l.current.get(e);n&&(n.abort(),l.current.delete(e));const a=u.current.find(t=>t.id===e);a&&a.reservedBytes>0&&(jg({apiEndpoint:r,conversationId:t,size:a.reservedBytes,authHeader:o}),d.current.bytes=Math.max(0,d.current.bytes-a.reservedBytes)),s(t=>t.filter(t=>t.id!==e))},[r,o,t]),v=I.useCallback(()=>{for(const e of l.current.values())e.abort();l.current.clear(),s([])},[]),w=I.useMemo(()=>i.some(e=>"validating"===e.status||"uploading"===e.status),[i]),k=I.useCallback(()=>i.filter(e=>"ready"===e.status&&"string"==typeof e.storageKey).map(e=>({filename:e.filename,mimeType:e.mimeType,size:e.size,storageKey:e.storageKey,url:e.url})),[i]);return{attachments:i,addFiles:b,removeAttachment:y,clearAll:v,isBusy:w,toSendPayload:k}}function Ng(e){if(!e||e<1024)return`${e||0} B`;const t=["KB","MB","GB"];let n=e/1024,r=0;for(;n>=1024&&r<t.length-1;)n/=1024,r+=1;return`${n.toFixed(n>=10?0:1)} ${t[r]}`}function Fg({attachment:e,onRemove:t,isDark:n}){const r="error"===e.status,o="uploading"===e.status,a="ready"===e.status,i=r?n?"rgba(239,68,68,0.15)":"#fee2e2":n?"#1f2937":"#f3f4f6",s=r?n?"#b91c1c":"#fca5a5":n?"#374151":"#e5e7eb",l=r?n?"#fca5a5":"#b91c1c":n?"#e5e7eb":"#374151",c=r?`${e.filename} - ${e.error?.message||"error"}`:o?`${e.filename} - uploading`:`${e.filename} - ready`;return eg.jsxs("div",{className:"inline-flex items-center gap-2 rounded-full pl-2 pr-1 py-1 text-xs",style:{backgroundColor:i,border:`1px solid ${s}`,color:l,maxWidth:240},title:r?e.error?.message:e.filename,"aria-label":c,children:[r?eg.jsx(fp,{size:12,"aria-hidden":"true"}):o?eg.jsx(yp,{size:12,className:"animate-spin","aria-hidden":"true"}):eg.jsx(bp,{size:12,"aria-hidden":"true"}),eg.jsx("span",{className:"truncate",style:{maxWidth:140,direction:"ltr"},children:e.filename}),a&&eg.jsx("span",{className:"opacity-70 text-chip",children:Ng(e.size)}),o&&"number"==typeof e.progress&&eg.jsxs("span",{className:"opacity-70 text-chip",children:[e.progress,"%"]}),eg.jsx("button",{type:"button",onClick:()=>t(e.id),className:"w-4 h-4 rounded-full inline-flex items-center justify-center",style:{backgroundColor:"transparent",border:"none",color:l,cursor:"pointer"},"aria-label":"Remove attachment",children:eg.jsx(jp,{size:12})})]})}const Lg=({suggestions:e,onSuggestionClick:t,promptPrimary:n,promptTextColor:r,promptFontFamily:o,promptFontSize:a,isRtl:i,t:s,questionDisplay:l=!0})=>eg.jsx("div",{className:"mb-2 px-5",children:eg.jsx("div",{className:"flex flex-col gap-2",role:"group","aria-label":s("suggestedQuestions"),children:e.map((e,s)=>{const c=((e,t=!0)=>{if(!e||"string"==typeof e)return e||"";const n="string"==typeof e.text?e.text:"";if(!t)return n;const r="string"==typeof e.submitText?e.submitText.trim():"";return r&&r!==n?r:n})(e,l),u=zd(c,i);return eg.jsx("button",{type:"button",onClick:()=>t(e.submitText||e.text||e,e,s),dir:u?"rtl":"ltr",className:"block w-full rounded-2xl px-4 py-2 border-0 transition-transform duration-150 active:scale-[0.99] "+(u?"text-right":"text-left"),style:{direction:u?"rtl":"ltr",textAlign:u?"right":"left",background:`linear-gradient(135deg, ${n} 0%, ${n}dd 100%)`,color:r,fontFamily:o,fontSize:a},children:c},`${e.text||e}-${s}`)})})}),Rg=({onStopGeneration:e,inputValue:t,setInputValue:n,onSend:r,isDark:o,primaryColor:a,isOpen:i,isMinimized:s,isLoading:l,isConversationLoading:c=!1,placeholder:u,textColor:d,fontFamily:p,fontSize:g,isRtl:f=!1,csatVisible:h=!1,enableVoiceInteraction:m=!1,isVoiceSessionActive:b=!1,voiceStatus:y="idle",voiceError:v=null,onVoiceToggle:w,onBidiSubmit:k,disclaimerEnabled:x=!1,disclaimerText:S,disclaimerPosition:C="top",disclaimerLinkUrl:M,disclaimerLinkLabel:P,showPoweredBy:z=!0,onboardingQuestions:E=[],onboardingActive:j=!1,onboardingCompleted:T=!1,userMessageBubbleFontFamily:N,onboardingEnabled:F=!1,userMessageBubbleFontSize:L,userMessageBoxColor:R,resolvedUserMessageColor:A,userTextColor:_,promptSuggestions:B,onPromptSuggestionClick:D,autoPromptQuestionDisplay:O=!0,tagSelectorNode:$=null,showResolveButton:V=!1,onResolve:U,defaultLanguage:H="en",chatFeatures:W,apiEndpoint:q,organizationId:Q,conversationId:K})=>{const Y=I.useMemo(()=>jd(H),[H]),G=I.useMemo(()=>function(e){const t=Sd(e),n=wd[t]||vd;return{beforeBrand:n.poweredByBefore??n.poweredBy??vd.poweredByBefore,afterBrand:n.poweredByAfter??""}}(H),[H]),J=I.useMemo(()=>zd(t,f),[t,f]),[X,Z]=I.useState(!1),[ee,te]=I.useState(!1),ne=I.useMemo(()=>({fileUploadEnabled:W?.fileUploadEnabled??!1,fileUploadMaxSizeMB:W?.fileUploadMaxSizeMB??10,fileUploadMaxFiles:W?.fileUploadMaxFiles??3,fileUploadAllowedMimes:W?.fileUploadAllowedMimes??[]}),[W]),{attachments:re,addFiles:oe,removeAttachment:ae,clearAll:ie,isBusy:se,toSendPayload:le}=Tg({orgId:Q,conversationId:K,config:ne,apiEndpoint:q,authHeader:void 0}),ce=I.useRef(null),ue=I.useRef(new Set);I.useEffect(()=>{if(!b||!K||!q)return;const e=le().filter(e=>e.storageKey&&!ue.current.has(e.storageKey));e.length&&(e.forEach(e=>ue.current.add(e.storageKey)),fetch(`${String(q).replace(/\/$/,"")}/api/v1/chat-attachments/ingest`,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({conversationId:K,attachments:e.map(e=>({storageKey:e.storageKey}))})}).catch(()=>{}))},[b,K,q,re,le]);const de=!!ne.fileUploadEnabled&&!!q,pe=re.length>=ne.fileUploadMaxFiles,ge=`Max ${ne.fileUploadMaxFiles} files per message.`,fe=I.useMemo(()=>ne.fileUploadAllowedMimes.length>0?ne.fileUploadAllowedMimes.join(","):void 0,[ne.fileUploadAllowedMimes]),[he,me]=I.useState({top:0,left:0,placement:"top",arrowOffset:0}),[be,ye]=I.useState(!1),ve=I.useRef(null),we=I.useRef(null),ke=I.useRef(null),xe=I.useRef(null);Ap(p),Ap(N),I.useEffect(()=>{i&&!s&&we.current?.focus()},[i,s]),I.useEffect(()=>{const e=we.current;if(e){e.style.height="auto";const n=e.scrollHeight,r=t.trim().length>0?20:48,o=Math.max(r,Math.min(n,120));e.style.height=`${o}px`}},[t]);const Se=I.useCallback(()=>{const e=le();e.length>0?(r(void 0,e),ie()):r()},[le,ie,r]),Ce=re.some(e=>"ready"===e.status),Me=!t.trim()&&!Ce||l||c||se,Pe=o?"#374151":"#e5e7eb",ze=E&&E.length>0,Ee=h||c||F&&(ze&&!T)||"connecting"===y,je=h?Y("pleaseSubmitRatingFirst"):ze?j?Y("completeOnboardingToEnableVoice"):T?"":Y("sendMessageToCompleteOnboarding"):"",Te=()=>{if(!ke.current)return;const e=ke.current.getBoundingClientRect(),t=220,n=e.top,r=window.innerHeight-e.bottom;let o="top",a=0,i=0;n>=73?(o="top",a=e.top-60-5-8,i=e.right-t,i<10&&(i=10),i+t>window.innerWidth-10&&(i=window.innerWidth-t-10)):r>=68?(o="bottom",a=e.bottom+8,i=e.right-t,i<10&&(i=10),i+t>window.innerWidth-10&&(i=window.innerWidth-t-10)):(o="top",a=Math.max(10,e.top-60-5-8),i=e.right-t,i<10&&(i=10),i+t>window.innerWidth-10&&(i=window.innerWidth-t-10));return{top:a,left:i,placement:o,arrowOffset:e.left+e.width/2-i}};I.useEffect(()=>{if(ee&&je){const e=()=>{const e=Te();me(e)};return window.addEventListener("scroll",e,!0),window.addEventListener("resize",e),()=>{window.removeEventListener("scroll",e,!0),window.removeEventListener("resize",e)}}},[ee,je]),I.useEffect(()=>()=>{ve.current&&clearTimeout(ve.current)},[]);const Ne=null!=A?A:null!=R?R:null!=a?a:"#2563eb",Fe=null!=_?_:null!=d?d:"#FFFFFF",Le=null!=N?N:null!=p?p:"Inter",Re=null!=L?L:null!=g?g:null,Ae=Re?`calc(${Re} - 2px)`:"12px",_e=Ad(M);return eg.jsxs("div",{className:"py-4 flex-shrink-0 relative "+(o?"bg-gray-900":"bg-white"),style:{overflow:"visible"},children:[$||B.length>0&&D&&eg.jsx(Lg,{suggestions:B,onSuggestionClick:D,questionDisplay:O,promptPrimary:Ne,promptTextColor:Fe,promptFontFamily:Le,promptFontSize:Ae,isRtl:f,t:Y}),eg.jsx("div",{className:"my-4",style:{height:"1px",backgroundColor:Pe}}),de&&re.length>0&&eg.jsx("div",{className:"px-5 mb-2 flex flex-wrap gap-1.5",children:re.map(e=>eg.jsx(Fg,{attachment:e,onRemove:ae,isDark:o},e.id))}),eg.jsxs("div",{className:"flex items-center px-5 gap-1.5",children:[de&&eg.jsx("input",{ref:ce,type:"file",multiple:!0,accept:fe,"aria-label":Y("uploadFile"),className:"hidden",style:{display:"none"},onChange:e=>{const t=e.target.files;t&&t.length&&!pe&&oe(t),e.currentTarget.value=""}}),eg.jsxs("div",{className:`flex-1 flex items-center gap-1 px-1 min-h-[48px] ${o?"bg-gray-800":"bg-gray-50"} rounded-2xl transition-all duration-200`,style:{borderStyle:"solid",borderColor:t&&t.trim().length>0?a||"#2563eb":Pe,borderWidth:t&&t.trim().length>0?"2px":"1px"},children:[de&&eg.jsxs("div",{className:"relative group shrink-0",children:[eg.jsx("button",{type:"button",onClick:()=>ce.current&&ce.current.click(),disabled:h||c||l||pe,"aria-label":pe?ge:"Attach file",title:pe?ge:"Attach file",className:`h-8 w-8 rounded-lg flex items-center justify-center transition-colors duration-200 ${o?"text-gray-300 hover:bg-gray-700":"text-gray-500 hover:bg-gray-200"} disabled:opacity-40 disabled:cursor-not-allowed`,style:{border:"none"},children:eg.jsx(kp,{className:"w-4 h-4"})}),pe&&eg.jsx("div",{role:"tooltip",className:"pointer-events-none absolute bottom-full left-1/2 -translate-x-1/2 mb-2 opacity-0 group-hover:opacity-100 transition-opacity px-3 py-1.5 text-xs rounded-lg whitespace-nowrap shadow-lg "+(o?"bg-gray-700 text-gray-100":"bg-gray-800 text-white"),children:ge})]}),eg.jsx("div",{className:"relative flex-1 flex items-center min-w-0",children:eg.jsx("textarea",{id:"chat-widget-input",ref:we,"aria-label":u||Y("typeYourMessage"),value:t,onChange:e=>{n(e.target.value)},onFocus:()=>Z(!0),onBlur:()=>Z(!1),onKeyDown:e=>{if("Enter"===e.key&&!e.shiftKey){if(e.preventDefault(),b&&k&&!Ce)return void k();if(Me)return;Se()}},placeholder:c?Y("agentIsLoading"):u||Y("typeYourMessage"),rows:1,disabled:h||c||l||b&&"connected"!==y,dir:J?"rtl":"ltr",className:`w-full px-3 bg-transparent rounded-xl leading-normal ${o?"text-gray-100":"text-gray-900"} placeholder-gray-400 resize-none outline-none scrollbar-hide break-words`,style:{height:"auto",maxHeight:"120px",minHeight:"48px",paddingTop:t.trim().length>0?"12px":"0px",paddingBottom:t.trim().length>0?"12px":"0px",lineHeight:t.trim().length>0?"1.4":"48px",fontFamily:N||p||"Inter",fontSize:g||"14px",color:o?"#F3F4F6":"#1F2937",textAlign:J?"right":"left",direction:J?"rtl":"ltr",wordSpacing:"0",letterSpacing:"0"}})}),m&&eg.jsxs("div",{className:"relative shrink-0",onMouseEnter:()=>{if(Ee&&je){ve.current&&(clearTimeout(ve.current),ve.current=null);const e=Te();me(e),te(!0)}},onMouseLeave:()=>{ve.current&&(clearTimeout(ve.current),ve.current=null),te(!1)},children:[eg.jsx("button",{style:{border:"none"},ref:ke,type:"button",onClick:w,"aria-label":Y(b?"stopVoiceInput":"startVoiceInput"),className:`h-8 w-8 rounded-lg flex items-center justify-center transition-colors duration-200 ${b?"bg-red-500 text-white hover:bg-red-600":o?"text-gray-300 hover:bg-gray-700":"text-gray-500 hover:bg-gray-200"} ${Ee?"opacity-60 cursor-not-allowed":""}`,disabled:Ee,children:"connecting"===y?eg.jsx(yp,{className:"w-4 h-4 animate-spin"}):eg.jsx(up,{className:"w-4 h-4"})}),ee&&je&&"undefined"!=typeof document&&Hu.createPortal(eg.jsxs("div",{ref:xe,className:"px-3 py-1.5 text-xs shadow-md pointer-events-none",style:{position:"fixed",top:`${he.top}px`,left:`${he.left}px`,maxWidth:"220px",whiteSpace:"normal",wordWrap:"break-word",minWidth:"180px",zIndex:999999,backgroundColor:o?"#1f2937":"#ffffff",color:o?"#f3f4f6":"#111827",border:o?"1px solid #374151":"1px solid #e5e7eb",borderRadius:"top"===he.placement?"6px 6px 6px 6px":"6px",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",overflow:"visible"},children:[eg.jsx("div",{className:"text-left leading-relaxed",children:je}),"top"===he.placement&&eg.jsxs(eg.Fragment,{children:[eg.jsx("div",{style:{position:"absolute",top:"100%",left:`${he.arrowOffset}px`,transform:"translateX(-50%)",width:0,height:0,borderLeft:"6px solid transparent",borderRight:"6px solid transparent",borderTop:o?"6px solid #374151":"6px solid #e5e7eb",pointerEvents:"none"}}),eg.jsx("div",{style:{position:"absolute",top:"100%",left:`${he.arrowOffset}px`,transform:"translateX(-50%)",marginTop:"-1px",width:0,height:0,borderLeft:"5px solid transparent",borderRight:"5px solid transparent",borderTop:o?"5px solid #1f2937":"5px solid #ffffff",pointerEvents:"none"}})]}),"bottom"===he.placement&&eg.jsxs(eg.Fragment,{children:[eg.jsx("div",{className:"absolute bottom-full",style:{left:`${he.arrowOffset}px`,transform:"translateX(-50%)",width:0,height:0,borderLeft:"5px solid transparent",borderRight:"5px solid transparent",borderBottom:o?"5px solid #374151":"5px solid #e5e7eb"}}),eg.jsx("div",{className:"absolute bottom-full -mb-px",style:{left:`${he.arrowOffset}px`,transform:"translateX(-50%)",width:0,height:0,borderLeft:"4px solid transparent",borderRight:"4px solid transparent",borderBottom:o?"4px solid #1f2937":"4px solid #ffffff"}})]})]}),document.body)]})]}),l&&!b&&"function"==typeof e?eg.jsx("button",{onClick:e,className:"h-10 w-10 flex-shrink-0 rounded-xl transition-all duration-200 flex items-center justify-center shadow-md scale-100",style:{backgroundColor:a,color:"white",border:"none"},"aria-label":Y("stopGenerating"),children:eg.jsx(Cp,{className:"w-3.5 h-3.5",fill:"currentColor"})}):eg.jsx("button",{onClick:b&&k&&!Ce?k:Se,disabled:h||Me||b&&"connected"!==y,className:"h-10 w-10 flex-shrink-0 rounded-xl transition-all duration-200 flex items-center justify-center shadow-md disabled:opacity-40 disabled:cursor-not-allowed disabled:shadow-none "+(t.trim()?"scale-100":"scale-95"),style:{backgroundColor:t.trim()?a:o?"#374151":"#e5e7eb",color:t.trim()?"white":"#9ca3af",border:"none"},"aria-label":Y("sendMessage"),children:eg.jsx(Sp,{className:"w-4 h-4 transition-transform",style:f?{transform:"rotate(-90deg)"}:void 0})})]}),b&&eg.jsxs("p",{"aria-live":"polite",className:`text-xs mt-2 px-5 ${"connected"===y?"text-status-success":"text-gray-500"} flex items-center gap-1`,children:[eg.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-current inline-flex"}),Y("connected"===y?"voiceSessionLive":"connectingVoice")]}),v&&eg.jsx("p",{role:"alert",className:"text-xs mt-1 px-5 text-status-error",children:Y(v)===v?Y("voiceUnavailable"):Y(v)}),x&&S&&"footer"===C&&eg.jsxs("p",{className:"text-xs mt-2 px-5 text-center",style:{color:o?"#d1d5db":"#6b7280",fontFamily:p||"Inter",fontSize:g?`calc(${g} - 2px)`:"12px",direction:f?"rtl":"ltr"},dir:f?"rtl":"ltr",children:[S,_e&&P&&eg.jsx("a",{href:_e,target:"_blank",rel:"noopener noreferrer",title:_e,style:{color:o?"#93c5fd":"#2563eb",marginInlineStart:"4px",verticalAlign:"middle",display:"inline-flex",alignItems:"center"},children:P})]}),z&&eg.jsx("div",{className:"mt-1.5 flex justify-center",children:eg.jsx("a",{href:"https://eshal.ai",target:"_blank",rel:"noopener noreferrer",className:"no-underline",children:eg.jsxs("span",{dir:"ltr",className:"inline-flex items-center gap-1.5 py-1.5 px-3",children:[G.beforeBrand&&eg.jsx("span",{className:_d("font-sans text-[10px] font-medium",o?"text-gray-400":"text-gray-500"),children:G.beforeBrand}),be?eg.jsx("span",{className:_d("font-sans text-[10px] font-semibold",o?"text-gray-300":"text-gray-600"),children:"ESHAL"}):eg.jsx("img",{src:o?"data:image/svg+xml,%3csvg width='219' height='54' xmlns='http://www.w3.org/2000/svg' version='1.0'%3e%3cg class='layer'%3e%3ctitle%3eEshal Logo%3c/title%3e%3cg clip-path='url(%23a)' transform='translate(-.708 -1.076)'%3e%3cg clip-path='url(%23b)'%3e%3cpath d='M21.79 54.75h4.5l3.93-.56 4.49-1.4 3.38-1.97 2.81-2.25 2.24-2.81 2.25-3.93 1.13-3.09v-.85l-3.65-1.12h-.57l-1.96 4.5-1.97 3.09-2.81 2.53-3.93 1.96-3.38.85-2.81.28h-2.81l-4.21-.57-3.94-1.4-2.81-1.97-2.25-2.24-1.96-3.38-1.41-4.21-.56-3.37-.28-3.1v-3.65l.56-5.06 1.12-4.21 1.97-3.94 2.53-2.81 2.25-1.68 2.81-1.41 3.37-.84 2.25-.28H26l4.78.84 4.5 2.25 2.53 2.53 1.4 2.53.56 2.53-.28 3.65-1.12 2.25-1.41 1.69-1.4.55-1.13-4.21-1.68-2.81-1.97-1.97-3.09-1.4-1.12-.28h-5.34l-3.09 1.12-2.25 1.69-1.41 1.97-.84 3.09.28 3.08 1.4 2.82 1.97 1.96 2.81 1.41 2.25.56 4.78.28 3.09-.28.84-.28-1.12 3.09-1.69 1.97-2.25.84h-3.65l-2.81-1.12-1.68-1.41-3.38 2.25.56 1.13 1.13 1.4 2.81 1.69 2.81.84h4.78l2.81-.84 2.53-1.69 1.96-2.25L35 34.8l.84-4.5 3.65-2.24 2.53-2.53 1.69-3.09.56-2.25.28-2.81-.56-3.93-1.12-2.82-2.25-3.09-3.09-2.81-4.22-2.25-4.5-1.12-2.52-.28h-4.5l-3.93.56-4.5 1.41-3.38 1.96-3.37 3.1-2.52 3.65-1.97 4.49-1.13 4.78-.28 2.25v9.27l.84 5.06 1.69 4.78 1.69 3.09 2.25 2.81 2.8 2.53 2.82 1.69 5.06 1.68zm1.12-27.54-2.53-.84-1.4-1.12-.84-1.69.28-2.53 1.12-1.4 2.25-1.13H26l2.81 1.41 1.41 1.97.84 2.8v2.25l-1.12.28zm0 0' fill='white'/%3e%3c/g%3e%3c/g%3e%3cpath d='M82.381 38.435v6.48h-27.06V9.965h26.41v6.5h-18.36v7.57h16.22v6.3h-16.22v8.1zm16.432 7.07c-2.77 0-5.44-.37-8.02-1.11-2.57-.75-4.65-1.72-6.22-2.92l2.75-6.09c1.5 1.09 3.28 1.98 5.34 2.64 2.07.67 4.13 1 6.19 1q3.45 0 5.1-1.02t1.65-2.73c0-.83-.33-1.52-.98-2.06-.65-.55-1.48-1-2.5-1.33-1.01-.33-2.39-.7-4.11-1.1-2.67-.63-4.85-1.26-6.55-1.89s-3.15-1.64-4.37-3.04c-1.21-1.41-1.82-3.27-1.82-5.6 0-2.03.55-3.86 1.64-5.51 1.11-1.66 2.76-2.96 4.97-3.92 2.22-.97 4.93-1.46 8.13-1.46 2.22 0 4.4.27 6.53.8s4 1.3 5.59 2.3l-2.5 6.14c-3.23-1.82-6.45-2.74-9.67-2.74-2.27 0-3.95.37-5.03 1.1-1.07.73-1.61 1.69-1.61 2.89q0 1.8 1.86 2.67c1.25.59 3.16 1.16 5.72 1.72 2.66.63 4.85 1.27 6.55 1.9 1.69.63 3.14 1.63 4.36 2.99 1.21 1.37 1.82 3.21 1.82 5.55 0 2-.56 3.82-1.67 5.46q-1.68 2.475-5.01 3.93c-2.23.95-4.95 1.43-8.14 1.43m50.913-35.54v34.95h-8.08v-14.33h-15.88v14.33h-8.09V9.965h8.09v13.78h15.88V9.965zm29.811 27.47h-16.22l-3.1 7.48h-8.29l15.58-34.95h7.98l15.62 34.95h-8.48zm-2.55-6.15-5.55-13.37-5.53 13.37zm16.274-21.32h8.09v28.36h17.52v6.59h-25.61zm0 0' fill='white'/%3e%3c/g%3e%3c/svg%3e":"data:image/svg+xml,%3csvg width='219' height='54' xmlns='http://www.w3.org/2000/svg' version='1.0'%3e%3cg class='layer'%3e%3ctitle%3eEshal Logo%3c/title%3e%3cg clip-path='url(%23a)' transform='translate(-.708 -1.076)'%3e%3cg clip-path='url(%23b)'%3e%3cpath d='M21.79 54.75h4.5l3.93-.56 4.49-1.4 3.38-1.97 2.81-2.25 2.24-2.81 2.25-3.93 1.13-3.09v-.85l-3.65-1.12h-.57l-1.96 4.5-1.97 3.09-2.81 2.53-3.93 1.96-3.38.85-2.81.28h-2.81l-4.21-.57-3.94-1.4-2.81-1.97-2.25-2.24-1.96-3.38-1.41-4.21-.56-3.37-.28-3.1v-3.65l.56-5.06 1.12-4.21 1.97-3.94 2.53-2.81 2.25-1.68 2.81-1.41 3.37-.84 2.25-.28H26l4.78.84 4.5 2.25 2.53 2.53 1.4 2.53.56 2.53-.28 3.65-1.12 2.25-1.41 1.69-1.4.55-1.13-4.21-1.68-2.81-1.97-1.97-3.09-1.4-1.12-.28h-5.34l-3.09 1.12-2.25 1.69-1.41 1.97-.84 3.09.28 3.08 1.4 2.82 1.97 1.96 2.81 1.41 2.25.56 4.78.28 3.09-.28.84-.28-1.12 3.09-1.69 1.97-2.25.84h-3.65l-2.81-1.12-1.68-1.41-3.38 2.25.56 1.13 1.13 1.4 2.81 1.69 2.81.84h4.78l2.81-.84 2.53-1.69 1.96-2.25L35 34.8l.84-4.5 3.65-2.24 2.53-2.53 1.69-3.09.56-2.25.28-2.81-.56-3.93-1.12-2.82-2.25-3.09-3.09-2.81-4.22-2.25-4.5-1.12-2.52-.28h-4.5l-3.93.56-4.5 1.41-3.38 1.96-3.37 3.1-2.52 3.65-1.97 4.49-1.13 4.78-.28 2.25v9.27l.84 5.06 1.69 4.78 1.69 3.09 2.25 2.81 2.8 2.53 2.82 1.69 5.06 1.68zm1.12-27.54-2.53-.84-1.4-1.12-.84-1.69.28-2.53 1.12-1.4 2.25-1.13H26l2.81 1.41 1.41 1.97.84 2.8v2.25l-1.12.28zm0 0' fill='black'/%3e%3c/g%3e%3c/g%3e%3cpath d='M82.381 38.435v6.48h-27.06V9.965h26.41v6.5h-18.36v7.57h16.22v6.3h-16.22v8.1zm16.432 7.07c-2.77 0-5.44-.37-8.02-1.11-2.57-.75-4.65-1.72-6.22-2.92l2.75-6.09c1.5 1.09 3.28 1.98 5.34 2.64 2.07.67 4.13 1 6.19 1q3.45 0 5.1-1.02t1.65-2.73c0-.83-.33-1.52-.98-2.06-.65-.55-1.48-1-2.5-1.33-1.01-.33-2.39-.7-4.11-1.1-2.67-.63-4.85-1.26-6.55-1.89s-3.15-1.64-4.37-3.04c-1.21-1.41-1.82-3.27-1.82-5.6 0-2.03.55-3.86 1.64-5.51 1.11-1.66 2.76-2.96 4.97-3.92 2.22-.97 4.93-1.46 8.13-1.46 2.22 0 4.4.27 6.53.8s4 1.3 5.59 2.3l-2.5 6.14c-3.23-1.82-6.45-2.74-9.67-2.74-2.27 0-3.95.37-5.03 1.1-1.07.73-1.61 1.69-1.61 2.89q0 1.8 1.86 2.67c1.25.59 3.16 1.16 5.72 1.72 2.66.63 4.85 1.27 6.55 1.9 1.69.63 3.14 1.63 4.36 2.99 1.21 1.37 1.82 3.21 1.82 5.55 0 2-.56 3.82-1.67 5.46q-1.68 2.475-5.01 3.93c-2.23.95-4.95 1.43-8.14 1.43m50.913-35.54v34.95h-8.08v-14.33h-15.88v14.33h-8.09V9.965h8.09v13.78h15.88V9.965zm29.811 27.47h-16.22l-3.1 7.48h-8.29l15.58-34.95h7.98l15.62 34.95h-8.48zm-2.55-6.15-5.55-13.37-5.53 13.37zm16.274-21.32h8.09v28.36h17.52v6.59h-25.61zm0 0' fill='black'/%3e%3c/g%3e%3c/svg%3e",alt:"ESHAL",className:_d("h-3",o?"opacity-60":"opacity-50"),onError:()=>ye(!0)}),G.afterBrand&&eg.jsx("span",{className:_d("font-sans text-[10px] font-medium",o?"text-gray-400":"text-gray-500"),children:G.afterBrand})]})})})]})},Ag=["sun","mon","tue","wed","thu","fri","sat"];function _g(e){if(!e||"string"!=typeof e)return null;const t=e.match(/^(\d{1,2}):(\d{2})/);if(!t)return null;const n=parseInt(t[1],10),r=parseInt(t[2],10);return Number.isNaN(n)||Number.isNaN(r)?null:60*n+r}function Ig(e,t=new Date,n={}){if(!e||!e.showStatus)return null;const r=n.online||"Online now",o=n.officeOpen||"Online now",a=n.offlineFallback||"Offline";if("officeHours"!==e.statusMode)return{online:!0,label:r};const i=e.officeHours||{},{dayKey:s,minutes:l}=function(e,t){try{const n=new Intl.DateTimeFormat("en-US",{timeZone:e||void 0,weekday:"short",hour:"2-digit",minute:"2-digit",hour12:!1}).formatToParts(t),r=(n.find(e=>"weekday"===e.type)||{}).value||"";let o=parseInt((n.find(e=>"hour"===e.type)||{}).value||"0",10);const a=parseInt((n.find(e=>"minute"===e.type)||{}).value||"0",10);return 24===o&&(o=0),{dayKey:r.slice(0,3).toLowerCase(),minutes:60*o+a}}catch{return{dayKey:Ag[t.getDay()],minutes:60*t.getHours()+t.getMinutes()}}}(i.timezone,t),c=Array.isArray(i.days)?i.days.map(e=>String(e).slice(0,3).toLowerCase()):[],u=_g(i.open),d=_g(i.close);if(c.includes(s)&&(null!=u&&null!=d&&(u<=d?l>=u&&l<d:l>=u||l<d))){return{online:!0,label:(i.onlineMessage||"").trim()||o}}return{online:!1,label:(i.offlineMessage||"").trim()||a}}const Bg=({conciergeName:e,companyName:t,companyLogo:n,primaryColor:r,isDark:o,isMinimized:a=!1,textColor:i,fontFamily:s,fontSize:l,onToggleTheme:c,onMinimize:u,onClose:d,headerTextBold:p=!1,headerTextItalic:g=!1,headerTextColor:f,headerFontFamily:h,headerFontSize:m,subtitle:b=null,showStatus:y=!1,statusMode:v="always",officeHours:w=null,onRefreshChat:k,onCopyChat:x,defaultLanguage:S="en"})=>{const C=r,M=f||"#FFFFFF",P=h||s||"Inter",z=m||l;Ap(P);const E=I.useMemo(()=>jd(S),[S]),j=Cd(S),T=I.useMemo(()=>zd(b,j),[b,j]),N=I.useMemo(()=>Ig({showStatus:y,statusMode:v,officeHours:w}),[y,v,w]),[F,L]=I.useState(!1),R=I.useRef(null),A=I.useRef(null);I.useEffect(()=>{if(!F)return;const e=e=>{R.current&&!e.composedPath().includes(R.current)&&L(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[F]);const _=I.useRef(!1);I.useEffect(()=>{if(F){_.current=!0;const e=R.current?.querySelector('[role="menuitem"]');e?.focus()}else _.current&&(_.current=!1,A.current?.focus())},[F]);const B=M;return eg.jsxs("div",{className:`text-white ${a?"px-4 py-2.5":"px-3 py-4"} flex items-center justify-between relative overflow-visible rounded-t-2xl z-[60]`,style:{background:C,fontFamily:P},children:[eg.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0 pl-1",children:[eg.jsxs("div",{className:"relative w-11 h-11 flex-shrink-0",children:[eg.jsx("div",{className:"w-full h-full rounded-full overflow-hidden flex items-center justify-center bg-white/20",children:n?eg.jsx("img",{src:n,alt:"Logo",style:{display:"block",width:"100%",height:"100%",objectFit:"contain"},loading:"lazy"}):eg.jsx("span",{className:"text-lg font-semibold leading-none",style:{color:B},children:(e||t||"")?.charAt(0)?.toUpperCase()})}),N?eg.jsx("span",{title:N.label,className:_d("absolute bottom-0 h-3 w-3 rounded-full ring-2 ring-white",j?"left-0":"right-0"),style:{backgroundColor:N.online?"#22c55e":"#9ca3af",boxShadow:N.online?"0 0 0 3px rgba(34,197,94,0.25)":"none"},"aria-hidden":"true"}):null]}),eg.jsxs("div",{className:"flex flex-col justify-center min-w-0",style:{fontFamily:P},children:[eg.jsx("h3",{title:e,className:_d("font-semibold leading-snug truncate",p&&"font-bold",g&&"italic"),style:{fontSize:z?`calc(${z} + 2px)`:"15px",color:B},children:e}),b?eg.jsx("p",{title:b,className:"leading-snug truncate opacity-75",dir:T?"rtl":"ltr",style:{fontSize:"12px",color:B,textAlign:T?"right":"left"},children:b}):null]})]}),eg.jsxs("div",{className:"flex items-center gap-0 relative z-10 text-white flex-shrink-0 ml-1",children:[eg.jsxs("div",{className:"relative",ref:R,children:[eg.jsx("button",{type:"button",ref:A,"aria-label":E("menu"),"aria-expanded":F,"aria-haspopup":"true",onClick:()=>L(e=>!e),onKeyDown:e=>{"Escape"===e.key&&F&&(e.preventDefault(),L(!1))},className:"inline-flex h-7 w-7 items-center justify-center cursor-pointer transition-opacity duration-200 hover:opacity-80 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/40 rounded-full border-0 bg-transparent p-0",style:{color:B},children:eg.jsx(mp,{className:"w-4 h-4",strokeWidth:1.6})}),F&&eg.jsxs("div",{role:"menu","aria-label":E("menu"),dir:j?"rtl":"ltr",onKeyDown:e=>{if("Escape"===e.key)return e.preventDefault(),void L(!1);if("Tab"===e.key){const t=R.current?Array.from(R.current.querySelectorAll('[role="menuitem"]')):[];if(0===t.length)return;const n=t[0],r=t[t.length-1],o=document.activeElement;e.shiftKey&&o===n?(e.preventDefault(),r.focus()):e.shiftKey||o!==r||(e.preventDefault(),n.focus())}},className:`absolute top-full mt-1 w-44 rounded-xl border shadow-lg py-1 z-[9999] animate-in fade-in slide-in-from-top-1 duration-150 ${j?"left-0":"right-0"} ${o?"bg-gray-800 border-gray-700":"bg-white border-gray-200"}`,style:{fontFamily:P},children:[eg.jsxs("button",{role:"menuitem",onClick:()=>{L(!1),k?.()},className:"flex items-center gap-2.5 w-full px-3 py-2 text-sm leading-5 transition-colors cursor-pointer "+(o?"text-gray-200 hover:bg-gray-700":"text-gray-700 hover:bg-gray-50"),style:{fontFamily:P,fontSize:"14px",border:"none",background:"transparent",appearance:"none",WebkitAppearance:"none",textAlign:j?"right":"left"},children:[eg.jsx(xp,{className:"w-3.5 h-3.5 flex-shrink-0"}),E("refreshChat")]}),eg.jsxs("button",{role:"menuitem",onClick:()=>{L(!1),x?.()},className:"flex items-center gap-2.5 w-full px-3 py-2 text-sm leading-5 transition-colors cursor-pointer "+(o?"text-gray-200 hover:bg-gray-700":"text-gray-700 hover:bg-gray-50"),style:{fontFamily:P,fontSize:"14px",border:"none",background:"transparent",appearance:"none",WebkitAppearance:"none",textAlign:j?"right":"left"},children:[eg.jsx(hp,{className:"w-3.5 h-3.5 flex-shrink-0"}),E("copyChat")]}),eg.jsxs("button",{role:"menuitem",onClick:()=>{L(!1),c?.()},className:"flex items-center gap-2.5 w-full px-3 py-2 text-sm leading-5 transition-colors cursor-pointer "+(o?"text-gray-200 hover:bg-gray-700":"text-gray-700 hover:bg-gray-50"),style:{fontFamily:P,fontSize:"14px",border:"none",background:"transparent",appearance:"none",WebkitAppearance:"none",textAlign:j?"right":"left"},children:[o?eg.jsx(Pp,{className:"w-3.5 h-3.5 flex-shrink-0"}):eg.jsx(wp,{className:"w-3.5 h-3.5 flex-shrink-0"}),E(o?"lightMode":"nightMode")]})]})]}),eg.jsx("button",{type:"button","aria-label":E("close"),onClick:d,className:"inline-flex h-7 w-7 items-center justify-center cursor-pointer transition-opacity duration-200 hover:opacity-80 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/40 rounded-full border-0 bg-transparent p-0",style:{color:B},children:eg.jsx(jp,{className:"w-3.5 h-3.5",strokeWidth:1.6})})]})]})},Dg=({questions:e=[],collapsiblePrompt:t,onSubmit:n,primaryColor:r="#2563eb",isRtl:o=!1,isDark:a=!1,defaultLanguage:i="en"})=>{const s=I.useMemo(()=>jd(i),[i]),[l,c]=I.useState({}),[u,d]=I.useState({}),[p,g]=I.useState(!1),f=I.useRef({}),h=[...e].sort((e,t)=>Bd(e.fieldType)-Bd(t.fieldType));return eg.jsx("div",{className:"flex flex-col items-center justify-center p-5 h-full min-h-0 z-50 relative ",style:a?{backgroundColor:"#10141C"}:void 0,children:eg.jsxs("div",{className:"w-full max-w-sm rounded-3xl shadow-xl border p-8 transition-colors duration-300 bg-white border-gray-100",style:a?{backgroundColor:"#1E232B",border:"1px solid #2A303C",borderRadius:"14px"}:void 0,children:[t&&eg.jsx("div",{className:"mb-5 text-left",children:eg.jsx("h3",{className:"transition-colors duration-300 text-h4 font-semibold "+(a?"text-white":"text-[#4A5568]"),children:t})}),eg.jsxs("form",{onSubmit:async e=>{e.preventDefault();const t=(()=>{const e={};return h.forEach(t=>{const n=t.fieldType||"question",r=(l[n]??"").trim(),o=t.collectionPrompt||t.askToType||t.question||t.label||n,a=!0===t.required||"true"===t.required;r?("fullName"!==n&&"name"!==n||r.length<2&&(e[n]=s("nameInvalid")),"email"!==n||/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(r)||(e[n]=s("emailInvalid")),"phone"!==n&&"mobileno"!==n||/^[+]?[\d\s-]{8,15}$/.test(r)||(e[n]=s("phoneInvalid"))):a&&(e[n]="email"===n?s("emailRequired"):"fullName"===n||"name"===n?s("nameRequired"):"phone"===n||"mobileno"===n?s("phoneRequired"):`${o} ${s("fieldRequiredSuffix")}`)}),d(e),e})();if(Object.keys(t).length>0){const e=h.map((e,t)=>e.fieldType||`question_${t}`).find(e=>t[e]);return void f.current[e]?.focus()}g(!0);try{await n(l)}finally{g(!1)}},className:"space-y-4",noValidate:!0,children:[h.map((e,t)=>{const n=e.fieldType||`question_${t}`,r=e.collectionPrompt||e.askToType||e.question||e.label;if(!r?.trim())return null;let i="text";"email"===n&&(i="email"),"phone"!==n&&"mobileno"!==n||(i="tel");const p=(n||"").toLowerCase(),g="fullname"===p||"name"===p||"username"===p,h="phone"===p||"mobileno"===p,m="email"===p?s("onboardingEmailPlaceholder"):g?s("onboardingNamePlaceholder"):h?s("onboardingPhonePlaceholder"):r,b=u[n],y="w-full h-12 rounded-lg text-sm px-4 outline-none border transition-colors focus:ring-0 "+(a?"text-white placeholder:text-[#A2A9B2] focus:border-[#5A6069]":"bg-white text-gray-900 placeholder:text-[#8C8C8C] focus:border-[#B0B0B0]"),v=b?"!border-status-error focus:!border-status-error":"",w=`onboarding-field-${n}`,k=`${w}-error`;return eg.jsxs("div",{className:"space-y-1",children:[eg.jsx("label",{htmlFor:w,className:"sr-only",children:r}),eg.jsx("input",{id:w,ref:e=>{f.current[n]=e},placeholder:m,type:i,value:l[n]??"",onChange:e=>((e,t)=>{c(n=>({...n,[e]:t})),u[e]&&d(t=>{const n={...t};return delete n[e],n})})(n,e.target.value),className:`${y} ${v}`,"aria-invalid":b?"true":"false","aria-describedby":b?k:void 0,style:{direction:o?"rtl":"ltr",...a?{backgroundColor:"#272C35",borderWidth:"1px",borderStyle:"solid",borderColor:b?void 0:"#3F444C"}:{borderWidth:"1px",borderStyle:"solid",borderColor:b?void 0:"#E0E0E0"}}}),b&&eg.jsx("p",{id:k,role:"alert",className:"text-xs text-status-error px-1",children:u[n]})]},n)}),eg.jsx("button",{type:"submit",disabled:p,"aria-busy":p,"aria-label":p?s("submitting"):void 0,className:"w-full h-12 text-sm border-none font-semibold shadow-xl hover:shadow-xl hover:scale-[1.02] active:scale-[0.98] transition-all rounded-xl mt-4 text-white",style:{backgroundColor:r},children:p?eg.jsx(yp,{className:"w-5 h-5 animate-spin","aria-hidden":"true"}):s("startChat")})]})]})})},Og=({categories:e=[],selectedCategoryId:t=null,onSelect:n,isDark:r=!1,primaryColor:o="#2563eb",fontFamily:a="Inter",isRtl:i=!1})=>{const s=I.useRef(null),[l,c]=I.useState(!1),[u,d]=I.useState(!1),p=I.useCallback(()=>{const e=s.current;if(!e)return;const{scrollLeft:t,scrollWidth:n,clientWidth:r}=e;c(Math.abs(t)>1),d(Math.abs(t)+r<n-1)},[]);I.useEffect(()=>{p();const e=s.current;if(!e)return;const t=new ResizeObserver(p);return t.observe(e),()=>t.disconnect()},[p,e]);const g=I.useCallback(e=>{const t=s.current;if(!t)return;const n="left"===e?-150:150;t.scrollBy({left:i?-n:n,behavior:"smooth"})},[i]);if(!Array.isArray(e)||0===e.length)return null;const f=r?"rgba(31,41,55,0.85)":"rgba(255,255,255,0.95)",h=r?"#e5e7eb":"#374151",m=r?"#4b5563":"#d1d5db",b=r?"#111827":"#ffffff",y=r?"#374151":"#e5e7eb";return eg.jsxs("div",{className:"flex-shrink-0 px-2 py-2 border-b flex items-center gap-1",style:{backgroundColor:b,borderColor:y,fontFamily:a,direction:i?"rtl":"ltr"},role:"region","aria-label":"Filter by category",children:[eg.jsx("button",{type:"button",onClick:()=>g("left"),disabled:!l,"aria-label":"Scroll categories left",className:"flex-shrink-0 flex items-center justify-center w-6 h-6 rounded-full transition-all duration-200",style:{backgroundColor:f,border:`1px solid ${m}`,color:h,opacity:l?1:.3,cursor:l?"pointer":"default"},children:eg.jsx(pp,{size:14})}),eg.jsx("div",{ref:s,onScroll:p,className:"flex-1 flex gap-2 overflow-x-auto",style:{scrollBehavior:"smooth",WebkitOverflowScrolling:"touch",scrollbarWidth:"none",msOverflowStyle:"none"},children:e.map(e=>{const i=t===e.id;return eg.jsx("button",{type:"button",onClick:()=>n?.(i?null:e.id),"aria-pressed":i,className:"flex-shrink-0 inline-flex items-center gap-1.5 px-3 py-1.5 rounded-full text-xs font-medium transition-all duration-150 whitespace-nowrap",style:{backgroundColor:r?"#1f2937":"#ffffff",border:i?`1.5px solid ${o}`:"1px solid "+(r?"#374151":"#e5e7eb"),color:i?o:r?"#e5e7eb":"#374151",fontFamily:a},children:eg.jsx("span",{children:e.label})},e.id)})}),eg.jsx("button",{type:"button",onClick:()=>g("right"),disabled:!u,"aria-label":"Scroll categories right",className:"flex-shrink-0 flex items-center justify-center w-6 h-6 rounded-full transition-all duration-200",style:{backgroundColor:f,border:`1px solid ${m}`,color:h,opacity:u?1:.3,cursor:u?"pointer":"default"},children:eg.jsx(gp,{size:14})})]})},$g=({categories:e=[],selectedCategoryId:t=null,onSelect:n,isDark:r=!1,primaryColor:o="#2563eb",fontFamily:a="Inter",fontSize:i="14px",isRtl:s=!1,label:l="Choose a topic to get started:"})=>{if(!Array.isArray(e)||0===e.length)return null;const c=r?"#9ca3af":"#6b7280";return eg.jsxs("div",{className:"pl-[50px] pt-1",style:{direction:s?"rtl":"ltr",paddingLeft:s?0:50,paddingRight:s?50:void 0},role:"region","aria-label":"Category filter",children:[eg.jsx("div",{className:"mb-2",style:{color:c,fontFamily:a,fontSize:`calc(${i} - 1px)`},children:l}),eg.jsx("div",{className:"flex flex-wrap gap-2",children:e.map(e=>{const s=t===e.id;return eg.jsx("button",{type:"button",onClick:()=>n?.(s?null:e.id),"aria-pressed":s,className:"inline-flex items-center gap-1.5 px-3 py-1.5 rounded-full transition-all duration-150 hover:scale-[1.02] active:scale-[0.98]",style:{backgroundColor:r?"#1f2937":"#ffffff",border:s?`1.5px solid ${o}`:"1px solid "+(r?"#374151":"#e5e7eb"),color:s?o:r?"#e5e7eb":"#374151",fontFamily:a,fontSize:`calc(${i} - 1px)`,fontWeight:500},children:e.label},e.id)})})]})};const Vg=[{value:"😡",label:"😡",bg:"bg-red-200"},{value:"😕",label:"😕",bg:"bg-orange-200"},{value:"😐",label:"😐",bg:"bg-yellow-200"},{value:"😊",label:"😊",bg:"bg-green-200"},{value:"😍",label:"😍",bg:"bg-pink-200"}],Ug=[{value:"positive",label:"👍"},{value:"negative",label:"👎"}],Hg=[{value:"1",label:"1"},{value:"2",label:"2"},{value:"3",label:"3"},{value:"4",label:"4"},{value:"5",label:"5"}],Wg=[{value:"1",label:"⭐"},{value:"2",label:"⭐"},{value:"3",label:"⭐"},{value:"4",label:"⭐"},{value:"5",label:"⭐"}],qg=({format:e="EMOJI",prompt:t="How was your experience?",onRating:n,disabled:r=!1,isDark:o=!1,primaryColor:a="#2563eb",defaultLanguage:i="en"})=>{const s=I.useMemo(()=>jd(i),[i]),[l,c]=I.useState(null),[u,d]=I.useState(null),[p,g]=I.useState(!1),f=async t=>{if(!r&&!p){c(t),g(!0);try{n&&n(t,e)}finally{g(!1)}}},h=(()=>{switch(e){case"THUMBS":return Ug;case"NUMERIC":return Hg;case"STARS":return Wg;default:return Vg}})();return eg.jsxs("div",{className:_d("transition-all duration-200 rounded-xl px-4",o?"bg-slate-800/50":"bg-slate-50/50"),children:[eg.jsx("p",{className:_d("text-sm font-semibold text-center mb-3",o?"text-gray-300":"text-gray-500/80"),children:t}),eg.jsxs("div",{className:"flex justify-center items-center",children:["EMOJI"===e&&eg.jsx("div",{className:"flex gap-2 justify-center items-center",children:h.map(e=>eg.jsx("button",{onClick:()=>f(e.value),disabled:r||p,className:_d("flex items-center justify-center text-2xl transition-transform","bg-transparent border-0 p-0 cursor-pointer","hover:scale-110 active:scale-95 disabled:opacity-50 disabled:cursor-not-allowed","focus:outline-none focus:ring-0",l===e.value?"":"opacity-80"),children:eg.jsx("span",{role:"img","aria-label":`${s("rate")} ${e.value}`,children:e.label})},e.value))}),"THUMBS"===e&&eg.jsx("div",{className:"flex gap-6 justify-center items-center",role:"group","aria-label":s("rateExperience"),children:h.map(e=>eg.jsx("button",{"aria-label":1===e.value?s("thumbsUp"):s("thumbsDown"),onClick:()=>f(e.value),disabled:r||p,className:_d("w-10 h-10 rounded-xl border flex items-center justify-center shadow-md text-2xl transition-all","hover:scale-105 active:scale-95 disabled:opacity-50 disabled:cursor-not-allowed","drop-shadow-md",o?"bg-gray-700 border-gray-600 hover:bg-gray-600":"bg-white border-gray-100 hover:bg-gray-50",l===e.value&&"ring-2 ring-primary/40 scale-110"),style:{borderColor:l===e.value?a:void 0},children:eg.jsx("span",{className:"drop-shadow-md","aria-hidden":"true",children:e.label})},e.value))}),"NUMERIC"===e&&eg.jsx("div",{className:"flex gap-2 justify-center items-center",role:"group","aria-label":s("rateExperience"),children:h.map(e=>eg.jsx("button",{"aria-label":`${s("rate")} ${e.value}`,onClick:()=>f(e.value),disabled:r||p,className:_d("w-10 h-10 rounded-lg flex items-center justify-center text-sm font-semibold transition-all","hover:scale-105 active:scale-95 disabled:opacity-50 disabled:cursor-not-allowed",l===e.value?"ring-2 ring-primary/40 scale-110 shadow-md text-white":o?"bg-gray-700 border border-gray-600 text-gray-300 hover:bg-gray-600":"bg-white border border-gray-200 text-gray-700 hover:bg-gray-50"),style:{backgroundColor:l===e.value?a:void 0,borderColor:l===e.value?a:void 0},children:e.label},e.value))}),"STARS"===e&&eg.jsx("div",{className:"flex gap-2 justify-center items-center",onMouseLeave:()=>d(null),children:h.map(e=>{const t=u===e.value;return eg.jsx("button",{onClick:()=>f(e.value),onMouseEnter:()=>d(e.value),disabled:r||p,className:_d("flex items-center justify-center text-2xl","bg-transparent border-0 p-0 cursor-pointer focus:outline-none","disabled:opacity-50 disabled:cursor-not-allowed"),style:{transform:t?"scale(1.25)":"scale(1)",filter:t?"brightness(1.1) drop-shadow(0 2px 4px rgba(0,0,0,0.15))":"none",opacity:t?1:.6,transition:"all 0.2s ease"},"aria-label":`${s("rate")} ${e.value}`,children:eg.jsx("span",{"aria-hidden":"true",children:e.label})},e.value)})})]}),p&&eg.jsx("p",{"aria-live":"polite",className:_d("text-xs mt-3 text-center",o?"text-slate-400":"text-slate-500"),children:s("submittingFeedback")})]})};async function Qg({apiBaseUrl:e,conversationId:t,chip:n,submitText:r,position:o,source:a="widget",getAuthToken:i,enabled:s=!0}={}){try{if(!1===s)return!1;if(!e||"string"!=typeof e)return!1;if(!t||"string"!=typeof t)return!1;const l=function({chip:e,submitText:t,position:n,conversationId:r,source:o="widget"}={}){const a=e&&"object"==typeof e,i=a&&"string"==typeof e.text?e.text:"",s="string"==typeof t&&t?t:a&&"string"==typeof e.submitText?e.submitText:"string"==typeof e?e:"",l=i||s;if(!l)return null;const c={conversationId:r,chipText:l,submitText:s||void 0,position:Number.isInteger(n)?n:void 0,source:o},u=a?e?.promptId:void 0;return"string"==typeof u&&u&&(c.promptId=u),c}({chip:n,submitText:r,position:o,conversationId:t,source:a});if(!l)return!1;const c=`${e.replace(/\/$/,"")}/api/v1/support/chip-click`,u=JSON.stringify(l);let d;if("function"==typeof i)try{d=await i()}catch{d=void 0}if(!d&&"undefined"!=typeof navigator&&"function"==typeof navigator.sendBeacon&&"undefined"!=typeof Blob)try{if(navigator.sendBeacon(c,new Blob([u],{type:"application/json"})))return!0}catch{}if("function"!=typeof fetch)return!1;const p={"Content-Type":"application/json"};return d&&(p.Authorization=`Bearer ${d}`),await fetch(c,{method:"POST",headers:p,credentials:"include",keepalive:!0,body:u}),!0}catch{return!1}}const Kg="#ffffff",Yg="#f5f5f5",Gg="#000000",Jg="#1f2937",Xg="#f3f4f6",Zg="#2563eb",ef="eshal:widget:size",tf=(e,t)=>!e||(e=>e?.trim().toLowerCase())(e)===t,nf=e=>(e instanceof Date?e:new Date(e)).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!0}).replace(/am|pm/i,e=>e.toUpperCase()),rf=e=>{const t=(e||"EMOJI").toString().trim().toUpperCase();return"THUMBS"===t||"THUMB"===t?"THUMBS":"STARS"===t||"STAR"===t?"STARS":"NUMERIC"===t||"NUMBER"===t?"NUMERIC":"EMOJI"},of=({isOpen:e,isMinimized:t,isDark:n,onStopGeneration:r,primaryColor:o,textColor:a,conciergeName:i,companyName:s,companyLogo:l,chatbotAvatarEnabled:c,chatbotAvatar:u,messages:d,isLoading:p,isConversationLoading:g=!1,inputValue:f,setInputValue:h,onSend:m,onDirectSend:b,onToggleTheme:y,onMinimize:v,onClose:w,quickQuestions:k=[],quickQuestionsEnabled:x,onQuickQuestion:S,quickQuestionsLayout:C="vertical",agentMessageBubbleColor:M,userMessageBoxColor:P,assistantTextColor:z,userTextColor:E,fontFamily:j="Inter",agentMessageBubbleFontFamily:T,agentMessageBubbleFontSize:N,userMessageBubbleFontFamily:F,userMessageBubbleFontSize:L,fontSize:R="14px",defaultLanguage:A="en",onDecision:_,headerTextBold:B=!1,headerTextItalic:D=!1,headerTextColor:O,headerFontFamily:$,headerFontSize:V,subtitle:U=null,showStatus:H=!1,statusMode:W="always",officeHours:q=null,enableVoiceInteraction:Q=!1,isVoiceSessionActive:K=!1,voiceStatus:Y="idle",voiceError:G=null,voiceConclusionForCsat:J=!1,onVoiceToggle:X,onBidiSubmit:Z,disclaimerEnabled:ee=!1,disclaimerText:te,disclaimerPosition:ne="top",disclaimerLinkUrl:re,disclaimerLinkLabel:oe,showPoweredBy:ae=!0,apiBaseUrl:ie,apiKey:se,getAuthToken:le,conversationId:ce,conciergeId:ue,onboardingQuestions:de=[],onboardingActive:pe=!1,onboardingCompleted:ge=!1,onOnboardingFormSubmit:fe,collectionPrompt:he,csatEnabled:me=!1,csatFormat:be="EMOJI",csatPrompt:ye="How was your experience?",onPromptSuggestionClick:ve,onboardingEnabled:we=!1,onResetConversation:ke,sessionExpiringSoon:xe=!1,autoPromptEnabled:Se=!0,autoPromptQuestionDisplay:Ce=!0,autoPromptClickTelemetry:Me=!0,allowFeedback:Pe=!0,provideCitations:ze=!0,onFeedback:Ee,onRetryMessage:je,onRefreshChat:Te,onCopyChat:Ne,filterCategories:Fe=[],showFilterStep:Le=!1,widgetFilter:Re=null,onWidgetFilterChange:Ae,onSynthesizeAssistantMessage:_e,launcherPosition:Ie="bottom-right",chatFeatures:Be,organizationId:De})=>{Ap(j);const Oe=I.useRef(null),$e=I.useRef(null),Ve=I.useMemo(()=>jd(A),[A]);I.useEffect(()=>{$e.current?.focus()},[]);const Ue=I.useCallback((e,t,n)=>{Qg({apiBaseUrl:ie,conversationId:ce,chip:t,submitText:null==e?void 0:String(e),position:n,source:"widget",getAuthToken:le,enabled:Me})},[ie,le,ce,Me]),He=I.useCallback((e,t,n)=>{t&&"object"==typeof t&&Ue(e,t,n),ve?ve(e):b?.(e)},[ve,b,Ue]),We=Ie.includes("right"),qe=Ie.includes("bottom"),[Qe,Ke]=I.useState(()=>{if("undefined"==typeof window)return null;try{const e=window.localStorage.getItem(ef);if(!e)return null;const t=JSON.parse(e);if("number"==typeof t?.width&&"number"==typeof t?.height&&t.width>=320&&t.height>=400)return t}catch{}return null}),Ye=I.useRef(null),Ge=I.useRef({x:0,y:0}),Je=I.useRef({width:380,height:650});I.useEffect(()=>{const e=e=>{const t=Ye.current;if(!t)return;const n=e.clientX-Ge.current.x,r=e.clientY-Ge.current.y,o={...Je.current},a=.92*window.innerWidth,i=.85*window.innerHeight;if("corner"===t||"horizontal"===t){const e=We?Je.current.width-n:Je.current.width+n;o.width=Math.min(Math.max(320,e),a)}if("corner"===t||"vertical"===t){const e=qe?Je.current.height-r:Je.current.height+r;o.height=Math.min(Math.max(400,e),i)}Ke(o)},t=()=>{Ye.current&&(Ye.current=null,document.body.style.cursor="",document.body.style.userSelect="")};return window.addEventListener("mousemove",e),window.addEventListener("mouseup",t),()=>{window.removeEventListener("mousemove",e),window.removeEventListener("mouseup",t)}},[We,qe]),I.useEffect(()=>{if(Qe)try{window.localStorage.setItem(ef,JSON.stringify(Qe))}catch{}},[Qe]);const Xe=(e,t)=>{t.preventDefault(),t.stopPropagation(),Ye.current=e,Ge.current={x:t.clientX,y:t.clientY},Je.current=Qe??{width:380,height:650};const n={corner:We===qe?"nwse-resize":"nesw-resize",horizontal:"ew-resize",vertical:"ns-resize"};document.body.style.cursor=n[e],document.body.style.userSelect="none"},[Ze,et]=I.useState(!1),[tt,nt]=I.useState(()=>{try{return Wd(De)?.csatSubmitted??!1}catch{return!1}}),[rt,ot]=I.useState(!1),[at,it]=I.useState(!1),[st,lt]=I.useState(0),[ct,ut]=I.useState(""),[dt,pt]=I.useState(!1);I.useEffect(()=>{try{const e=Wd(De)?.csatSubmitted??!1;nt(e),e&&et(!1)}catch{}},[ce]),function(e,t=[],n={}){const{enabled:r=!0,threshold:o=30,behavior:a="smooth",delay:i=0}=n,s=I.useRef(!0);I.useRef(0),I.useEffect(()=>{if(!r||!e.current)return;const t=e.current,n=()=>{const e=t.scrollHeight-t.scrollTop-t.clientHeight;s.current=e<o},l=()=>{n()};t.addEventListener("scroll",l,{passive:!0}),n();const c=setTimeout(()=>{s.current&&t&&t.scrollTo({top:t.scrollHeight,behavior:a})},i);return()=>{t.removeEventListener("scroll",l),clearTimeout(c)}},[e,r,o,a,i,...t])}(Oe,[d,p],{enabled:!0,threshold:30,behavior:"smooth",delay:0});const gt=Cd(A),ft=I.useMemo(()=>n?tf(M,Kg)?Jg:M||Jg:M||Kg,[M,n]),ht=I.useMemo(()=>n?tf(a,Gg)?Xg:a||Xg:a||Gg,[n,a]),mt=I.useMemo(()=>n?tf(P,Yg)?o||Zg:P||o||Zg:P||Yg,[n,o,P]),bt=Ve(at?"conversationResolved":"typeYourMessage"),yt=d?.some?.(e=>"user"===e.role),vt=I.useMemo(()=>(d||[]).filter(e=>"user"===e.role).length,[d]),[wt,kt]=I.useState(0),xt=Re?.category?(Fe||[]).find(e=>e.id===Re.category):null,St=I.useCallback(e=>{if(!Ae)return;const t=Re?.category||null;if(e){if(Ae({category:e,tags:[]}),kt(vt),!yt&&e!==t&&_e){const t=(Fe||[]).find(t=>t.id===e),n=t?.label||e,r=Ve("categoryTopicsHeading").replace("{category}",n);_e(r,{replaceMarker:"category-intro"})}}else Ae(null)},[Ae,Re,vt,Fe,yt,_e,Ve]);I.useCallback(e=>{const t=Re?.category||xt?.id;t&&Ae&&Ae({category:t,tags:[e]}),b&&b(e)},[Re,xt,Ae,b]);const Ct=Array.isArray(Fe)&&Fe.length>0,Mt=Ct&&!yt&&!Re?.category,Pt=!yt&&k.length>0&&x&&!Re?.category,zt=de&&de.length>0,Et=Boolean(me),jt=we&&zt&&!ge,Tt=I.useCallback(async()=>{if(Et&&!dt&&!at&&0!==st){pt(!0);try{const e={"Content-Type":"application/json"};if("function"==typeof le){const t=await le();t&&(e.Authorization=`Bearer ${t}`)}const t=rf(be);(await fetch(`${ie.replace(/\/$/,"")}/api/v1/support/csat`,{method:"POST",headers:e,credentials:"include",body:JSON.stringify({conversationId:ce,rating:String(st),ratingFormat:t,conciergeId:ue,feedback:ct||void 0})})).ok&&(ot(!1),lt(0),ut(""),Ae&&Ae(null),Te?Te():ke&&ke())}catch(e){}finally{pt(!1)}}},[Et,dt,at,st,ct,ce,le,ue,ie,be,ke,Te,Ae]),Nt=I.useCallback(()=>{if(!Et||!ce||!yt)return Ae&&Ae(null),Te?Te():ke&&ke(),void w?.();rt?(ot(!1),w?.()):at?w?.():ot(!0)},[Et,ce,yt,rt,at,w,Ae,Te,ke]);I.useEffect(()=>{Et||(rt&&ot(!1),at&&it(!1),0!==st&<(0),ct&&ut(""))},[Et,rt,at,st,ct]);const Ft=I.useMemo(()=>{if(!d||!Array.isArray(d))return[];for(let e=d.length-1;e>=0;e-=1)if("assistant"===d[e]?.role){const t=d[e].prompts;return Array.isArray(t)?t:[]}return[]},[d]),Lt=I.useRef([]);I.useEffect(()=>{Ft.length>0?Lt.current=Ft:d&&0!==d.length&&d.some(e=>"user"===e.role)||(Lt.current=[])},[Ft,d]);const Rt=I.useRef(vt);I.useEffect(()=>{vt!==Rt.current&&(Rt.current=vt,Lt.current=[])},[vt]);const At=Array.isArray(d)&&d.some(e=>"user"===e?.role),_t=Ft.length>0?Ft:At?Lt.current:[];I.useEffect(()=>{if(!me)return;if(!Ze)return;if(tt)return;const e=Oe.current;if(!e)return;const t=window.requestAnimationFrame(()=>{e.scrollTo({top:e.scrollHeight,behavior:"smooth"})});return()=>{window.cancelAnimationFrame(t)}},[Ze,me,tt]);const It=()=>{const e=rf(be);if("STARS"===e)return eg.jsx("div",{className:"flex justify-center gap-2 mb-5",role:"group","aria-label":Ve("rateExperience"),children:[1,2,3,4,5].map(e=>eg.jsx("button",{"aria-label":`${Ve("rate")} ${e}`,onClick:()=>lt(e),className:"transition-all duration-150 hover:scale-110 active:scale-95 bg-transparent border-0 p-0 cursor-pointer",disabled:dt,children:eg.jsx(Mp,{className:_d("w-8 h-8 transition-colors",e<=st?"text-yellow-400 drop-shadow-sm":n?"text-gray-600":"text-gray-300"),fill:e<=st?"#FBBF24":"none"})},e))});if("THUMBS"===e)return eg.jsx("div",{className:"flex gap-4 justify-center mb-5",role:"group","aria-label":Ve("rateExperience"),children:[{value:"positive",emoji:"👍"},{value:"negative",emoji:"👎"}].map(e=>eg.jsx("button",{"aria-label":"positive"===e.value?Ve("thumbsUp"):Ve("thumbsDown"),onClick:()=>lt(e.value),disabled:dt,className:_d("w-12 h-12 rounded-xl border flex items-center justify-center text-2xl transition-all hover:scale-105 active:scale-95",st===e.value?"ring-2 ring-blue-300 scale-110 shadow-lg":"",n?"bg-gray-700 border-gray-600 hover:bg-gray-600":"bg-white border-gray-200 hover:bg-gray-50"),children:eg.jsx("span",{className:"drop-shadow-md",children:e.emoji})},e.value))});return eg.jsx("div",{className:"flex gap-2 justify-center items-center mb-5",role:"group","aria-label":Ve("rateExperience"),children:[{value:1,emoji:"😡"},{value:2,emoji:"😕"},{value:3,emoji:"😐"},{value:4,emoji:"😊"},{value:5,emoji:"😍"}].map(e=>eg.jsx("button",{"aria-label":`${Ve("rate")} ${e.value}`,onClick:()=>lt(e.value),disabled:dt,className:_d("rounded-full w-10 h-10 flex items-center justify-center text-xl transition-all hover:scale-110 active:scale-95 bg-transparent border-0 p-0 cursor-pointer",st===e.value?"ring-2 ring-blue-100 scale-125 bg-gradient-to-b from-yellow-200 to-yellow-400 shadow-md":"grayscale-[0.3] opacity-80 hover:grayscale-0"),children:eg.jsx("span",{role:"img","aria-label":`${Ve("rate")} ${e.value}`,className:"drop-shadow-sm filter",children:e.emoji})},e.value))})};if(!e)return null;const Bt=!t&&Qe?{width:Qe.width,height:Qe.height,maxWidth:"92vw",maxHeight:"85vh"}:void 0;return eg.jsxs("div",{dir:gt?"rtl":"ltr",className:"relative flex-shrink-0 z-50 "+(t?"w-80 h-auto":""),style:Bt,children:[!t&&eg.jsxs(eg.Fragment,{children:[eg.jsx("div",{onMouseDown:e=>Xe("horizontal",e),className:"absolute top-0 h-full w-1.5 cursor-ew-resize hover:bg-blue-500/20 transition-colors z-[70] "+(We?"left-0":"right-0"),"aria-hidden":!0}),eg.jsx("div",{onMouseDown:e=>Xe("vertical",e),className:"absolute left-0 w-full h-1.5 cursor-ns-resize hover:bg-blue-500/20 transition-colors z-[70] "+(qe?"top-0":"bottom-0"),"aria-hidden":!0})]}),eg.jsxs("div",{id:"chat-window-panel",ref:$e,role:"dialog","aria-modal":"true","aria-label":Ve("openChat"),tabIndex:-1,className:`relative focus:outline-none ${Qe||t?"":"w-[380px]"} ${Qe||t?"":"h-[650px]"} ${t?"w-80 h-auto":""} ${Qe&&!t?"w-full h-full":""} max-w-[92vw] border rounded-2xl shadow-2xl bg-white border-gray-200 flex flex-col ${t?"":"max-h-[85vh]"} overflow-hidden ${n?"bg-gray-900 border-gray-700":""}`,children:[!t&&eg.jsx("div",{onMouseDown:e=>Xe("corner",e),"aria-hidden":"true",className:`absolute w-4 h-4 ${We===qe?"cursor-nwse-resize":"cursor-nesw-resize"} text-gray-400 hover:text-blue-500 transition-colors z-[71] flex p-0.5 ${qe?"top-0 items-start":"bottom-0 items-end"} ${We?"left-0 justify-start":"right-0 justify-end"}`,children:eg.jsx("svg",{viewBox:"0 0 12 12",className:"w-3 h-3 "+(qe&&We?"rotate-180":qe?"-rotate-90":We?"rotate-90":""),"aria-hidden":!0,children:eg.jsx("path",{d:"M11 1 L1 11 M11 5 L5 11 M11 9 L9 11",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round"})})}),eg.jsx(Bg,{conciergeName:i,companyName:s,companyLogo:l,primaryColor:o,isDark:n,isMinimized:t,textColor:ht,fontFamily:j,fontSize:R,onToggleTheme:y,onMinimize:v,onClose:Nt,headerTextBold:B,headerTextItalic:D,headerTextColor:O,headerFontFamily:$,headerFontSize:V,subtitle:U,showStatus:H,statusMode:W,officeHours:q,onRefreshChat:Te,onCopyChat:Ne,defaultLanguage:A}),!t&&Ct&&!Mt&&!(rt&&!at)&&!(pe&&!ge)&&eg.jsx(Og,{categories:Fe,selectedCategoryId:Re?.category||null,onSelect:St,isDark:n,primaryColor:o,fontFamily:j,isRtl:gt}),!t&&eg.jsxs(eg.Fragment,{children:[eg.jsx("div",{ref:Oe,role:"log","aria-live":"polite",className:`chat-messages flex-1 overflow-y-auto px-3 py-4 space-y-4 ${n?"bg-gray-900":"bg-gradient-to-b from-gray-50/50 to-white"} break-words`,children:rt&&!at?eg.jsx("div",{className:"animate-in slide-in-from-top-4 fade-in duration-300 mt-4 mx-2",children:eg.jsxs("div",{className:_d("w-full rounded-3xl p-6 shadow-lg",n?"bg-gray-800 shadow-black/20":"bg-white shadow-gray-200/80"),children:[eg.jsx("p",{className:_d("text-sm font-medium text-center mb-5 [font-family:inherit]",n?"text-gray-300":"text-gray-500"),children:ye||Ve("feedbackPrompt")}),It(),eg.jsx("textarea",{"aria-label":Ve("feedbackPlaceholder"),value:ct,onChange:e=>{e.target.value.length<=1e3&&ut(e.target.value)},maxLength:1e3,placeholder:Ve("feedbackPlaceholder"),rows:4,disabled:dt,className:_d("w-full rounded-xl border px-4 py-3 text-sm [font-family:inherit] resize-none outline-none transition-colors mb-5",n?"bg-gray-700 border-gray-600 text-gray-100 placeholder-gray-400":"bg-gray-50 border-gray-200 text-gray-900 placeholder-gray-400")}),eg.jsxs("div",{className:"relative group",children:[eg.jsx("button",{onClick:Tt,disabled:0===st||dt,"aria-describedby":0===st?"resolve-rating-hint":void 0,className:_d("w-full py-3.5 rounded-xl text-sm font-semibold [font-family:inherit] transition-all duration-200 border-none outline-none focus:outline-none active:outline-none focus:ring-0 active:ring-0","disabled:opacity-50 disabled:cursor-not-allowed",n?"bg-gray-700 text-gray-100 hover:bg-gray-600":"bg-gray-100 text-gray-700 hover:bg-gray-200"),children:Ve(dt?"submitting":"submitFeedback")}),0===st&&!dt&&eg.jsx("div",{id:"resolve-rating-hint",role:"tooltip",className:"absolute -top-8 left-1/2 -translate-x-1/2 whitespace-nowrap px-2 py-1 rounded-md text-xs bg-gray-800 text-white opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none",children:Ve("selectRatingFirst")})]})]})}):pe&&!ge&&fe?eg.jsx(Dg,{questions:de,onPromptSuggestionClick:He,collapsiblePrompt:he,onSubmit:fe,primaryColor:o,isRtl:gt,isDark:n,defaultLanguage:A}):eg.jsxs(eg.Fragment,{children:[xe&&eg.jsx("div",{role:"status",className:"mx-3 mt-1 mb-2 rounded-lg px-3 py-2 text-xs font-medium "+(n?"bg-amber-900/40 text-amber-200 border border-amber-700/50":"bg-amber-50 text-amber-800 border border-amber-200"),children:Ve("sessionExpiringSoon")}),eg.jsx(zg,{messages:d,isDark:n,primaryColor:o,isLoading:p,agentMessageBubbleColor:M,userMessageBoxColor:P,textColor:a,assistantTextColor:z,userTextColor:E,fontFamily:j,agentMessageBubbleFontFamily:T,agentMessageBubbleFontSize:N,userMessageBubbleFontFamily:F,userMessageBubbleFontSize:L,fontSize:R,formatTime:nf,isRtl:gt,defaultLanguage:A,quickQuestions:k,shouldShowQuickQuestions:Pt,onQuickQuestion:S??b,quickQuestionsLayout:C,onDecision:_,disclaimerEnabled:ee,disclaimerText:te,disclaimerPosition:ne,disclaimerLinkUrl:re,disclaimerLinkLabel:oe,resolvedAgentBubbleColor:ft,resolvedUserMessageColor:mt,resolvedTextColor:ht,isVoiceSessionActive:K,voiceStatus:Y,messagesContainerRef:Oe,companyLogo:l,chatbotAvatarEnabled:c,chatbotAvatar:u,conciergeName:i,companyName:s,apiBaseUrl:ie,getAuthToken:le,onPromptSuggestionClick:He,conversationResetKey:ce,allowFeedback:Pe,provideCitations:ze,onFeedback:Ee,onRetryMessage:je,headerTextColor:O,beforePromptsSlot:Mt?eg.jsx($g,{categories:Fe,selectedCategoryId:Re?.category||null,onSelect:St,isDark:n,primaryColor:o,fontFamily:j,fontSize:R,isRtl:gt,label:Ve("chooseTopicLabel")}):null,quickQuestionsHeadingLabel:Ct?Ve("quickQuestionsHeadingLabel"):void 0}),Ze&&me&&!tt&&eg.jsx("div",{className:"",children:eg.jsx(qg,{format:rf(be),prompt:ye||Ve("howWasYourExperience"),onRating:async(e,t)=>{nt(!0),et(!1),(e=>{try{const t=Wd(e);if(!t)return;t.csatSubmitted=!0,localStorage.setItem(`${Dd}_${e}`,JSON.stringify(t))}catch{}})(void 0);try{const n={"Content-Type":"application/json"};if("function"==typeof le){const e=await le();e&&(n.Authorization=`Bearer ${e}`)}(await fetch(`${ie.replace(/\/$/,"")}/api/v1/support/csat`,{method:"POST",headers:n,credentials:"include",body:JSON.stringify({conversationId:ce,rating:e,ratingFormat:t,conciergeId:ue})})).ok}catch(e){}},disabled:!1,isDark:n,primaryColor:o,defaultLanguage:A})})]})}),!(pe&&!ge)&&eg.jsx(Rg,{onStopGeneration:r,inputValue:f,setInputValue:h,onSend:m,isDark:n,primaryColor:o,isOpen:e,isMinimized:t,isLoading:p,isConversationLoading:g,placeholder:bt,textColor:ht,fontFamily:j,userMessageBubbleFontFamily:F,userMessageBubbleFontSize:L,fontSize:R,isRtl:gt,csatVisible:Ze&&me&&!tt||Et&&(rt||at),enableVoiceInteraction:Q,isVoiceSessionActive:K,voiceStatus:Y,voiceError:G,onVoiceToggle:X,onBidiSubmit:Z,disclaimerEnabled:ee,disclaimerText:te,disclaimerPosition:ne,disclaimerLinkUrl:re,disclaimerLinkLabel:oe,showPoweredBy:ae,defaultLanguage:A,onboardingQuestions:de,onboardingActive:pe,onboardingCompleted:ge,onboardingEnabled:we,userMessageBoxColor:P,resolvedUserMessageColor:mt,userTextColor:E,promptSuggestions:rt||at||!1===Se||p?[]:_t,onPromptSuggestionClick:He,autoPromptQuestionDisplay:Ce,tagSelectorNode:null,showResolveButton:Et&&yt&&!at&&!rt&&!Ze&&!jt,onResolve:()=>{Et&&ot(!0)},chatFeatures:Be,apiEndpoint:ie,organizationId:De,conversationId:ce})]})]})]})},af=new Map;const sf={whatsapp:["wa.me","api.whatsapp.com"],telegram:["t.me"],messenger:["m.me"],instagram:["ig.me","instagram.com","www.instagram.com"]},lf={whatsapp:"WhatsApp",telegram:"Telegram",messenger:"Messenger",instagram:"Instagram"};const cf=I.forwardRef(({isDark:e,primaryColor:t,onToggle:n,textColor:r,headerTextColor:o,defaultLanguage:a="en",isOpen:i=!1,className:s,channelLinks:l},c)=>{const u=I.useMemo(()=>jd(a),[a]),d=I.useMemo(()=>function(e){if(!Array.isArray(e))return[];const t=[];for(const n of e){if(!n||"object"!=typeof n)continue;const e="string"==typeof n.type?n.type.toLowerCase():"",r=sf[e];if(!r||"string"!=typeof n.url)continue;let o;try{o=new URL(n.url)}catch{continue}"https:"===o.protocol&&r.includes(o.hostname.toLowerCase())&&t.push({type:e,url:o.toString(),label:"string"==typeof n.label&&n.label.trim()?n.label.trim():lf[e]})}return t}(l),[l]),[p,g]=I.useState(!1),f=d.length>0,h=t,m=o||"#FFFFFF",b={display:"block",width:"100%",padding:"8px 12px",textAlign:"start",fontSize:"14px",color:e?"#F1F5F9":"#0F172A",background:"transparent",border:"none",borderRadius:"6px",textDecoration:"none",cursor:"pointer"};return eg.jsxs("div",{className:`relative ${s||""}`,children:[f&&p&&!i&&eg.jsxs("div",{role:"menu","aria-label":u("chooseChannel"),"data-testid":"channel-picker",style:{position:"absolute",bottom:"76px",right:0,minWidth:"180px",padding:"6px",borderRadius:"8px",border:"1px solid "+(e?"#334155":"#E2E8F0"),background:e?"#1E293B":"#FFFFFF",boxShadow:"0 10px 30px rgba(15, 23, 42, 0.15)"},children:[eg.jsx("button",{type:"button",role:"menuitem",style:b,onClick:()=>{g(!1),n?.()},children:u("chatHere")}),d.map(e=>eg.jsx("a",{role:"menuitem",href:e.url,target:"_blank",rel:"noopener noreferrer",style:b,onClick:()=>g(!1),children:e.label},`${e.type}-${e.url}`))]}),eg.jsxs("button",{ref:c,onClick:()=>{!f||i?n?.():g(e=>!e)},className:"group relative w-16 h-16 rounded-full shadow-2xl transition-all duration-300 flex items-center justify-center text-white overflow-hidden hover:scale-110",style:{background:`linear-gradient(135deg, ${h} 0%, ${h}dd 100%)`,boxShadow:`0 10px 30px ${h}40`,border:"none"},"aria-label":u(i?"closeChat":"openChat"),"aria-expanded":f&&p||i,"aria-haspopup":f?"menu":void 0,"aria-controls":"chat-window-panel",children:[eg.jsx("div",{className:"absolute inset-0 rounded-full bg-white/20 scale-0 group-hover:scale-100 transition-transform duration-500"}),eg.jsx("div",{className:"relative z-10 transition-transform duration-300",children:eg.jsx(vp,{className:"w-7 h-7",style:{color:m}})})]})]})});cf.displayName="ToggleButton";const uf="0.2.13",df=({getAuthToken:e,apiBaseUrl:t,darkMode:n,primaryColor:r,position:o,companyName:a,conciergeName:i,companyLogo:s,welcomeMessage:l,quickQuestions:c,quickQuestionsEnabled:u,quickQuestionsLayout:d="vertical",textColor:p,agentMessageBubbleColor:g,userMessageBoxColor:f,assistantTextColor:h,userTextColor:m,fontFamily:b,fontSize:y,defaultLanguage:v,apiKey:w,agentMessageBubbleFontFamily:k,agentMessageBubbleFontSize:x,userMessageBubbleFontFamily:S,userMessageBubbleFontSize:C,autoOpen:M=!1,openDelay:P=0,locale:z,className:E="",headerTextBold:j,headerTextItalic:T,enableVoiceInteraction:N,disclaimerEnabled:F,disclaimerText:L,disclaimerPosition:R,disclaimerLinkUrl:A,disclaimerLinkLabel:_,showPoweredBy:B,onboardingQuestions:D,collectionPrompt:O,allowedDomains:$,onboardingEnabled:V,wsBaseUrl:U,channelLinks:H})=>{const[W,q]=I.useState(null),[Q,K]=I.useState(!0),[Y,G]=I.useState(null),[J,X]=I.useState(!1),Z=I.useRef(!1);I.useEffect(()=>{if(Z.current)return;(async()=>{if(!t)return G("apiBaseUrl is required"),void K(!1);try{K(!0);const n=await(async(e,t)=>{if(!e)throw new Error("apiBaseUrl is required");try{const n=e.replace(/\/$/,""),r=uf?`${n}/api/v1/deploy-agent?wv=${encodeURIComponent(uf)}`:`${n}/api/v1/deploy-agent`,o={"Content-Type":"application/json"};if("function"==typeof t){const e=await t();e&&(o.Authorization=`Bearer ${e}`)}const a=await fetch(r,{method:"GET",headers:o,credentials:"include"});if(404===a.status)return null;if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);return await a.json()}catch(e){throw e}})(t,e);if(null===n)return Z.current=!0,X(!0),q(null),void G(null);q(n),G(null)}catch(e){G(e.message||"Failed to load configuration")}finally{K(!1)}})()},[t,e]);const ee=I.useMemo(()=>{if(!W)return null;const e=W.config??{},t=e.identity??{},d=e.branding??{},w=e.typography??{},M=e.messages??{},P=e.voice??{},z=e.onboarding??{},E=e.disclaimer??{},I=e.csat??{},U=e.inactivity??{},q=e.behavior??{},Q=e.security??{},K=e.layout??{},Y=v??M.defaultLocale??"en",G=M.bundles?.[Y]??{},J=M.bundles?.en??{},X={welcome:G.welcome||J.welcome,fallback:G.fallback||J.fallback,quickQuestions:Array.isArray(G.quickQuestions)&&G.quickQuestions.length>0?G.quickQuestions:J.quickQuestions},Z=$??Q.allowedDomains??(Q.domains??[]).map(e=>"string"==typeof e?e:e.domain).filter(Boolean)??[];return{darkMode:n??!1,primaryColor:r??d.brandColor??"#2563eb",companyName:a??t.companyName??"Support Team",conciergeName:i??t.conciergeName,companyLogo:s??d.avatar??null,chatbotAvatarEnabled:d.chatbotAvatarEnabled??!1,chatbotAvatar:d.chatbotAvatar??null,welcomeMessage:l??X.welcome??"Hi! How can we help?",fallbackMessage:X.fallback,quickQuestions:c??X.quickQuestions??[],quickQuestionsEnabled:u??M.quickQuestionsEnabled,textColor:p??"#000000",agentMessageBubbleColor:g??w.agentMessageBubbleColor,userMessageBoxColor:f??w.userMessageBoxColor,assistantTextColor:h??w.assistantTextColor??"#000000",userTextColor:m??w.userTextColor??"#000000",fontFamily:b??w.agentMessageBubbleFontFamily??"Inter",fontSize:y??w.agentMessageBubbleFontSize??"14px",defaultLanguage:Y,headerTextBold:j??w.headerTextBold??!1,headerTextItalic:T??w.headerTextItalic??!1,headerTextColor:w.headerTextColor??"#FFFFFF",headerFontFamily:w.headerFontFamily,headerFontSize:w.headerFontSize,subtitle:t.subtitle??null,showStatus:t.showStatus??!1,statusMode:t.statusMode??"always",officeHours:t.officeHours??null,enableVoiceInteraction:N??P.enableVoiceInteraction??!1,disclaimerEnabled:F??E.enabled??!1,disclaimerText:L??E.text,disclaimerPosition:R??(ee=E.position,ee?ee.toLowerCase():"top"),disclaimerLinkUrl:Ad(A??E.linkUrl),disclaimerLinkLabel:_??E.linkLabel,showPoweredBy:B??d.showPoweredBy??!0,onboardingQuestions:D??z.questions??[],collectionPrompt:O??z.collapsiblePrompt??"Before we begin, I need to verify your details.",allowedDomains:Z,launcherPosition:o??(e=>e?e.toLowerCase().replace(/_/g,"-"):"bottom-right")(K.launcherPosition),onboardingEnabled:V??z.enabled??!1,inactivityTimeoutValue:U.timeoutValue??null,inactivityTimeoutUnit:U.timeoutUnit??null,agentMessageBubbleFontFamily:k??w.agentMessageBubbleFontFamily??b??"Inter",agentMessageBubbleFontSize:x??w.agentMessageBubbleFontSize??y??"14px",userMessageBubbleFontFamily:S??w.userMessageBubbleFontFamily??b??"Inter",userMessageBubbleFontSize:C??w.userMessageBubbleFontSize??y??"14px",csatEnabled:I.enabled??!1,csatFormat:I.format??"EMOJI",csatPrompt:I.prompt??"How was your experience?",autoPromptEnabled:q.autoPromptEnabled??!0,autoPromptQuestionDisplay:q.autoPromptQuestionDisplay??!0,autoPromptClickTelemetry:q.autoPromptClickTelemetry??!0,allowFeedback:q.allowFeedback??!0,provideCitations:q.provideCitations??!0,organizationId:W.organizationId??null,chatFeatures:e.chatFeatures??null,channelLinks:H??e.channelLinks??null};var ee},[H,W,n,r,o,a,i,s,l,c,u,p,g,f,h,m,b,y,v,j,T,N,F,L,R,_,A,B,D,V,O,$,k,x,S,C]),te=I.useMemo(()=>!ee||((e=[])=>{if("undefined"==typeof window)return!1;const t=window.location.hostname.toLowerCase(),n=window.location.host.toLowerCase();return!(!e||0===e.length)&&e.some(e=>{const r=e.toLowerCase().trim();return r.includes(":")?n===r:t===r||t.endsWith("."+r)})})(ee.allowedDomains),[ee]),ne=I.useMemo(()=>({welcomeMessage:"Hi! How can we help?",quickQuestions:[],apiBaseUrl:t||"",apiKey:w||"",getAuthToken:e,autoOpen:!1,openDelay:0,darkMode:!1,enableVoiceInteraction:!1,onboardingQuestions:[],onboardingEnabled:!1,collectionPrompt:void 0}),[t,w,e]),{isOpen:re,isMinimized:oe,isDark:ae,messages:ie,inputValue:se,isLoading:le,widgetRef:ce,setInputValue:ue,handleSend:de,stopGeneration:pe,handleQuickQuestion:ge,sendMessage:fe,retryMessage:he,toggleChat:me,toggleTheme:be,toggleMinimize:ye,closeChat:ve,handleDecision:we,isVoiceSessionActive:ke,voiceStatus:xe,voiceError:Se,voiceConclusionForCsat:Ce,handleVoiceToggle:Me,sendBidiTextMessage:Pe,onboardingActive:ze,onboardingCompleted:Ee,handleOnboardingFormSubmit:je,conversationId:Te,resetConversation:Ne,sessionExpiringSoon:Fe,updateMessageFeedback:Le,widgetFilter:Re,setWidgetFilter:Ae,addAssistantMessage:_e}=rp(ee?{welcomeMessage:ee.welcomeMessage,fallbackMessage:ee.fallbackMessage,quickQuestions:ee.quickQuestions,apiBaseUrl:t,wsBaseUrl:U??W?.wsBaseUrl,apiKey:w,locale:ee.defaultLanguage||z,organizationId:ee.organizationId,getAuthToken:e,autoOpen:M,openDelay:P,darkMode:ee.darkMode,enableVoiceInteraction:ee.enableVoiceInteraction,onboardingQuestions:ee.onboardingQuestions,onboardingEnabled:ee.onboardingEnabled,collectionPrompt:ee.collectionPrompt,provideCitations:ee.provideCitations,inactivityTimeoutValue:ee.inactivityTimeoutValue,inactivityTimeoutUnit:ee.inactivityTimeoutUnit,messageLimits:W?.messageLimits}:ne),Ie=I.useRef(null),Be=I.useRef(re);I.useEffect(()=>{Be.current&&!re&&Ie.current?.focus(),Be.current=re},[re]);const De=I.useCallback((n,r,o)=>{if(Le(n,r),!Te||!t)return;const a=t.replace(/\/$/,"");(async()=>{try{const t={"Content-Type":"application/json"};if("function"==typeof e){const n=await e();n&&(t.Authorization=`Bearer ${n}`)}await fetch(`${a}/api/v1/support/feedback`,{method:"POST",headers:t,credentials:"include",body:JSON.stringify({messageContent:n,conversationId:Te,feedback:r,feedbackText:o})})}catch(e){}})()},[Te,t,e,Le]),Oe=I.useCallback(()=>{Ne&&Ne()},[Ne]),{categories:$e,hasFilters:Ve}=function(e,t){const n=!!e,[r,o]=I.useState({categories:[],loading:n,error:null});I.useEffect(()=>{if(!e)return void o({categories:[],loading:!1,error:null});const n=t?`${e}|__session__`:`${e}|__proxy__`,r=af.get(n);if(r)return void o({categories:r,loading:!1,error:null});let a=!1;o(e=>({...e,loading:!0,error:null}));const i=`${e.replace(/\/$/,"")}/api/v1/widget/filters`;return(async()=>{try{const e={Accept:"application/json"};if("function"==typeof t){const n=await t();n&&(e.Authorization=`Bearer ${n}`)}const r=await fetch(i,{method:"GET",headers:e});if(!r.ok)throw new Error(`filter catalog HTTP ${r.status}`);const s=await r.json(),l=Array.isArray(s?.categories)?s.categories:[];if(a)return;af.set(n,l),o({categories:l,loading:!1,error:null})}catch(e){if(a)return;o({categories:[],loading:!1,error:e})}})(),()=>{a=!0}},[e,t]);const a=I.useMemo(()=>Array.isArray(r.categories)&&r.categories.length>0,[r.categories]);return{...r,hasFilters:a}}(t,e),Ue=I.useCallback(()=>{const e=ie.filter(e=>e.content&&""!==e.content.trim()).map(e=>`${"user"===e.role?"You":ee?.conciergeName||"Assistant"}: ${e.content}`).join("\n\n");e&&navigator.clipboard.writeText(e).catch(()=>{})},[ie,ee?.conciergeName]);if(I.useEffect(()=>{ce.current&&ee&&(ce.current.style.setProperty("--cw-primary",ee.primaryColor),ee.fontFamily&&ce.current.style.setProperty("--cw-font-family",ee.fontFamily),ee.textColor&&ce.current.style.setProperty("--cw-text-color",ee.textColor))},[ee,ce]),Q)return null;if(J)return null;if(Y||!ee)return null;if(!te)return null;const He={"bottom-right":"bottom-5 right-5","bottom-left":"bottom-5 left-5","top-right":"top-5 right-5","top-left":"top-5 left-5"};return eg.jsx("div",{id:"chat-widget-root",children:eg.jsxs("div",{ref:ce,className:`chat-widget-root fixed flex flex-col ${ee.launcherPosition?.includes("left")?"items-start":"items-end"} z-[999999] ${ae?"dark":""} ${E} ${He[ee.launcherPosition]||He["bottom-right"]}`,children:[eg.jsx(of,{isOpen:re,isMinimized:oe,isDark:ae,launcherPosition:ee.launcherPosition,primaryColor:ee.primaryColor,textColor:ee.textColor,companyName:ee.companyName,conciergeName:ee.conciergeName,companyLogo:ee.companyLogo,chatbotAvatarEnabled:ee.chatbotAvatarEnabled,chatbotAvatar:ee.chatbotAvatar,messages:ie,isLoading:le,inputValue:se,setInputValue:ue,onSend:de,onStopGeneration:pe,onDirectSend:fe,onToggleTheme:be,onMinimize:ye,onClose:ve,quickQuestions:ee.quickQuestions,quickQuestionsEnabled:ee.quickQuestionsEnabled,onQuickQuestion:ge,quickQuestionsLayout:d,agentMessageBubbleColor:ee.agentMessageBubbleColor,userMessageBoxColor:ee.userMessageBoxColor,assistantTextColor:ee.assistantTextColor,userTextColor:ee.userTextColor,fontFamily:ee.fontFamily,agentMessageBubbleFontFamily:ee.agentMessageBubbleFontFamily,agentMessageBubbleFontSize:ee.agentMessageBubbleFontSize,userMessageBubbleFontFamily:ee.userMessageBubbleFontFamily,userMessageBubbleFontSize:ee.userMessageBubbleFontSize,fontSize:ee.fontSize,defaultLanguage:ee.defaultLanguage||z,onDecision:we,headerTextBold:ee.headerTextBold,headerTextItalic:ee.headerTextItalic,headerTextColor:ee.headerTextColor,headerFontFamily:ee.headerFontFamily,headerFontSize:ee.headerFontSize,subtitle:ee.subtitle,showStatus:ee.showStatus,statusMode:ee.statusMode,officeHours:ee.officeHours,enableVoiceInteraction:ee.enableVoiceInteraction,isVoiceSessionActive:ke,voiceStatus:xe,voiceError:Se,voiceConclusionForCsat:Ce,onVoiceToggle:Me,onBidiSubmit:()=>Pe(se),disclaimerEnabled:ee.disclaimerEnabled,disclaimerText:ee.disclaimerText,disclaimerPosition:ee.disclaimerPosition,disclaimerLinkUrl:ee.disclaimerLinkUrl,disclaimerLinkLabel:ee.disclaimerLinkLabel,showPoweredBy:ee.showPoweredBy,apiBaseUrl:t,apiKey:w,getAuthToken:e,conversationId:Te,conciergeId:W?.conciergeId??W?.id,onboardingQuestions:ee.onboardingQuestions,onboardingActive:ze,onboardingCompleted:Ee,onOnboardingFormSubmit:je,collectionPrompt:ee.collectionPrompt,csatEnabled:ee.csatEnabled,csatFormat:ee.csatFormat,csatPrompt:ee.csatPrompt,onboardingEnabled:ee.onboardingEnabled,onResetConversation:Ne,sessionExpiringSoon:Fe,autoPromptEnabled:ee.autoPromptEnabled,autoPromptQuestionDisplay:ee.autoPromptQuestionDisplay,autoPromptClickTelemetry:ee.autoPromptClickTelemetry,allowFeedback:ee.allowFeedback,provideCitations:ee.provideCitations,onFeedback:De,onRetryMessage:he,onRefreshChat:Oe,onCopyChat:Ue,filterCategories:$e,showFilterStep:Ve,widgetFilter:Re,onWidgetFilterChange:Ae,onSynthesizeAssistantMessage:_e,chatFeatures:ee.chatFeatures,organizationId:ee.organizationId}),eg.jsx(cf,{ref:Ie,isDark:ae,primaryColor:ee.primaryColor,onToggle:me,textColor:ee.textColor,headerTextColor:ee.headerTextColor,defaultLanguage:ee.defaultLanguage||z,isOpen:re,className:re?"hidden":void 0,channelLinks:ee.channelLinks})]})})};class pf extends I.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,t){}render(){return this.state.hasError?eg.jsx("div",{role:"alert",style:{position:"fixed",bottom:"20px",right:"20px",maxWidth:"280px",padding:"10px 14px",borderRadius:"10px",background:"#1f2937",color:"#f3f4f6",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif',fontSize:"13px",lineHeight:1.4,boxShadow:"0 4px 12px rgba(0,0,0,0.15)",zIndex:2147483647},children:"Chat is temporarily unavailable. Please refresh the page to try again."}):this.props.children}}"undefined"!=typeof window&&(window.__eshalChatWidgetReact=I),function(){let e=null,t=null,n=null,r={},o=null;const a={darkMode:!1,primaryColor:"#2563eb",position:"bottom-right",companyName:"Support Team",conciergeName:null,companyLogo:null,welcomeMessage:"Hi! How can we help?",quickQuestions:[],quickQuestionsLayout:"vertical",textColor:"#fcfcfc",agentMessageBubbleColor:void 0,userMessageBoxColor:void 0,assistantTextColor:void 0,userTextColor:void 0,fontFamily:"Inter",fontSize:"14px",defaultLanguage:"en",autoOpen:!1,openDelay:0,apiBaseUrl:null,wsBaseUrl:null,apiKey:null,organizationId:null,sessionUrl:null,userId:null,userName:null,userEmail:null,locale:"en",headerTextBold:!1,headerTextItalic:!1,enableVoiceInteraction:!1,disclaimerEnabled:!1,disclaimerText:void 0,disclaimerPosition:"top",showPoweredBy:!0,onboardingQuestions:[],onboardingEnabled:!1,collectionPrompt:void 0,allowedDomains:[],onOpen:null,onClose:null},i={init:async function(s={}){if(r={...a,...s},r.sessionUrl&&!o&&(o=await(async e=>{if(e.sessionUrl)try{const t=await fetch(e.sessionUrl,{method:"POST",headers:{"Content-Type":"application/json",...e.apiKey&&{Authorization:`Bearer ${e.apiKey}`}},body:JSON.stringify({userId:e.userId,userName:e.userName,userEmail:e.userEmail}),credentials:"include"});return(await t.json()).sessionId}catch(e){return null}return null})(r)),n||(n=document.createElement("div"),n.id="chat-widget-host",document.body.appendChild(n)),!n.shadowRoot){const e=n.attachShadow({mode:"open"}),r=document.createElement("style");r.textContent=":host { all: initial; display: block; }",e.appendChild(r);const o=document.createElement("style");o.textContent='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.chat-widget-root{--cw-primary:#1d4ed8;--cw-primary-hover:#1e40af;--cw-status-success:160 84% 39%;--cw-status-success-bg:152 81% 96%;--cw-status-warning:35 100% 50%;--cw-status-warning-bg:34 100% 95%;--cw-status-error:350 89% 60%;--cw-status-error-bg:356 100% 97%;--cw-status-info:199 89% 48%;--cw-status-info-bg:204 100% 97%;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif}.chat-widget-root.dark{--cw-status-success:158 64% 52%;--cw-status-success-bg:152 36% 14%;--cw-status-warning:38 92% 60%;--cw-status-warning-bg:36 33% 14%;--cw-status-error:350 89% 65%;--cw-status-error-bg:356 33% 16%;--cw-status-info:199 89% 58%;--cw-status-info-bg:204 33% 14%}.\\!container{width:100%!important}.container{width:100%}@media (min-width:640px){.\\!container{max-width:640px!important}.container{max-width:640px}}@media (min-width:768px){.\\!container{max-width:768px!important}.container{max-width:768px}}@media (min-width:1024px){.\\!container{max-width:1024px!important}.container{max-width:1024px}}@media (min-width:1280px){.\\!container{max-width:1280px!important}.container{max-width:1280px}}@media (min-width:1536px){.\\!container{max-width:1536px!important}.container{max-width:1536px}}#chat-widget-root .chat-widget-root *{box-sizing:border-box;margin:0;padding:0}#chat-widget-root .chat-messages::-webkit-scrollbar{width:6px}#chat-widget-root .chat-messages::-webkit-scrollbar-track{background:transparent}#chat-widget-root .chat-messages::-webkit-scrollbar-thumb{background:rgba(156,163,175,.5);border-radius:10px}#chat-widget-root .chat-messages::-webkit-scrollbar-thumb:hover{background:rgba(156,163,175,.7)}#chat-widget-root .dark .chat-messages::-webkit-scrollbar-thumb{background:rgba(75,85,99,.5)}#chat-widget-root .dark .chat-messages::-webkit-scrollbar-thumb:hover{background:rgba(75,85,99,.7)}#chat-widget-root .sr-only{clip:rect(0,0,0,0);border-width:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}#chat-widget-root .pointer-events-none{pointer-events:none}#chat-widget-root .visible{visibility:visible}#chat-widget-root .invisible{visibility:hidden}#chat-widget-root .collapse{visibility:collapse}#chat-widget-root .static{position:static}#chat-widget-root .fixed{position:fixed}#chat-widget-root .absolute{position:absolute}#chat-widget-root .relative{position:relative}#chat-widget-root .sticky{position:sticky}#chat-widget-root .inset-0{inset:0}#chat-widget-root .-top-8{top:-2rem}#chat-widget-root .bottom-0{bottom:0}#chat-widget-root .bottom-5{bottom:1.25rem}#chat-widget-root .bottom-full{bottom:100%}#chat-widget-root .left-0{left:0}#chat-widget-root .left-1\\/2{left:50%}#chat-widget-root .left-5{left:1.25rem}#chat-widget-root .right-0{right:0}#chat-widget-root .right-5{right:1.25rem}#chat-widget-root .top-0{top:0}#chat-widget-root .top-1\\/2{top:50%}#chat-widget-root .top-5{top:1.25rem}#chat-widget-root .top-full{top:100%}#chat-widget-root .isolate{isolation:isolate}#chat-widget-root .z-10{z-index:10}#chat-widget-root .z-50{z-index:50}#chat-widget-root .z-\\[60\\]{z-index:60}#chat-widget-root .z-\\[70\\]{z-index:70}#chat-widget-root .z-\\[71\\]{z-index:71}#chat-widget-root .z-\\[999999\\]{z-index:999999}#chat-widget-root .z-\\[9999\\]{z-index:9999}#chat-widget-root .m-0{margin:0}#chat-widget-root .mx-2{margin-left:.5rem;margin-right:.5rem}#chat-widget-root .mx-3{margin-left:.75rem;margin-right:.75rem}#chat-widget-root .my-3{margin-bottom:.75rem;margin-top:.75rem}#chat-widget-root .my-4{margin-bottom:1rem;margin-top:1rem}#chat-widget-root .-mb-px{margin-bottom:-1px}#chat-widget-root .mb-1{margin-bottom:.25rem}#chat-widget-root .mb-1\\.5{margin-bottom:.375rem}#chat-widget-root .mb-2{margin-bottom:.5rem}#chat-widget-root .mb-3{margin-bottom:.75rem}#chat-widget-root .mb-4{margin-bottom:1rem}#chat-widget-root .mb-5{margin-bottom:1.25rem}#chat-widget-root .ml-1{margin-left:.25rem}#chat-widget-root .ms-0\\.5{margin-inline-start:.125rem}#chat-widget-root .mt-0\\.5{margin-top:.125rem}#chat-widget-root .mt-1{margin-top:.25rem}#chat-widget-root .mt-1\\.5{margin-top:.375rem}#chat-widget-root .mt-2{margin-top:.5rem}#chat-widget-root .mt-3{margin-top:.75rem}#chat-widget-root .mt-4{margin-top:1rem}#chat-widget-root .block{display:block}#chat-widget-root .inline-block{display:inline-block}#chat-widget-root .inline{display:inline}#chat-widget-root .flex{display:flex}#chat-widget-root .inline-flex{display:inline-flex}#chat-widget-root .table{display:table}#chat-widget-root .grid{display:grid}#chat-widget-root .hidden{display:none}#chat-widget-root .h-1\\.5{height:.375rem}#chat-widget-root .h-10{height:2.5rem}#chat-widget-root .h-11{height:2.75rem}#chat-widget-root .h-12{height:3rem}#chat-widget-root .h-16{height:4rem}#chat-widget-root .h-2{height:.5rem}#chat-widget-root .h-3{height:.75rem}#chat-widget-root .h-3\\.5{height:.875rem}#chat-widget-root .h-4{height:1rem}#chat-widget-root .h-5{height:1.25rem}#chat-widget-root .h-6{height:1.5rem}#chat-widget-root .h-7{height:1.75rem}#chat-widget-root .h-8{height:2rem}#chat-widget-root .h-\\[650px\\]{height:650px}#chat-widget-root .h-auto{height:auto}#chat-widget-root .h-full{height:100%}#chat-widget-root .h-px{height:1px}#chat-widget-root .max-h-\\[85vh\\]{max-height:85vh}#chat-widget-root .min-h-0{min-height:0}#chat-widget-root .min-h-\\[48px\\]{min-height:48px}#chat-widget-root .w-1\\.5{width:.375rem}#chat-widget-root .w-10{width:2.5rem}#chat-widget-root .w-11{width:2.75rem}#chat-widget-root .w-12{width:3rem}#chat-widget-root .w-16{width:4rem}#chat-widget-root .w-2{width:.5rem}#chat-widget-root .w-3{width:.75rem}#chat-widget-root .w-3\\.5{width:.875rem}#chat-widget-root .w-4{width:1rem}#chat-widget-root .w-44{width:11rem}#chat-widget-root .w-5{width:1.25rem}#chat-widget-root .w-6{width:1.5rem}#chat-widget-root .w-7{width:1.75rem}#chat-widget-root .w-8{width:2rem}#chat-widget-root .w-80{width:20rem}#chat-widget-root .w-96{width:24rem}#chat-widget-root .w-\\[380px\\]{width:380px}#chat-widget-root .w-full{width:100%}#chat-widget-root .min-w-0{min-width:0}#chat-widget-root .min-w-\\[60px\\]{min-width:60px}#chat-widget-root .min-w-full{min-width:100%}#chat-widget-root .max-w-\\[75\\%\\]{max-width:75%}#chat-widget-root .max-w-\\[92vw\\]{max-width:92vw}#chat-widget-root .max-w-full{max-width:100%}#chat-widget-root .max-w-none{max-width:none}#chat-widget-root .max-w-sm{max-width:24rem}#chat-widget-root .max-w-xs{max-width:20rem}#chat-widget-root .flex-1{flex:1 1 0%}#chat-widget-root .flex-shrink-0,#chat-widget-root .shrink-0{flex-shrink:0}#chat-widget-root .grow{flex-grow:1}#chat-widget-root .border-collapse{border-collapse:collapse}#chat-widget-root .-translate-x-1\\/2{--tw-translate-x:-50%}#chat-widget-root .-translate-x-1\\/2,#chat-widget-root .-translate-y-1\\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#chat-widget-root .-translate-y-1\\/2{--tw-translate-y:-50%}#chat-widget-root .-rotate-90{--tw-rotate:-90deg}#chat-widget-root .-rotate-90,#chat-widget-root .rotate-180{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#chat-widget-root .rotate-180{--tw-rotate:180deg}#chat-widget-root .rotate-90{--tw-rotate:90deg}#chat-widget-root .rotate-90,#chat-widget-root .scale-0{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#chat-widget-root .scale-0{--tw-scale-x:0;--tw-scale-y:0}#chat-widget-root .scale-100{--tw-scale-x:1;--tw-scale-y:1}#chat-widget-root .scale-100,#chat-widget-root .scale-110{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#chat-widget-root .scale-110{--tw-scale-x:1.1;--tw-scale-y:1.1}#chat-widget-root .scale-125{--tw-scale-x:1.25;--tw-scale-y:1.25}#chat-widget-root .scale-125,#chat-widget-root .scale-95{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#chat-widget-root .scale-95{--tw-scale-x:.95;--tw-scale-y:.95}#chat-widget-root .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes bounce{0%,to{animation-timing-function:cubic-bezier(.8,0,1,1);transform:translateY(-25%)}50%{animation-timing-function:cubic-bezier(0,0,.2,1);transform:none}}#chat-widget-root .animate-bounce{animation:bounce 1s infinite}@keyframes pulse{50%{opacity:.5}}#chat-widget-root .animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(1turn)}}#chat-widget-root .animate-spin{animation:spin 1s linear infinite}#chat-widget-root .cursor-ew-resize{cursor:ew-resize}#chat-widget-root .cursor-nesw-resize{cursor:nesw-resize}#chat-widget-root .cursor-not-allowed{cursor:not-allowed}#chat-widget-root .cursor-ns-resize{cursor:ns-resize}#chat-widget-root .cursor-nwse-resize{cursor:nwse-resize}#chat-widget-root .cursor-pointer{cursor:pointer}#chat-widget-root .resize-none{resize:none}#chat-widget-root .resize{resize:both}#chat-widget-root .list-decimal{list-style-type:decimal}#chat-widget-root .list-disc{list-style-type:disc}#chat-widget-root .list-none{list-style-type:none}#chat-widget-root .flex-row{flex-direction:row}#chat-widget-root .flex-row-reverse{flex-direction:row-reverse}#chat-widget-root .flex-col{flex-direction:column}#chat-widget-root .flex-wrap{flex-wrap:wrap}#chat-widget-root .items-start{align-items:flex-start}#chat-widget-root .items-end{align-items:flex-end}#chat-widget-root .items-center{align-items:center}#chat-widget-root .justify-start{justify-content:flex-start}#chat-widget-root .justify-end{justify-content:flex-end}#chat-widget-root .justify-center{justify-content:center}#chat-widget-root .justify-between{justify-content:space-between}#chat-widget-root .gap-0{gap:0}#chat-widget-root .gap-0\\.5{gap:.125rem}#chat-widget-root .gap-1{gap:.25rem}#chat-widget-root .gap-1\\.5{gap:.375rem}#chat-widget-root .gap-2{gap:.5rem}#chat-widget-root .gap-2\\.5{gap:.625rem}#chat-widget-root .gap-3{gap:.75rem}#chat-widget-root .gap-4{gap:1rem}#chat-widget-root .gap-6{gap:1.5rem}#chat-widget-root :is(.space-y-1>:not([hidden])~:not([hidden])){--tw-space-y-reverse:0;margin-bottom:calc(.25rem*var(--tw-space-y-reverse));margin-top:calc(.25rem*(1 - var(--tw-space-y-reverse)))}#chat-widget-root :is(.space-y-2>:not([hidden])~:not([hidden])){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}#chat-widget-root :is(.space-y-4>:not([hidden])~:not([hidden])){--tw-space-y-reverse:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}#chat-widget-root .overflow-hidden{overflow:hidden}#chat-widget-root .overflow-visible{overflow:visible}#chat-widget-root .overflow-x-auto{overflow-x:auto}#chat-widget-root .overflow-y-auto{overflow-y:auto}#chat-widget-root .truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#chat-widget-root .whitespace-nowrap{white-space:nowrap}#chat-widget-root .whitespace-pre-wrap{white-space:pre-wrap}#chat-widget-root .break-words{overflow-wrap:break-word}#chat-widget-root .break-all{word-break:break-all}#chat-widget-root .rounded{border-radius:.25rem}#chat-widget-root .rounded-2xl{border-radius:1rem}#chat-widget-root .rounded-3xl{border-radius:1.5rem}#chat-widget-root .rounded-full{border-radius:9999px}#chat-widget-root .rounded-lg{border-radius:.5rem}#chat-widget-root .rounded-md{border-radius:.375rem}#chat-widget-root .rounded-xl{border-radius:.75rem}#chat-widget-root .rounded-t-2xl{border-top-left-radius:1rem;border-top-right-radius:1rem}#chat-widget-root .rounded-tl-sm{border-top-left-radius:.125rem}#chat-widget-root .rounded-tr-sm{border-top-right-radius:.125rem}#chat-widget-root .border{border-width:1px}#chat-widget-root .border-0{border-width:0}#chat-widget-root .border-b{border-bottom-width:1px}#chat-widget-root .border-l-4{border-left-width:4px}#chat-widget-root .border-t{border-top-width:1px}#chat-widget-root .border-t-2{border-top-width:2px}#chat-widget-root .border-dotted{border-style:dotted}#chat-widget-root .border-none{border-style:none}#chat-widget-root .\\!border-status-error{border-color:hsl(var(--cw-status-error))!important}#chat-widget-root .border-amber-200{--tw-border-opacity:1;border-color:rgb(253 230 138/var(--tw-border-opacity,1))}#chat-widget-root .border-amber-700\\/50{border-color:rgba(180,83,9,.5)}#chat-widget-root .border-blue-200{--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity,1))}#chat-widget-root .border-blue-700\\/50{border-color:rgba(29,78,216,.5)}#chat-widget-root .border-gray-100{--tw-border-opacity:1;border-color:rgb(243 244 246/var(--tw-border-opacity,1))}#chat-widget-root .border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}#chat-widget-root .border-gray-200\\/60{border-color:rgba(229,231,235,.6)}#chat-widget-root .border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}#chat-widget-root .border-gray-600{--tw-border-opacity:1;border-color:rgb(75 85 99/var(--tw-border-opacity,1))}#chat-widget-root .border-gray-700{--tw-border-opacity:1;border-color:rgb(55 65 81/var(--tw-border-opacity,1))}#chat-widget-root .border-gray-700\\/50{border-color:rgba(55,65,81,.5)}#chat-widget-root .border-transparent{border-color:transparent}#chat-widget-root .bg-amber-50{--tw-bg-opacity:1;background-color:rgb(255 251 235/var(--tw-bg-opacity,1))}#chat-widget-root .bg-amber-900\\/40{background-color:rgba(120,53,15,.4)}#chat-widget-root .bg-blue-50{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}#chat-widget-root .bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))}#chat-widget-root .bg-blue-900\\/30{background-color:rgba(30,58,138,.3)}#chat-widget-root .bg-current{background-color:currentColor}#chat-widget-root .bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}#chat-widget-root .bg-gray-400{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity,1))}#chat-widget-root .bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}#chat-widget-root .bg-gray-500{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity,1))}#chat-widget-root .bg-gray-700{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}#chat-widget-root .bg-gray-700\\/50{background-color:rgba(55,65,81,.5)}#chat-widget-root .bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}#chat-widget-root .bg-gray-800\\/50{background-color:rgba(31,41,55,.5)}#chat-widget-root .bg-gray-900{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity,1))}#chat-widget-root .bg-green-200{--tw-bg-opacity:1;background-color:rgb(187 247 208/var(--tw-bg-opacity,1))}#chat-widget-root .bg-orange-200{--tw-bg-opacity:1;background-color:rgb(254 215 170/var(--tw-bg-opacity,1))}#chat-widget-root .bg-pink-200{--tw-bg-opacity:1;background-color:rgb(251 207 232/var(--tw-bg-opacity,1))}#chat-widget-root .bg-red-200{--tw-bg-opacity:1;background-color:rgb(254 202 202/var(--tw-bg-opacity,1))}#chat-widget-root .bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}#chat-widget-root .bg-slate-50\\/50{background-color:rgba(248,250,252,.5)}#chat-widget-root .bg-slate-800\\/50{background-color:rgba(30,41,59,.5)}#chat-widget-root .bg-transparent{background-color:transparent}#chat-widget-root .bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}#chat-widget-root .bg-white\\/10{background-color:hsla(0,0%,100%,.1)}#chat-widget-root .bg-white\\/20{background-color:hsla(0,0%,100%,.2)}#chat-widget-root .bg-yellow-200{--tw-bg-opacity:1;background-color:rgb(254 240 138/var(--tw-bg-opacity,1))}#chat-widget-root .bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}#chat-widget-root .bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}#chat-widget-root .from-gray-50\\/50{--tw-gradient-from:rgba(249,250,251,.5) var(--tw-gradient-from-position);--tw-gradient-to:rgba(249,250,251,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}#chat-widget-root .from-white\\/0{--tw-gradient-from:hsla(0,0%,100%,0) var(--tw-gradient-from-position);--tw-gradient-to:hsla(0,0%,100%,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}#chat-widget-root .from-white\\/10{--tw-gradient-from:hsla(0,0%,100%,.1) var(--tw-gradient-from-position);--tw-gradient-to:hsla(0,0%,100%,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}#chat-widget-root .from-yellow-200{--tw-gradient-from:#fef08a var(--tw-gradient-from-position);--tw-gradient-to:hsla(53,98%,77%,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}#chat-widget-root .via-white\\/5{--tw-gradient-to:hsla(0,0%,100%,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),hsla(0,0%,100%,.05) var(--tw-gradient-via-position),var(--tw-gradient-to)}#chat-widget-root .to-white{--tw-gradient-to:#fff var(--tw-gradient-to-position)}#chat-widget-root .to-white\\/10{--tw-gradient-to:hsla(0,0%,100%,.1) var(--tw-gradient-to-position)}#chat-widget-root .to-yellow-400{--tw-gradient-to:#facc15 var(--tw-gradient-to-position)}#chat-widget-root .object-contain{-o-object-fit:contain;object-fit:contain}#chat-widget-root .p-0{padding:0}#chat-widget-root .p-0\\.5{padding:.125rem}#chat-widget-root .p-3{padding:.75rem}#chat-widget-root .p-5{padding:1.25rem}#chat-widget-root .p-6{padding:1.5rem}#chat-widget-root .p-8{padding:2rem}#chat-widget-root .px-1{padding-left:.25rem;padding-right:.25rem}#chat-widget-root .px-2{padding-left:.5rem;padding-right:.5rem}#chat-widget-root .px-2\\.5{padding-left:.625rem;padding-right:.625rem}#chat-widget-root .px-3{padding-left:.75rem;padding-right:.75rem}#chat-widget-root .px-4{padding-left:1rem;padding-right:1rem}#chat-widget-root .px-5{padding-left:1.25rem;padding-right:1.25rem}#chat-widget-root .py-1{padding-bottom:.25rem;padding-top:.25rem}#chat-widget-root .py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}#chat-widget-root .py-12{padding-bottom:3rem;padding-top:3rem}#chat-widget-root .py-2{padding-bottom:.5rem;padding-top:.5rem}#chat-widget-root .py-2\\.5{padding-bottom:.625rem;padding-top:.625rem}#chat-widget-root .py-3{padding-bottom:.75rem;padding-top:.75rem}#chat-widget-root .py-3\\.5{padding-bottom:.875rem;padding-top:.875rem}#chat-widget-root .py-4{padding-bottom:1rem;padding-top:1rem}#chat-widget-root .pb-1{padding-bottom:.25rem}#chat-widget-root .pb-2{padding-bottom:.5rem}#chat-widget-root .pl-1{padding-left:.25rem}#chat-widget-root .pl-2{padding-left:.5rem}#chat-widget-root .pl-4{padding-left:1rem}#chat-widget-root .pl-\\[50px\\]{padding-left:50px}#chat-widget-root .pr-1{padding-right:.25rem}#chat-widget-root .pt-1{padding-top:.25rem}#chat-widget-root .text-left{text-align:left}#chat-widget-root .text-center{text-align:center}#chat-widget-root .text-right{text-align:right}#chat-widget-root .align-text-bottom{vertical-align:text-bottom}#chat-widget-root .font-sans{font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}#chat-widget-root .text-2xl{font-size:1.5rem;line-height:2rem}#chat-widget-root .text-\\[10px\\]{font-size:10px}#chat-widget-root .text-base{font-size:1rem;line-height:1.5rem}#chat-widget-root .text-chip{font-size:11px;letter-spacing:0;line-height:1.4}#chat-widget-root .text-h4{font-size:18px;letter-spacing:0;line-height:1.3}#chat-widget-root .text-lg{font-size:1.125rem;line-height:1.75rem}#chat-widget-root .text-sm{font-size:.875rem;line-height:1.25rem}#chat-widget-root .text-xl{font-size:1.25rem;line-height:1.75rem}#chat-widget-root .text-xs{font-size:.75rem;line-height:1rem}#chat-widget-root .font-bold{font-weight:700}#chat-widget-root .font-medium{font-weight:500}#chat-widget-root .font-semibold{font-weight:600}#chat-widget-root .uppercase{text-transform:uppercase}#chat-widget-root .lowercase{text-transform:lowercase}#chat-widget-root .italic{font-style:italic}#chat-widget-root .tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}#chat-widget-root .leading-5{line-height:1.25rem}#chat-widget-root .leading-none{line-height:1}#chat-widget-root .leading-normal{line-height:1.5}#chat-widget-root .leading-relaxed{line-height:1.625}#chat-widget-root .leading-snug{line-height:1.375}#chat-widget-root .tracking-wide{letter-spacing:.025em}#chat-widget-root .text-\\[\\#4A5568\\]{--tw-text-opacity:1;color:rgb(74 85 104/var(--tw-text-opacity,1))}#chat-widget-root .text-amber-200{--tw-text-opacity:1;color:rgb(253 230 138/var(--tw-text-opacity,1))}#chat-widget-root .text-amber-800{--tw-text-opacity:1;color:rgb(146 64 14/var(--tw-text-opacity,1))}#chat-widget-root .text-current{color:currentColor}#chat-widget-root .text-gray-100{--tw-text-opacity:1;color:rgb(243 244 246/var(--tw-text-opacity,1))}#chat-widget-root .text-gray-200{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity,1))}#chat-widget-root .text-gray-300{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}#chat-widget-root .text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}#chat-widget-root .text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}#chat-widget-root .text-gray-500\\/80{color:hsla(220,9%,46%,.8)}#chat-widget-root .text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}#chat-widget-root .text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}#chat-widget-root .text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity,1))}#chat-widget-root .text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}#chat-widget-root .text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity,1))}#chat-widget-root .text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}#chat-widget-root .text-slate-400{--tw-text-opacity:1;color:rgb(148 163 184/var(--tw-text-opacity,1))}#chat-widget-root .text-slate-500{--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity,1))}#chat-widget-root .text-status-error{color:hsl(var(--cw-status-error))}#chat-widget-root .text-status-success{color:hsl(var(--cw-status-success))}#chat-widget-root .text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}#chat-widget-root .text-yellow-400{--tw-text-opacity:1;color:rgb(250 204 21/var(--tw-text-opacity,1))}#chat-widget-root .underline{text-decoration-line:underline}#chat-widget-root .no-underline{text-decoration-line:none}#chat-widget-root .placeholder-gray-400::-moz-placeholder{--tw-placeholder-opacity:1;color:rgb(156 163 175/var(--tw-placeholder-opacity,1))}#chat-widget-root .placeholder-gray-400::placeholder{--tw-placeholder-opacity:1;color:rgb(156 163 175/var(--tw-placeholder-opacity,1))}#chat-widget-root .placeholder-gray-500::-moz-placeholder{--tw-placeholder-opacity:1;color:rgb(107 114 128/var(--tw-placeholder-opacity,1))}#chat-widget-root .placeholder-gray-500::placeholder{--tw-placeholder-opacity:1;color:rgb(107 114 128/var(--tw-placeholder-opacity,1))}#chat-widget-root .opacity-0{opacity:0}#chat-widget-root .opacity-50{opacity:.5}#chat-widget-root .opacity-60{opacity:.6}#chat-widget-root .opacity-70{opacity:.7}#chat-widget-root .opacity-75{opacity:.75}#chat-widget-root .opacity-80{opacity:.8}#chat-widget-root .shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}#chat-widget-root .shadow,#chat-widget-root .shadow-2xl{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}#chat-widget-root .shadow-2xl{--tw-shadow:0 25px 50px -12px rgba(0,0,0,.25);--tw-shadow-colored:0 25px 50px -12px var(--tw-shadow-color)}#chat-widget-root .shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}#chat-widget-root .shadow-lg,#chat-widget-root .shadow-md{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}#chat-widget-root .shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}#chat-widget-root .shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}#chat-widget-root .shadow-sm,#chat-widget-root .shadow-xl{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}#chat-widget-root .shadow-xl{--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color)}#chat-widget-root .shadow-black\\/20{--tw-shadow-color:rgba(0,0,0,.2);--tw-shadow:var(--tw-shadow-colored)}#chat-widget-root .shadow-gray-200\\/80{--tw-shadow-color:rgba(229,231,235,.8);--tw-shadow:var(--tw-shadow-colored)}#chat-widget-root .outline-none{outline:2px solid transparent;outline-offset:2px}#chat-widget-root .outline{outline-style:solid}#chat-widget-root .ring{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color)}#chat-widget-root .ring,#chat-widget-root .ring-2{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}#chat-widget-root .ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)}#chat-widget-root .ring-blue-100{--tw-ring-opacity:1;--tw-ring-color:rgb(219 234 254/var(--tw-ring-opacity,1))}#chat-widget-root .ring-blue-300{--tw-ring-opacity:1;--tw-ring-color:rgb(147 197 253/var(--tw-ring-opacity,1))}#chat-widget-root .ring-white{--tw-ring-opacity:1;--tw-ring-color:rgb(255 255 255/var(--tw-ring-opacity,1))}#chat-widget-root .blur{--tw-blur:blur(8px)}#chat-widget-root .blur,#chat-widget-root .drop-shadow{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)}#chat-widget-root .drop-shadow{--tw-drop-shadow:drop-shadow(0 1px 2px rgba(0,0,0,.1)) drop-shadow(0 1px 1px rgba(0,0,0,.06))}#chat-widget-root .drop-shadow-md{--tw-drop-shadow:drop-shadow(0 4px 3px rgba(0,0,0,.07)) drop-shadow(0 2px 2px rgba(0,0,0,.06))}#chat-widget-root .drop-shadow-md,#chat-widget-root .drop-shadow-sm{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#chat-widget-root .drop-shadow-sm{--tw-drop-shadow:drop-shadow(0 1px 1px rgba(0,0,0,.05))}#chat-widget-root .grayscale-\\[0\\.3\\]{--tw-grayscale:grayscale(0.3)}#chat-widget-root .filter,#chat-widget-root .grayscale-\\[0\\.3\\]{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)}#chat-widget-root .backdrop-blur-sm{--tw-backdrop-blur:blur(4px);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}#chat-widget-root .transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}#chat-widget-root .transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}#chat-widget-root .transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}#chat-widget-root .transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}#chat-widget-root .transition-transform{transition-duration:.15s;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}#chat-widget-root .duration-150{transition-duration:.15s}#chat-widget-root .duration-200{transition-duration:.2s}#chat-widget-root .duration-300{transition-duration:.3s}#chat-widget-root .duration-500{transition-duration:.5s}#chat-widget-root :is(#chat-widget-root .animate-in){animation:slideIn .3s ease-out}#chat-widget-root :is(#chat-widget-root .transition-all){transition-duration:.3s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}#chat-widget-root .\\[font-family\\:inherit\\]{font-family:inherit}#chat-widget-root .placeholder\\:text-\\[\\#8C8C8C\\]::-moz-placeholder{--tw-text-opacity:1;color:rgb(140 140 140/var(--tw-text-opacity,1))}#chat-widget-root .placeholder\\:text-\\[\\#8C8C8C\\]::placeholder{--tw-text-opacity:1;color:rgb(140 140 140/var(--tw-text-opacity,1))}#chat-widget-root .placeholder\\:text-\\[\\#A2A9B2\\]::-moz-placeholder{--tw-text-opacity:1;color:rgb(162 169 178/var(--tw-text-opacity,1))}#chat-widget-root .placeholder\\:text-\\[\\#A2A9B2\\]::placeholder{--tw-text-opacity:1;color:rgb(162 169 178/var(--tw-text-opacity,1))}#chat-widget-root .hover\\:scale-105:hover{--tw-scale-x:1.05;--tw-scale-y:1.05}#chat-widget-root .hover\\:scale-105:hover,#chat-widget-root .hover\\:scale-110:hover{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#chat-widget-root .hover\\:scale-110:hover{--tw-scale-x:1.1;--tw-scale-y:1.1}#chat-widget-root .hover\\:scale-\\[1\\.02\\]:hover{--tw-scale-x:1.02;--tw-scale-y:1.02;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#chat-widget-root .hover\\:border-blue-400:hover{--tw-border-opacity:1;border-color:rgb(96 165 250/var(--tw-border-opacity,1))}#chat-widget-root .hover\\:border-blue-600:hover{--tw-border-opacity:1;border-color:rgb(37 99 235/var(--tw-border-opacity,1))}#chat-widget-root .hover\\:bg-blue-50:hover{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}#chat-widget-root .hover\\:bg-blue-500\\/20:hover{background-color:rgba(59,130,246,.2)}#chat-widget-root .hover\\:bg-blue-900\\/50:hover{background-color:rgba(30,58,138,.5)}#chat-widget-root .hover\\:bg-gray-200:hover{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}#chat-widget-root .hover\\:bg-gray-50:hover{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}#chat-widget-root .hover\\:bg-gray-600:hover{--tw-bg-opacity:1;background-color:rgb(75 85 99/var(--tw-bg-opacity,1))}#chat-widget-root .hover\\:bg-gray-700:hover{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}#chat-widget-root .hover\\:bg-red-600:hover{--tw-bg-opacity:1;background-color:rgb(220 38 38/var(--tw-bg-opacity,1))}#chat-widget-root .hover\\:bg-transparent:hover{background-color:transparent}#chat-widget-root .hover\\:text-blue-500:hover{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity,1))}#chat-widget-root .hover\\:text-gray-200:hover{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity,1))}#chat-widget-root .hover\\:text-gray-300:hover{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}#chat-widget-root .hover\\:text-gray-600:hover{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}#chat-widget-root .hover\\:text-gray-700:hover{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}#chat-widget-root .hover\\:underline:hover{text-decoration-line:underline}#chat-widget-root .hover\\:opacity-80:hover{opacity:.8}#chat-widget-root .hover\\:opacity-90:hover{opacity:.9}#chat-widget-root .hover\\:shadow-md:hover{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}#chat-widget-root .hover\\:shadow-md:hover,#chat-widget-root .hover\\:shadow-xl:hover{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}#chat-widget-root .hover\\:shadow-xl:hover{--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color)}#chat-widget-root .hover\\:grayscale-0:hover{--tw-grayscale:grayscale(0);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)}#chat-widget-root .focus\\:\\!border-status-error:focus{border-color:hsl(var(--cw-status-error))!important}#chat-widget-root .focus\\:border-\\[\\#5A6069\\]:focus{--tw-border-opacity:1;border-color:rgb(90 96 105/var(--tw-border-opacity,1))}#chat-widget-root .focus\\:border-\\[\\#B0B0B0\\]:focus{--tw-border-opacity:1;border-color:rgb(176 176 176/var(--tw-border-opacity,1))}#chat-widget-root .focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}#chat-widget-root .focus\\:ring-0:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color)}#chat-widget-root .focus\\:ring-0:focus,#chat-widget-root .focus\\:ring-1:focus{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}#chat-widget-root .focus\\:ring-1:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)}#chat-widget-root .focus\\:ring-gray-300:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(209 213 219/var(--tw-ring-opacity,1))}#chat-widget-root .focus\\:ring-gray-600:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(75 85 99/var(--tw-ring-opacity,1))}#chat-widget-root .focus-visible\\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}#chat-widget-root .focus-visible\\:ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}#chat-widget-root .focus-visible\\:ring-white\\/40:focus-visible{--tw-ring-color:hsla(0,0%,100%,.4)}#chat-widget-root .active\\:scale-95:active{--tw-scale-x:.95;--tw-scale-y:.95}#chat-widget-root .active\\:scale-95:active,#chat-widget-root .active\\:scale-\\[0\\.97\\]:active{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#chat-widget-root .active\\:scale-\\[0\\.97\\]:active{--tw-scale-x:0.97;--tw-scale-y:0.97}#chat-widget-root .active\\:scale-\\[0\\.98\\]:active{--tw-scale-x:0.98;--tw-scale-y:0.98}#chat-widget-root .active\\:scale-\\[0\\.98\\]:active,#chat-widget-root .active\\:scale-\\[0\\.99\\]:active{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#chat-widget-root .active\\:scale-\\[0\\.99\\]:active{--tw-scale-x:0.99;--tw-scale-y:0.99}#chat-widget-root .active\\:outline-none:active{outline:2px solid transparent;outline-offset:2px}#chat-widget-root .active\\:ring-0:active{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}#chat-widget-root .disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}#chat-widget-root .disabled\\:opacity-40:disabled{opacity:.4}#chat-widget-root .disabled\\:opacity-50:disabled{opacity:.5}#chat-widget-root .disabled\\:shadow-none:disabled{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}#chat-widget-root :is(.group:hover .group-hover\\:scale-100){--tw-scale-x:1;--tw-scale-y:1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#chat-widget-root :is(.group:hover .group-hover\\:opacity-100){opacity:1}#chat-widget-root .dark\\:text-gray-300:is(.dark *){--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}#chat-widget-root .dark\\:text-gray-400:is(.dark *){--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}#chat-widget-root .rtl\\:rounded-tl-2xl:where([dir=rtl],[dir=rtl] *){border-top-left-radius:1rem}#chat-widget-root .rtl\\:rounded-tr-sm:where([dir=rtl],[dir=rtl] *){border-top-right-radius:.125rem}#chat-widget-root .\\[\\&\\:first-child\\]\\:\\!mt-0:first-child{margin-top:0!important}#chat-widget-root :is(.\\[\\&\\>\\*\\:first-child\\]\\:\\!mt-0>:first-child){margin-top:0!important}#chat-widget-root :is(.\\[\\&\\>\\*\\:last-child\\]\\:\\!mb-0>:last-child){margin-bottom:0!important}\n.chat-widget-root{position:fixed;z-index:999999}.chat-widget-container{color:var(--cw-text-color,inherit);font-family:var(\n --cw-font-family,-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif\n )}#chat-widget-root .chat-messages p{overflow-wrap:anywhere;word-break:break-word}textarea#chat-widget-input::-moz-placeholder{border:none;line-height:48px;outline:none}textarea#chat-widget-input::placeholder{border:none;line-height:48px;outline:none}textarea#chat-widget-input{border:none;line-height:48px;outline:none}@keyframes slideIn{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}@keyframes bounce{0%,to{transform:translateY(0)}50%{transform:translateY(-5px)}}#chat-widget-root .scrollbar-hide{-ms-overflow-style:none;scrollbar-width:none}#chat-widget-root .scrollbar-hide::-webkit-scrollbar{display:none}#chat-widget-root .slim-scrollbar-x{scrollbar-width:thin}#chat-widget-root .slim-scrollbar-x::-webkit-scrollbar{height:3px!important}#chat-widget-root .slim-scrollbar-x::-webkit-scrollbar-track{background:transparent!important}#chat-widget-root .slim-scrollbar-x::-webkit-scrollbar-thumb{background:#d1d5db!important;border-radius:2px!important}#chat-widget-root .slim-scrollbar-x::-webkit-scrollbar-thumb:hover{background:#9ca3af!important}@media print{.chat-widget-root{display:none!important}}',e.appendChild(o),t=document.createElement("div"),t.id="chat-widget-mount",e.appendChild(t)}e||(e=Uu(t)),void 0===s.darkMode&&(r.darkMode=window.matchMedia("(prefers-color-scheme: dark)").matches);const l=r.apiBaseUrl?{apiBaseUrl:r.apiBaseUrl,...void 0!==s.wsBaseUrl&&{wsBaseUrl:r.wsBaseUrl},...void 0!==s.position&&{position:r.position},...void 0!==s.quickQuestionsLayout&&{quickQuestionsLayout:r.quickQuestionsLayout},...void 0!==s.darkMode&&{darkMode:r.darkMode},...void 0!==s.primaryColor&&{primaryColor:r.primaryColor},...void 0!==s.companyName&&{companyName:r.companyName},...void 0!==s.conciergeName&&{conciergeName:r.conciergeName},...void 0!==s.companyLogo&&{companyLogo:r.companyLogo},...void 0!==s.welcomeMessage&&{welcomeMessage:r.welcomeMessage},...void 0!==s.quickQuestions&&{quickQuestions:r.quickQuestions},...void 0!==s.channelLinks&&{channelLinks:r.channelLinks},...void 0!==s.textColor&&{textColor:r.textColor},...void 0!==s.agentMessageBubbleColor&&{agentMessageBubbleColor:r.agentMessageBubbleColor},...void 0!==s.userMessageBoxColor&&{userMessageBoxColor:r.userMessageBoxColor},...void 0!==s.assistantTextColor&&{assistantTextColor:r.assistantTextColor},...void 0!==s.userTextColor&&{userTextColor:r.userTextColor},...void 0!==s.fontFamily&&{fontFamily:r.fontFamily},...void 0!==s.fontSize&&{fontSize:r.fontSize},...void 0!==s.defaultLanguage&&{defaultLanguage:r.defaultLanguage},...void 0!==s.locale&&{locale:r.locale},...void 0!==s.headerTextBold&&{headerTextBold:r.headerTextBold},...void 0!==s.headerTextItalic&&{headerTextItalic:r.headerTextItalic},...void 0!==s.enableVoiceInteraction&&{enableVoiceInteraction:r.enableVoiceInteraction},...void 0!==s.disclaimerEnabled&&{disclaimerEnabled:r.disclaimerEnabled},...void 0!==s.disclaimerText&&{disclaimerText:r.disclaimerText},...void 0!==s.disclaimerPosition&&{disclaimerPosition:r.disclaimerPosition},...void 0!==s.onboardingQuestions&&{onboardingQuestions:r.onboardingQuestions},...void 0!==s.onboardingEnabled&&{onboardingEnabled:r.onboardingEnabled},...void 0!==s.showPoweredBy&&{showPoweredBy:r.showPoweredBy},...void 0!==s.collectionPrompt&&{collectionPrompt:r.collectionPrompt},...void 0!==s.allowedDomains&&s.allowedDomains.length>0&&{allowedDomains:r.allowedDomains},...void 0!==s.autoOpen&&{autoOpen:r.autoOpen},...void 0!==s.openDelay&&{openDelay:r.openDelay},...void 0!==s.apiKey&&{apiKey:r.apiKey},...void 0!==s.className&&{className:r.className}}:{...r,apiBaseUrl:r.apiBaseUrl,wsBaseUrl:r.wsBaseUrl,organizationId:r.organizationId};try{e.render(I.createElement(pf,null,I.createElement(df,l)))}catch(e){t&&(t.innerHTML='<div role="alert" style="position:fixed;bottom:20px;right:20px;max-width:280px;padding:10px 14px;border-radius:10px;background:#1f2937;color:#f3f4f6;font-family:-apple-system,BlinkMacSystemFont,\'Segoe UI\',Roboto,Arial,sans-serif;font-size:13px;line-height:1.4;box-shadow:0 4px 12px rgba(0,0,0,0.15);z-index:2147483647;">Chat is temporarily unavailable. Please refresh the page to try again.</div>')}return r.onOpen&&r.autoOpen&&setTimeout(()=>r.onOpen(),r.openDelay),i},updateConfig:function(e){return r={...r,...e},this.init(r),i},open:function(){return this.updateConfig({autoOpen:!0,openDelay:0}),r.onOpen&&r.onOpen(),i},close:function(){return this.updateConfig({autoOpen:!1}),r.onClose&&r.onClose(),i},toggleTheme:function(){return r.darkMode=!r.darkMode,this.updateConfig({darkMode:r.darkMode}),i},destroy:function(){return e&&(e.unmount(),e=null),n&&n.parentNode&&(n.parentNode.removeChild(n),n=null),t=null,o=null,r={},i},getConfig:function(){return{...r}}};"undefined"!=typeof window&&(window.ChatWidget=i,window.ChatWidget.version=uf,window.ChatWidgetConfig&&document.addEventListener("DOMContentLoaded",()=>{i.init(window.ChatWidgetConfig)}),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",e=>{(void 0===r.darkMode||r.autoTheme)&&i.updateConfig({darkMode:e.matches})})),"undefined"!=typeof module&&module.exports&&(module.exports=i)}();var gf={exports:{}};function ff(e){try{const t=window[e];return t.setItem("__ft__","1"),t.removeItem("__ft__"),"1"}catch{return"0"}}function hf(){try{return Array.from(navigator.plugins||[]).map(e=>`${e.name}::${e.filename}`).sort().join("|")}catch{return""}}function mf(){try{return Array.from(navigator.mimeTypes||[]).map(e=>e.type).sort().join("|")}catch{return""}}function bf(){try{const e=document.createElement("canvas");e.width=240,e.height=60;const t=e.getContext("2d");return t.textBaseline="alphabetic",t.fillStyle="#f60",t.fillRect(125,1,62,20),t.fillStyle="#069",t.font="11pt no-real-font-abc",t.fillText("user-trace:canvas,🔍<canvas>",2,15),t.fillStyle="rgba(102,204,0,0.7)",t.font="18pt Arial",t.fillText("user-trace:canvas,🔍<canvas>",4,45),e.toDataURL().slice(-50)}catch{return"nocanvas"}}function yf(){try{const e=document.createElement("canvas"),t=e.getContext("webgl")||e.getContext("experimental-webgl");if(!t)return"nowebgl";const n=t.getExtension("WEBGL_debug_renderer_info"),r=n?t.getParameter(n.UNMASKED_VENDOR_WEBGL):t.getParameter(t.VENDOR);return`${r}::${n?t.getParameter(n.UNMASKED_RENDERER_WEBGL):t.getParameter(t.RENDERER)}`}catch{return"nowebgl"}}function vf(){const e=["Arial","Courier New","Georgia","Times New Roman","Verdana","Helvetica","Comic Sans MS","Impact","Tahoma","Trebuchet MS","Palatino Linotype","Lucida Console","Lucida Sans Unicode","MS Sans Serif","MS Serif","Symbol","Wingdings","Franklin Gothic Medium","Book Antiqua","Garamond","Calibri","Cambria","Consolas","Candara","Optima","Segoe UI","Gill Sans","Century Gothic","Futura"];try{const t=document.createElement("canvas").getContext("2d"),n="monospace",r="mmmmmmmmmmlli",o="72px";t.font=`${o} ${n}`;const a=t.measureText(r).width;return e.filter(e=>(t.font=`${o} '${e}', ${n}`,t.measureText(r).width!==a)).join(",")}catch{return""}}function wf(){try{return window.OfflineAudioContext||window.webkitOfflineAudioContext?"audio-supported":"noaudio"}catch{return"noaudio"}}var kf={generateFingerprint:function(){const e=function(){const e=navigator||{},t=screen||{};return{userAgent:e.userAgent||"",language:e.language||"",languages:(e.languages||[]).join(","),platform:e.platform||"",hardwareConcurrency:e.hardwareConcurrency||0,deviceMemory:e.deviceMemory||0,maxTouchPoints:e.maxTouchPoints||0,cookieEnabled:e.cookieEnabled?"1":"0",doNotTrack:e.doNotTrack||"unknown",screenWidth:t.width||0,screenHeight:t.height||0,colorDepth:t.colorDepth||0,pixelDepth:t.pixelDepth||0,devicePixelRatio:"undefined"!=typeof devicePixelRatio?devicePixelRatio:1,timezoneOffset:(new Date).getTimezoneOffset(),timezone:Intl.DateTimeFormat().resolvedOptions().timeZone||"",sessionStorage:ff("sessionStorage"),localStorage:ff("localStorage"),indexedDB:"undefined"!=typeof indexedDB?"1":"0",cpuClass:e.cpuClass||"unknown",oscpu:e.oscpu||"unknown",vendor:e.vendor||"",vendorSub:e.vendorSub||"",productSub:e.productSub||"",plugins:hf(),mimeTypes:mf(),canvas:bf(),webgl:yf(),fonts:vf(),audioContext:wf()}}(),t=function(e){let t=5381;for(let n=0;n<e.length;n++)t=(t<<5)+t^e.charCodeAt(n),t&=t;return(t>>>0).toString(16).padStart(8,"0")}(Object.values(e).join("|||")),n=["nocanvas"!==e.canvas,"nowebgl"!==e.webgl&&""!==e.webgl,""!==e.fonts,""!==e.plugins,e.hardwareConcurrency>0,""!==e.timezone];return{id:t,signals:e,confidence:Math.round(n.filter(Boolean).length/n.length*100)}}};const xf=[{url:"https://api.ipify.org?format=json",parse:e=>e.ip},{url:"https://api64.ipify.org?format=json",parse:e=>e.ip},{url:"https://api.my-ip.io/v2/ip.json",parse:e=>e.ip},{url:"https://ipapi.co/json/",parse:e=>e.ip}];async function Sf(e,t=4e3){const n=new AbortController,r=setTimeout(()=>n.abort(),t);try{const t=await fetch(e,{signal:n.signal});if(!t.ok)throw new Error(`HTTP ${t.status}`);return await t.json()}finally{clearTimeout(r)}}function Cf(e){return/^(\d{1,3}\.){3}\d{1,3}$/.test(e)||/^[0-9a-f:]{2,39}$/i.test(e)}var Mf={detectIP:async function(){for(const e of xf)try{const t=await Sf(e.url),n=e.parse(t);if(n&&Cf(n))return{ip:n,source:new URL(e.url).hostname}}catch{}return null},getIPVersion:function(e){return e?/^(\d{1,3}\.){3}\d{1,3}$/.test(e)?"v4":/^[0-9a-f:]{2,39}$/i.test(e)?"v6":"unknown":"unknown"}};let Pf={apiKeys:{},preferredProvider:null,timeoutMs:5e3};function zf(e={}){const t=[e.ipinfo&&{name:"ipinfo.io",tier:"free-with-key",freeLimit:"50,000 req/month",signup:"https://ipinfo.io/signup",buildUrl:t=>`https://ipinfo.io/${t}/json?token=${e.ipinfo}`,parse:e=>{if(e.error)throw new Error(e.error.message||"Failed");const[t,n]=(e.loc||"0,0").split(",").map(Number);return{ip:e.ip||"",country:e.country||"",countryCode:e.country||"",region:e.region||"",regionCode:"",city:e.city||"",zip:e.postal||"",latitude:t,longitude:n,timezone:e.timezone||"",isp:e.org||"",org:e.org||"",proxy:!1,hosting:!1}}},e.ipgeolocation&&{name:"ipgeolocation.io",tier:"free-with-key",freeLimit:"1,000 req/day",signup:"https://ipgeolocation.io/signup.html",buildUrl:t=>`https://api.ipgeolocation.io/ipgeo?apiKey=${e.ipgeolocation}&ip=${t}`,parse:e=>{if(e.message)throw new Error(e.message);return{ip:e.ip||"",country:e.country_name||"",countryCode:e.country_code2||"",region:e.state_prov||"",regionCode:e.state_code||"",city:e.city||"",zip:e.zipcode||"",latitude:parseFloat(e.latitude)||0,longitude:parseFloat(e.longitude)||0,timezone:e.time_zone?.name||"",isp:e.isp||"",org:e.organization||"",proxy:e.security?.is_proxy||!1,hosting:e.security?.is_hosting||!1}}},e.abstractapi&&{name:"abstractapi.com",tier:"free-with-key",freeLimit:"20,000 req/month",signup:"https://app.abstractapi.com/users/signup?target=/api/ip-geolocation",buildUrl:t=>`https://ipgeolocation.abstractapi.com/v1/?api_key=${e.abstractapi}&ip_address=${t}`,parse:e=>{if(e.error)throw new Error(e.error.message||"Failed");return{ip:e.ip_address||"",country:e.country||"",countryCode:e.country_code||"",region:e.region||"",regionCode:e.region_iso_code||"",city:e.city||"",zip:e.postal_code||"",latitude:e.latitude||0,longitude:e.longitude||0,timezone:e.timezone?.name||"",isp:e.connection?.isp_name||"",org:e.connection?.org_name||"",proxy:e.security?.is_vpn||!1,hosting:e.security?.is_hosting||!1}}},e.ip2location&&{name:"ip2location.io",tier:"free-with-key",freeLimit:"30,000 req/month",signup:"https://www.ip2location.io/sign-up",buildUrl:t=>`https://api.ip2location.io/?key=${e.ip2location}&ip=${t}&format=json`,parse:e=>{if(e.error)throw new Error(e.error.error_message||"Failed");return{ip:e.ip||"",country:e.country_name||"",countryCode:e.country_code||"",region:e.region_name||"",regionCode:"",city:e.city_name||"",zip:e.zip_code||"",latitude:e.latitude||0,longitude:e.longitude||0,timezone:e.time_zone||"",isp:e.isp||"",org:e.domain||"",proxy:e.is_proxy||!1,hosting:!1}}},e.ipstack&&{name:"ipstack.com",tier:"free-with-key",freeLimit:"100 req/month",signup:"https://ipstack.com/product",buildUrl:t=>`https://api.ipstack.com/${t}?access_key=${e.ipstack}`,parse:e=>{if(e.error)throw new Error(e.error.info||"Failed");return{ip:e.ip||"",country:e.country_name||"",countryCode:e.country_code||"",region:e.region_name||"",regionCode:e.region_code||"",city:e.city||"",zip:e.zip||"",latitude:e.latitude||0,longitude:e.longitude||0,timezone:e.time_zone?.id||"",isp:e.connection?.isp||"",org:"",proxy:!1,hosting:!1}}}].filter(Boolean),n=[{name:"ip-api.com",tier:"free",freeLimit:"45 req/min (no key needed)",buildUrl:e=>`https://ip-api.com/json/${e}?fields=status,message,country,countryCode,region,regionName,city,zip,lat,lon,timezone,isp,org,proxy,hosting,query`,parse:e=>{if("success"!==e.status)throw new Error(e.message||"Failed");return{ip:e.query||"",country:e.country||"",countryCode:e.countryCode||"",region:e.regionName||"",regionCode:e.region||"",city:e.city||"",zip:e.zip||"",latitude:e.lat||0,longitude:e.lon||0,timezone:e.timezone||"",isp:e.isp||"",org:e.org||"",proxy:e.proxy||!1,hosting:e.hosting||!1}}},{name:"ipwho.is",tier:"free",freeLimit:"unlimited (fair use, no key needed)",buildUrl:e=>`https://ipwho.is/${e}`,parse:e=>{if(!e.success)throw new Error(e.message||"Failed");return{ip:e.ip||"",country:e.country||"",countryCode:e.country_code||"",region:e.region||"",regionCode:e.region_code||"",city:e.city||"",zip:e.postal||"",latitude:e.latitude||0,longitude:e.longitude||0,timezone:e.timezone?.id||"",isp:e.connection?.isp||"",org:e.connection?.org||"",proxy:!1,hosting:!1}}},{name:"ipapi.co",tier:"free",freeLimit:"1,000 req/day (no key needed)",buildUrl:e=>`https://ipapi.co/${e}/json/`,parse:e=>{if(e.error)throw new Error(e.reason||"Failed");return{ip:e.ip||"",country:e.country_name||"",countryCode:e.country_code||"",region:e.region||"",regionCode:e.region_code||"",city:e.city||"",zip:e.postal||"",latitude:e.latitude||0,longitude:e.longitude||0,timezone:e.timezone||"",isp:e.org||"",org:e.org||"",proxy:!1,hosting:!1}}},{name:"freeipapi.com",tier:"free",freeLimit:"unlimited (fair use, no key needed)",buildUrl:e=>`https://freeipapi.com/api/json/${e}`,parse:e=>({ip:e.ipAddress||"",country:e.countryName||"",countryCode:e.countryCode||"",region:e.regionName||"",regionCode:e.regionCode||"",city:e.cityName||"",zip:e.zipCode||"",latitude:e.latitude||0,longitude:e.longitude||0,timezone:e.timeZone||"",isp:"",org:"",proxy:!1,hosting:!1})}],r=["freeipapi.com","ipwho.is","ipapi.co","ip-api.com"];return n.sort((e,t)=>r.indexOf(e.name)-r.indexOf(t.name)),[...t,...n]}async function Ef(e,t=5e3){const n=new AbortController,r=setTimeout(()=>n.abort(),t);try{const t=await fetch(e,{signal:n.signal});if(!t.ok)throw new Error(`HTTP ${t.status}`);return await t.json()}finally{clearTimeout(r)}}const jf={enableHighAccuracy:!0,timeout:8e3,maximumAge:3e5};function Tf(e={}){return new Promise(t=>"undefined"!=typeof navigator&&navigator.geolocation?"undefined"!=typeof window&&!1===window.isSecureContext?t(null):void navigator.geolocation.getCurrentPosition(e=>t({latitude:e.coords.latitude,longitude:e.coords.longitude,accuracy:e.coords.accuracy}),()=>t(null),{...jf,...e}):t(null))}async function Nf(e,t,n={}){if("number"!=typeof e||"number"!=typeof t)return null;const r=n.timeoutMs||Pf.timeoutMs||5e3,o=`https://api.bigdatacloud.net/data/reverse-geocode-client?latitude=${e}&longitude=${t}&localityLanguage=${n.localityLanguage||"en"}`;try{const n=await Ef(o,r),a=n.city||n.locality||"";return a||n.countryName?{city:a,region:n.principalSubdivision||"",regionCode:(n.principalSubdivisionCode||"").split("-").pop()||"",country:n.countryName||"",countryCode:n.countryCode||"",latitude:e,longitude:t}:null}catch{return null}}var Ff={configureGeo:function(e={}){e.apiKeys&&(Pf.apiKeys={...Pf.apiKeys,...e.apiKeys}),void 0!==e.preferredProvider&&(Pf.preferredProvider=e.preferredProvider),void 0!==e.timeoutMs&&(Pf.timeoutMs=e.timeoutMs)},resolveLocation:async function(e,t={}){const n={apiKeys:{...Pf.apiKeys,...t.apiKeys||{}},preferredProvider:t.preferredProvider||Pf.preferredProvider,timeoutMs:t.timeoutMs||Pf.timeoutMs};let r=zf(n.apiKeys);if(n.preferredProvider){const e=r.findIndex(e=>e.name===n.preferredProvider);if(e>0){const[t]=r.splice(e,1);r.unshift(t)}}for(const t of r)try{const r=await Ef(t.buildUrl(e),n.timeoutMs);return{...t.parse(r),source:t.name,tier:t.tier}}catch{}return null},listProviders:function(e={}){return zf({...Pf.apiKeys,...e}).map(({name:e,tier:t,freeLimit:n,signup:r})=>({name:e,tier:t,freeLimit:n,signup:r||"—"}))},getBrowserGeolocation:Tf,getGeolocationPermission:async function(){try{if("undefined"==typeof navigator||!navigator.permissions||!navigator.permissions.query)return"unsupported";return(await navigator.permissions.query({name:"geolocation"})).state}catch{return"unsupported"}},reverseGeocode:Nf,getBrowserLocation:async function(e={}){const t=await Tf(e);if(!t)return null;const n=await Nf(t.latitude,t.longitude,e),r=!(!n||!n.city&&!n.country);return{...r?n:{},latitude:t.latitude,longitude:t.longitude,accuracy:t.accuracy,...r?{source:"gps"}:{}}},toMapsUrl:function(e,t){return`https://www.google.com/maps?q=${e},${t}`}};const Lf="__ut_sid__",Rf="__ut_uid__",Af="__ut_meta__";function _f(){const e=new Uint8Array(16);crypto.getRandomValues(e),e[6]=15&e[6]|64,e[8]=63&e[8]|128;const t=Array.from(e).map(e=>e.toString(16).padStart(2,"0")).join("");return[t.slice(0,8),t.slice(8,12),t.slice(12,16),t.slice(16,20),t.slice(20)].join("-")}function If(e,t){try{return e.getItem(t)}catch{return null}}function Bf(e,t,n){try{return e.setItem(t,n),!0}catch{return!1}}var Df={getOrCreateUserID:function(){let e=If(localStorage,Rf),t=!1;return e||(e=_f(),t=!0,Bf(localStorage,Rf,e)),{uid:e,isNew:t}},getOrCreateSessionID:function(){let e=If(sessionStorage,Lf),t=!1;return e||(e=_f(),t=!0,Bf(sessionStorage,Lf,e)),{sid:e,isNew:t}},saveSessionMeta:function(e){try{const t=JSON.stringify({...e,savedAt:(new Date).toISOString()});Bf(localStorage,Af,t)}catch{}},loadSessionMeta:function(){try{const e=If(localStorage,Af);return e?JSON.parse(e):null}catch{return null}},clearSession:function(){try{localStorage.removeItem(Rf)}catch{}try{localStorage.removeItem(Af)}catch{}try{sessionStorage.removeItem(Lf)}catch{}},getBrowserContext:function(){return{userAgent:navigator.userAgent,platform:navigator.platform||"unknown",language:navigator.language||"unknown",timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,screenRes:`${screen.width}x${screen.height}`,viewportRes:`${window.innerWidth}x${window.innerHeight}`,colorDepth:screen.colorDepth,touchSupport:navigator.maxTouchPoints>0,cookieEnabled:navigator.cookieEnabled,referrer:document.referrer||null,currentUrl:window.location.href,loadedAt:(new Date).toISOString()}}};const{generateFingerprint:Of}=kf,{detectIP:$f,getIPVersion:Vf}=Mf,{configureGeo:Uf,resolveLocation:Hf,listProviders:Wf,getBrowserGeolocation:qf,getGeolocationPermission:Qf,reverseGeocode:Kf,getBrowserLocation:Yf,toMapsUrl:Gf}=Ff,{getOrCreateUserID:Jf,getOrCreateSessionID:Xf,saveSessionMeta:Zf,loadSessionMeta:eh,clearSession:th,getBrowserContext:nh}=Df;gf.exports=class{constructor(e={}){this._options={onReady:e.onReady||null,onError:e.onError||null,geoFromBrowser:void 0===e.geoFromBrowser||e.geoFromBrowser,geoApiKeys:e.geoApiKeys||null,geoOptions:e.geoOptions||null,cache:!1!==e.cache,maxAgeMs:e.maxAgeMs||3e5,autoInit:e.autoInit||!1,webhookUrl:e.webhookUrl||null},this.profile=null,this._ready=!1,this._options.autoInit&&this.init().catch(()=>{})}async init(){if(this._options.cache){const e=eh();if(e&&e.savedAt){if(Date.now()-new Date(e.savedAt).getTime()<this._options.maxAgeMs)return this.profile=e,this._ready=!0,this._options.onReady&&this._options.onReady(this.profile),this.profile}}try{const{uid:e,isNew:t}=Jf(),{sid:n,isNew:r}=Xf(),{id:o,signals:a,confidence:i}=Of(),s=this._options.geoApiKeys?{apiKeys:this._options.geoApiKeys}:{},[l,c]=await Promise.all([(async()=>{const e=await $f(),t=e?.ip||"unknown",n="unknown"!==t?await Hf(t,s):null;return{ip:t,ipVersion:e?Vf(t):"unknown",geo:n}})(),this._collectBrowserLocation()]),{ip:u,ipVersion:d}=l;let p=l.geo,g=null;c&&(g={latitude:c.latitude,longitude:c.longitude,accuracy:c.accuracy},"gps"===c.source&&(p={...p||{},...c}));const f=nh();return this.profile={uid:e,sid:n,isNewUser:t,isNewSession:r,fingerprintId:o,fingerprintConfidence:i,ip:u,ipVersion:d,geo:p||null,browserGeo:g||null,browser:f,raw:a,createdAt:(new Date).toISOString(),...p?{mapsUrl:Gf(p.latitude,p.longitude)}:{}},Zf(this.profile),this._options.webhookUrl&&this._sendToWebhook(this.profile),this._ready=!0,this._options.onReady&&this._options.onReady(this.profile),this.profile}catch(e){throw this._options.onError&&this._options.onError(e),e}}async _collectBrowserLocation(){const e=this._options.geoFromBrowser;if(!e)return null;if("auto"===e){if("granted"!==await Qf())return null}return Yf(this._options.geoOptions||{})}async captureBrowserLocation(e={}){const t=await Yf({...this._options.geoOptions||{},...e});return t&&this.profile?(this.profile.browserGeo={latitude:t.latitude,longitude:t.longitude,accuracy:t.accuracy},this.profile.mapsUrl=Gf(t.latitude,t.longitude),"gps"===t.source&&(this.profile.geo={...this.profile.geo||{},...t}),Zf(this.profile),this._options.onReady&&this._options.onReady(this.profile),this.profile):this.profile}getProfile(){return this.profile}isKnownUser(e){return this.profile?.uid===e}async refresh(){return th(),this.profile=null,this._ready=!1,this.init()}clear(){th(),this.profile=null,this._ready=!1}getSummary(){if(!this.profile)return null;const{uid:e,sid:t,fingerprintId:n,ip:r,geo:o,browser:a,createdAt:i}=this.profile;return{uid:e,sid:t,fingerprintId:n,ip:r,country:o?.country||"unknown",city:o?.city||"unknown",isp:o?.isp||"unknown",proxy:o?.proxy||!1,timezone:o?.timezone||a.timezone,userAgent:a.userAgent,language:a.language,createdAt:i}}async _sendToWebhook(e){try{await fetch(this._options.webhookUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}catch{}}};var rh=gf.exports.generateFingerprint=Of,oh=gf.exports.detectIP=$f,ah=gf.exports.configureGeo=Uf,ih=gf.exports.resolveLocation=Hf,sh=gf.exports.listProviders=Wf,lh=gf.exports.getBrowserGeolocation=qf,ch=gf.exports.getGeolocationPermission=Qf,uh=gf.exports.reverseGeocode=Kf,dh=gf.exports.getBrowserLocation=Yf,ph=gf.exports.getOrCreateUserID=Jf,gh=gf.exports.getOrCreateSessionID=Xf,fh=gf.exports.clearSession=th,hh=gf.exports.getBrowserContext=nh,mh=gf.exports,bh=e({__proto__:null,clearSession:fh,configureGeo:ah,default:mh,detectIP:oh,generateFingerprint:rh,getBrowserContext:hh,getBrowserGeolocation:lh,getBrowserLocation:dh,getGeolocationPermission:ch,getOrCreateSessionID:gh,getOrCreateUserID:ph,listProviders:sh,resolveLocation:ih,reverseGeocode:uh},[mh]),yh={exports:{}};!function(e){!function(){function t(e,t,n){return e.call.apply(e.bind,arguments)}function n(e,t,n){if(!e)throw Error();if(2<arguments.length){var r=Array.prototype.slice.call(arguments,2);return function(){var n=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(n,r),e.apply(t,n)}}return function(){return e.apply(t,arguments)}}function r(e,o,a){return(r=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?t:n).apply(null,arguments)}var o=Date.now||function(){return+new Date};function a(e,t){this.a=e,this.o=t||e,this.c=this.o.document}var i=!!window.FontFace;function s(e,t,n,r){if(t=e.c.createElement(t),n)for(var o in n)n.hasOwnProperty(o)&&("style"==o?t.style.cssText=n[o]:t.setAttribute(o,n[o]));return r&&t.appendChild(e.c.createTextNode(r)),t}function l(e,t,n){(e=e.c.getElementsByTagName(t)[0])||(e=document.documentElement),e.insertBefore(n,e.lastChild)}function c(e){e.parentNode&&e.parentNode.removeChild(e)}function u(e,t,n){t=t||[],n=n||[];for(var r=e.className.split(/\s+/),o=0;o<t.length;o+=1){for(var a=!1,i=0;i<r.length;i+=1)if(t[o]===r[i]){a=!0;break}a||r.push(t[o])}for(t=[],o=0;o<r.length;o+=1){for(a=!1,i=0;i<n.length;i+=1)if(r[o]===n[i]){a=!0;break}a||t.push(r[o])}e.className=t.join(" ").replace(/\s+/g," ").replace(/^\s+|\s+$/,"")}function d(e,t){for(var n=e.className.split(/\s+/),r=0,o=n.length;r<o;r++)if(n[r]==t)return!0;return!1}function p(e,t,n){function r(){u&&o&&a&&(u(c),u=null)}t=s(e,"link",{rel:"stylesheet",href:t,media:"all"});var o=!1,a=!0,c=null,u=n||null;i?(t.onload=function(){o=!0,r()},t.onerror=function(){o=!0,c=Error("Stylesheet failed to load"),r()}):setTimeout(function(){o=!0,r()},0),l(e,"head",t)}function g(e,t,n,r){var o=e.c.getElementsByTagName("head")[0];if(o){var a=s(e,"script",{src:t}),i=!1;return a.onload=a.onreadystatechange=function(){i||this.readyState&&"loaded"!=this.readyState&&"complete"!=this.readyState||(i=!0,n&&n(null),a.onload=a.onreadystatechange=null,"HEAD"==a.parentNode.tagName&&o.removeChild(a))},o.appendChild(a),setTimeout(function(){i||(i=!0,n&&n(Error("Script load timeout")))},r||5e3),a}return null}function f(){this.a=0,this.c=null}function h(e){return e.a++,function(){e.a--,b(e)}}function m(e,t){e.c=t,b(e)}function b(e){0==e.a&&e.c&&(e.c(),e.c=null)}function y(e){this.a=e||"-"}function v(e,t){this.c=e,this.f=4,this.a="n";var n=(t||"n4").match(/^([nio])([1-9])$/i);n&&(this.a=n[1],this.f=parseInt(n[2],10))}function w(e){var t=[];e=e.split(/,\s*/);for(var n=0;n<e.length;n++){var r=e[n].replace(/['"]/g,"");-1!=r.indexOf(" ")||/^\d/.test(r)?t.push("'"+r+"'"):t.push(r)}return t.join(",")}function k(e){return e.a+e.f}function x(e){var t="normal";return"o"===e.a?t="oblique":"i"===e.a&&(t="italic"),t}function S(e){var t=4,n="n",r=null;return e&&((r=e.match(/(normal|oblique|italic)/i))&&r[1]&&(n=r[1].substr(0,1).toLowerCase()),(r=e.match(/([1-9]00|normal|bold)/i))&&r[1]&&(/bold/i.test(r[1])?t=7:/[1-9]00/.test(r[1])&&(t=parseInt(r[1].substr(0,1),10)))),n+t}function C(e,t){this.c=e,this.f=e.o.document.documentElement,this.h=t,this.a=new y("-"),this.j=!1!==t.events,this.g=!1!==t.classes}function M(e){if(e.g){var t=d(e.f,e.a.c("wf","active")),n=[],r=[e.a.c("wf","loading")];t||n.push(e.a.c("wf","inactive")),u(e.f,n,r)}P(e,"inactive")}function P(e,t,n){e.j&&e.h[t]&&(n?e.h[t](n.c,k(n)):e.h[t]())}function z(){this.c={}}function E(e,t){this.c=e,this.f=t,this.a=s(this.c,"span",{"aria-hidden":"true"},this.f)}function j(e){l(e.c,"body",e.a)}function T(e){return"display:block;position:absolute;top:-9999px;left:-9999px;font-size:300px;width:auto;height:auto;line-height:normal;margin:0;padding:0;font-variant:normal;white-space:nowrap;font-family:"+w(e.c)+";font-style:"+x(e)+";font-weight:"+e.f+"00;"}function N(e,t,n,r,o,a){this.g=e,this.j=t,this.a=r,this.c=n,this.f=o||3e3,this.h=a||void 0}function F(e,t,n,r,o,a,i){this.v=e,this.B=t,this.c=n,this.a=r,this.s=i||"BESbswy",this.f={},this.w=o||3e3,this.u=a||null,this.m=this.j=this.h=this.g=null,this.g=new E(this.c,this.s),this.h=new E(this.c,this.s),this.j=new E(this.c,this.s),this.m=new E(this.c,this.s),e=T(e=new v(this.a.c+",serif",k(this.a))),this.g.a.style.cssText=e,e=T(e=new v(this.a.c+",sans-serif",k(this.a))),this.h.a.style.cssText=e,e=T(e=new v("serif",k(this.a))),this.j.a.style.cssText=e,e=T(e=new v("sans-serif",k(this.a))),this.m.a.style.cssText=e,j(this.g),j(this.h),j(this.j),j(this.m)}y.prototype.c=function(e){for(var t=[],n=0;n<arguments.length;n++)t.push(arguments[n].replace(/[\W_]+/g,"").toLowerCase());return t.join(this.a)},N.prototype.start=function(){var e=this.c.o.document,t=this,n=o(),r=new Promise(function(r,a){!function i(){o()-n>=t.f?a():e.fonts.load(function(e){return x(e)+" "+e.f+"00 300px "+w(e.c)}(t.a),t.h).then(function(e){1<=e.length?r():setTimeout(i,25)},function(){a()})}()}),a=null,i=new Promise(function(e,n){a=setTimeout(n,t.f)});Promise.race([i,r]).then(function(){a&&(clearTimeout(a),a=null),t.g(t.a)},function(){t.j(t.a)})};var L={D:"serif",C:"sans-serif"},R=null;function A(){if(null===R){var e=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent);R=!!e&&(536>parseInt(e[1],10)||536===parseInt(e[1],10)&&11>=parseInt(e[2],10))}return R}function _(e,t,n){for(var r in L)if(L.hasOwnProperty(r)&&t===e.f[L[r]]&&n===e.f[L[r]])return!0;return!1}function I(e){var t,n=e.g.a.offsetWidth,a=e.h.a.offsetWidth;(t=n===e.f.serif&&a===e.f["sans-serif"])||(t=A()&&_(e,n,a)),t?o()-e.A>=e.w?A()&&_(e,n,a)&&(null===e.u||e.u.hasOwnProperty(e.a.c))?B(e,e.v):B(e,e.B):function(e){setTimeout(r(function(){I(this)},e),50)}(e):B(e,e.v)}function B(e,t){setTimeout(r(function(){c(this.g.a),c(this.h.a),c(this.j.a),c(this.m.a),t(this.a)},e),0)}function D(e,t,n){this.c=e,this.a=t,this.f=0,this.m=this.j=!1,this.s=n}F.prototype.start=function(){this.f.serif=this.j.a.offsetWidth,this.f["sans-serif"]=this.m.a.offsetWidth,this.A=o(),I(this)};var O=null;function $(e){0==--e.f&&e.j&&(e.m?((e=e.a).g&&u(e.f,[e.a.c("wf","active")],[e.a.c("wf","loading"),e.a.c("wf","inactive")]),P(e,"active")):M(e.a))}function V(e){this.j=e,this.a=new z,this.h=0,this.f=this.g=!0}function U(e,t,n,o,a){var i=0==--e.h;(e.f||e.g)&&setTimeout(function(){var e=a||null,s=o||{};if(0===n.length&&i)M(t.a);else{t.f+=n.length,i&&(t.j=i);var l,c=[];for(l=0;l<n.length;l++){var d=n[l],p=s[d.c],g=t.a,f=d;if(g.g&&u(g.f,[g.a.c("wf",f.c,k(f).toString(),"loading")]),P(g,"fontloading",f),g=null,null===O)if(window.FontFace){f=/Gecko.*Firefox\/(\d+)/.exec(window.navigator.userAgent);var h=/OS X.*Version\/10\..*Safari/.exec(window.navigator.userAgent)&&/Apple/.exec(window.navigator.vendor);O=f?42<parseInt(f[1],10):!h}else O=!1;g=O?new N(r(t.g,t),r(t.h,t),t.c,d,t.s,p):new F(r(t.g,t),r(t.h,t),t.c,d,t.s,e,p),c.push(g)}for(l=0;l<c.length;l++)c[l].start()}},0)}function H(e,t){this.c=e,this.a=t}function W(e,t){this.c=e,this.a=t}function q(e,t){this.c=e||Q,this.a=[],this.f=[],this.g=t||""}D.prototype.g=function(e){var t=this.a;t.g&&u(t.f,[t.a.c("wf",e.c,k(e).toString(),"active")],[t.a.c("wf",e.c,k(e).toString(),"loading"),t.a.c("wf",e.c,k(e).toString(),"inactive")]),P(t,"fontactive",e),this.m=!0,$(this)},D.prototype.h=function(e){var t=this.a;if(t.g){var n=d(t.f,t.a.c("wf",e.c,k(e).toString(),"active")),r=[],o=[t.a.c("wf",e.c,k(e).toString(),"loading")];n||r.push(t.a.c("wf",e.c,k(e).toString(),"inactive")),u(t.f,r,o)}P(t,"fontinactive",e),$(this)},V.prototype.load=function(e){this.c=new a(this.j,e.context||this.j),this.g=!1!==e.events,this.f=!1!==e.classes,function(e,t,n){var r=[],o=n.timeout;!function(e){e.g&&u(e.f,[e.a.c("wf","loading")]),P(e,"loading")}(t);r=function(e,t,n){var r,o=[];for(r in t)if(t.hasOwnProperty(r)){var a=e.c[r];a&&o.push(a(t[r],n))}return o}(e.a,n,e.c);var a=new D(e.c,t,o);for(e.h=r.length,t=0,n=r.length;t<n;t++)r[t].load(function(t,n,r){U(e,a,t,n,r)})}(this,new C(this.c,e),e)},H.prototype.load=function(e){function t(){if(a["__mti_fntLst"+r]){var n,o=a["__mti_fntLst"+r](),i=[];if(o)for(var s=0;s<o.length;s++){var l=o[s].fontfamily;null!=o[s].fontStyle&&null!=o[s].fontWeight?(n=o[s].fontStyle+o[s].fontWeight,i.push(new v(l,n))):i.push(new v(l))}e(i)}else setTimeout(function(){t()},50)}var n=this,r=n.a.projectId,o=n.a.version;if(r){var a=n.c.o;g(this.c,(n.a.api||"https://fast.fonts.net/jsapi")+"/"+r+".js"+(o?"?v="+o:""),function(o){o?e([]):(a["__MonotypeConfiguration__"+r]=function(){return n.a},t())}).id="__MonotypeAPIScript__"+r}else e([])},W.prototype.load=function(e){var t,n,r=this.a.urls||[],o=this.a.families||[],a=this.a.testStrings||{},i=new f;for(t=0,n=r.length;t<n;t++)p(this.c,r[t],h(i));var s=[];for(t=0,n=o.length;t<n;t++)if((r=o[t].split(":"))[1])for(var l=r[1].split(","),c=0;c<l.length;c+=1)s.push(new v(r[0],l[c]));else s.push(new v(r[0]));m(i,function(){e(s,a)})};var Q="https://fonts.googleapis.com/css";function K(e){this.f=e,this.a=[],this.c={}}var Y={latin:"BESbswy","latin-ext":"çöüğş",cyrillic:"йяЖ",greek:"αβΣ",khmer:"កខគ",Hanuman:"កខគ"},G={thin:"1",extralight:"2","extra-light":"2",ultralight:"2","ultra-light":"2",light:"3",regular:"4",book:"4",medium:"5","semi-bold":"6",semibold:"6","demi-bold":"6",demibold:"6",bold:"7","extra-bold":"8",extrabold:"8","ultra-bold":"8",ultrabold:"8",black:"9",heavy:"9",l:"3",r:"4",b:"7"},J={i:"i",italic:"i",n:"n",normal:"n"},X=/^(thin|(?:(?:extra|ultra)-?)?light|regular|book|medium|(?:(?:semi|demi|extra|ultra)-?)?bold|black|heavy|l|r|b|[1-9]00)?(n|i|normal|italic)?$/;function Z(e,t){this.c=e,this.a=t}var ee={Arimo:!0,Cousine:!0,Tinos:!0};function te(e,t){this.c=e,this.a=t}function ne(e,t){this.c=e,this.f=t,this.a=[]}Z.prototype.load=function(e){var t=new f,n=this.c,r=new q(this.a.api,this.a.text),o=this.a.families;!function(e,t){for(var n=t.length,r=0;r<n;r++){var o=t[r].split(":");3==o.length&&e.f.push(o.pop());var a="";2==o.length&&""!=o[1]&&(a=":"),e.a.push(o.join(a))}}(r,o);var a=new K(o);!function(e){for(var t=e.f.length,n=0;n<t;n++){var r=e.f[n].split(":"),o=r[0].replace(/\+/g," "),a=["n4"];if(2<=r.length){var i;if(i=[],s=r[1])for(var s,l=(s=s.split(",")).length,c=0;c<l;c++){var u;if((u=s[c]).match(/^[\w-]+$/))if(null==(d=X.exec(u.toLowerCase())))u="";else{if(u=null==(u=d[2])||""==u?"n":J[u],null==(d=d[1])||""==d)d="4";else var d=G[d]||(isNaN(d)?"4":d.substr(0,1));u=[u,d].join("")}else u="";u&&i.push(u)}0<i.length&&(a=i),3==r.length&&(i=[],0<(r=(r=r[2])?r.split(","):i).length&&(r=Y[r[0]])&&(e.c[o]=r))}for(e.c[o]||(r=Y[o])&&(e.c[o]=r),r=0;r<a.length;r+=1)e.a.push(new v(o,a[r]))}}(a),p(n,function(e){if(0==e.a.length)throw Error("No fonts to load!");if(-1!=e.c.indexOf("kit="))return e.c;for(var t=e.a.length,n=[],r=0;r<t;r++)n.push(e.a[r].replace(/ /g,"+"));return t=e.c+"?family="+n.join("%7C"),0<e.f.length&&(t+="&subset="+e.f.join(",")),0<e.g.length&&(t+="&text="+encodeURIComponent(e.g)),t}(r),h(t)),m(t,function(){e(a.a,a.c,ee)})},te.prototype.load=function(e){var t=this.a.id,n=this.c.o;t?g(this.c,(this.a.api||"https://use.typekit.net")+"/"+t+".js",function(t){if(t)e([]);else if(n.Typekit&&n.Typekit.config&&n.Typekit.config.fn){t=n.Typekit.config.fn;for(var r=[],o=0;o<t.length;o+=2)for(var a=t[o],i=t[o+1],s=0;s<i.length;s++)r.push(new v(a,i[s]));try{n.Typekit.load({events:!1,classes:!1,async:!0})}catch(e){}e(r)}},2e3):e([])},ne.prototype.load=function(e){var t=this.f.id,n=this.c.o,r=this;t?(n.__webfontfontdeckmodule__||(n.__webfontfontdeckmodule__={}),n.__webfontfontdeckmodule__[t]=function(t,n){for(var o=0,a=n.fonts.length;o<a;++o){var i=n.fonts[o];r.a.push(new v(i.name,S("font-weight:"+i.weight+";font-style:"+i.style)))}e(r.a)},g(this.c,(this.f.api||"https://f.fontdeck.com/s/css/js/")+function(e){return e.o.location.hostname||e.a.location.hostname}(this.c)+"/"+t+".js",function(t){t&&e([])})):e([])};var re=new V(window);re.a.c.custom=function(e,t){return new W(t,e)},re.a.c.fontdeck=function(e,t){return new ne(t,e)},re.a.c.monotype=function(e,t){return new H(t,e)},re.a.c.typekit=function(e,t){return new te(t,e)},re.a.c.google=function(e,t){return new Z(t,e)};var oe={load:r(re.load,re)};e.exports?e.exports=oe:(window.WebFont=oe,window.WebFontConfig&&re.load(window.WebFontConfig))}()}(yh);var vh=yh.exports,wh=e({__proto__:null,default:vh},[vh])}();
|