@botfabrik/engine-webclient 4.101.0 → 4.101.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -90,7 +90,7 @@ For more details see https://formatjs.github.io/docs/getting-started/message-dis
90
90
  *
91
91
  * This source code is licensed under the MIT license found in the
92
92
  * LICENSE file in the root directory of this source tree.
93
- */var wy;function YA(){if(wy)return Ge;wy=1;var n=typeof Symbol=="function"&&Symbol.for,a=n?Symbol.for("react.element"):60103,i=n?Symbol.for("react.portal"):60106,l=n?Symbol.for("react.fragment"):60107,o=n?Symbol.for("react.strict_mode"):60108,c=n?Symbol.for("react.profiler"):60114,d=n?Symbol.for("react.provider"):60109,h=n?Symbol.for("react.context"):60110,m=n?Symbol.for("react.async_mode"):60111,g=n?Symbol.for("react.concurrent_mode"):60111,v=n?Symbol.for("react.forward_ref"):60112,E=n?Symbol.for("react.suspense"):60113,S=n?Symbol.for("react.suspense_list"):60120,w=n?Symbol.for("react.memo"):60115,_=n?Symbol.for("react.lazy"):60116,x=n?Symbol.for("react.block"):60121,T=n?Symbol.for("react.fundamental"):60117,D=n?Symbol.for("react.responder"):60118,z=n?Symbol.for("react.scope"):60119;function U(M){if(typeof M=="object"&&M!==null){var P=M.$$typeof;switch(P){case a:switch(M=M.type,M){case m:case g:case l:case c:case o:case E:return M;default:switch(M=M&&M.$$typeof,M){case h:case v:case _:case w:case d:return M;default:return P}}case i:return P}}}function G(M){return U(M)===g}return Ge.AsyncMode=m,Ge.ConcurrentMode=g,Ge.ContextConsumer=h,Ge.ContextProvider=d,Ge.Element=a,Ge.ForwardRef=v,Ge.Fragment=l,Ge.Lazy=_,Ge.Memo=w,Ge.Portal=i,Ge.Profiler=c,Ge.StrictMode=o,Ge.Suspense=E,Ge.isAsyncMode=function(M){return G(M)||U(M)===m},Ge.isConcurrentMode=G,Ge.isContextConsumer=function(M){return U(M)===h},Ge.isContextProvider=function(M){return U(M)===d},Ge.isElement=function(M){return typeof M=="object"&&M!==null&&M.$$typeof===a},Ge.isForwardRef=function(M){return U(M)===v},Ge.isFragment=function(M){return U(M)===l},Ge.isLazy=function(M){return U(M)===_},Ge.isMemo=function(M){return U(M)===w},Ge.isPortal=function(M){return U(M)===i},Ge.isProfiler=function(M){return U(M)===c},Ge.isStrictMode=function(M){return U(M)===o},Ge.isSuspense=function(M){return U(M)===E},Ge.isValidElementType=function(M){return typeof M=="string"||typeof M=="function"||M===l||M===g||M===c||M===o||M===E||M===S||typeof M=="object"&&M!==null&&(M.$$typeof===_||M.$$typeof===w||M.$$typeof===d||M.$$typeof===h||M.$$typeof===v||M.$$typeof===T||M.$$typeof===D||M.$$typeof===z||M.$$typeof===x)},Ge.typeOf=U,Ge}var Ny;function PA(){return Ny||(Ny=1,ed.exports=YA()),ed.exports}var td,My;function XA(){if(My)return td;My=1;var n=PA(),a={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},l={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},c={};c[n.ForwardRef]=l,c[n.Memo]=o;function d(_){return n.isMemo(_)?o:c[_.$$typeof]||a}var h=Object.defineProperty,m=Object.getOwnPropertyNames,g=Object.getOwnPropertySymbols,v=Object.getOwnPropertyDescriptor,E=Object.getPrototypeOf,S=Object.prototype;function w(_,x,T){if(typeof x!="string"){if(S){var D=E(x);D&&D!==S&&w(_,D,T)}var z=m(x);g&&(z=z.concat(g(x)));for(var U=d(_),G=d(x),M=0;M<z.length;++M){var P=z[M];if(!i[P]&&!(T&&T[P])&&!(G&&G[P])&&!(U&&U[P])){var Q=v(x,P);try{h(_,P,Q)}catch{}}}}return _}return td=w,td}XA();var Nh=typeof window<"u"&&!window.__REACT_INTL_BYPASS_GLOBAL_CONTEXT__?window.__REACT_INTL_CONTEXT__||(window.__REACT_INTL_CONTEXT__=H.createContext(null)):H.createContext(null);Nh.Consumer;var ZA=Nh.Provider,QA=ZA,KA=Nh;function Su(){var n=H.useContext(KA);return gb(n),n}var ah;(function(n){n.formatDate="FormattedDate",n.formatTime="FormattedTime",n.formatNumber="FormattedNumber",n.formatList="FormattedList",n.formatDisplayName="FormattedDisplayName"})(ah||(ah={}));var rh;(function(n){n.formatDate="FormattedDateParts",n.formatTime="FormattedTimeParts",n.formatNumber="FormattedNumberParts",n.formatList="FormattedListParts"})(rh||(rh={}));function bb(n){var a=function(i){var l=Su(),o=i.value,c=i.children,d=Eu(i,["value","children"]),h=typeof o=="string"?new Date(o||0):o,m=n==="formatDate"?l.formatDateToParts(h,d):l.formatTimeToParts(h,d);return c(m)};return a.displayName=rh[n],a}function rs(n){var a=function(i){var l=Su(),o=i.value,c=i.children,d=Eu(i,["value","children"]),h=l[n](o,d);if(typeof c=="function")return c(h);var m=l.textComponent||H.Fragment;return H.createElement(m,null,h)};return a.displayName=ah[n],a}function _b(n){return n&&Object.keys(n).reduce(function(a,i){var l=n[i];return a[i]=cb(l)?FA(l):l,a},{})}var Dy=function(n,a,i,l){for(var o=[],c=4;c<arguments.length;c++)o[c-4]=arguments[c];var d=_b(l),h=nh.apply(void 0,$n([n,a,i,d],o,!1));return Array.isArray(h)?vb(h):h},Ly=function(n,a){var i=n.defaultRichTextElements,l=Eu(n,["defaultRichTextElements"]),o=_b(i),c=GA(le(le(le({},yb),l),{defaultRichTextElements:o}),a),d={locale:c.locale,timeZone:c.timeZone,fallbackOnEmptyString:c.fallbackOnEmptyString,formats:c.formats,defaultLocale:c.defaultLocale,defaultFormats:c.defaultFormats,messages:c.messages,onError:c.onError,defaultRichTextElements:o};return le(le({},c),{formatMessage:Dy.bind(null,d,c.formatters),$t:Dy.bind(null,d,c.formatters)})};function nd(n){return{locale:n.locale,timeZone:n.timeZone,fallbackOnEmptyString:n.fallbackOnEmptyString,formats:n.formats,textComponent:n.textComponent,messages:n.messages,defaultLocale:n.defaultLocale,defaultFormats:n.defaultFormats,onError:n.onError,onWarn:n.onWarn,wrapRichTextChunksInFragment:n.wrapRichTextChunksInFragment,defaultRichTextElements:n.defaultRichTextElements}}var $A=(function(n){Cn(a,n);function a(){var i=n!==null&&n.apply(this,arguments)||this;return i.cache=hb(),i.state={cache:i.cache,intl:Ly(nd(i.props),i.cache),prevConfig:nd(i.props)},i}return a.getDerivedStateFromProps=function(i,l){var o=l.prevConfig,c=l.cache,d=nd(i);return VA(o,d)?null:{intl:Ly(d,c),prevConfig:d}},a.prototype.render=function(){return gb(this.state.intl),H.createElement(QA,{value:this.state.intl},this.props.children)},a.displayName="IntlProvider",a.defaultProps=yb,a})(H.PureComponent);rs("formatDate");rs("formatTime");rs("formatNumber");rs("formatList");rs("formatDisplayName");bb("formatDate");bb("formatTime");const WA="_app_1rj0t_1",JA={app:WA},Ba=yT,st=_T,Eb="%[a-f0-9]{2}",By=new RegExp("("+Eb+")|([^%]+?)","gi"),Uy=new RegExp("("+Eb+")+","gi");function ih(n,a){try{return[decodeURIComponent(n.join(""))]}catch{}if(n.length===1)return n;a=a||1;const i=n.slice(0,a),l=n.slice(a);return Array.prototype.concat.call([],ih(i),ih(l))}function eO(n){try{return decodeURIComponent(n)}catch{let a=n.match(By)||[];for(let i=1;i<a.length;i++)n=ih(a,i).join(""),a=n.match(By)||[];return n}}function tO(n){const a={"%FE%FF":"��","%FF%FE":"��"};let i=Uy.exec(n);for(;i;){try{a[i[0]]=decodeURIComponent(i[0])}catch{const o=eO(i[0]);o!==i[0]&&(a[i[0]]=o)}i=Uy.exec(n)}a["%C2"]="�";const l=Object.keys(a);for(const o of l)n=n.replace(new RegExp(o,"g"),a[o]);return n}function nO(n){if(typeof n!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof n+"`");try{return decodeURIComponent(n)}catch{return tO(n)}}function aO(n,a){const i={};if(Array.isArray(a))for(const l of a){const o=Object.getOwnPropertyDescriptor(n,l);o?.enumerable&&Object.defineProperty(i,l,o)}else for(const l of Reflect.ownKeys(n)){const o=Object.getOwnPropertyDescriptor(n,l);if(o.enumerable){const c=n[l];a(l,c,n)&&Object.defineProperty(i,l,o)}}return i}function Sb(n,a){if(!(typeof n=="string"&&typeof a=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(n===""||a==="")return[];const i=n.indexOf(a);return i===-1?[]:[n.slice(0,i),n.slice(i+a.length)]}const rO=n=>n==null,iO=n=>encodeURIComponent(n).replaceAll(/[!'()*]/g,a=>`%${a.charCodeAt(0).toString(16).toUpperCase()}`),lh=Symbol("encodeFragmentIdentifier");function lO(n){switch(n.arrayFormat){case"index":return a=>(i,l)=>{const o=i.length;return l===void 0||n.skipNull&&l===null||n.skipEmptyString&&l===""?i:l===null?[...i,[yt(a,n),"[",o,"]"].join("")]:[...i,[yt(a,n),"[",yt(o,n),"]=",yt(l,n)].join("")]};case"bracket":return a=>(i,l)=>l===void 0||n.skipNull&&l===null||n.skipEmptyString&&l===""?i:l===null?[...i,[yt(a,n),"[]"].join("")]:[...i,[yt(a,n),"[]=",yt(l,n)].join("")];case"colon-list-separator":return a=>(i,l)=>l===void 0||n.skipNull&&l===null||n.skipEmptyString&&l===""?i:l===null?[...i,[yt(a,n),":list="].join("")]:[...i,[yt(a,n),":list=",yt(l,n)].join("")];case"comma":case"separator":case"bracket-separator":{const a=n.arrayFormat==="bracket-separator"?"[]=":"=";return i=>(l,o)=>o===void 0||n.skipNull&&o===null||n.skipEmptyString&&o===""?l:(o=o===null?"":o,l.length===0?[[yt(i,n),a,yt(o,n)].join("")]:[[l,yt(o,n)].join(n.arrayFormatSeparator)])}default:return a=>(i,l)=>l===void 0||n.skipNull&&l===null||n.skipEmptyString&&l===""?i:l===null?[...i,yt(a,n)]:[...i,[yt(a,n),"=",yt(l,n)].join("")]}}function sO(n){let a;switch(n.arrayFormat){case"index":return(i,l,o)=>{if(a=/\[(\d*)]$/.exec(i),i=i.replace(/\[\d*]$/,""),!a){o[i]=l;return}o[i]===void 0&&(o[i]={}),o[i][a[1]]=l};case"bracket":return(i,l,o)=>{if(a=/(\[])$/.exec(i),i=i.replace(/\[]$/,""),!a){o[i]=l;return}if(o[i]===void 0){o[i]=[l];return}o[i]=[...o[i],l]};case"colon-list-separator":return(i,l,o)=>{if(a=/(:list)$/.exec(i),i=i.replace(/:list$/,""),!a){o[i]=l;return}if(o[i]===void 0){o[i]=[l];return}o[i]=[...o[i],l]};case"comma":case"separator":return(i,l,o)=>{const d=typeof l=="string"&&l.includes(n.arrayFormatSeparator)?l.split(n.arrayFormatSeparator).map(h=>Gr(h,n)):l===null?l:Gr(l,n);o[i]=d};case"bracket-separator":return(i,l,o)=>{const c=/(\[])$/.test(i);if(i=i.replace(/\[]$/,""),!c){o[i]=l&&Gr(l,n);return}const d=l===null?[]:Gr(l,n).split(n.arrayFormatSeparator);if(o[i]===void 0){o[i]=d;return}o[i]=[...o[i],...d]};default:return(i,l,o)=>{if(o[i]===void 0){o[i]=l;return}o[i]=[...[o[i]].flat(),l]}}}function Tb(n){if(typeof n!="string"||n.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function yt(n,a){return a.encode?a.strict?iO(n):encodeURIComponent(n):n}function Gr(n,a){return a.decode?nO(n):n}function Ab(n){return Array.isArray(n)?n.sort():typeof n=="object"?Ab(Object.keys(n)).sort((a,i)=>Number(a)-Number(i)).map(a=>n[a]):n}function Ob(n){const a=n.indexOf("#");return a!==-1&&(n=n.slice(0,a)),n}function oO(n){let a="";const i=n.indexOf("#");return i!==-1&&(a=n.slice(i)),a}function jy(n,a,i){return i==="string"&&typeof n=="string"?n:typeof i=="function"&&typeof n=="string"?i(n):i==="boolean"&&n===null?!0:i==="boolean"&&n!==null&&(n.toLowerCase()==="true"||n.toLowerCase()==="false")?n.toLowerCase()==="true":i==="boolean"&&n!==null&&(n.toLowerCase()==="1"||n.toLowerCase()==="0")?n.toLowerCase()==="1":i==="string[]"&&a.arrayFormat!=="none"&&typeof n=="string"?[n]:i==="number[]"&&a.arrayFormat!=="none"&&!Number.isNaN(Number(n))&&typeof n=="string"&&n.trim()!==""?[Number(n)]:i==="number"&&!Number.isNaN(Number(n))&&typeof n=="string"&&n.trim()!==""?Number(n):a.parseBooleans&&n!==null&&(n.toLowerCase()==="true"||n.toLowerCase()==="false")?n.toLowerCase()==="true":a.parseNumbers&&!Number.isNaN(Number(n))&&typeof n=="string"&&n.trim()!==""?Number(n):n}function Mh(n){n=Ob(n);const a=n.indexOf("?");return a===-1?"":n.slice(a+1)}function Dh(n,a){a={decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1,types:Object.create(null),...a},Tb(a.arrayFormatSeparator);const i=sO(a),l=Object.create(null);if(typeof n!="string"||(n=n.trim().replace(/^[?#&]/,""),!n))return l;for(const o of n.split("&")){if(o==="")continue;const c=a.decode?o.replaceAll("+"," "):o;let[d,h]=Sb(c,"=");d===void 0&&(d=c),h=h===void 0?null:["comma","separator","bracket-separator"].includes(a.arrayFormat)?h:Gr(h,a),i(Gr(d,a),h,l)}for(const[o,c]of Object.entries(l))if(typeof c=="object"&&c!==null&&a.types[o]!=="string")for(const[d,h]of Object.entries(c)){const m=a.types[o],g=typeof m=="function"?m:m?m.replace("[]",""):void 0;c[d]=jy(h,a,g)}else typeof c=="object"&&c!==null&&a.types[o]==="string"?l[o]=Object.values(c).join(a.arrayFormatSeparator):l[o]=jy(c,a,a.types[o]);return a.sort===!1?l:(a.sort===!0?Object.keys(l).sort():Object.keys(l).sort(a.sort)).reduce((o,c)=>{const d=l[c];return o[c]=d&&typeof d=="object"&&!Array.isArray(d)?Ab(d):d,o},Object.create(null))}function xb(n,a){if(!n)return"";a={encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:",",...a},Tb(a.arrayFormatSeparator);const i=d=>a.skipNull&&rO(n[d])||a.skipEmptyString&&n[d]==="",l=lO(a),o={};for(const[d,h]of Object.entries(n))i(d)||(o[d]=h);const c=Object.keys(o);return a.sort!==!1&&c.sort(a.sort),c.map(d=>{let h=n[d];if(a.replacer&&(h=a.replacer(d,h),h===void 0)||h===void 0)return"";if(h===null)return yt(d,a);if(Array.isArray(h)){if(h.length===0&&a.arrayFormat==="bracket-separator")return yt(d,a)+"[]";let m=h;return a.replacer&&(m=h.map((g,v)=>a.replacer(`${d}[${v}]`,g)).filter(g=>g!==void 0)),m.reduce(l(d),[]).join("&")}return yt(d,a)+"="+yt(h,a)}).filter(d=>d.length>0).join("&")}function Cb(n,a){a={decode:!0,...a};let[i,l]=Sb(n,"#");return i===void 0&&(i=n),{url:i?.split("?")?.[0]??"",query:Dh(Mh(n),a),...a&&a.parseFragmentIdentifier&&l?{fragmentIdentifier:Gr(l,a)}:{}}}function Rb(n,a){a={encode:!0,strict:!0,[lh]:!0,...a};const i=Ob(n.url).split("?")[0]||"",l=Mh(n.url),o={...Dh(l,{sort:!1,...a}),...n.query};let c=xb(o,a);c&&=`?${c}`;let d=oO(n.url);if(typeof n.fragmentIdentifier=="string"){const h=new URL(i);h.hash=n.fragmentIdentifier,d=a[lh]?h.hash:`#${n.fragmentIdentifier}`}return`${i}${c}${d}`}function wb(n,a,i){i={parseFragmentIdentifier:!0,[lh]:!1,...i};const{url:l,query:o,fragmentIdentifier:c}=Cb(n,i);return Rb({url:l,query:aO(o,a),fragmentIdentifier:c},i)}function uO(n,a,i){const l=Array.isArray(a)?o=>!a.includes(o):(o,c)=>!a(o,c);return wb(n,l,i)}const Lh=Object.freeze(Object.defineProperty({__proto__:null,exclude:uO,extract:Mh,parse:Dh,parseUrl:Cb,pick:wb,stringify:xb,stringifyUrl:Rb},Symbol.toStringTag,{value:"Module"}));var Bn={},Un={},Ve={},No={},de={},Hy;function fn(){return Hy||(Hy=1,Object.defineProperty(de,"__esModule",{value:!0}),de.GUEST_LOCALE_CHANGED=de.DRAWER_CLOSE=de.DRAWER_OPEN=de.CONVERSATION_RATING_FROM_GUEST=de.TRANSCRIPT_ITEM_GUEST_REACTION=de.TRANSCRIPT_MAIL_REQUEST=de.INBOX_CONNECT_REQUEST=de.RESTART_CHAT_REQUEST=de.EVENT_TO_GUEST=de.NLU_REQUEST_EVENT=de.EXPERTS_DISCONNECTED=de.EXPERTS_DISCONNECT_REQUEST=de.EXPERTS_CONNECTED=de.EXPERTS_CONNECT_REQUEST=de.MESSAGE_TO_GUEST=de.MESSAGE_WITHOUT_ANALYSIS_FROM_GUEST=de.MESSAGE_FROM_GUEST=de.GUEST_FEEDBACK_RESPONSE=de.GUEST_DISCONNECTED=de.GUEST_CONNECTED=de.TYPING_OFF=de.TYPING_ON=void 0,de.TYPING_ON="core.typing.on",de.TYPING_OFF="core.typing.off",de.GUEST_CONNECTED="core.guest.connected",de.GUEST_DISCONNECTED="core.guest.disconnected",de.GUEST_FEEDBACK_RESPONSE="core.guest.feedback.response",de.MESSAGE_FROM_GUEST="core.message.from.guest",de.MESSAGE_WITHOUT_ANALYSIS_FROM_GUEST="core.message.without.analysis.from.guest",de.MESSAGE_TO_GUEST="core.message.to.guest",de.EXPERTS_CONNECT_REQUEST="core.experts.connect.request",de.EXPERTS_CONNECTED="core.experts.connected",de.EXPERTS_DISCONNECT_REQUEST="core.experts.disconnect.request",de.EXPERTS_DISCONNECTED="core.experts.disconnected",de.NLU_REQUEST_EVENT="core.nlu.request.event",de.EVENT_TO_GUEST="core.event.to.guest",de.RESTART_CHAT_REQUEST="core.chat.restart.request",de.INBOX_CONNECT_REQUEST="core.inbox.connect.request",de.TRANSCRIPT_MAIL_REQUEST="core.transcript.mail.request",de.TRANSCRIPT_ITEM_GUEST_REACTION="core.transcript.item.guest.reaction",de.CONVERSATION_RATING_FROM_GUEST="core.conversation.rating.from.guest",de.DRAWER_OPEN="core.drawer.open",de.DRAWER_CLOSE="core.drawer.close",de.GUEST_LOCALE_CHANGED="core.guest.locale.changed"),de}var Iy;function cO(){if(Iy)return No;Iy=1,Object.defineProperty(No,"__esModule",{value:!0});const n=fn(),a=()=>({type:n.DRAWER_CLOSE});return No.default=a,No}var Mo={},zy;function fO(){if(zy)return Mo;zy=1,Object.defineProperty(Mo,"__esModule",{value:!0});const n=fn(),a=(i,l)=>({type:n.GUEST_FEEDBACK_RESPONSE,payload:{satisfaction:i,intent:l}});return Mo.default=a,Mo}var Do={},Gy;function dO(){if(Gy)return Do;Gy=1,Object.defineProperty(Do,"__esModule",{value:!0});const n=fn(),a=i=>({type:n.GUEST_CONNECTED,payload:{sessionId:i}});return Do.default=a,Do}var Lo={},ky;function hO(){if(ky)return Lo;ky=1,Object.defineProperty(Lo,"__esModule",{value:!0});const n=fn(),a=i=>({type:n.GUEST_DISCONNECTED,payload:{sessionId:i}});return Lo.default=a,Lo}var Bo={},qy;function mO(){if(qy)return Bo;qy=1,Object.defineProperty(Bo,"__esModule",{value:!0});const n=fn(),a=(i,l)=>({type:n.GUEST_LOCALE_CHANGED,payload:{previousLocale:i,newLocale:l}});return Bo.default=a,Bo}var Uo={},Fy;function pO(){if(Fy)return Uo;Fy=1,Object.defineProperty(Uo,"__esModule",{value:!0});const n=fn(),a=i=>({type:n.DRAWER_OPEN,payload:{parameters:{contentUrl:i}}});return Uo.default=a,Uo}var jo={},at={},Vy;function Bh(){if(Vy)return at;Vy=1,Object.defineProperty(at,"__esModule",{value:!0}),at.getStringRepresentationFromMessage=at.MessageTypeEnum=at.AudioMessage=at.FileMessage=at.ImageMessage=at.VideoMessage=at.MarkdownMessage=at.DetailMessage=at.TextMessage=at.Message=void 0;class n{type;sender;sources;quickReplies;constructor(E,S,w=[],_=[]){this.type=E,this.sender=S,this.sources=w,this.quickReplies=_}addQuickReply(E,S){this.quickReplies.push({label:E,payload:S})}}at.Message=n;class a extends n{text;constructor(E,S,w=[],_=[]){super(m.TEXT,S,w,_),this.text=E}}at.TextMessage=a;class i extends n{title;text;imageUrl;itemUrl;buttons;constructor(E,S){super(m.DETAIL,S),this.title=E,this.text="",this.imageUrl="",this.itemUrl="",this.buttons=[]}setImageUrl(E){this.imageUrl=E}setItemUrl(E){this.itemUrl=E}setText(E){this.text=E}addButton(E){this.buttons.push(E)}}at.DetailMessage=i;class l extends n{markdown;constructor(E,S,w=[],_=[]){super(m.MARKDOWN,S,w,_),this.markdown=E}}at.MarkdownMessage=l;class o extends n{url;constructor(E,S){super(m.VIDEO,S),this.url=E}}at.VideoMessage=o;class c extends n{url;constructor(E,S){super(m.IMAGE,S),this.url=E}}at.ImageMessage=c;class d extends n{url;constructor(E,S){super(m.FILE,S),this.url=E}}at.FileMessage=d;class h extends n{url;constructor(E,S){super(m.AUDIO,S),this.url=E}}at.AudioMessage=h;var m;(function(v){v.TEXT="TEXT",v.DETAIL="DETAIL",v.MARKDOWN="MARKDOWN",v.VIDEO="VIDEO",v.IMAGE="IMAGE",v.FILE="FILE",v.AUDIO="AUDIO"})(m||(at.MessageTypeEnum=m={}));const g=v=>{switch(v.type){case m.TEXT:return v.text;case m.DETAIL:return`${v.title}`;case m.MARKDOWN:return v.markdown;case m.VIDEO:return`Video Url: ${v.url}`;case m.IMAGE:return`Image Url: ${v.url}`;case m.FILE:return`File Url: ${v.url}`;case m.AUDIO:return`Audio Url: ${v.url}`;default:throw new Error("Unknown message type "+v.type)}};return at.getStringRepresentationFromMessage=g,at}var sn={},Yy;function Uh(){if(Yy)return sn;Yy=1,Object.defineProperty(sn,"__esModule",{value:!0}),sn.UserType=sn.PersonUser=sn.GuestUser=sn.BotUser=sn.User=void 0;class n{type;id;name;avatar;constructor(d,h,m,g){this.type=d,this.id=h,this.name=m,this.avatar=g}}sn.User=n;class a extends n{constructor(){super(o.BOT,null,"Chatbot","bot.svg")}}sn.BotUser=a;class i extends n{constructor(){super(o.GUEST,null,"Guest","visitor.svg")}}sn.GuestUser=i;class l extends n{constructor(d,h,m){super(o.PERSON,d,h,m)}}sn.PersonUser=l;var o;return(function(c){c.GUEST="GUEST",c.BOT="BOT",c.PERSON="PERSON"})(o||(sn.UserType=o={})),sn}var Py;function gO(){if(Py)return jo;Py=1,Object.defineProperty(jo,"__esModule",{value:!0});const n=Bh(),a=Uh(),i=fn(),l=o=>{const c=new n.TextMessage(o,new a.GuestUser);return{type:i.MESSAGE_FROM_GUEST,message:c}};return jo.default=l,jo}var Ho={},Xy;function yO(){if(Xy)return Ho;Xy=1,Object.defineProperty(Ho,"__esModule",{value:!0});const n=Bh(),a=Uh(),i=fn(),l=(o,c={})=>{const d=new n.TextMessage(o,new a.GuestUser);return{type:i.MESSAGE_WITHOUT_ANALYSIS_FROM_GUEST,message:d,payload:c}};return Ho.default=l,Ho}var Io={},Zy;function vO(){if(Zy)return Io;Zy=1,Object.defineProperty(Io,"__esModule",{value:!0});const n=fn(),a=i=>({type:n.NLU_REQUEST_EVENT,event:i});return Io.default=a,Io}var zo={},Qy;function bO(){if(Qy)return zo;Qy=1,Object.defineProperty(zo,"__esModule",{value:!0});const n=fn(),a=()=>({type:n.RESTART_CHAT_REQUEST});return zo.default=a,zo}var Go={},Ky;function _O(){if(Ky)return Go;Ky=1,Object.defineProperty(Go,"__esModule",{value:!0});const n=fn(),a=i=>({type:n.MESSAGE_TO_GUEST,message:i});return Go.default=a,Go}var ko={},$y;function EO(){if($y)return ko;$y=1,Object.defineProperty(ko,"__esModule",{value:!0});const n=fn(),a=(i,l,o=null,c=null)=>({type:n.TRANSCRIPT_ITEM_GUEST_REACTION,payload:{actionId:i,reaction:l,category:o,comment:c}});return ko.default=a,ko}var Wy;function SO(){if(Wy)return Ve;Wy=1;var n=Ve&&Ve.__importDefault||function(w){return w&&w.__esModule?w:{default:w}};Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.transcriptItemGuestReaction=Ve.sendMessageToGuest=Ve.restartChatRequest=Ve.requestNLUEvent=Ve.receiveTextMessageWithoutAnalysisFromGuest=Ve.receiveTextMessageFromGuest=Ve.openDrawer=Ve.guestLocaleChanged=Ve.guestDisconnected=Ve.guestConnected=Ve.feedbackFromGuestResponse=Ve.closeDrawer=void 0;const a=n(cO());Ve.closeDrawer=a.default;const i=n(fO());Ve.feedbackFromGuestResponse=i.default;const l=n(dO());Ve.guestConnected=l.default;const o=n(hO());Ve.guestDisconnected=o.default;const c=n(mO());Ve.guestLocaleChanged=c.default;const d=n(pO());Ve.openDrawer=d.default;const h=n(gO());Ve.receiveTextMessageFromGuest=h.default;const m=n(yO());Ve.receiveTextMessageWithoutAnalysisFromGuest=m.default;const g=n(vO());Ve.requestNLUEvent=g.default;const v=n(bO());Ve.restartChatRequest=v.default;const E=n(_O());Ve.sendMessageToGuest=E.default;const S=n(EO());return Ve.transcriptItemGuestReaction=S.default,Ve}var ad={},Jy;function TO(){return Jy||(Jy=1,Object.defineProperty(ad,"__esModule",{value:!0})),ad}var e1;function AO(){return e1||(e1=1,(function(n){var a=Un&&Un.__createBinding||(Object.create?(function(c,d,h,m){m===void 0&&(m=h);var g=Object.getOwnPropertyDescriptor(d,h);(!g||("get"in g?!d.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return d[h]}}),Object.defineProperty(c,m,g)}):(function(c,d,h,m){m===void 0&&(m=h),c[m]=d[h]})),i=Un&&Un.__setModuleDefault||(Object.create?(function(c,d){Object.defineProperty(c,"default",{enumerable:!0,value:d})}):function(c,d){c.default=d}),l=Un&&Un.__importStar||(function(){var c=function(d){return c=Object.getOwnPropertyNames||function(h){var m=[];for(var g in h)Object.prototype.hasOwnProperty.call(h,g)&&(m[m.length]=g);return m},c(d)};return function(d){if(d&&d.__esModule)return d;var h={};if(d!=null)for(var m=c(d),g=0;g<m.length;g++)m[g]!=="default"&&a(h,d,m[g]);return i(h,d),h}})(),o=Un&&Un.__exportStar||function(c,d){for(var h in c)h!=="default"&&!Object.prototype.hasOwnProperty.call(d,h)&&a(d,c,h)};Object.defineProperty(n,"__esModule",{value:!0}),n.ActionTypes=n.Actions=void 0,n.Actions=l(SO()),n.ActionTypes=l(fn()),o(TO(),n)})(Un)),Un}var on={},rd={},t1;function OO(){return t1||(t1=1,Object.defineProperty(rd,"__esModule",{value:!0})),rd}var jl={},n1;function xO(){if(n1)return jl;n1=1,Object.defineProperty(jl,"__esModule",{value:!0}),jl.NullableKnowledgeBaseAdapter=void 0;class n{async createApiKnowledgeBase(i){throw new Error("Method not implemented.")}async updateApiKnowledgeBase(i,l){throw new Error("Method not implemented.")}async deleteApiKnowledgeBase(i){throw new Error("Method not implemented.")}async upsertApiKnowledgeBase(i){throw new Error("Method not implemented.")}async findApiKnowledgeBaseById(i){throw new Error("Method not implemented.")}async findApiKnowledgeBaseByName(i){throw new Error("Method not implemented.")}async findApiKnowledgeBases(){throw new Error("Method not implemented.")}async deleteApiKnowledgeBaseByName(i){throw new Error("Method not implemented.")}async findKnowledgeBaseEntries(i){throw new Error("Method not implemented.")}async createKnowledgeBaseEntry(i,l){throw new Error("Method not implemented.")}async updateKnowledgeBaseEntry(i,l,o){throw new Error("Method not implemented.")}async deleteKnowledgeBaseEntry(i,l){throw new Error("Method not implemented.")}async upsertKnowledgeBaseEntry(i,l){throw new Error("Method not implemented.")}async retrieveKnowledgeBaseEntryConfig(i,l){throw new Error("Method not implemented.")}async findKnowledgeBaseEntryByUriAlias(i,l){throw new Error("Method not implemented.")}async deleteKnowledgeBaseEntriesIndexedBeforeDate(i,l){throw new Error("Method not implemented.")}async findKnowledgeBaseEntryAttachments(i,l){throw new Error("Method not implemented.")}async createKnowledgeBaseEntryAttachment(i,l,o){throw new Error("Method not implemented.")}async updateKnowledgeBaseEntryAttachment(i,l,o,c){throw new Error("Method not implemented.")}async deleteKnowledgeBaseEntryAttachment(i,l,o){throw new Error("Method not implemented.")}async setIndexingStatus(i,l){throw new Error("Method not implemented.")}async subscribeToReindex(i,l){throw new Error("Method not implemented.")}isContentTypeSupported(i){throw new Error("Method not implemented.")}registerTool(i,l){throw new Error("Method not implemented.")}async getTools(i){throw new Error("Method not implemented.")}}return jl.NullableKnowledgeBaseAdapter=n,jl}var a1;function CO(){if(a1)return on;a1=1;var n=on&&on.__createBinding||(Object.create?(function(o,c,d,h){h===void 0&&(h=d);var m=Object.getOwnPropertyDescriptor(c,d);(!m||("get"in m?!c.__esModule:m.writable||m.configurable))&&(m={enumerable:!0,get:function(){return c[d]}}),Object.defineProperty(o,h,m)}):(function(o,c,d,h){h===void 0&&(h=d),o[h]=c[d]})),a=on&&on.__setModuleDefault||(Object.create?(function(o,c){Object.defineProperty(o,"default",{enumerable:!0,value:c})}):function(o,c){o.default=c}),i=on&&on.__importStar||(function(){var o=function(c){return o=Object.getOwnPropertyNames||function(d){var h=[];for(var m in d)Object.prototype.hasOwnProperty.call(d,m)&&(h[h.length]=m);return h},o(c)};return function(c){if(c&&c.__esModule)return c;var d={};if(c!=null)for(var h=o(c),m=0;m<h.length;m++)h[m]!=="default"&&n(d,c,h[m]);return a(d,c),d}})();Object.defineProperty(on,"__esModule",{value:!0}),on.NullableCmsAdapter=on.KnowledgeBase=void 0,on.KnowledgeBase=i(OO());const l=xO();return on.NullableCmsAdapter={knowledgeBase:new l.NullableKnowledgeBaseAdapter},on}var Br={},id={},r1;function RO(){return r1||(r1=1,Object.defineProperty(id,"__esModule",{value:!0})),id}var ld={},i1;function wO(){return i1||(i1=1,Object.defineProperty(ld,"__esModule",{value:!0})),ld}var sd={},l1;function NO(){return l1||(l1=1,Object.defineProperty(sd,"__esModule",{value:!0})),sd}var od={},s1;function MO(){return s1||(s1=1,Object.defineProperty(od,"__esModule",{value:!0})),od}var Hl={},o1;function DO(){if(o1)return Hl;o1=1,Object.defineProperty(Hl,"__esModule",{value:!0}),Hl.checkMiddlewareCondition=void 0;const n=async(a,i,l)=>(Array.isArray(a)?a:[a]).reduce(async(c,d)=>await c?await d(i,l):!1,Promise.resolve(!0));return Hl.checkMiddlewareCondition=n,Hl}var ud={},u1;function LO(){return u1||(u1=1,Object.defineProperty(ud,"__esModule",{value:!0})),ud}var cd={},c1;function BO(){return c1||(c1=1,Object.defineProperty(cd,"__esModule",{value:!0})),cd}var fd={},f1;function UO(){return f1||(f1=1,Object.defineProperty(fd,"__esModule",{value:!0})),fd}var d1;function jO(){return d1||(d1=1,(function(n){var a=Br&&Br.__createBinding||(Object.create?(function(l,o,c,d){d===void 0&&(d=c);var h=Object.getOwnPropertyDescriptor(o,c);(!h||("get"in h?!o.__esModule:h.writable||h.configurable))&&(h={enumerable:!0,get:function(){return o[c]}}),Object.defineProperty(l,d,h)}):(function(l,o,c,d){d===void 0&&(d=c),l[d]=o[c]})),i=Br&&Br.__exportStar||function(l,o){for(var c in l)c!=="default"&&!Object.prototype.hasOwnProperty.call(o,c)&&a(o,l,c)};Object.defineProperty(n,"__esModule",{value:!0}),i(RO(),n),i(wO(),n),i(NO(),n),i(MO(),n),i(DO(),n),i(LO(),n),i(BO(),n),i(UO(),n)})(Br)),Br}var Ur={},jn={},h1;function HO(){if(h1)return jn;h1=1,Object.defineProperty(jn,"__esModule",{value:!0}),jn.ButtonTypeEnum=jn.PostbackButton=jn.UrlButton=jn.Button=void 0;class n{title;type;constructor(c,d){this.title=c,this.type=d}}jn.Button=n;class a extends n{url;constructor(c,d){super(c,l.WEB_URL),this.url=d}}jn.UrlButton=a;class i extends n{payload;constructor(c,d){super(c,l.POSTBACK),this.payload=d}}jn.PostbackButton=i;var l;return(function(o){o.WEB_URL="web_url",o.POSTBACK="postback"})(l||(jn.ButtonTypeEnum=l={})),jn}var dd={},m1;function IO(){return m1||(m1=1,Object.defineProperty(dd,"__esModule",{value:!0})),dd}var Il={},p1;function zO(){if(p1)return Il;p1=1,Object.defineProperty(Il,"__esModule",{value:!0}),Il.SatisfactionEnum=void 0;var n;return(function(a){a.GOOD="GOOD",a.BAD="BAD"})(n||(Il.SatisfactionEnum=n={})),Il}var g1;function y1(){return g1||(g1=1,(function(n){var a=Ur&&Ur.__createBinding||(Object.create?(function(l,o,c,d){d===void 0&&(d=c);var h=Object.getOwnPropertyDescriptor(o,c);(!h||("get"in h?!o.__esModule:h.writable||h.configurable))&&(h={enumerable:!0,get:function(){return o[c]}}),Object.defineProperty(l,d,h)}):(function(l,o,c,d){d===void 0&&(d=c),l[d]=o[c]})),i=Ur&&Ur.__exportStar||function(l,o){for(var c in l)c!=="default"&&!Object.prototype.hasOwnProperty.call(o,c)&&a(o,l,c)};Object.defineProperty(n,"__esModule",{value:!0}),i(HO(),n),i(IO(),n),i(zO(),n),i(Bh(),n),i(Uh(),n)})(Ur)),Ur}var v1;function GO(){return v1||(v1=1,(function(n){var a=Bn&&Bn.__createBinding||(Object.create?(function(c,d,h,m){m===void 0&&(m=h);var g=Object.getOwnPropertyDescriptor(d,h);(!g||("get"in g?!d.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return d[h]}}),Object.defineProperty(c,m,g)}):(function(c,d,h,m){m===void 0&&(m=h),c[m]=d[h]})),i=Bn&&Bn.__setModuleDefault||(Object.create?(function(c,d){Object.defineProperty(c,"default",{enumerable:!0,value:d})}):function(c,d){c.default=d}),l=Bn&&Bn.__exportStar||function(c,d){for(var h in c)h!=="default"&&!Object.prototype.hasOwnProperty.call(d,h)&&a(d,c,h)},o=Bn&&Bn.__importStar||(function(){var c=function(d){return c=Object.getOwnPropertyNames||function(h){var m=[];for(var g in h)Object.prototype.hasOwnProperty.call(h,g)&&(m[m.length]=g);return m},c(d)};return function(d){if(d&&d.__esModule)return d;var h={};if(d!=null)for(var m=c(d),g=0;g<m.length;g++)m[g]!=="default"&&a(h,d,m[g]);return i(h,d),h}})();Object.defineProperty(n,"__esModule",{value:!0}),n.Model=n.CMS=void 0,l(AO(),n),n.CMS=o(CO()),l(jO(),n),n.Model=o(y1()),l(y1(),n)})(Bn)),Bn}var Te=GO();const Nb=n=>a=>(n.payload.type!==Te.ActionTypes.MESSAGE_FROM_GUEST&&a(Te.Actions.receiveTextMessageWithoutAnalysisFromGuest(n.label,n.payload)),a(n.payload)),Mb=n=>(a,i)=>{const{quickReplies:l}=i().chat,o=l.find(c=>n.toLocaleLowerCase().indexOf(c.label.toLocaleLowerCase())>-1);return a(o?Nb({...o,label:n}):JSON.parse(JSON.stringify(Te.Actions.receiveTextMessageFromGuest(n))))},jh="MESSAGE_TO_PARENT_PAGE",Hh="RESTORE_PREVIOUS_CHAT_MESSAGES",Ih="AUDIO_MESSAGE_FROM_USER",zh="RECEIVE_SPEECH_TRANSCRIPTION",Gh="ENABLE_CONVERSATION_RATING",Db="LOAD_SOURCE_INFOS_RESPONSE",kh="LOAD_SOURCE_INFOS_ERROR",qh="LOAD_SOURCE_INFOS_REQUEST",Fh="CLOSE_SOURCE_INFOS",kO="webclient.get.started",Lb="webclient.window.expand",Bb="webclient.window.close",Ub="webclient.transcript.pdf.download",qO=[jh,Hh,Ih,zh,Gh,qh,Fh],FO=n=>({type:Ih,buffer:n}),VO=n=>({type:zh,transcription:n}),YO=n=>({type:Te.ActionTypes.TRANSCRIPT_MAIL_REQUEST,payload:{parameters:{mailTo:n}}}),PO=()=>({type:Ub}),XO=({rating:n})=>({type:Gh,payload:{rating:n}}),ZO=(n,a)=>({type:Te.ActionTypes.CONVERSATION_RATING_FROM_GUEST,payload:{value:n,feedback:a}}),jb=n=>Te.Actions.requestNLUEvent(n),QO=n=>({type:Hh,messages:n}),KO=n=>{switch(n.type){case Te.ButtonTypeEnum.WEB_URL:return Ib(n.url);case Te.ButtonTypeEnum.POSTBACK:return n.payload;default:throw new Error(`unknown button type ${n.type}`)}},Hb=n=>Ib(n),Ib=n=>({type:jh,message:{type:"webclient.change.url",url:n}});/*! js-cookie v3.0.5 | MIT */function qo(n){for(var a=1;a<arguments.length;a++){var i=arguments[a];for(var l in i)n[l]=i[l]}return n}var $O={read:function(n){return n[0]==='"'&&(n=n.slice(1,-1)),n.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(n){return encodeURIComponent(n).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function sh(n,a){function i(o,c,d){if(!(typeof document>"u")){d=qo({},a,d),typeof d.expires=="number"&&(d.expires=new Date(Date.now()+d.expires*864e5)),d.expires&&(d.expires=d.expires.toUTCString()),o=encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var h="";for(var m in d)d[m]&&(h+="; "+m,d[m]!==!0&&(h+="="+d[m].split(";")[0]));return document.cookie=o+"="+n.write(c,o)+h}}function l(o){if(!(typeof document>"u"||arguments.length&&!o)){for(var c=document.cookie?document.cookie.split("; "):[],d={},h=0;h<c.length;h++){var m=c[h].split("="),g=m.slice(1).join("=");try{var v=decodeURIComponent(m[0]);if(d[v]=n.read(g,v),o===v)break}catch{}}return o?d[o]:d}}return Object.create({set:i,get:l,remove:function(o,c){i(o,"",qo({},c,{expires:-1}))},withAttributes:function(o){return sh(this.converter,qo({},this.attributes,o))},withConverter:function(o){return sh(qo({},this.converter,o),this.attributes)}},{attributes:{value:Object.freeze(a)},converter:{value:Object.freeze(n)}})}var Fo=sh($O,{path:"/"});const Lt=[];for(let n=0;n<256;++n)Lt.push((n+256).toString(16).slice(1));function WO(n,a=0){return(Lt[n[a+0]]+Lt[n[a+1]]+Lt[n[a+2]]+Lt[n[a+3]]+"-"+Lt[n[a+4]]+Lt[n[a+5]]+"-"+Lt[n[a+6]]+Lt[n[a+7]]+"-"+Lt[n[a+8]]+Lt[n[a+9]]+"-"+Lt[n[a+10]]+Lt[n[a+11]]+Lt[n[a+12]]+Lt[n[a+13]]+Lt[n[a+14]]+Lt[n[a+15]]).toLowerCase()}let hd;const JO=new Uint8Array(16);function ex(){if(!hd){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");hd=crypto.getRandomValues.bind(crypto)}return hd(JO)}const tx=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),b1={randomUUID:tx};function nx(n,a,i){n=n||{};const l=n.random??n.rng?.()??ex();if(l.length<16)throw new Error("Random bytes length must be >= 16");return l[6]=l[6]&15|64,l[8]=l[8]&63|128,WO(l)}function uu(n,a,i){return b1.randomUUID&&!n?b1.randomUUID():nx(n)}const Vh=()=>ax(window.location.pathname),ax=n=>{const a=n.split("/"),i=n.endsWith("/");return a[a.length-(i?2:1)]};function Bt(n){return`Minified Redux error #${n}; visit https://redux.js.org/Errors?code=${n} for the full message or use the non-minified dev environment for full errors. `}var rx=typeof Symbol=="function"&&Symbol.observable||"@@observable",_1=rx,md=()=>Math.random().toString(36).substring(7).split("").join("."),ix={INIT:`@@redux/INIT${md()}`,REPLACE:`@@redux/REPLACE${md()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${md()}`},cu=ix;function Yh(n){if(typeof n!="object"||n===null)return!1;let a=n;for(;Object.getPrototypeOf(a)!==null;)a=Object.getPrototypeOf(a);return Object.getPrototypeOf(n)===a||Object.getPrototypeOf(n)===null}function zb(n,a,i){if(typeof n!="function")throw new Error(Bt(2));if(typeof a=="function"&&typeof i=="function"||typeof i=="function"&&typeof arguments[3]=="function")throw new Error(Bt(0));if(typeof a=="function"&&typeof i>"u"&&(i=a,a=void 0),typeof i<"u"){if(typeof i!="function")throw new Error(Bt(1));return i(zb)(n,a)}let l=n,o=a,c=new Map,d=c,h=0,m=!1;function g(){d===c&&(d=new Map,c.forEach((T,D)=>{d.set(D,T)}))}function v(){if(m)throw new Error(Bt(3));return o}function E(T){if(typeof T!="function")throw new Error(Bt(4));if(m)throw new Error(Bt(5));let D=!0;g();const z=h++;return d.set(z,T),function(){if(D){if(m)throw new Error(Bt(6));D=!1,g(),d.delete(z),c=null}}}function S(T){if(!Yh(T))throw new Error(Bt(7));if(typeof T.type>"u")throw new Error(Bt(8));if(typeof T.type!="string")throw new Error(Bt(17));if(m)throw new Error(Bt(9));try{m=!0,o=l(o,T)}finally{m=!1}return(c=d).forEach(z=>{z()}),T}function w(T){if(typeof T!="function")throw new Error(Bt(10));l=T,S({type:cu.REPLACE})}function _(){const T=E;return{subscribe(D){if(typeof D!="object"||D===null)throw new Error(Bt(11));function z(){const G=D;G.next&&G.next(v())}return z(),{unsubscribe:T(z)}},[_1](){return this}}}return S({type:cu.INIT}),{dispatch:S,subscribe:E,getState:v,replaceReducer:w,[_1]:_}}function lx(n){Object.keys(n).forEach(a=>{const i=n[a];if(typeof i(void 0,{type:cu.INIT})>"u")throw new Error(Bt(12));if(typeof i(void 0,{type:cu.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Bt(13))})}function Gb(n){const a=Object.keys(n),i={};for(let c=0;c<a.length;c++){const d=a[c];typeof n[d]=="function"&&(i[d]=n[d])}const l=Object.keys(i);let o;try{lx(i)}catch(c){o=c}return function(d={},h){if(o)throw o;let m=!1;const g={};for(let v=0;v<l.length;v++){const E=l[v],S=i[E],w=d[E],_=S(w,h);if(typeof _>"u")throw h&&h.type,new Error(Bt(14));g[E]=_,m=m||_!==w}return m=m||l.length!==Object.keys(d).length,m?g:d}}function fu(...n){return n.length===0?a=>a:n.length===1?n[0]:n.reduce((a,i)=>(...l)=>a(i(...l)))}function sx(...n){return a=>(i,l)=>{const o=a(i,l);let c=()=>{throw new Error(Bt(15))};const d={getState:o.getState,dispatch:(m,...g)=>c(m,...g)},h=n.map(m=>m(d));return c=fu(...h)(o.dispatch),{...o,dispatch:c}}}function ox(n){return Yh(n)&&"type"in n&&typeof n.type=="string"}var kb=Symbol.for("immer-nothing"),E1=Symbol.for("immer-draftable"),cn=Symbol.for("immer-state");function Gn(n,...a){throw new Error(`[Immer] minified error nr: ${n}. Full error at: https://bit.ly/3cXEKWf`)}var Mi=Object.getPrototypeOf;function Fr(n){return!!n&&!!n[cn]}function La(n){return n?qb(n)||Array.isArray(n)||!!n[E1]||!!n.constructor?.[E1]||is(n)||Au(n):!1}var ux=Object.prototype.constructor.toString();function qb(n){if(!n||typeof n!="object")return!1;const a=Mi(n);if(a===null)return!0;const i=Object.hasOwnProperty.call(a,"constructor")&&a.constructor;return i===Object?!0:typeof i=="function"&&Function.toString.call(i)===ux}function du(n,a){Tu(n)===0?Reflect.ownKeys(n).forEach(i=>{a(i,n[i],n)}):n.forEach((i,l)=>a(l,i,n))}function Tu(n){const a=n[cn];return a?a.type_:Array.isArray(n)?1:is(n)?2:Au(n)?3:0}function oh(n,a){return Tu(n)===2?n.has(a):Object.prototype.hasOwnProperty.call(n,a)}function Fb(n,a,i){const l=Tu(n);l===2?n.set(a,i):l===3?n.add(i):n[a]=i}function cx(n,a){return n===a?n!==0||1/n===1/a:n!==n&&a!==a}function is(n){return n instanceof Map}function Au(n){return n instanceof Set}function zr(n){return n.copy_||n.base_}function uh(n,a){if(is(n))return new Map(n);if(Au(n))return new Set(n);if(Array.isArray(n))return Array.prototype.slice.call(n);const i=qb(n);if(a===!0||a==="class_only"&&!i){const l=Object.getOwnPropertyDescriptors(n);delete l[cn];let o=Reflect.ownKeys(l);for(let c=0;c<o.length;c++){const d=o[c],h=l[d];h.writable===!1&&(h.writable=!0,h.configurable=!0),(h.get||h.set)&&(l[d]={configurable:!0,writable:!0,enumerable:h.enumerable,value:n[d]})}return Object.create(Mi(n),l)}else{const l=Mi(n);if(l!==null&&i)return{...n};const o=Object.create(l);return Object.assign(o,n)}}function Ph(n,a=!1){return Ou(n)||Fr(n)||!La(n)||(Tu(n)>1&&Object.defineProperties(n,{set:{value:Vo},add:{value:Vo},clear:{value:Vo},delete:{value:Vo}}),Object.freeze(n),a&&Object.values(n).forEach(i=>Ph(i,!0))),n}function Vo(){Gn(2)}function Ou(n){return Object.isFrozen(n)}var fx={};function Vr(n){const a=fx[n];return a||Gn(0,n),a}var Jl;function Vb(){return Jl}function dx(n,a){return{drafts_:[],parent_:n,immer_:a,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function S1(n,a){a&&(Vr("Patches"),n.patches_=[],n.inversePatches_=[],n.patchListener_=a)}function ch(n){fh(n),n.drafts_.forEach(hx),n.drafts_=null}function fh(n){n===Jl&&(Jl=n.parent_)}function T1(n){return Jl=dx(Jl,n)}function hx(n){const a=n[cn];a.type_===0||a.type_===1?a.revoke_():a.revoked_=!0}function A1(n,a){a.unfinalizedDrafts_=a.drafts_.length;const i=a.drafts_[0];return n!==void 0&&n!==i?(i[cn].modified_&&(ch(a),Gn(4)),La(n)&&(n=hu(a,n),a.parent_||mu(a,n)),a.patches_&&Vr("Patches").generateReplacementPatches_(i[cn].base_,n,a.patches_,a.inversePatches_)):n=hu(a,i,[]),ch(a),a.patches_&&a.patchListener_(a.patches_,a.inversePatches_),n!==kb?n:void 0}function hu(n,a,i){if(Ou(a))return a;const l=a[cn];if(!l)return du(a,(o,c)=>O1(n,l,a,o,c,i)),a;if(l.scope_!==n)return a;if(!l.modified_)return mu(n,l.base_,!0),l.base_;if(!l.finalized_){l.finalized_=!0,l.scope_.unfinalizedDrafts_--;const o=l.copy_;let c=o,d=!1;l.type_===3&&(c=new Set(o),o.clear(),d=!0),du(c,(h,m)=>O1(n,l,o,h,m,i,d)),mu(n,o,!1),i&&n.patches_&&Vr("Patches").generatePatches_(l,i,n.patches_,n.inversePatches_)}return l.copy_}function O1(n,a,i,l,o,c,d){if(Fr(o)){const h=c&&a&&a.type_!==3&&!oh(a.assigned_,l)?c.concat(l):void 0,m=hu(n,o,h);if(Fb(i,l,m),Fr(m))n.canAutoFreeze_=!1;else return}else d&&i.add(o);if(La(o)&&!Ou(o)){if(!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1)return;hu(n,o),(!a||!a.scope_.parent_)&&typeof l!="symbol"&&(is(i)?i.has(l):Object.prototype.propertyIsEnumerable.call(i,l))&&mu(n,o)}}function mu(n,a,i=!1){!n.parent_&&n.immer_.autoFreeze_&&n.canAutoFreeze_&&Ph(a,i)}function mx(n,a){const i=Array.isArray(n),l={type_:i?1:0,scope_:a?a.scope_:Vb(),modified_:!1,finalized_:!1,assigned_:{},parent_:a,base_:n,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=l,c=Xh;i&&(o=[l],c=es);const{revoke:d,proxy:h}=Proxy.revocable(o,c);return l.draft_=h,l.revoke_=d,h}var Xh={get(n,a){if(a===cn)return n;const i=zr(n);if(!oh(i,a))return px(n,i,a);const l=i[a];return n.finalized_||!La(l)?l:l===pd(n.base_,a)?(gd(n),n.copy_[a]=hh(l,n)):l},has(n,a){return a in zr(n)},ownKeys(n){return Reflect.ownKeys(zr(n))},set(n,a,i){const l=Yb(zr(n),a);if(l?.set)return l.set.call(n.draft_,i),!0;if(!n.modified_){const o=pd(zr(n),a),c=o?.[cn];if(c&&c.base_===i)return n.copy_[a]=i,n.assigned_[a]=!1,!0;if(cx(i,o)&&(i!==void 0||oh(n.base_,a)))return!0;gd(n),dh(n)}return n.copy_[a]===i&&(i!==void 0||a in n.copy_)||Number.isNaN(i)&&Number.isNaN(n.copy_[a])||(n.copy_[a]=i,n.assigned_[a]=!0),!0},deleteProperty(n,a){return pd(n.base_,a)!==void 0||a in n.base_?(n.assigned_[a]=!1,gd(n),dh(n)):delete n.assigned_[a],n.copy_&&delete n.copy_[a],!0},getOwnPropertyDescriptor(n,a){const i=zr(n),l=Reflect.getOwnPropertyDescriptor(i,a);return l&&{writable:!0,configurable:n.type_!==1||a!=="length",enumerable:l.enumerable,value:i[a]}},defineProperty(){Gn(11)},getPrototypeOf(n){return Mi(n.base_)},setPrototypeOf(){Gn(12)}},es={};du(Xh,(n,a)=>{es[n]=function(){return arguments[0]=arguments[0][0],a.apply(this,arguments)}});es.deleteProperty=function(n,a){return es.set.call(this,n,a,void 0)};es.set=function(n,a,i){return Xh.set.call(this,n[0],a,i,n[0])};function pd(n,a){const i=n[cn];return(i?zr(i):n)[a]}function px(n,a,i){const l=Yb(a,i);return l?"value"in l?l.value:l.get?.call(n.draft_):void 0}function Yb(n,a){if(!(a in n))return;let i=Mi(n);for(;i;){const l=Object.getOwnPropertyDescriptor(i,a);if(l)return l;i=Mi(i)}}function dh(n){n.modified_||(n.modified_=!0,n.parent_&&dh(n.parent_))}function gd(n){n.copy_||(n.copy_=uh(n.base_,n.scope_.immer_.useStrictShallowCopy_))}var gx=class{constructor(n){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(a,i,l)=>{if(typeof a=="function"&&typeof i!="function"){const c=i;i=a;const d=this;return function(m=c,...g){return d.produce(m,v=>i.call(this,v,...g))}}typeof i!="function"&&Gn(6),l!==void 0&&typeof l!="function"&&Gn(7);let o;if(La(a)){const c=T1(this),d=hh(a,void 0);let h=!0;try{o=i(d),h=!1}finally{h?ch(c):fh(c)}return S1(c,l),A1(o,c)}else if(!a||typeof a!="object"){if(o=i(a),o===void 0&&(o=a),o===kb&&(o=void 0),this.autoFreeze_&&Ph(o,!0),l){const c=[],d=[];Vr("Patches").generateReplacementPatches_(a,o,c,d),l(c,d)}return o}else Gn(1,a)},this.produceWithPatches=(a,i)=>{if(typeof a=="function")return(d,...h)=>this.produceWithPatches(d,m=>a(m,...h));let l,o;return[this.produce(a,i,(d,h)=>{l=d,o=h}),l,o]},typeof n?.autoFreeze=="boolean"&&this.setAutoFreeze(n.autoFreeze),typeof n?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(n.useStrictShallowCopy)}createDraft(n){La(n)||Gn(8),Fr(n)&&(n=yx(n));const a=T1(this),i=hh(n,void 0);return i[cn].isManual_=!0,fh(a),i}finishDraft(n,a){const i=n&&n[cn];(!i||!i.isManual_)&&Gn(9);const{scope_:l}=i;return S1(l,a),A1(void 0,l)}setAutoFreeze(n){this.autoFreeze_=n}setUseStrictShallowCopy(n){this.useStrictShallowCopy_=n}applyPatches(n,a){let i;for(i=a.length-1;i>=0;i--){const o=a[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(a=a.slice(i+1));const l=Vr("Patches").applyPatches_;return Fr(n)?l(n,a):this.produce(n,o=>l(o,a))}};function hh(n,a){const i=is(n)?Vr("MapSet").proxyMap_(n,a):Au(n)?Vr("MapSet").proxySet_(n,a):mx(n,a);return(a?a.scope_:Vb()).drafts_.push(i),i}function yx(n){return Fr(n)||Gn(10,n),Pb(n)}function Pb(n){if(!La(n)||Ou(n))return n;const a=n[cn];let i;if(a){if(!a.modified_)return a.base_;a.finalized_=!0,i=uh(n,a.scope_.immer_.useStrictShallowCopy_)}else i=uh(n,!0);return du(i,(l,o)=>{Fb(i,l,Pb(o))}),a&&(a.finalized_=!1),i}var vx=new gx,Xb=vx.produce;function Zb(n){return({dispatch:i,getState:l})=>o=>c=>typeof c=="function"?c(i,l,n):o(c)}var bx=Zb(),_x=Zb,Ex=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?fu:fu.apply(null,arguments)};function x1(n,a){function i(...l){if(a){let o=a(...l);if(!o)throw new Error(wa(0));return{type:n,payload:o.payload,..."meta"in o&&{meta:o.meta},..."error"in o&&{error:o.error}}}return{type:n,payload:l[0]}}return i.toString=()=>`${n}`,i.type=n,i.match=l=>ox(l)&&l.type===n,i}var Qb=class Ql extends Array{constructor(...a){super(...a),Object.setPrototypeOf(this,Ql.prototype)}static get[Symbol.species](){return Ql}concat(...a){return super.concat.apply(this,a)}prepend(...a){return a.length===1&&Array.isArray(a[0])?new Ql(...a[0].concat(this)):new Ql(...a.concat(this))}};function C1(n){return La(n)?Xb(n,()=>{}):n}function Yo(n,a,i){return n.has(a)?n.get(a):n.set(a,i(a)).get(a)}function Sx(n){return typeof n=="boolean"}var Tx=()=>function(a){const{thunk:i=!0,immutableCheck:l=!0,serializableCheck:o=!0,actionCreatorCheck:c=!0}=a??{};let d=new Qb;return i&&(Sx(i)?d.push(bx):d.push(_x(i.extraArgument))),d},Ax="RTK_autoBatch",R1=n=>a=>{setTimeout(a,n)},Ox=(n={type:"raf"})=>a=>(...i)=>{const l=a(...i);let o=!0,c=!1,d=!1;const h=new Set,m=n.type==="tick"?queueMicrotask:n.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:R1(10):n.type==="callback"?n.queueNotification:R1(n.timeout),g=()=>{d=!1,c&&(c=!1,h.forEach(v=>v()))};return Object.assign({},l,{subscribe(v){const E=()=>o&&v(),S=l.subscribe(E);return h.add(v),()=>{S(),h.delete(v)}},dispatch(v){try{return o=!v?.meta?.[Ax],c=!o,c&&(d||(d=!0,m(g))),l.dispatch(v)}finally{o=!0}}})},xx=n=>function(i){const{autoBatch:l=!0}=i??{};let o=new Qb(n);return l&&o.push(Ox(typeof l=="object"?l:void 0)),o};function Cx(n){const a=Tx(),{reducer:i=void 0,middleware:l,devTools:o=!0,preloadedState:c=void 0,enhancers:d=void 0}=n||{};let h;if(typeof i=="function")h=i;else if(Yh(i))h=Gb(i);else throw new Error(wa(1));let m;typeof l=="function"?m=l(a):m=a();let g=fu;o&&(g=Ex({trace:!1,...typeof o=="object"&&o}));const v=sx(...m),E=xx(v);let S=typeof d=="function"?d(E):E();const w=g(...S);return zb(h,c,w)}function Kb(n){const a={},i=[];let l;const o={addCase(c,d){const h=typeof c=="string"?c:c.type;if(!h)throw new Error(wa(28));if(h in a)throw new Error(wa(29));return a[h]=d,o},addAsyncThunk(c,d){return d.pending&&(a[c.pending.type]=d.pending),d.rejected&&(a[c.rejected.type]=d.rejected),d.fulfilled&&(a[c.fulfilled.type]=d.fulfilled),d.settled&&i.push({matcher:c.settled,reducer:d.settled}),o},addMatcher(c,d){return i.push({matcher:c,reducer:d}),o},addDefaultCase(c){return l=c,o}};return n(o),[a,i,l]}function Rx(n){return typeof n=="function"}function wx(n,a){let[i,l,o]=Kb(a),c;if(Rx(n))c=()=>C1(n());else{const h=C1(n);c=()=>h}function d(h=c(),m){let g=[i[m.type],...l.filter(({matcher:v})=>v(m)).map(({reducer:v})=>v)];return g.filter(v=>!!v).length===0&&(g=[o]),g.reduce((v,E)=>{if(E)if(Fr(v)){const w=E(v,m);return w===void 0?v:w}else{if(La(v))return Xb(v,S=>E(S,m));{const S=E(v,m);if(S===void 0){if(v===null)return v;throw Error("A case reducer on a non-draftable value must not return undefined")}return S}}return v},h)}return d.getInitialState=c,d}var Nx=Symbol.for("rtk-slice-createasyncthunk");function Mx(n,a){return`${n}/${a}`}function Dx({creators:n}={}){const a=n?.asyncThunk?.[Nx];return function(l){const{name:o,reducerPath:c=o}=l;if(!o)throw new Error(wa(11));const d=(typeof l.reducers=="function"?l.reducers(Bx()):l.reducers)||{},h=Object.keys(d),m={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},g={addCase(U,G){const M=typeof U=="string"?U:U.type;if(!M)throw new Error(wa(12));if(M in m.sliceCaseReducersByType)throw new Error(wa(13));return m.sliceCaseReducersByType[M]=G,g},addMatcher(U,G){return m.sliceMatchers.push({matcher:U,reducer:G}),g},exposeAction(U,G){return m.actionCreators[U]=G,g},exposeCaseReducer(U,G){return m.sliceCaseReducersByName[U]=G,g}};h.forEach(U=>{const G=d[U],M={reducerName:U,type:Mx(o,U),createNotation:typeof l.reducers=="function"};jx(G)?Ix(M,G,g,a):Ux(M,G,g)});function v(){const[U={},G=[],M=void 0]=typeof l.extraReducers=="function"?Kb(l.extraReducers):[l.extraReducers],P={...U,...m.sliceCaseReducersByType};return wx(l.initialState,Q=>{for(let ae in P)Q.addCase(ae,P[ae]);for(let ae of m.sliceMatchers)Q.addMatcher(ae.matcher,ae.reducer);for(let ae of G)Q.addMatcher(ae.matcher,ae.reducer);M&&Q.addDefaultCase(M)})}const E=U=>U,S=new Map,w=new WeakMap;let _;function x(U,G){return _||(_=v()),_(U,G)}function T(){return _||(_=v()),_.getInitialState()}function D(U,G=!1){function M(Q){let ae=Q[U];return typeof ae>"u"&&G&&(ae=Yo(w,M,T)),ae}function P(Q=E){const ae=Yo(S,G,()=>new WeakMap);return Yo(ae,Q,()=>{const Be={};for(const[He,ge]of Object.entries(l.selectors??{}))Be[He]=Lx(ge,Q,()=>Yo(w,Q,T),G);return Be})}return{reducerPath:U,getSelectors:P,get selectors(){return P(M)},selectSlice:M}}const z={name:o,reducer:x,actions:m.actionCreators,caseReducers:m.sliceCaseReducersByName,getInitialState:T,...D(c),injectInto(U,{reducerPath:G,...M}={}){const P=G??c;return U.inject({reducerPath:P,reducer:x},M),{...z,...D(P,!0)}}};return z}}function Lx(n,a,i,l){function o(c,...d){let h=a(c);return typeof h>"u"&&l&&(h=i()),n(h,...d)}return o.unwrapped=n,o}var Zh=Dx();function Bx(){function n(a,i){return{_reducerDefinitionType:"asyncThunk",payloadCreator:a,...i}}return n.withTypes=()=>n,{reducer(a){return Object.assign({[a.name](...i){return a(...i)}}[a.name],{_reducerDefinitionType:"reducer"})},preparedReducer(a,i){return{_reducerDefinitionType:"reducerWithPrepare",prepare:a,reducer:i}},asyncThunk:n}}function Ux({type:n,reducerName:a,createNotation:i},l,o){let c,d;if("reducer"in l){if(i&&!Hx(l))throw new Error(wa(17));c=l.reducer,d=l.prepare}else c=l;o.addCase(n,c).exposeCaseReducer(a,c).exposeAction(a,d?x1(n,d):x1(n))}function jx(n){return n._reducerDefinitionType==="asyncThunk"}function Hx(n){return n._reducerDefinitionType==="reducerWithPrepare"}function Ix({type:n,reducerName:a},i,l,o){if(!o)throw new Error(wa(18));const{payloadCreator:c,fulfilled:d,pending:h,rejected:m,settled:g,options:v}=i,E=o(n,c,v);l.exposeAction(a,E),d&&l.addCase(E.fulfilled,d),h&&l.addCase(E.pending,h),m&&l.addCase(E.rejected,m),g&&l.addMatcher(E.settled,g),l.exposeCaseReducer(a,{fulfilled:d||Po,pending:h||Po,rejected:m||Po,settled:g||Po})}function Po(){}function wa(n){return`Minified Redux Toolkit error #${n}; visit https://redux-toolkit.js.org/Errors?code=${n} for the full message or use the non-minified dev environment for full errors. `}const zx={formValues:{}},$b=Zh({name:"start-screen",initialState:zx,reducers:{showStartScreen(n){n.startScreenStatus="VISIBLE",n.formValues={}},startChat(n,a){n.startScreenStatus="HIDDEN",n.formValues=a.payload.formValues},startAuthenticatedChat(n,a){n.startScreenStatus="HIDDEN",n.loginToken=a.payload.loginToken,n.loginRequestToken=void 0},requestLogin(n,a){n.loginRequestToken=a.payload.loginRequestToken,n.formValues=a.payload.formValues},loginWindowClosed(n){n.loginRequestToken=void 0}}}),{startChat:Gx,startAuthenticatedChat:kx,showStartScreen:qx,requestLogin:Fx,loginWindowClosed:Vx}=$b.actions,Yx=$b.reducer,Wb="RESET_CHAT_STATE",Jb="TOGGLE_TRANSCRIPT_MAIL_OVERLAY",e_="SHOW_CONVERSATION_RATING_OVERLAY",t_="HIDE_CONVERSATION_RATING_OVERLAY",n_=()=>({type:Bb}),Px=()=>({type:Wb}),a_=()=>({type:Jb}),pu=(n,a=void 0)=>({type:e_,payload:{opener:n,defaultRating:a}}),Xx=()=>({type:t_}),w1=(n,a,i)=>(l,o)=>{try{const c=o().connection.sessionId;if(!c)throw new Error("Session ID is not available");l({type:qh,payload:{chunkId:i}}),N1(n,c,a,i,!1,l),N1(n,c,a,i,!0,l)}catch(c){console.error("Error loading source infos:",c),l({type:kh})}},N1=(n,a,i,l,o,c)=>{const d=`/${n}/me/chat-widget/transcript/${i}/chunks/${l}?highlight=${o}`;fetch(d,{headers:{"x-bubble-chat-session-id":a}}).then(h=>{if(!h.ok)throw new Error(`HTTP error! Status: ${h.status}`);return h.json()}).then(h=>{const m={...h,chunkId:l,highlighted:o};c({type:Db,payload:m})}).catch(h=>{console.error("Error fetching source infos:",h),c({type:kh,payload:{highlighted:o}})})},Zx=()=>({type:Fh}),Qh="CONNECT",Kh="CONNECTING",$h="CONNECTED",Wh="DISCONNECTED",Jh="RECONNECTED",em="RESTORE_SESSION_ID",xu="START",Cu="CLEAR_SESSION_ID",Qx=[Qh,Kh,$h,Wh,Jh,em],Kx=(n,a)=>({type:Qh,clientName:n,querystrings:a}),$x=n=>({type:em,sessionId:n}),Wx=()=>({type:Kh}),Jx=()=>({type:$h}),eC=()=>({type:Wh}),tC=()=>({type:Jh}),r_=n=>(a,i)=>{const l=i().connection,{formValues:o,loginToken:c}=i().startScreen;let d=l.sessionId;d===void 0&&(d=uu());let h=l.userId;if(h===void 0){const g=Fo.get("bubble-chat-user-id")||Fo.get("bubble-chat-userId")||Fo.get("bf-webclient-userId");h=g||uu(),Fo.set("bubble-chat-user-id",h)}const m=Lh.parse(i().connection.queryString||"");a({type:xu,payload:{sessionId:d,userId:h,clientName:n,loginToken:c,querystrings:{...m,...o}}})},ls=()=>(n,a)=>{const i=a().connection.sessionId||"";if(n(nC(i)),n(Px()),a().settings.enableStartScreen)n(qx());else{const l=Vh();return n(r_(l))}},nC=n=>({type:Cu,payload:{sessionId:n}}),tt=()=>{const n=Su();return i=>{const l=n.formatMessage({id:i});return l===i?void 0:l}};var kr=(n=>(n[n.CONNECTING=0]="CONNECTING",n[n.CONNECTED=1]="CONNECTED",n[n.RECONNECTED=2]="RECONNECTED",n[n.DISCONNECTED=3]="DISCONNECTED",n))(kr||{}),gu=(n=>(n.GUEST="GUEST",n.BOT="BOT",n.PERSON="PERSON",n))(gu||{});const aC="_container_q2uun_1",rC="_chatcontent_q2uun_6",iC="_accessabilityHidden_q2uun_12",yd={container:aC,chatcontent:rC,accessabilityHidden:iC},lC="_messageContainer_ofi0g_1",sC="_messages_ofi0g_12",M1={messageContainer:lC,messages:sC};function Wn(){return Wn=Object.assign?Object.assign.bind():function(n){for(var a=1;a<arguments.length;a++){var i=arguments[a];for(var l in i)({}).hasOwnProperty.call(i,l)&&(n[l]=i[l])}return n},Wn.apply(null,arguments)}const Xo=["strong","em","del","mark"],D1=[["**",Xo[0]],["__",Xo[0]],["~~",Xo[2]],["==",Xo[3]],["*","em"],["_","em"]];function oC(n,a){for(var i=1,l=a+1;l<n.length&&i>0;)n[l]!=="\\"?(n[l]==="["&&i++,n[l]==="]"&&i--,l++):l+=2;if(i===0&&l<n.length&&(n[l]==="("||n[l]==="[")){var o=n[l]==="("?")":"]",c=1;for(l++;l<n.length&&c>0;)n[l]!=="\\"?(n[l]==="("&&o===")"&&c++,n[l]===o&&c--,l++):l+=2;if(c===0)return l}return-1}function uC(n,a){if(!a||!a.inline&&!a.simple)return null;var i=n[0];if(i!=="*"&&i!=="_"&&i!=="~"&&i!=="=")return null;for(var l="",o=0,c="",d=0;d<6;d++){var h=D1[d][0];if(n.startsWith(h)&&n.length>=2*h.length){l=h,o=h.length,c=D1[d][1];break}}if(!l)return null;for(var m=o,g=!1,v=!1,E="",S=0,w="",_=!1,x="";m<n.length;){var T=n[m];if(_)w+=T,_=!1,x=T,m++;else if(T!=="\\")if(T!=="`"||S!==0){if(T==="["&&!g&&S===0){var D=oC(n,m);if(D!==-1){w+=n.slice(m,D),m=D,x=n[D-1];continue}}if(v)w+=T,E?T===E&&(E=""):T==='"'||T==="'"?E=T:T===">"&&(v=!1),x=T,m++;else if(T!=="<"||g){if(T===`
93
+ */var wy;function YA(){if(wy)return Ge;wy=1;var n=typeof Symbol=="function"&&Symbol.for,a=n?Symbol.for("react.element"):60103,i=n?Symbol.for("react.portal"):60106,l=n?Symbol.for("react.fragment"):60107,o=n?Symbol.for("react.strict_mode"):60108,c=n?Symbol.for("react.profiler"):60114,d=n?Symbol.for("react.provider"):60109,h=n?Symbol.for("react.context"):60110,m=n?Symbol.for("react.async_mode"):60111,g=n?Symbol.for("react.concurrent_mode"):60111,v=n?Symbol.for("react.forward_ref"):60112,E=n?Symbol.for("react.suspense"):60113,S=n?Symbol.for("react.suspense_list"):60120,w=n?Symbol.for("react.memo"):60115,_=n?Symbol.for("react.lazy"):60116,x=n?Symbol.for("react.block"):60121,T=n?Symbol.for("react.fundamental"):60117,D=n?Symbol.for("react.responder"):60118,z=n?Symbol.for("react.scope"):60119;function U(M){if(typeof M=="object"&&M!==null){var P=M.$$typeof;switch(P){case a:switch(M=M.type,M){case m:case g:case l:case c:case o:case E:return M;default:switch(M=M&&M.$$typeof,M){case h:case v:case _:case w:case d:return M;default:return P}}case i:return P}}}function G(M){return U(M)===g}return Ge.AsyncMode=m,Ge.ConcurrentMode=g,Ge.ContextConsumer=h,Ge.ContextProvider=d,Ge.Element=a,Ge.ForwardRef=v,Ge.Fragment=l,Ge.Lazy=_,Ge.Memo=w,Ge.Portal=i,Ge.Profiler=c,Ge.StrictMode=o,Ge.Suspense=E,Ge.isAsyncMode=function(M){return G(M)||U(M)===m},Ge.isConcurrentMode=G,Ge.isContextConsumer=function(M){return U(M)===h},Ge.isContextProvider=function(M){return U(M)===d},Ge.isElement=function(M){return typeof M=="object"&&M!==null&&M.$$typeof===a},Ge.isForwardRef=function(M){return U(M)===v},Ge.isFragment=function(M){return U(M)===l},Ge.isLazy=function(M){return U(M)===_},Ge.isMemo=function(M){return U(M)===w},Ge.isPortal=function(M){return U(M)===i},Ge.isProfiler=function(M){return U(M)===c},Ge.isStrictMode=function(M){return U(M)===o},Ge.isSuspense=function(M){return U(M)===E},Ge.isValidElementType=function(M){return typeof M=="string"||typeof M=="function"||M===l||M===g||M===c||M===o||M===E||M===S||typeof M=="object"&&M!==null&&(M.$$typeof===_||M.$$typeof===w||M.$$typeof===d||M.$$typeof===h||M.$$typeof===v||M.$$typeof===T||M.$$typeof===D||M.$$typeof===z||M.$$typeof===x)},Ge.typeOf=U,Ge}var Ny;function PA(){return Ny||(Ny=1,ed.exports=YA()),ed.exports}var td,My;function XA(){if(My)return td;My=1;var n=PA(),a={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},l={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},c={};c[n.ForwardRef]=l,c[n.Memo]=o;function d(_){return n.isMemo(_)?o:c[_.$$typeof]||a}var h=Object.defineProperty,m=Object.getOwnPropertyNames,g=Object.getOwnPropertySymbols,v=Object.getOwnPropertyDescriptor,E=Object.getPrototypeOf,S=Object.prototype;function w(_,x,T){if(typeof x!="string"){if(S){var D=E(x);D&&D!==S&&w(_,D,T)}var z=m(x);g&&(z=z.concat(g(x)));for(var U=d(_),G=d(x),M=0;M<z.length;++M){var P=z[M];if(!i[P]&&!(T&&T[P])&&!(G&&G[P])&&!(U&&U[P])){var Q=v(x,P);try{h(_,P,Q)}catch{}}}}return _}return td=w,td}XA();var Nh=typeof window<"u"&&!window.__REACT_INTL_BYPASS_GLOBAL_CONTEXT__?window.__REACT_INTL_CONTEXT__||(window.__REACT_INTL_CONTEXT__=H.createContext(null)):H.createContext(null);Nh.Consumer;var ZA=Nh.Provider,QA=ZA,KA=Nh;function Su(){var n=H.useContext(KA);return gb(n),n}var ah;(function(n){n.formatDate="FormattedDate",n.formatTime="FormattedTime",n.formatNumber="FormattedNumber",n.formatList="FormattedList",n.formatDisplayName="FormattedDisplayName"})(ah||(ah={}));var rh;(function(n){n.formatDate="FormattedDateParts",n.formatTime="FormattedTimeParts",n.formatNumber="FormattedNumberParts",n.formatList="FormattedListParts"})(rh||(rh={}));function bb(n){var a=function(i){var l=Su(),o=i.value,c=i.children,d=Eu(i,["value","children"]),h=typeof o=="string"?new Date(o||0):o,m=n==="formatDate"?l.formatDateToParts(h,d):l.formatTimeToParts(h,d);return c(m)};return a.displayName=rh[n],a}function rs(n){var a=function(i){var l=Su(),o=i.value,c=i.children,d=Eu(i,["value","children"]),h=l[n](o,d);if(typeof c=="function")return c(h);var m=l.textComponent||H.Fragment;return H.createElement(m,null,h)};return a.displayName=ah[n],a}function _b(n){return n&&Object.keys(n).reduce(function(a,i){var l=n[i];return a[i]=cb(l)?FA(l):l,a},{})}var Dy=function(n,a,i,l){for(var o=[],c=4;c<arguments.length;c++)o[c-4]=arguments[c];var d=_b(l),h=nh.apply(void 0,$n([n,a,i,d],o,!1));return Array.isArray(h)?vb(h):h},Ly=function(n,a){var i=n.defaultRichTextElements,l=Eu(n,["defaultRichTextElements"]),o=_b(i),c=GA(le(le(le({},yb),l),{defaultRichTextElements:o}),a),d={locale:c.locale,timeZone:c.timeZone,fallbackOnEmptyString:c.fallbackOnEmptyString,formats:c.formats,defaultLocale:c.defaultLocale,defaultFormats:c.defaultFormats,messages:c.messages,onError:c.onError,defaultRichTextElements:o};return le(le({},c),{formatMessage:Dy.bind(null,d,c.formatters),$t:Dy.bind(null,d,c.formatters)})};function nd(n){return{locale:n.locale,timeZone:n.timeZone,fallbackOnEmptyString:n.fallbackOnEmptyString,formats:n.formats,textComponent:n.textComponent,messages:n.messages,defaultLocale:n.defaultLocale,defaultFormats:n.defaultFormats,onError:n.onError,onWarn:n.onWarn,wrapRichTextChunksInFragment:n.wrapRichTextChunksInFragment,defaultRichTextElements:n.defaultRichTextElements}}var $A=(function(n){Cn(a,n);function a(){var i=n!==null&&n.apply(this,arguments)||this;return i.cache=hb(),i.state={cache:i.cache,intl:Ly(nd(i.props),i.cache),prevConfig:nd(i.props)},i}return a.getDerivedStateFromProps=function(i,l){var o=l.prevConfig,c=l.cache,d=nd(i);return VA(o,d)?null:{intl:Ly(d,c),prevConfig:d}},a.prototype.render=function(){return gb(this.state.intl),H.createElement(QA,{value:this.state.intl},this.props.children)},a.displayName="IntlProvider",a.defaultProps=yb,a})(H.PureComponent);rs("formatDate");rs("formatTime");rs("formatNumber");rs("formatList");rs("formatDisplayName");bb("formatDate");bb("formatTime");const WA="_app_1rj0t_1",JA={app:WA},Ba=yT,st=_T,Eb="%[a-f0-9]{2}",By=new RegExp("("+Eb+")|([^%]+?)","gi"),Uy=new RegExp("("+Eb+")+","gi");function ih(n,a){try{return[decodeURIComponent(n.join(""))]}catch{}if(n.length===1)return n;a=a||1;const i=n.slice(0,a),l=n.slice(a);return Array.prototype.concat.call([],ih(i),ih(l))}function eO(n){try{return decodeURIComponent(n)}catch{let a=n.match(By)||[];for(let i=1;i<a.length;i++)n=ih(a,i).join(""),a=n.match(By)||[];return n}}function tO(n){const a={"%FE%FF":"��","%FF%FE":"��"};let i=Uy.exec(n);for(;i;){try{a[i[0]]=decodeURIComponent(i[0])}catch{const o=eO(i[0]);o!==i[0]&&(a[i[0]]=o)}i=Uy.exec(n)}a["%C2"]="�";const l=Object.keys(a);for(const o of l)n=n.replace(new RegExp(o,"g"),a[o]);return n}function nO(n){if(typeof n!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof n+"`");try{return decodeURIComponent(n)}catch{return tO(n)}}function aO(n,a){const i={};if(Array.isArray(a))for(const l of a){const o=Object.getOwnPropertyDescriptor(n,l);o?.enumerable&&Object.defineProperty(i,l,o)}else for(const l of Reflect.ownKeys(n)){const o=Object.getOwnPropertyDescriptor(n,l);if(o.enumerable){const c=n[l];a(l,c,n)&&Object.defineProperty(i,l,o)}}return i}function Sb(n,a){if(!(typeof n=="string"&&typeof a=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(n===""||a==="")return[];const i=n.indexOf(a);return i===-1?[]:[n.slice(0,i),n.slice(i+a.length)]}const rO=n=>n==null,iO=n=>encodeURIComponent(n).replaceAll(/[!'()*]/g,a=>`%${a.charCodeAt(0).toString(16).toUpperCase()}`),lh=Symbol("encodeFragmentIdentifier");function lO(n){switch(n.arrayFormat){case"index":return a=>(i,l)=>{const o=i.length;return l===void 0||n.skipNull&&l===null||n.skipEmptyString&&l===""?i:l===null?[...i,[yt(a,n),"[",o,"]"].join("")]:[...i,[yt(a,n),"[",yt(o,n),"]=",yt(l,n)].join("")]};case"bracket":return a=>(i,l)=>l===void 0||n.skipNull&&l===null||n.skipEmptyString&&l===""?i:l===null?[...i,[yt(a,n),"[]"].join("")]:[...i,[yt(a,n),"[]=",yt(l,n)].join("")];case"colon-list-separator":return a=>(i,l)=>l===void 0||n.skipNull&&l===null||n.skipEmptyString&&l===""?i:l===null?[...i,[yt(a,n),":list="].join("")]:[...i,[yt(a,n),":list=",yt(l,n)].join("")];case"comma":case"separator":case"bracket-separator":{const a=n.arrayFormat==="bracket-separator"?"[]=":"=";return i=>(l,o)=>o===void 0||n.skipNull&&o===null||n.skipEmptyString&&o===""?l:(o=o===null?"":o,l.length===0?[[yt(i,n),a,yt(o,n)].join("")]:[[l,yt(o,n)].join(n.arrayFormatSeparator)])}default:return a=>(i,l)=>l===void 0||n.skipNull&&l===null||n.skipEmptyString&&l===""?i:l===null?[...i,yt(a,n)]:[...i,[yt(a,n),"=",yt(l,n)].join("")]}}function sO(n){let a;switch(n.arrayFormat){case"index":return(i,l,o)=>{if(a=/\[(\d*)]$/.exec(i),i=i.replace(/\[\d*]$/,""),!a){o[i]=l;return}o[i]===void 0&&(o[i]={}),o[i][a[1]]=l};case"bracket":return(i,l,o)=>{if(a=/(\[])$/.exec(i),i=i.replace(/\[]$/,""),!a){o[i]=l;return}if(o[i]===void 0){o[i]=[l];return}o[i]=[...o[i],l]};case"colon-list-separator":return(i,l,o)=>{if(a=/(:list)$/.exec(i),i=i.replace(/:list$/,""),!a){o[i]=l;return}if(o[i]===void 0){o[i]=[l];return}o[i]=[...o[i],l]};case"comma":case"separator":return(i,l,o)=>{const d=typeof l=="string"&&l.includes(n.arrayFormatSeparator)?l.split(n.arrayFormatSeparator).map(h=>Gr(h,n)):l===null?l:Gr(l,n);o[i]=d};case"bracket-separator":return(i,l,o)=>{const c=/(\[])$/.test(i);if(i=i.replace(/\[]$/,""),!c){o[i]=l&&Gr(l,n);return}const d=l===null?[]:Gr(l,n).split(n.arrayFormatSeparator);if(o[i]===void 0){o[i]=d;return}o[i]=[...o[i],...d]};default:return(i,l,o)=>{if(o[i]===void 0){o[i]=l;return}o[i]=[...[o[i]].flat(),l]}}}function Tb(n){if(typeof n!="string"||n.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function yt(n,a){return a.encode?a.strict?iO(n):encodeURIComponent(n):n}function Gr(n,a){return a.decode?nO(n):n}function Ab(n){return Array.isArray(n)?n.sort():typeof n=="object"?Ab(Object.keys(n)).sort((a,i)=>Number(a)-Number(i)).map(a=>n[a]):n}function Ob(n){const a=n.indexOf("#");return a!==-1&&(n=n.slice(0,a)),n}function oO(n){let a="";const i=n.indexOf("#");return i!==-1&&(a=n.slice(i)),a}function jy(n,a,i){return i==="string"&&typeof n=="string"?n:typeof i=="function"&&typeof n=="string"?i(n):i==="boolean"&&n===null?!0:i==="boolean"&&n!==null&&(n.toLowerCase()==="true"||n.toLowerCase()==="false")?n.toLowerCase()==="true":i==="boolean"&&n!==null&&(n.toLowerCase()==="1"||n.toLowerCase()==="0")?n.toLowerCase()==="1":i==="string[]"&&a.arrayFormat!=="none"&&typeof n=="string"?[n]:i==="number[]"&&a.arrayFormat!=="none"&&!Number.isNaN(Number(n))&&typeof n=="string"&&n.trim()!==""?[Number(n)]:i==="number"&&!Number.isNaN(Number(n))&&typeof n=="string"&&n.trim()!==""?Number(n):a.parseBooleans&&n!==null&&(n.toLowerCase()==="true"||n.toLowerCase()==="false")?n.toLowerCase()==="true":a.parseNumbers&&!Number.isNaN(Number(n))&&typeof n=="string"&&n.trim()!==""?Number(n):n}function Mh(n){n=Ob(n);const a=n.indexOf("?");return a===-1?"":n.slice(a+1)}function Dh(n,a){a={decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1,types:Object.create(null),...a},Tb(a.arrayFormatSeparator);const i=sO(a),l=Object.create(null);if(typeof n!="string"||(n=n.trim().replace(/^[?#&]/,""),!n))return l;for(const o of n.split("&")){if(o==="")continue;const c=a.decode?o.replaceAll("+"," "):o;let[d,h]=Sb(c,"=");d===void 0&&(d=c),h=h===void 0?null:["comma","separator","bracket-separator"].includes(a.arrayFormat)?h:Gr(h,a),i(Gr(d,a),h,l)}for(const[o,c]of Object.entries(l))if(typeof c=="object"&&c!==null&&a.types[o]!=="string")for(const[d,h]of Object.entries(c)){const m=a.types[o],g=typeof m=="function"?m:m?m.replace("[]",""):void 0;c[d]=jy(h,a,g)}else typeof c=="object"&&c!==null&&a.types[o]==="string"?l[o]=Object.values(c).join(a.arrayFormatSeparator):l[o]=jy(c,a,a.types[o]);return a.sort===!1?l:(a.sort===!0?Object.keys(l).sort():Object.keys(l).sort(a.sort)).reduce((o,c)=>{const d=l[c];return o[c]=d&&typeof d=="object"&&!Array.isArray(d)?Ab(d):d,o},Object.create(null))}function xb(n,a){if(!n)return"";a={encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:",",...a},Tb(a.arrayFormatSeparator);const i=d=>a.skipNull&&rO(n[d])||a.skipEmptyString&&n[d]==="",l=lO(a),o={};for(const[d,h]of Object.entries(n))i(d)||(o[d]=h);const c=Object.keys(o);return a.sort!==!1&&c.sort(a.sort),c.map(d=>{let h=n[d];if(a.replacer&&(h=a.replacer(d,h),h===void 0)||h===void 0)return"";if(h===null)return yt(d,a);if(Array.isArray(h)){if(h.length===0&&a.arrayFormat==="bracket-separator")return yt(d,a)+"[]";let m=h;return a.replacer&&(m=h.map((g,v)=>a.replacer(`${d}[${v}]`,g)).filter(g=>g!==void 0)),m.reduce(l(d),[]).join("&")}return yt(d,a)+"="+yt(h,a)}).filter(d=>d.length>0).join("&")}function Cb(n,a){a={decode:!0,...a};let[i,l]=Sb(n,"#");return i===void 0&&(i=n),{url:i?.split("?")?.[0]??"",query:Dh(Mh(n),a),...a&&a.parseFragmentIdentifier&&l?{fragmentIdentifier:Gr(l,a)}:{}}}function Rb(n,a){a={encode:!0,strict:!0,[lh]:!0,...a};const i=Ob(n.url).split("?")[0]||"",l=Mh(n.url),o={...Dh(l,{sort:!1,...a}),...n.query};let c=xb(o,a);c&&=`?${c}`;let d=oO(n.url);if(typeof n.fragmentIdentifier=="string"){const h=new URL(i);h.hash=n.fragmentIdentifier,d=a[lh]?h.hash:`#${n.fragmentIdentifier}`}return`${i}${c}${d}`}function wb(n,a,i){i={parseFragmentIdentifier:!0,[lh]:!1,...i};const{url:l,query:o,fragmentIdentifier:c}=Cb(n,i);return Rb({url:l,query:aO(o,a),fragmentIdentifier:c},i)}function uO(n,a,i){const l=Array.isArray(a)?o=>!a.includes(o):(o,c)=>!a(o,c);return wb(n,l,i)}const Lh=Object.freeze(Object.defineProperty({__proto__:null,exclude:uO,extract:Mh,parse:Dh,parseUrl:Cb,pick:wb,stringify:xb,stringifyUrl:Rb},Symbol.toStringTag,{value:"Module"}));var Bn={},Un={},Ve={},No={},de={},Hy;function fn(){return Hy||(Hy=1,Object.defineProperty(de,"__esModule",{value:!0}),de.GUEST_LOCALE_CHANGED=de.DRAWER_CLOSE=de.DRAWER_OPEN=de.CONVERSATION_RATING_FROM_GUEST=de.TRANSCRIPT_ITEM_GUEST_REACTION=de.TRANSCRIPT_MAIL_REQUEST=de.INBOX_CONNECT_REQUEST=de.RESTART_CHAT_REQUEST=de.EVENT_TO_GUEST=de.NLU_REQUEST_EVENT=de.EXPERTS_DISCONNECTED=de.EXPERTS_DISCONNECT_REQUEST=de.EXPERTS_CONNECTED=de.EXPERTS_CONNECT_REQUEST=de.MESSAGE_TO_GUEST=de.MESSAGE_WITHOUT_ANALYSIS_FROM_GUEST=de.MESSAGE_FROM_GUEST=de.GUEST_FEEDBACK_RESPONSE=de.GUEST_DISCONNECTED=de.GUEST_CONNECTED=de.TYPING_OFF=de.TYPING_ON=void 0,de.TYPING_ON="core.typing.on",de.TYPING_OFF="core.typing.off",de.GUEST_CONNECTED="core.guest.connected",de.GUEST_DISCONNECTED="core.guest.disconnected",de.GUEST_FEEDBACK_RESPONSE="core.guest.feedback.response",de.MESSAGE_FROM_GUEST="core.message.from.guest",de.MESSAGE_WITHOUT_ANALYSIS_FROM_GUEST="core.message.without.analysis.from.guest",de.MESSAGE_TO_GUEST="core.message.to.guest",de.EXPERTS_CONNECT_REQUEST="core.experts.connect.request",de.EXPERTS_CONNECTED="core.experts.connected",de.EXPERTS_DISCONNECT_REQUEST="core.experts.disconnect.request",de.EXPERTS_DISCONNECTED="core.experts.disconnected",de.NLU_REQUEST_EVENT="core.nlu.request.event",de.EVENT_TO_GUEST="core.event.to.guest",de.RESTART_CHAT_REQUEST="core.chat.restart.request",de.INBOX_CONNECT_REQUEST="core.inbox.connect.request",de.TRANSCRIPT_MAIL_REQUEST="core.transcript.mail.request",de.TRANSCRIPT_ITEM_GUEST_REACTION="core.transcript.item.guest.reaction",de.CONVERSATION_RATING_FROM_GUEST="core.conversation.rating.from.guest",de.DRAWER_OPEN="core.drawer.open",de.DRAWER_CLOSE="core.drawer.close",de.GUEST_LOCALE_CHANGED="core.guest.locale.changed"),de}var Iy;function cO(){if(Iy)return No;Iy=1,Object.defineProperty(No,"__esModule",{value:!0});const n=fn(),a=()=>({type:n.DRAWER_CLOSE});return No.default=a,No}var Mo={},zy;function fO(){if(zy)return Mo;zy=1,Object.defineProperty(Mo,"__esModule",{value:!0});const n=fn(),a=(i,l)=>({type:n.GUEST_FEEDBACK_RESPONSE,payload:{satisfaction:i,intent:l}});return Mo.default=a,Mo}var Do={},Gy;function dO(){if(Gy)return Do;Gy=1,Object.defineProperty(Do,"__esModule",{value:!0});const n=fn(),a=i=>({type:n.GUEST_CONNECTED,payload:{sessionId:i}});return Do.default=a,Do}var Lo={},ky;function hO(){if(ky)return Lo;ky=1,Object.defineProperty(Lo,"__esModule",{value:!0});const n=fn(),a=i=>({type:n.GUEST_DISCONNECTED,payload:{sessionId:i}});return Lo.default=a,Lo}var Bo={},qy;function mO(){if(qy)return Bo;qy=1,Object.defineProperty(Bo,"__esModule",{value:!0});const n=fn(),a=(i,l)=>({type:n.GUEST_LOCALE_CHANGED,payload:{previousLocale:i,newLocale:l}});return Bo.default=a,Bo}var Uo={},Fy;function pO(){if(Fy)return Uo;Fy=1,Object.defineProperty(Uo,"__esModule",{value:!0});const n=fn(),a=i=>({type:n.DRAWER_OPEN,payload:{parameters:{contentUrl:i}}});return Uo.default=a,Uo}var jo={},at={},Vy;function Bh(){if(Vy)return at;Vy=1,Object.defineProperty(at,"__esModule",{value:!0}),at.getStringRepresentationFromMessage=at.MessageTypeEnum=at.AudioMessage=at.FileMessage=at.ImageMessage=at.VideoMessage=at.MarkdownMessage=at.DetailMessage=at.TextMessage=at.Message=void 0;class n{type;sender;sources;quickReplies;constructor(E,S,w=[],_=[]){this.type=E,this.sender=S,this.sources=w,this.quickReplies=_}addQuickReply(E,S){this.quickReplies.push({label:E,payload:S})}}at.Message=n;class a extends n{text;constructor(E,S,w=[],_=[]){super(m.TEXT,S,w,_),this.text=E}}at.TextMessage=a;class i extends n{title;text;imageUrl;itemUrl;buttons;constructor(E,S){super(m.DETAIL,S),this.title=E,this.text="",this.imageUrl="",this.itemUrl="",this.buttons=[]}setImageUrl(E){this.imageUrl=E}setItemUrl(E){this.itemUrl=E}setText(E){this.text=E}addButton(E){this.buttons.push(E)}}at.DetailMessage=i;class l extends n{markdown;constructor(E,S,w=[],_=[]){super(m.MARKDOWN,S,w,_),this.markdown=E}}at.MarkdownMessage=l;class o extends n{url;constructor(E,S){super(m.VIDEO,S),this.url=E}}at.VideoMessage=o;class c extends n{url;constructor(E,S){super(m.IMAGE,S),this.url=E}}at.ImageMessage=c;class d extends n{url;constructor(E,S){super(m.FILE,S),this.url=E}}at.FileMessage=d;class h extends n{url;constructor(E,S){super(m.AUDIO,S),this.url=E}}at.AudioMessage=h;var m;(function(v){v.TEXT="TEXT",v.DETAIL="DETAIL",v.MARKDOWN="MARKDOWN",v.VIDEO="VIDEO",v.IMAGE="IMAGE",v.FILE="FILE",v.AUDIO="AUDIO"})(m||(at.MessageTypeEnum=m={}));const g=v=>{switch(v.type){case m.TEXT:return v.text;case m.DETAIL:return`${v.title}`;case m.MARKDOWN:return v.markdown;case m.VIDEO:return`Video Url: ${v.url}`;case m.IMAGE:return`Image Url: ${v.url}`;case m.FILE:return`File Url: ${v.url}`;case m.AUDIO:return`Audio Url: ${v.url}`;default:throw new Error("Unknown message type "+v.type)}};return at.getStringRepresentationFromMessage=g,at}var sn={},Yy;function Uh(){if(Yy)return sn;Yy=1,Object.defineProperty(sn,"__esModule",{value:!0}),sn.UserType=sn.PersonUser=sn.GuestUser=sn.BotUser=sn.User=void 0;class n{type;id;name;avatar;constructor(d,h,m,g){this.type=d,this.id=h,this.name=m,this.avatar=g}}sn.User=n;class a extends n{constructor(){super(o.BOT,null,"Chatbot","bot.svg")}}sn.BotUser=a;class i extends n{constructor(){super(o.GUEST,null,"Guest","visitor.svg")}}sn.GuestUser=i;class l extends n{constructor(d,h,m){super(o.PERSON,d,h,m)}}sn.PersonUser=l;var o;return(function(c){c.GUEST="GUEST",c.BOT="BOT",c.PERSON="PERSON"})(o||(sn.UserType=o={})),sn}var Py;function gO(){if(Py)return jo;Py=1,Object.defineProperty(jo,"__esModule",{value:!0});const n=Bh(),a=Uh(),i=fn(),l=o=>{const c=new n.TextMessage(o,new a.GuestUser);return{type:i.MESSAGE_FROM_GUEST,message:c}};return jo.default=l,jo}var Ho={},Xy;function yO(){if(Xy)return Ho;Xy=1,Object.defineProperty(Ho,"__esModule",{value:!0});const n=Bh(),a=Uh(),i=fn(),l=(o,c={})=>{const d=new n.TextMessage(o,new a.GuestUser);return{type:i.MESSAGE_WITHOUT_ANALYSIS_FROM_GUEST,message:d,payload:c}};return Ho.default=l,Ho}var Io={},Zy;function vO(){if(Zy)return Io;Zy=1,Object.defineProperty(Io,"__esModule",{value:!0});const n=fn(),a=i=>({type:n.NLU_REQUEST_EVENT,event:i});return Io.default=a,Io}var zo={},Qy;function bO(){if(Qy)return zo;Qy=1,Object.defineProperty(zo,"__esModule",{value:!0});const n=fn(),a=()=>({type:n.RESTART_CHAT_REQUEST});return zo.default=a,zo}var Go={},Ky;function _O(){if(Ky)return Go;Ky=1,Object.defineProperty(Go,"__esModule",{value:!0});const n=fn(),a=i=>({type:n.MESSAGE_TO_GUEST,message:i});return Go.default=a,Go}var ko={},$y;function EO(){if($y)return ko;$y=1,Object.defineProperty(ko,"__esModule",{value:!0});const n=fn(),a=(i,l,o=null,c=null)=>({type:n.TRANSCRIPT_ITEM_GUEST_REACTION,payload:{actionId:i,reaction:l,category:o,comment:c}});return ko.default=a,ko}var Wy;function SO(){if(Wy)return Ve;Wy=1;var n=Ve&&Ve.__importDefault||function(w){return w&&w.__esModule?w:{default:w}};Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.transcriptItemGuestReaction=Ve.sendMessageToGuest=Ve.restartChatRequest=Ve.requestNLUEvent=Ve.receiveTextMessageWithoutAnalysisFromGuest=Ve.receiveTextMessageFromGuest=Ve.openDrawer=Ve.guestLocaleChanged=Ve.guestDisconnected=Ve.guestConnected=Ve.feedbackFromGuestResponse=Ve.closeDrawer=void 0;const a=n(cO());Ve.closeDrawer=a.default;const i=n(fO());Ve.feedbackFromGuestResponse=i.default;const l=n(dO());Ve.guestConnected=l.default;const o=n(hO());Ve.guestDisconnected=o.default;const c=n(mO());Ve.guestLocaleChanged=c.default;const d=n(pO());Ve.openDrawer=d.default;const h=n(gO());Ve.receiveTextMessageFromGuest=h.default;const m=n(yO());Ve.receiveTextMessageWithoutAnalysisFromGuest=m.default;const g=n(vO());Ve.requestNLUEvent=g.default;const v=n(bO());Ve.restartChatRequest=v.default;const E=n(_O());Ve.sendMessageToGuest=E.default;const S=n(EO());return Ve.transcriptItemGuestReaction=S.default,Ve}var ad={},Jy;function TO(){return Jy||(Jy=1,Object.defineProperty(ad,"__esModule",{value:!0})),ad}var e1;function AO(){return e1||(e1=1,(function(n){var a=Un&&Un.__createBinding||(Object.create?(function(c,d,h,m){m===void 0&&(m=h);var g=Object.getOwnPropertyDescriptor(d,h);(!g||("get"in g?!d.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return d[h]}}),Object.defineProperty(c,m,g)}):(function(c,d,h,m){m===void 0&&(m=h),c[m]=d[h]})),i=Un&&Un.__setModuleDefault||(Object.create?(function(c,d){Object.defineProperty(c,"default",{enumerable:!0,value:d})}):function(c,d){c.default=d}),l=Un&&Un.__importStar||(function(){var c=function(d){return c=Object.getOwnPropertyNames||function(h){var m=[];for(var g in h)Object.prototype.hasOwnProperty.call(h,g)&&(m[m.length]=g);return m},c(d)};return function(d){if(d&&d.__esModule)return d;var h={};if(d!=null)for(var m=c(d),g=0;g<m.length;g++)m[g]!=="default"&&a(h,d,m[g]);return i(h,d),h}})(),o=Un&&Un.__exportStar||function(c,d){for(var h in c)h!=="default"&&!Object.prototype.hasOwnProperty.call(d,h)&&a(d,c,h)};Object.defineProperty(n,"__esModule",{value:!0}),n.ActionTypes=n.Actions=void 0,n.Actions=l(SO()),n.ActionTypes=l(fn()),o(TO(),n)})(Un)),Un}var on={},rd={},t1;function OO(){return t1||(t1=1,Object.defineProperty(rd,"__esModule",{value:!0})),rd}var jl={},n1;function xO(){if(n1)return jl;n1=1,Object.defineProperty(jl,"__esModule",{value:!0}),jl.NullableKnowledgeBaseAdapter=void 0;class n{async createApiKnowledgeBase(i){throw new Error("Method not implemented.")}async updateApiKnowledgeBase(i,l){throw new Error("Method not implemented.")}async deleteApiKnowledgeBase(i){throw new Error("Method not implemented.")}async upsertApiKnowledgeBase(i){throw new Error("Method not implemented.")}async findApiKnowledgeBaseById(i){throw new Error("Method not implemented.")}async findApiKnowledgeBaseByName(i){throw new Error("Method not implemented.")}async findApiKnowledgeBases(){throw new Error("Method not implemented.")}async deleteApiKnowledgeBaseByName(i){throw new Error("Method not implemented.")}async findKnowledgeBaseEntries(i){throw new Error("Method not implemented.")}async createKnowledgeBaseEntry(i,l){throw new Error("Method not implemented.")}async updateKnowledgeBaseEntry(i,l,o){throw new Error("Method not implemented.")}async deleteKnowledgeBaseEntry(i,l){throw new Error("Method not implemented.")}async deleteObsoleteKnowledgeBaseEntries(i,l){throw new Error("Method not implemented.")}async upsertKnowledgeBaseEntry(i,l){throw new Error("Method not implemented.")}async retrieveKnowledgeBaseEntryConfig(i,l){throw new Error("Method not implemented.")}async findKnowledgeBaseEntryByUriAlias(i,l){throw new Error("Method not implemented.")}async deleteKnowledgeBaseEntriesIndexedBeforeDate(i,l){throw new Error("Method not implemented.")}async findKnowledgeBaseEntryAttachments(i,l){throw new Error("Method not implemented.")}async createKnowledgeBaseEntryAttachment(i,l,o){throw new Error("Method not implemented.")}async updateKnowledgeBaseEntryAttachment(i,l,o,c){throw new Error("Method not implemented.")}async deleteKnowledgeBaseEntryAttachment(i,l,o){throw new Error("Method not implemented.")}async setIndexingStatus(i,l){throw new Error("Method not implemented.")}async subscribeToReindex(i,l){throw new Error("Method not implemented.")}isContentTypeSupported(i){throw new Error("Method not implemented.")}registerTool(i,l){throw new Error("Method not implemented.")}async getTools(i){throw new Error("Method not implemented.")}createBrowserInstance(i){throw new Error("Method not implemented.")}}return jl.NullableKnowledgeBaseAdapter=n,jl}var a1;function CO(){if(a1)return on;a1=1;var n=on&&on.__createBinding||(Object.create?(function(o,c,d,h){h===void 0&&(h=d);var m=Object.getOwnPropertyDescriptor(c,d);(!m||("get"in m?!c.__esModule:m.writable||m.configurable))&&(m={enumerable:!0,get:function(){return c[d]}}),Object.defineProperty(o,h,m)}):(function(o,c,d,h){h===void 0&&(h=d),o[h]=c[d]})),a=on&&on.__setModuleDefault||(Object.create?(function(o,c){Object.defineProperty(o,"default",{enumerable:!0,value:c})}):function(o,c){o.default=c}),i=on&&on.__importStar||(function(){var o=function(c){return o=Object.getOwnPropertyNames||function(d){var h=[];for(var m in d)Object.prototype.hasOwnProperty.call(d,m)&&(h[h.length]=m);return h},o(c)};return function(c){if(c&&c.__esModule)return c;var d={};if(c!=null)for(var h=o(c),m=0;m<h.length;m++)h[m]!=="default"&&n(d,c,h[m]);return a(d,c),d}})();Object.defineProperty(on,"__esModule",{value:!0}),on.NullableCmsAdapter=on.KnowledgeBase=void 0,on.KnowledgeBase=i(OO());const l=xO();return on.NullableCmsAdapter={knowledgeBase:new l.NullableKnowledgeBaseAdapter},on}var Br={},id={},r1;function RO(){return r1||(r1=1,Object.defineProperty(id,"__esModule",{value:!0})),id}var ld={},i1;function wO(){return i1||(i1=1,Object.defineProperty(ld,"__esModule",{value:!0})),ld}var sd={},l1;function NO(){return l1||(l1=1,Object.defineProperty(sd,"__esModule",{value:!0})),sd}var od={},s1;function MO(){return s1||(s1=1,Object.defineProperty(od,"__esModule",{value:!0})),od}var Hl={},o1;function DO(){if(o1)return Hl;o1=1,Object.defineProperty(Hl,"__esModule",{value:!0}),Hl.checkMiddlewareCondition=void 0;const n=async(a,i,l)=>(Array.isArray(a)?a:[a]).reduce(async(c,d)=>await c?await d(i,l):!1,Promise.resolve(!0));return Hl.checkMiddlewareCondition=n,Hl}var ud={},u1;function LO(){return u1||(u1=1,Object.defineProperty(ud,"__esModule",{value:!0})),ud}var cd={},c1;function BO(){return c1||(c1=1,Object.defineProperty(cd,"__esModule",{value:!0})),cd}var fd={},f1;function UO(){return f1||(f1=1,Object.defineProperty(fd,"__esModule",{value:!0})),fd}var d1;function jO(){return d1||(d1=1,(function(n){var a=Br&&Br.__createBinding||(Object.create?(function(l,o,c,d){d===void 0&&(d=c);var h=Object.getOwnPropertyDescriptor(o,c);(!h||("get"in h?!o.__esModule:h.writable||h.configurable))&&(h={enumerable:!0,get:function(){return o[c]}}),Object.defineProperty(l,d,h)}):(function(l,o,c,d){d===void 0&&(d=c),l[d]=o[c]})),i=Br&&Br.__exportStar||function(l,o){for(var c in l)c!=="default"&&!Object.prototype.hasOwnProperty.call(o,c)&&a(o,l,c)};Object.defineProperty(n,"__esModule",{value:!0}),i(RO(),n),i(wO(),n),i(NO(),n),i(MO(),n),i(DO(),n),i(LO(),n),i(BO(),n),i(UO(),n)})(Br)),Br}var Ur={},jn={},h1;function HO(){if(h1)return jn;h1=1,Object.defineProperty(jn,"__esModule",{value:!0}),jn.ButtonTypeEnum=jn.PostbackButton=jn.UrlButton=jn.Button=void 0;class n{title;type;constructor(c,d){this.title=c,this.type=d}}jn.Button=n;class a extends n{url;constructor(c,d){super(c,l.WEB_URL),this.url=d}}jn.UrlButton=a;class i extends n{payload;constructor(c,d){super(c,l.POSTBACK),this.payload=d}}jn.PostbackButton=i;var l;return(function(o){o.WEB_URL="web_url",o.POSTBACK="postback"})(l||(jn.ButtonTypeEnum=l={})),jn}var dd={},m1;function IO(){return m1||(m1=1,Object.defineProperty(dd,"__esModule",{value:!0})),dd}var Il={},p1;function zO(){if(p1)return Il;p1=1,Object.defineProperty(Il,"__esModule",{value:!0}),Il.SatisfactionEnum=void 0;var n;return(function(a){a.GOOD="GOOD",a.BAD="BAD"})(n||(Il.SatisfactionEnum=n={})),Il}var g1;function y1(){return g1||(g1=1,(function(n){var a=Ur&&Ur.__createBinding||(Object.create?(function(l,o,c,d){d===void 0&&(d=c);var h=Object.getOwnPropertyDescriptor(o,c);(!h||("get"in h?!o.__esModule:h.writable||h.configurable))&&(h={enumerable:!0,get:function(){return o[c]}}),Object.defineProperty(l,d,h)}):(function(l,o,c,d){d===void 0&&(d=c),l[d]=o[c]})),i=Ur&&Ur.__exportStar||function(l,o){for(var c in l)c!=="default"&&!Object.prototype.hasOwnProperty.call(o,c)&&a(o,l,c)};Object.defineProperty(n,"__esModule",{value:!0}),i(HO(),n),i(IO(),n),i(zO(),n),i(Bh(),n),i(Uh(),n)})(Ur)),Ur}var v1;function GO(){return v1||(v1=1,(function(n){var a=Bn&&Bn.__createBinding||(Object.create?(function(c,d,h,m){m===void 0&&(m=h);var g=Object.getOwnPropertyDescriptor(d,h);(!g||("get"in g?!d.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return d[h]}}),Object.defineProperty(c,m,g)}):(function(c,d,h,m){m===void 0&&(m=h),c[m]=d[h]})),i=Bn&&Bn.__setModuleDefault||(Object.create?(function(c,d){Object.defineProperty(c,"default",{enumerable:!0,value:d})}):function(c,d){c.default=d}),l=Bn&&Bn.__exportStar||function(c,d){for(var h in c)h!=="default"&&!Object.prototype.hasOwnProperty.call(d,h)&&a(d,c,h)},o=Bn&&Bn.__importStar||(function(){var c=function(d){return c=Object.getOwnPropertyNames||function(h){var m=[];for(var g in h)Object.prototype.hasOwnProperty.call(h,g)&&(m[m.length]=g);return m},c(d)};return function(d){if(d&&d.__esModule)return d;var h={};if(d!=null)for(var m=c(d),g=0;g<m.length;g++)m[g]!=="default"&&a(h,d,m[g]);return i(h,d),h}})();Object.defineProperty(n,"__esModule",{value:!0}),n.Model=n.CMS=void 0,l(AO(),n),n.CMS=o(CO()),l(jO(),n),n.Model=o(y1()),l(y1(),n)})(Bn)),Bn}var Te=GO();const Nb=n=>a=>(n.payload.type!==Te.ActionTypes.MESSAGE_FROM_GUEST&&a(Te.Actions.receiveTextMessageWithoutAnalysisFromGuest(n.label,n.payload)),a(n.payload)),Mb=n=>(a,i)=>{const{quickReplies:l}=i().chat,o=l.find(c=>n.toLocaleLowerCase().indexOf(c.label.toLocaleLowerCase())>-1);return a(o?Nb({...o,label:n}):JSON.parse(JSON.stringify(Te.Actions.receiveTextMessageFromGuest(n))))},jh="MESSAGE_TO_PARENT_PAGE",Hh="RESTORE_PREVIOUS_CHAT_MESSAGES",Ih="AUDIO_MESSAGE_FROM_USER",zh="RECEIVE_SPEECH_TRANSCRIPTION",Gh="ENABLE_CONVERSATION_RATING",Db="LOAD_SOURCE_INFOS_RESPONSE",kh="LOAD_SOURCE_INFOS_ERROR",qh="LOAD_SOURCE_INFOS_REQUEST",Fh="CLOSE_SOURCE_INFOS",kO="webclient.get.started",Lb="webclient.window.expand",Bb="webclient.window.close",Ub="webclient.transcript.pdf.download",qO=[jh,Hh,Ih,zh,Gh,qh,Fh],FO=n=>({type:Ih,buffer:n}),VO=n=>({type:zh,transcription:n}),YO=n=>({type:Te.ActionTypes.TRANSCRIPT_MAIL_REQUEST,payload:{parameters:{mailTo:n}}}),PO=()=>({type:Ub}),XO=({rating:n})=>({type:Gh,payload:{rating:n}}),ZO=(n,a)=>({type:Te.ActionTypes.CONVERSATION_RATING_FROM_GUEST,payload:{value:n,feedback:a}}),jb=n=>Te.Actions.requestNLUEvent(n),QO=n=>({type:Hh,messages:n}),KO=n=>{switch(n.type){case Te.ButtonTypeEnum.WEB_URL:return Ib(n.url);case Te.ButtonTypeEnum.POSTBACK:return n.payload;default:throw new Error(`unknown button type ${n.type}`)}},Hb=n=>Ib(n),Ib=n=>({type:jh,message:{type:"webclient.change.url",url:n}});/*! js-cookie v3.0.5 | MIT */function qo(n){for(var a=1;a<arguments.length;a++){var i=arguments[a];for(var l in i)n[l]=i[l]}return n}var $O={read:function(n){return n[0]==='"'&&(n=n.slice(1,-1)),n.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(n){return encodeURIComponent(n).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function sh(n,a){function i(o,c,d){if(!(typeof document>"u")){d=qo({},a,d),typeof d.expires=="number"&&(d.expires=new Date(Date.now()+d.expires*864e5)),d.expires&&(d.expires=d.expires.toUTCString()),o=encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var h="";for(var m in d)d[m]&&(h+="; "+m,d[m]!==!0&&(h+="="+d[m].split(";")[0]));return document.cookie=o+"="+n.write(c,o)+h}}function l(o){if(!(typeof document>"u"||arguments.length&&!o)){for(var c=document.cookie?document.cookie.split("; "):[],d={},h=0;h<c.length;h++){var m=c[h].split("="),g=m.slice(1).join("=");try{var v=decodeURIComponent(m[0]);if(d[v]=n.read(g,v),o===v)break}catch{}}return o?d[o]:d}}return Object.create({set:i,get:l,remove:function(o,c){i(o,"",qo({},c,{expires:-1}))},withAttributes:function(o){return sh(this.converter,qo({},this.attributes,o))},withConverter:function(o){return sh(qo({},this.converter,o),this.attributes)}},{attributes:{value:Object.freeze(a)},converter:{value:Object.freeze(n)}})}var Fo=sh($O,{path:"/"});const Lt=[];for(let n=0;n<256;++n)Lt.push((n+256).toString(16).slice(1));function WO(n,a=0){return(Lt[n[a+0]]+Lt[n[a+1]]+Lt[n[a+2]]+Lt[n[a+3]]+"-"+Lt[n[a+4]]+Lt[n[a+5]]+"-"+Lt[n[a+6]]+Lt[n[a+7]]+"-"+Lt[n[a+8]]+Lt[n[a+9]]+"-"+Lt[n[a+10]]+Lt[n[a+11]]+Lt[n[a+12]]+Lt[n[a+13]]+Lt[n[a+14]]+Lt[n[a+15]]).toLowerCase()}let hd;const JO=new Uint8Array(16);function ex(){if(!hd){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");hd=crypto.getRandomValues.bind(crypto)}return hd(JO)}const tx=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),b1={randomUUID:tx};function nx(n,a,i){n=n||{};const l=n.random??n.rng?.()??ex();if(l.length<16)throw new Error("Random bytes length must be >= 16");return l[6]=l[6]&15|64,l[8]=l[8]&63|128,WO(l)}function uu(n,a,i){return b1.randomUUID&&!n?b1.randomUUID():nx(n)}const Vh=()=>ax(window.location.pathname),ax=n=>{const a=n.split("/"),i=n.endsWith("/");return a[a.length-(i?2:1)]};function Bt(n){return`Minified Redux error #${n}; visit https://redux.js.org/Errors?code=${n} for the full message or use the non-minified dev environment for full errors. `}var rx=typeof Symbol=="function"&&Symbol.observable||"@@observable",_1=rx,md=()=>Math.random().toString(36).substring(7).split("").join("."),ix={INIT:`@@redux/INIT${md()}`,REPLACE:`@@redux/REPLACE${md()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${md()}`},cu=ix;function Yh(n){if(typeof n!="object"||n===null)return!1;let a=n;for(;Object.getPrototypeOf(a)!==null;)a=Object.getPrototypeOf(a);return Object.getPrototypeOf(n)===a||Object.getPrototypeOf(n)===null}function zb(n,a,i){if(typeof n!="function")throw new Error(Bt(2));if(typeof a=="function"&&typeof i=="function"||typeof i=="function"&&typeof arguments[3]=="function")throw new Error(Bt(0));if(typeof a=="function"&&typeof i>"u"&&(i=a,a=void 0),typeof i<"u"){if(typeof i!="function")throw new Error(Bt(1));return i(zb)(n,a)}let l=n,o=a,c=new Map,d=c,h=0,m=!1;function g(){d===c&&(d=new Map,c.forEach((T,D)=>{d.set(D,T)}))}function v(){if(m)throw new Error(Bt(3));return o}function E(T){if(typeof T!="function")throw new Error(Bt(4));if(m)throw new Error(Bt(5));let D=!0;g();const z=h++;return d.set(z,T),function(){if(D){if(m)throw new Error(Bt(6));D=!1,g(),d.delete(z),c=null}}}function S(T){if(!Yh(T))throw new Error(Bt(7));if(typeof T.type>"u")throw new Error(Bt(8));if(typeof T.type!="string")throw new Error(Bt(17));if(m)throw new Error(Bt(9));try{m=!0,o=l(o,T)}finally{m=!1}return(c=d).forEach(z=>{z()}),T}function w(T){if(typeof T!="function")throw new Error(Bt(10));l=T,S({type:cu.REPLACE})}function _(){const T=E;return{subscribe(D){if(typeof D!="object"||D===null)throw new Error(Bt(11));function z(){const G=D;G.next&&G.next(v())}return z(),{unsubscribe:T(z)}},[_1](){return this}}}return S({type:cu.INIT}),{dispatch:S,subscribe:E,getState:v,replaceReducer:w,[_1]:_}}function lx(n){Object.keys(n).forEach(a=>{const i=n[a];if(typeof i(void 0,{type:cu.INIT})>"u")throw new Error(Bt(12));if(typeof i(void 0,{type:cu.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Bt(13))})}function Gb(n){const a=Object.keys(n),i={};for(let c=0;c<a.length;c++){const d=a[c];typeof n[d]=="function"&&(i[d]=n[d])}const l=Object.keys(i);let o;try{lx(i)}catch(c){o=c}return function(d={},h){if(o)throw o;let m=!1;const g={};for(let v=0;v<l.length;v++){const E=l[v],S=i[E],w=d[E],_=S(w,h);if(typeof _>"u")throw h&&h.type,new Error(Bt(14));g[E]=_,m=m||_!==w}return m=m||l.length!==Object.keys(d).length,m?g:d}}function fu(...n){return n.length===0?a=>a:n.length===1?n[0]:n.reduce((a,i)=>(...l)=>a(i(...l)))}function sx(...n){return a=>(i,l)=>{const o=a(i,l);let c=()=>{throw new Error(Bt(15))};const d={getState:o.getState,dispatch:(m,...g)=>c(m,...g)},h=n.map(m=>m(d));return c=fu(...h)(o.dispatch),{...o,dispatch:c}}}function ox(n){return Yh(n)&&"type"in n&&typeof n.type=="string"}var kb=Symbol.for("immer-nothing"),E1=Symbol.for("immer-draftable"),cn=Symbol.for("immer-state");function Gn(n,...a){throw new Error(`[Immer] minified error nr: ${n}. Full error at: https://bit.ly/3cXEKWf`)}var Mi=Object.getPrototypeOf;function Fr(n){return!!n&&!!n[cn]}function La(n){return n?qb(n)||Array.isArray(n)||!!n[E1]||!!n.constructor?.[E1]||is(n)||Au(n):!1}var ux=Object.prototype.constructor.toString();function qb(n){if(!n||typeof n!="object")return!1;const a=Mi(n);if(a===null)return!0;const i=Object.hasOwnProperty.call(a,"constructor")&&a.constructor;return i===Object?!0:typeof i=="function"&&Function.toString.call(i)===ux}function du(n,a){Tu(n)===0?Reflect.ownKeys(n).forEach(i=>{a(i,n[i],n)}):n.forEach((i,l)=>a(l,i,n))}function Tu(n){const a=n[cn];return a?a.type_:Array.isArray(n)?1:is(n)?2:Au(n)?3:0}function oh(n,a){return Tu(n)===2?n.has(a):Object.prototype.hasOwnProperty.call(n,a)}function Fb(n,a,i){const l=Tu(n);l===2?n.set(a,i):l===3?n.add(i):n[a]=i}function cx(n,a){return n===a?n!==0||1/n===1/a:n!==n&&a!==a}function is(n){return n instanceof Map}function Au(n){return n instanceof Set}function zr(n){return n.copy_||n.base_}function uh(n,a){if(is(n))return new Map(n);if(Au(n))return new Set(n);if(Array.isArray(n))return Array.prototype.slice.call(n);const i=qb(n);if(a===!0||a==="class_only"&&!i){const l=Object.getOwnPropertyDescriptors(n);delete l[cn];let o=Reflect.ownKeys(l);for(let c=0;c<o.length;c++){const d=o[c],h=l[d];h.writable===!1&&(h.writable=!0,h.configurable=!0),(h.get||h.set)&&(l[d]={configurable:!0,writable:!0,enumerable:h.enumerable,value:n[d]})}return Object.create(Mi(n),l)}else{const l=Mi(n);if(l!==null&&i)return{...n};const o=Object.create(l);return Object.assign(o,n)}}function Ph(n,a=!1){return Ou(n)||Fr(n)||!La(n)||(Tu(n)>1&&Object.defineProperties(n,{set:{value:Vo},add:{value:Vo},clear:{value:Vo},delete:{value:Vo}}),Object.freeze(n),a&&Object.values(n).forEach(i=>Ph(i,!0))),n}function Vo(){Gn(2)}function Ou(n){return Object.isFrozen(n)}var fx={};function Vr(n){const a=fx[n];return a||Gn(0,n),a}var Jl;function Vb(){return Jl}function dx(n,a){return{drafts_:[],parent_:n,immer_:a,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function S1(n,a){a&&(Vr("Patches"),n.patches_=[],n.inversePatches_=[],n.patchListener_=a)}function ch(n){fh(n),n.drafts_.forEach(hx),n.drafts_=null}function fh(n){n===Jl&&(Jl=n.parent_)}function T1(n){return Jl=dx(Jl,n)}function hx(n){const a=n[cn];a.type_===0||a.type_===1?a.revoke_():a.revoked_=!0}function A1(n,a){a.unfinalizedDrafts_=a.drafts_.length;const i=a.drafts_[0];return n!==void 0&&n!==i?(i[cn].modified_&&(ch(a),Gn(4)),La(n)&&(n=hu(a,n),a.parent_||mu(a,n)),a.patches_&&Vr("Patches").generateReplacementPatches_(i[cn].base_,n,a.patches_,a.inversePatches_)):n=hu(a,i,[]),ch(a),a.patches_&&a.patchListener_(a.patches_,a.inversePatches_),n!==kb?n:void 0}function hu(n,a,i){if(Ou(a))return a;const l=a[cn];if(!l)return du(a,(o,c)=>O1(n,l,a,o,c,i)),a;if(l.scope_!==n)return a;if(!l.modified_)return mu(n,l.base_,!0),l.base_;if(!l.finalized_){l.finalized_=!0,l.scope_.unfinalizedDrafts_--;const o=l.copy_;let c=o,d=!1;l.type_===3&&(c=new Set(o),o.clear(),d=!0),du(c,(h,m)=>O1(n,l,o,h,m,i,d)),mu(n,o,!1),i&&n.patches_&&Vr("Patches").generatePatches_(l,i,n.patches_,n.inversePatches_)}return l.copy_}function O1(n,a,i,l,o,c,d){if(Fr(o)){const h=c&&a&&a.type_!==3&&!oh(a.assigned_,l)?c.concat(l):void 0,m=hu(n,o,h);if(Fb(i,l,m),Fr(m))n.canAutoFreeze_=!1;else return}else d&&i.add(o);if(La(o)&&!Ou(o)){if(!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1)return;hu(n,o),(!a||!a.scope_.parent_)&&typeof l!="symbol"&&(is(i)?i.has(l):Object.prototype.propertyIsEnumerable.call(i,l))&&mu(n,o)}}function mu(n,a,i=!1){!n.parent_&&n.immer_.autoFreeze_&&n.canAutoFreeze_&&Ph(a,i)}function mx(n,a){const i=Array.isArray(n),l={type_:i?1:0,scope_:a?a.scope_:Vb(),modified_:!1,finalized_:!1,assigned_:{},parent_:a,base_:n,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=l,c=Xh;i&&(o=[l],c=es);const{revoke:d,proxy:h}=Proxy.revocable(o,c);return l.draft_=h,l.revoke_=d,h}var Xh={get(n,a){if(a===cn)return n;const i=zr(n);if(!oh(i,a))return px(n,i,a);const l=i[a];return n.finalized_||!La(l)?l:l===pd(n.base_,a)?(gd(n),n.copy_[a]=hh(l,n)):l},has(n,a){return a in zr(n)},ownKeys(n){return Reflect.ownKeys(zr(n))},set(n,a,i){const l=Yb(zr(n),a);if(l?.set)return l.set.call(n.draft_,i),!0;if(!n.modified_){const o=pd(zr(n),a),c=o?.[cn];if(c&&c.base_===i)return n.copy_[a]=i,n.assigned_[a]=!1,!0;if(cx(i,o)&&(i!==void 0||oh(n.base_,a)))return!0;gd(n),dh(n)}return n.copy_[a]===i&&(i!==void 0||a in n.copy_)||Number.isNaN(i)&&Number.isNaN(n.copy_[a])||(n.copy_[a]=i,n.assigned_[a]=!0),!0},deleteProperty(n,a){return pd(n.base_,a)!==void 0||a in n.base_?(n.assigned_[a]=!1,gd(n),dh(n)):delete n.assigned_[a],n.copy_&&delete n.copy_[a],!0},getOwnPropertyDescriptor(n,a){const i=zr(n),l=Reflect.getOwnPropertyDescriptor(i,a);return l&&{writable:!0,configurable:n.type_!==1||a!=="length",enumerable:l.enumerable,value:i[a]}},defineProperty(){Gn(11)},getPrototypeOf(n){return Mi(n.base_)},setPrototypeOf(){Gn(12)}},es={};du(Xh,(n,a)=>{es[n]=function(){return arguments[0]=arguments[0][0],a.apply(this,arguments)}});es.deleteProperty=function(n,a){return es.set.call(this,n,a,void 0)};es.set=function(n,a,i){return Xh.set.call(this,n[0],a,i,n[0])};function pd(n,a){const i=n[cn];return(i?zr(i):n)[a]}function px(n,a,i){const l=Yb(a,i);return l?"value"in l?l.value:l.get?.call(n.draft_):void 0}function Yb(n,a){if(!(a in n))return;let i=Mi(n);for(;i;){const l=Object.getOwnPropertyDescriptor(i,a);if(l)return l;i=Mi(i)}}function dh(n){n.modified_||(n.modified_=!0,n.parent_&&dh(n.parent_))}function gd(n){n.copy_||(n.copy_=uh(n.base_,n.scope_.immer_.useStrictShallowCopy_))}var gx=class{constructor(n){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(a,i,l)=>{if(typeof a=="function"&&typeof i!="function"){const c=i;i=a;const d=this;return function(m=c,...g){return d.produce(m,v=>i.call(this,v,...g))}}typeof i!="function"&&Gn(6),l!==void 0&&typeof l!="function"&&Gn(7);let o;if(La(a)){const c=T1(this),d=hh(a,void 0);let h=!0;try{o=i(d),h=!1}finally{h?ch(c):fh(c)}return S1(c,l),A1(o,c)}else if(!a||typeof a!="object"){if(o=i(a),o===void 0&&(o=a),o===kb&&(o=void 0),this.autoFreeze_&&Ph(o,!0),l){const c=[],d=[];Vr("Patches").generateReplacementPatches_(a,o,c,d),l(c,d)}return o}else Gn(1,a)},this.produceWithPatches=(a,i)=>{if(typeof a=="function")return(d,...h)=>this.produceWithPatches(d,m=>a(m,...h));let l,o;return[this.produce(a,i,(d,h)=>{l=d,o=h}),l,o]},typeof n?.autoFreeze=="boolean"&&this.setAutoFreeze(n.autoFreeze),typeof n?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(n.useStrictShallowCopy)}createDraft(n){La(n)||Gn(8),Fr(n)&&(n=yx(n));const a=T1(this),i=hh(n,void 0);return i[cn].isManual_=!0,fh(a),i}finishDraft(n,a){const i=n&&n[cn];(!i||!i.isManual_)&&Gn(9);const{scope_:l}=i;return S1(l,a),A1(void 0,l)}setAutoFreeze(n){this.autoFreeze_=n}setUseStrictShallowCopy(n){this.useStrictShallowCopy_=n}applyPatches(n,a){let i;for(i=a.length-1;i>=0;i--){const o=a[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(a=a.slice(i+1));const l=Vr("Patches").applyPatches_;return Fr(n)?l(n,a):this.produce(n,o=>l(o,a))}};function hh(n,a){const i=is(n)?Vr("MapSet").proxyMap_(n,a):Au(n)?Vr("MapSet").proxySet_(n,a):mx(n,a);return(a?a.scope_:Vb()).drafts_.push(i),i}function yx(n){return Fr(n)||Gn(10,n),Pb(n)}function Pb(n){if(!La(n)||Ou(n))return n;const a=n[cn];let i;if(a){if(!a.modified_)return a.base_;a.finalized_=!0,i=uh(n,a.scope_.immer_.useStrictShallowCopy_)}else i=uh(n,!0);return du(i,(l,o)=>{Fb(i,l,Pb(o))}),a&&(a.finalized_=!1),i}var vx=new gx,Xb=vx.produce;function Zb(n){return({dispatch:i,getState:l})=>o=>c=>typeof c=="function"?c(i,l,n):o(c)}var bx=Zb(),_x=Zb,Ex=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?fu:fu.apply(null,arguments)};function x1(n,a){function i(...l){if(a){let o=a(...l);if(!o)throw new Error(wa(0));return{type:n,payload:o.payload,..."meta"in o&&{meta:o.meta},..."error"in o&&{error:o.error}}}return{type:n,payload:l[0]}}return i.toString=()=>`${n}`,i.type=n,i.match=l=>ox(l)&&l.type===n,i}var Qb=class Ql extends Array{constructor(...a){super(...a),Object.setPrototypeOf(this,Ql.prototype)}static get[Symbol.species](){return Ql}concat(...a){return super.concat.apply(this,a)}prepend(...a){return a.length===1&&Array.isArray(a[0])?new Ql(...a[0].concat(this)):new Ql(...a.concat(this))}};function C1(n){return La(n)?Xb(n,()=>{}):n}function Yo(n,a,i){return n.has(a)?n.get(a):n.set(a,i(a)).get(a)}function Sx(n){return typeof n=="boolean"}var Tx=()=>function(a){const{thunk:i=!0,immutableCheck:l=!0,serializableCheck:o=!0,actionCreatorCheck:c=!0}=a??{};let d=new Qb;return i&&(Sx(i)?d.push(bx):d.push(_x(i.extraArgument))),d},Ax="RTK_autoBatch",R1=n=>a=>{setTimeout(a,n)},Ox=(n={type:"raf"})=>a=>(...i)=>{const l=a(...i);let o=!0,c=!1,d=!1;const h=new Set,m=n.type==="tick"?queueMicrotask:n.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:R1(10):n.type==="callback"?n.queueNotification:R1(n.timeout),g=()=>{d=!1,c&&(c=!1,h.forEach(v=>v()))};return Object.assign({},l,{subscribe(v){const E=()=>o&&v(),S=l.subscribe(E);return h.add(v),()=>{S(),h.delete(v)}},dispatch(v){try{return o=!v?.meta?.[Ax],c=!o,c&&(d||(d=!0,m(g))),l.dispatch(v)}finally{o=!0}}})},xx=n=>function(i){const{autoBatch:l=!0}=i??{};let o=new Qb(n);return l&&o.push(Ox(typeof l=="object"?l:void 0)),o};function Cx(n){const a=Tx(),{reducer:i=void 0,middleware:l,devTools:o=!0,preloadedState:c=void 0,enhancers:d=void 0}=n||{};let h;if(typeof i=="function")h=i;else if(Yh(i))h=Gb(i);else throw new Error(wa(1));let m;typeof l=="function"?m=l(a):m=a();let g=fu;o&&(g=Ex({trace:!1,...typeof o=="object"&&o}));const v=sx(...m),E=xx(v);let S=typeof d=="function"?d(E):E();const w=g(...S);return zb(h,c,w)}function Kb(n){const a={},i=[];let l;const o={addCase(c,d){const h=typeof c=="string"?c:c.type;if(!h)throw new Error(wa(28));if(h in a)throw new Error(wa(29));return a[h]=d,o},addAsyncThunk(c,d){return d.pending&&(a[c.pending.type]=d.pending),d.rejected&&(a[c.rejected.type]=d.rejected),d.fulfilled&&(a[c.fulfilled.type]=d.fulfilled),d.settled&&i.push({matcher:c.settled,reducer:d.settled}),o},addMatcher(c,d){return i.push({matcher:c,reducer:d}),o},addDefaultCase(c){return l=c,o}};return n(o),[a,i,l]}function Rx(n){return typeof n=="function"}function wx(n,a){let[i,l,o]=Kb(a),c;if(Rx(n))c=()=>C1(n());else{const h=C1(n);c=()=>h}function d(h=c(),m){let g=[i[m.type],...l.filter(({matcher:v})=>v(m)).map(({reducer:v})=>v)];return g.filter(v=>!!v).length===0&&(g=[o]),g.reduce((v,E)=>{if(E)if(Fr(v)){const w=E(v,m);return w===void 0?v:w}else{if(La(v))return Xb(v,S=>E(S,m));{const S=E(v,m);if(S===void 0){if(v===null)return v;throw Error("A case reducer on a non-draftable value must not return undefined")}return S}}return v},h)}return d.getInitialState=c,d}var Nx=Symbol.for("rtk-slice-createasyncthunk");function Mx(n,a){return`${n}/${a}`}function Dx({creators:n}={}){const a=n?.asyncThunk?.[Nx];return function(l){const{name:o,reducerPath:c=o}=l;if(!o)throw new Error(wa(11));const d=(typeof l.reducers=="function"?l.reducers(Bx()):l.reducers)||{},h=Object.keys(d),m={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},g={addCase(U,G){const M=typeof U=="string"?U:U.type;if(!M)throw new Error(wa(12));if(M in m.sliceCaseReducersByType)throw new Error(wa(13));return m.sliceCaseReducersByType[M]=G,g},addMatcher(U,G){return m.sliceMatchers.push({matcher:U,reducer:G}),g},exposeAction(U,G){return m.actionCreators[U]=G,g},exposeCaseReducer(U,G){return m.sliceCaseReducersByName[U]=G,g}};h.forEach(U=>{const G=d[U],M={reducerName:U,type:Mx(o,U),createNotation:typeof l.reducers=="function"};jx(G)?Ix(M,G,g,a):Ux(M,G,g)});function v(){const[U={},G=[],M=void 0]=typeof l.extraReducers=="function"?Kb(l.extraReducers):[l.extraReducers],P={...U,...m.sliceCaseReducersByType};return wx(l.initialState,Q=>{for(let ae in P)Q.addCase(ae,P[ae]);for(let ae of m.sliceMatchers)Q.addMatcher(ae.matcher,ae.reducer);for(let ae of G)Q.addMatcher(ae.matcher,ae.reducer);M&&Q.addDefaultCase(M)})}const E=U=>U,S=new Map,w=new WeakMap;let _;function x(U,G){return _||(_=v()),_(U,G)}function T(){return _||(_=v()),_.getInitialState()}function D(U,G=!1){function M(Q){let ae=Q[U];return typeof ae>"u"&&G&&(ae=Yo(w,M,T)),ae}function P(Q=E){const ae=Yo(S,G,()=>new WeakMap);return Yo(ae,Q,()=>{const Be={};for(const[He,ge]of Object.entries(l.selectors??{}))Be[He]=Lx(ge,Q,()=>Yo(w,Q,T),G);return Be})}return{reducerPath:U,getSelectors:P,get selectors(){return P(M)},selectSlice:M}}const z={name:o,reducer:x,actions:m.actionCreators,caseReducers:m.sliceCaseReducersByName,getInitialState:T,...D(c),injectInto(U,{reducerPath:G,...M}={}){const P=G??c;return U.inject({reducerPath:P,reducer:x},M),{...z,...D(P,!0)}}};return z}}function Lx(n,a,i,l){function o(c,...d){let h=a(c);return typeof h>"u"&&l&&(h=i()),n(h,...d)}return o.unwrapped=n,o}var Zh=Dx();function Bx(){function n(a,i){return{_reducerDefinitionType:"asyncThunk",payloadCreator:a,...i}}return n.withTypes=()=>n,{reducer(a){return Object.assign({[a.name](...i){return a(...i)}}[a.name],{_reducerDefinitionType:"reducer"})},preparedReducer(a,i){return{_reducerDefinitionType:"reducerWithPrepare",prepare:a,reducer:i}},asyncThunk:n}}function Ux({type:n,reducerName:a,createNotation:i},l,o){let c,d;if("reducer"in l){if(i&&!Hx(l))throw new Error(wa(17));c=l.reducer,d=l.prepare}else c=l;o.addCase(n,c).exposeCaseReducer(a,c).exposeAction(a,d?x1(n,d):x1(n))}function jx(n){return n._reducerDefinitionType==="asyncThunk"}function Hx(n){return n._reducerDefinitionType==="reducerWithPrepare"}function Ix({type:n,reducerName:a},i,l,o){if(!o)throw new Error(wa(18));const{payloadCreator:c,fulfilled:d,pending:h,rejected:m,settled:g,options:v}=i,E=o(n,c,v);l.exposeAction(a,E),d&&l.addCase(E.fulfilled,d),h&&l.addCase(E.pending,h),m&&l.addCase(E.rejected,m),g&&l.addMatcher(E.settled,g),l.exposeCaseReducer(a,{fulfilled:d||Po,pending:h||Po,rejected:m||Po,settled:g||Po})}function Po(){}function wa(n){return`Minified Redux Toolkit error #${n}; visit https://redux-toolkit.js.org/Errors?code=${n} for the full message or use the non-minified dev environment for full errors. `}const zx={formValues:{}},$b=Zh({name:"start-screen",initialState:zx,reducers:{showStartScreen(n){n.startScreenStatus="VISIBLE",n.formValues={}},startChat(n,a){n.startScreenStatus="HIDDEN",n.formValues=a.payload.formValues},startAuthenticatedChat(n,a){n.startScreenStatus="HIDDEN",n.loginToken=a.payload.loginToken,n.loginRequestToken=void 0},requestLogin(n,a){n.loginRequestToken=a.payload.loginRequestToken,n.formValues=a.payload.formValues},loginWindowClosed(n){n.loginRequestToken=void 0}}}),{startChat:Gx,startAuthenticatedChat:kx,showStartScreen:qx,requestLogin:Fx,loginWindowClosed:Vx}=$b.actions,Yx=$b.reducer,Wb="RESET_CHAT_STATE",Jb="TOGGLE_TRANSCRIPT_MAIL_OVERLAY",e_="SHOW_CONVERSATION_RATING_OVERLAY",t_="HIDE_CONVERSATION_RATING_OVERLAY",n_=()=>({type:Bb}),Px=()=>({type:Wb}),a_=()=>({type:Jb}),pu=(n,a=void 0)=>({type:e_,payload:{opener:n,defaultRating:a}}),Xx=()=>({type:t_}),w1=(n,a,i)=>(l,o)=>{try{const c=o().connection.sessionId;if(!c)throw new Error("Session ID is not available");l({type:qh,payload:{chunkId:i}}),N1(n,c,a,i,!1,l),N1(n,c,a,i,!0,l)}catch(c){console.error("Error loading source infos:",c),l({type:kh})}},N1=(n,a,i,l,o,c)=>{const d=`/${n}/me/chat-widget/transcript/${i}/chunks/${l}?highlight=${o}`;fetch(d,{headers:{"x-bubble-chat-session-id":a}}).then(h=>{if(!h.ok)throw new Error(`HTTP error! Status: ${h.status}`);return h.json()}).then(h=>{const m={...h,chunkId:l,highlighted:o};c({type:Db,payload:m})}).catch(h=>{console.error("Error fetching source infos:",h),c({type:kh,payload:{highlighted:o}})})},Zx=()=>({type:Fh}),Qh="CONNECT",Kh="CONNECTING",$h="CONNECTED",Wh="DISCONNECTED",Jh="RECONNECTED",em="RESTORE_SESSION_ID",xu="START",Cu="CLEAR_SESSION_ID",Qx=[Qh,Kh,$h,Wh,Jh,em],Kx=(n,a)=>({type:Qh,clientName:n,querystrings:a}),$x=n=>({type:em,sessionId:n}),Wx=()=>({type:Kh}),Jx=()=>({type:$h}),eC=()=>({type:Wh}),tC=()=>({type:Jh}),r_=n=>(a,i)=>{const l=i().connection,{formValues:o,loginToken:c}=i().startScreen;let d=l.sessionId;d===void 0&&(d=uu());let h=l.userId;if(h===void 0){const g=Fo.get("bubble-chat-user-id")||Fo.get("bubble-chat-userId")||Fo.get("bf-webclient-userId");h=g||uu(),Fo.set("bubble-chat-user-id",h)}const m=Lh.parse(i().connection.queryString||"");a({type:xu,payload:{sessionId:d,userId:h,clientName:n,loginToken:c,querystrings:{...m,...o}}})},ls=()=>(n,a)=>{const i=a().connection.sessionId||"";if(n(nC(i)),n(Px()),a().settings.enableStartScreen)n(qx());else{const l=Vh();return n(r_(l))}},nC=n=>({type:Cu,payload:{sessionId:n}}),tt=()=>{const n=Su();return i=>{const l=n.formatMessage({id:i});return l===i?void 0:l}};var kr=(n=>(n[n.CONNECTING=0]="CONNECTING",n[n.CONNECTED=1]="CONNECTED",n[n.RECONNECTED=2]="RECONNECTED",n[n.DISCONNECTED=3]="DISCONNECTED",n))(kr||{}),gu=(n=>(n.GUEST="GUEST",n.BOT="BOT",n.PERSON="PERSON",n))(gu||{});const aC="_container_q2uun_1",rC="_chatcontent_q2uun_6",iC="_accessabilityHidden_q2uun_12",yd={container:aC,chatcontent:rC,accessabilityHidden:iC},lC="_messageContainer_ofi0g_1",sC="_messages_ofi0g_12",M1={messageContainer:lC,messages:sC};function Wn(){return Wn=Object.assign?Object.assign.bind():function(n){for(var a=1;a<arguments.length;a++){var i=arguments[a];for(var l in i)({}).hasOwnProperty.call(i,l)&&(n[l]=i[l])}return n},Wn.apply(null,arguments)}const Xo=["strong","em","del","mark"],D1=[["**",Xo[0]],["__",Xo[0]],["~~",Xo[2]],["==",Xo[3]],["*","em"],["_","em"]];function oC(n,a){for(var i=1,l=a+1;l<n.length&&i>0;)n[l]!=="\\"?(n[l]==="["&&i++,n[l]==="]"&&i--,l++):l+=2;if(i===0&&l<n.length&&(n[l]==="("||n[l]==="[")){var o=n[l]==="("?")":"]",c=1;for(l++;l<n.length&&c>0;)n[l]!=="\\"?(n[l]==="("&&o===")"&&c++,n[l]===o&&c--,l++):l+=2;if(c===0)return l}return-1}function uC(n,a){if(!a||!a.inline&&!a.simple)return null;var i=n[0];if(i!=="*"&&i!=="_"&&i!=="~"&&i!=="=")return null;for(var l="",o=0,c="",d=0;d<6;d++){var h=D1[d][0];if(n.startsWith(h)&&n.length>=2*h.length){l=h,o=h.length,c=D1[d][1];break}}if(!l)return null;for(var m=o,g=!1,v=!1,E="",S=0,w="",_=!1,x="";m<n.length;){var T=n[m];if(_)w+=T,_=!1,x=T,m++;else if(T!=="\\")if(T!=="`"||S!==0){if(T==="["&&!g&&S===0){var D=oC(n,m);if(D!==-1){w+=n.slice(m,D),m=D,x=n[D-1];continue}}if(v)w+=T,E?T===E&&(E=""):T==='"'||T==="'"?E=T:T===">"&&(v=!1),x=T,m++;else if(T!=="<"||g){if(T===`
94
94
  `&&x===`
95
95
  `&&!g&&S===0)return null;if(!g&&S===0){for(var z=0;m+z<n.length&&n[m+z]===l[0];)z++;if(z>=o&&(o!==1||l!=="*"&&l!=="_"||n[m-1]!==l&&n[m+1]!==l)){var U=[n.slice(0,m+z),c,w+n.slice(m+o,m+z)];return U.index=0,U.input=n,U}}w+=T,x=T,m++}else{var G=n[m+1],M=n.indexOf(">",m);if(M!==-1){var P=n.slice(m,M+1).endsWith("/>");G==="/"?S=Math.max(0,S-1):P||S++}v=!0,w+=T,x=T,m++}}else g=!g,w+=T,x=T,m++;else w+=T,_=!0,x=T,m++}return null}const cC=["children","options"],fC={footnoteReference:"7"},L1=["allowFullScreen","allowTransparency","autoComplete","autoFocus","autoPlay","cellPadding","cellSpacing","charSet","classId","colSpan","contentEditable","contextMenu","crossOrigin","encType","formAction","formEncType","formMethod","formNoValidate","formTarget","frameBorder","hrefLang","inputMode","keyParams","keyType","marginHeight","marginWidth","maxLength","mediaGroup","minLength","noValidate","radioGroup","readOnly","rowSpan","spellCheck","srcDoc","srcLang","srcSet","tabIndex","useMap"].reduce((n,a)=>(n[a.toLowerCase()]=a,n),{class:"className",for:"htmlFor"}),B1={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},dC=["style","script","pre"],hC=["src","href","data","formAction","srcDoc","action"],mC=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,pC=/\n{2,}$/,U1=/^(\s*>[\s\S]*?)(?=\n\n|$)/,gC=/^ *> ?/gm,yC=/^(?:\[!([^\]]*)\]\n)?([\s\S]*)/,vC=/^ {2,}\n/,bC=/^(?:([-*_])( *\1){2,}) *(?:\n *)+\n/,j1=/^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/,H1=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,_C=/^(`+)((?:\\`|(?!\1)`|[^`])+)\1/,EC=/^(?:\n *)*\n/,SC=/\r\n?/g,TC=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,AC=/^\[\^([^\]]+)]/,OC=/\f/g,xC=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,CC=/^\[(x|\s)\]/,I1=/^(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,z1=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,G1=/^([^\n]+)\n *(=|-)\2{2,} *\n/,tm=/^<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>/i;function RC(n){const a=tm.exec(n);if(!a)return null;const i=a[1],l=i.toLowerCase(),o=l.length+1;let c=a[0].length;n[c]===`
96
96
  `&&c++;const d=c;let h=c,m=1;const g=n.length;for(;m>0;){const E=n.indexOf("<",c);if(E===-1)return null;let S=-1,w=-1;if(n[E+1]==="/")w=E;else if(n[E+1]===l[0]||n[E+1]===i[0]){let _=!0;for(let x=0;x<l.length;x++){const T=n[E+1+x];if(T!==l[x]&&T!==i[x]){_=!1;break}}!_||n[E+o]!==" "&&n[E+o]!==">"||(S=E)}if(S!==-1||w!==-1)if(S!==-1&&(w===-1||S<w))c=S+o+1,m++;else{let _=w+2;for(;_<g;){const T=n[_];if(T!==" "&&T!==" "&&T!==`
@@ -128,4 +128,4 @@ For more details see https://formatjs.github.io/docs/getting-started/message-dis
128
128
 
129
129
  - La cronologia delle chat è memorizzata nell'area UE e può essere visualizzata solo da persone autorizzate.
130
130
  - Non inserire dati personali nella finestra di chat (password, data di nascita, ecc.).`,"general-conditions.accept-conditions-note":"Utilizzando la chat si accettano le condizioni d'uso.","block-user-input.title":"Attendere la risposta del chatbot.","conversation-rating.call-to-action.title":"Valuta questa chat","conversation-rating.overlay.title":"Quanto sei soddisfatto di questa chat?","conversation-rating.overlay.guest-feedback.input-placeholder":"Inserisci qui il tuo feedback (opzionale)","conversation-rating.overlay.star.very-bad":"Molto male","conversation-rating.overlay.star.very-good":"Molto buono","conversation-rating.overlay.bot-message.rate-feedback.value-1":"Oh, non suona bene. Vi prego di darmi un feedback in modo che possa imparare di più.","conversation-rating.overlay.bot-message.rate-feedback.value-2":"Oh, non suona bene. Vi prego di darmi un feedback in modo che possa imparare di più.","conversation-rating.overlay.bot-message.rate-feedback.value-3":"La media non è il mio obiettivo, cosa posso ancora migliorare?","conversation-rating.overlay.bot-message.rate-feedback.value-4":"Anche l'assenza è finita. Cosa posso migliorare per ottenere tutte le stelle la prossima volta?","conversation-rating.overlay.bot-message.rate-feedback.value-5":"Perfetto! Allora spero di potervi consigliare ancora una volta bene.","conversation-rating.overlay.bot-message.submit-feedback":"Grazie mille per il feedback. Mi impegno costantemente per migliorare.","conversation-rating.overlay.action.submit":"Invia","conversation-rating.overlay.action.back-to-chat":"Chiudere","conversation-rating.overlay.action.close-chat":"Minimizzare la chat","conversation-rating.overlay.action.restart-chat":"Riavviare la chat","conversation-rating.overlay.action.cancel":"Annulla","start-screen.intro":"","start-screen.start-chat":"Avviare la chat","start-screen.waiting-for-login":"In attesa di login ...","header.close-chat":"Minimizzare la chat","header.menu.title":"Menu","header.menu.restart-chat":"Riavviare la chat","header.menu.expand-chat-window":"Espandere la finestra","header.menu.download-transcript":"Scaricare la trascrizione","header.menu.send-transcript":"Inviare la trascrizione","header.menu.export-transcript":"Esportare la trascrizione","header.menu.rate-conversation":"Valutare la conversazione","source-infos.close":"Chiudere","source-infos.open-source":"Fonte aperta","source-infos.error.title":"Errore","source-infos.error.info":"Ops! Qualcosa è andato storto. Riprovare o contattare l'assistenza se il problema persiste.","source-infos.highlight-loading.title":"Il contenuto rilevante è evidenziato...","source-infos.highlight-loading.description":"Un momento - la fonte è in fase di analisi","commands.show-more.action":"Di più","commands.show-more.tooltip":"Mostra più comandi","commands.show-less.action":"Meno","commands.show-less.tooltip":"Mostra meno comandi"},j8=["de","en","fr","it"],D_={locale:"de",messages:M_},H8=(n,a)=>{if(j8.includes(n)){const i=I8(n),l=D8(a);return{...i,...l}}return a},I8=n=>{switch(n.toString()){case"en":return L8;case"fr":return B8;case"it":return U8;default:return M_}},z8=(n=G8,a)=>{switch(a.type){case Kh:return Object.assign({},n,{connectionState:kr.CONNECTING});case $h:return Object.assign({},n,{connectionState:kr.CONNECTED});case Wh:return Object.assign({},n,{connectionState:kr.DISCONNECTED});case Jh:return Object.assign({},n,{connectionState:kr.RECONNECTED});case em:return Object.assign({},n,{sessionId:a.sessionId});case xu:return Object.assign({},n,{sessionId:a.payload.sessionId,userId:a.payload.userId});case Cu:return Object.assign({},n,{sessionId:void 0});default:return n}},G8={connectionState:kr.DISCONNECTED,sessionId:void 0,userId:void 0,queryString:window.location.search},k8=(n=Lv,a)=>{switch(a.type){case Wb:return Lv;case xu:return Ir({type:"webclient.chat.started"}),n;case Cu:return Ir({type:"webclient.chat.ended"}),n;case Te.ActionTypes.TYPING_ON:return Object.assign({},n,{isBotTyping:!0});case Te.ActionTypes.TYPING_OFF:return Object.assign({},n,{isBotTyping:!1});case Te.ActionTypes.MESSAGE_FROM_GUEST:case Te.ActionTypes.MESSAGE_WITHOUT_ANALYSIS_FROM_GUEST:return Dv(n,a.message);case Te.ActionTypes.MESSAGE_TO_GUEST:{Ir(a);const i=Object.assign({},a.message,{_id:a.meta.actionId}),l=n.messages.filter(o=>o._id===a.meta.actionId).length>0;return Object.assign({},n,{isBotTyping:!1,messages:l?n.messages:n.messages.concat([i]),quickReplies:i.quickReplies?i.quickReplies:[]})}case Hh:{const i=a.messages,l=i.length?i[i.length-1]:void 0;return Object.assign({},n,{isBotTyping:!1,messages:i,quickReplies:l?.quickReplies||[]})}case jh:return Ir(a.message),n;case Te.ActionTypes.EVENT_TO_GUEST:return Ir(a.event),n;case Te.ActionTypes.DRAWER_OPEN:return Object.assign({},n,{drawerContentUrl:a.payload.parameters.contentUrl});case Te.ActionTypes.DRAWER_CLOSE:return Object.assign({},n,{drawerContentUrl:void 0});case Te.ActionTypes.GUEST_LOCALE_CHANGED:return Object.assign({},n,{locale:a.payload.locale});case Lb:return Ir(a),n;case Bb:return Ir(a),{...n,conversationRating:{...n.conversationRating,opener:void 0}};case zh:{const i=new Te.TextMessage(a.transcription,new Te.GuestUser),l=Object.assign({},i,{_id:uu()});return Dv(n,l)}case Te.ActionTypes.TRANSCRIPT_ITEM_GUEST_REACTION:{const i=n.messages.map(l=>l._id===a.payload.actionId?Object.assign({},l,a.payload.reaction?{reaction:{type:a.payload.reaction,category:a.payload.category,comment:a.payload.comment}}:{reaction:void 0}):l);return Object.assign({},n,{messages:i})}case Gh:{const i={enabled:!0,rating:a.payload.rating};return Object.assign({},n,{conversationRating:i})}case Te.ActionTypes.CONVERSATION_RATING_FROM_GUEST:{const i={...n.conversationRating,rating:a.payload};return Object.assign({},n,{conversationRating:i})}case e_:{const i={...n.conversationRating,opener:a.payload.opener,...a.payload.defaultRating?{rating:{value:a.payload.defaultRating,feedback:n.conversationRating.rating?.feedback||""}}:{}};return Object.assign({},n,{conversationRating:i})}case t_:{const i={...n.conversationRating,opener:void 0};return Object.assign({},n,{conversationRating:i})}case qh:return{...n,sourceInfos:{type:"loading",chunkId:a.payload.chunkId}};case kh:{const{highlighted:i}=a.payload;return n.sourceInfos?.type==="loaded"&&i?{...n,sourceInfos:{...n.sourceInfos,highlighted:!0}}:{...n,sourceInfos:{type:"loading-error"}}}case Db:{const i=n.sourceInfos?.type,{chunkId:l,knowledgeBaseType:o,title:c,content:d,highlighted:h,url:m}=a.payload,g=n.sourceInfos?.type==="loading"||n.sourceInfos?.type==="loaded"?n.sourceInfos?.chunkId:void 0;return g&&g!==l?n:i==="loading"||i==="loaded"&&h?{...n,sourceInfos:{type:"loaded",chunkId:l,knowledgeBaseType:o,title:c,content:d,highlighted:h,url:m}}:n}case Fh:return{...n,sourceInfos:void 0};case Jb:return{...n,showTranscriptMailOverlay:!n.showTranscriptMailOverlay,conversationRating:{...n.conversationRating,opener:void 0}};default:return n}},Dv=(n,a)=>{const i=n.messages[n.messages.length-1],l=i?.text===a.text;return i&&i.sender.type===a.sender.type&&l?n:Object.assign({},n,{messages:n.messages.concat([a]),quickReplies:[]})},Ir=n=>{q8()?window.top?.postMessage(n,"*"):n.type==="webclient.change.url"&&window.open(n.url)},q8=()=>typeof window<"u"&&window.self!==window.top,Lv={messages:[],quickReplies:[],isBotTyping:!1,showTranscriptMailOverlay:!1,conversationRating:{enabled:!1}},L_=Zh({name:"intl",initialState:D_,reducers:{updateIntl:(n,a)=>{n.locale=a.payload.language,n.messages=a.payload.messages}}}),{updateIntl:F8}=L_.actions,V8=L_.reducer,Y8={version:void 0,requiresUserAuthentication:!1,enableStartScreen:void 0,enableStandaloneView:!1,enableTranscriptExportEmail:!1,enableTranscriptExportPdf:!1,enableGeneralConditions:!1,enableSpeechSupport:!1,commands:[],menuItems:[]},B_=Zh({name:"settings",initialState:Y8,reducers:{setSettings(n,a){n.version&&n.version!==a.payload.version?(console.log("version changed, reloading chat window"),window.location.reload()):(n.version=a.payload.version,n.requiresUserAuthentication=a.payload.requiresUserAuthentication,n.enableStartScreen=a.payload.enableStartScreen,n.enableStandaloneView=a.payload.enableStandaloneView,n.enableTranscriptExportEmail=a.payload.enableTranscriptExportEmail,n.enableTranscriptExportPdf=a.payload.enableTranscriptExportPdf,n.enableGeneralConditions=a.payload.enableGeneralConditions,n.enableSpeechSupport=a.payload.enableSpeechSupport,n.commands=a.payload.commands,n.menuItems=a.payload.menuItems||[])}}}),{setSettings:P8}=B_.actions,X8=B_.reducer,Z8=Gb({settings:X8,chat:k8,startScreen:Yx,connection:z8,intl:V8}),Q8="bubble-chat",U_="state-last-saved-at",j_="state",K8=n=>{try{if(!J8())return;const a=Bv(n,U_);if(W8(a))return;{const i=Bv(n,j_);if(i===null)return;const l=JSON.parse(i),o=l.connection?.queryString;if(o!==void 0&&o!==window.location.search){console.log("Ignoring persisted state due to different query string");return}else return l}}catch(a){console.error(a);return}},$8=(n,a)=>{try{const i=JSON.stringify(a);Uv(n,j_,i);const l=new Date().toISOString();Uv(n,U_,l)}catch(i){console.error(i)}},W8=n=>{if(n===null)return!1;const a=new Date(n);return a.setHours(a.getHours()+12),new Date>a},J8=()=>typeof localStorage<"u",Bv=(n,a)=>{const i=H_(n,a);return localStorage.getItem(i)},Uv=(n,a,i)=>{const l=H_(n,a);return localStorage.setItem(l,i)},H_=(n,a)=>`${Q8}-${n}-${a}`,ta=Object.create(null);ta.open="0";ta.close="1";ta.ping="2";ta.pong="3";ta.message="4";ta.upgrade="5";ta.noop="6";const ru=Object.create(null);Object.keys(ta).forEach(n=>{ru[ta[n]]=n});const bh={type:"error",data:"parser error"},I_=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",z_=typeof ArrayBuffer=="function",G_=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n&&n.buffer instanceof ArrayBuffer,om=({type:n,data:a},i,l)=>I_&&a instanceof Blob?i?l(a):jv(a,l):z_&&(a instanceof ArrayBuffer||G_(a))?i?l(a):jv(new Blob([a]),l):l(ta[n]+(a||"")),jv=(n,a)=>{const i=new FileReader;return i.onload=function(){const l=i.result.split(",")[1];a("b"+(l||""))},i.readAsDataURL(n)};function Hv(n){return n instanceof Uint8Array?n:n instanceof ArrayBuffer?new Uint8Array(n):new Uint8Array(n.buffer,n.byteOffset,n.byteLength)}let Vd;function eM(n,a){if(I_&&n.data instanceof Blob)return n.data.arrayBuffer().then(Hv).then(a);if(z_&&(n.data instanceof ArrayBuffer||G_(n.data)))return a(Hv(n.data));om(n,!1,i=>{Vd||(Vd=new TextEncoder),a(Vd.encode(i))})}const Iv="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",$l=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let n=0;n<Iv.length;n++)$l[Iv.charCodeAt(n)]=n;const tM=n=>{let a=n.length*.75,i=n.length,l,o=0,c,d,h,m;n[n.length-1]==="="&&(a--,n[n.length-2]==="="&&a--);const g=new ArrayBuffer(a),v=new Uint8Array(g);for(l=0;l<i;l+=4)c=$l[n.charCodeAt(l)],d=$l[n.charCodeAt(l+1)],h=$l[n.charCodeAt(l+2)],m=$l[n.charCodeAt(l+3)],v[o++]=c<<2|d>>4,v[o++]=(d&15)<<4|h>>2,v[o++]=(h&3)<<6|m&63;return g},nM=typeof ArrayBuffer=="function",um=(n,a)=>{if(typeof n!="string")return{type:"message",data:k_(n,a)};const i=n.charAt(0);return i==="b"?{type:"message",data:aM(n.substring(1),a)}:ru[i]?n.length>1?{type:ru[i],data:n.substring(1)}:{type:ru[i]}:bh},aM=(n,a)=>{if(nM){const i=tM(n);return k_(i,a)}else return{base64:!0,data:n}},k_=(n,a)=>{switch(a){case"blob":return n instanceof Blob?n:new Blob([n]);case"arraybuffer":default:return n instanceof ArrayBuffer?n:n.buffer}},q_="",rM=(n,a)=>{const i=n.length,l=new Array(i);let o=0;n.forEach((c,d)=>{om(c,!1,h=>{l[d]=h,++o===i&&a(l.join(q_))})})},iM=(n,a)=>{const i=n.split(q_),l=[];for(let o=0;o<i.length;o++){const c=um(i[o],a);if(l.push(c),c.type==="error")break}return l};function lM(){return new TransformStream({transform(n,a){eM(n,i=>{const l=i.length;let o;if(l<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,l);else if(l<65536){o=new Uint8Array(3);const c=new DataView(o.buffer);c.setUint8(0,126),c.setUint16(1,l)}else{o=new Uint8Array(9);const c=new DataView(o.buffer);c.setUint8(0,127),c.setBigUint64(1,BigInt(l))}n.data&&typeof n.data!="string"&&(o[0]|=128),a.enqueue(o),a.enqueue(i)})}})}let Yd;function Jo(n){return n.reduce((a,i)=>a+i.length,0)}function eu(n,a){if(n[0].length===a)return n.shift();const i=new Uint8Array(a);let l=0;for(let o=0;o<a;o++)i[o]=n[0][l++],l===n[0].length&&(n.shift(),l=0);return n.length&&l<n[0].length&&(n[0]=n[0].slice(l)),i}function sM(n,a){Yd||(Yd=new TextDecoder);const i=[];let l=0,o=-1,c=!1;return new TransformStream({transform(d,h){for(i.push(d);;){if(l===0){if(Jo(i)<1)break;const m=eu(i,1);c=(m[0]&128)===128,o=m[0]&127,o<126?l=3:o===126?l=1:l=2}else if(l===1){if(Jo(i)<2)break;const m=eu(i,2);o=new DataView(m.buffer,m.byteOffset,m.length).getUint16(0),l=3}else if(l===2){if(Jo(i)<8)break;const m=eu(i,8),g=new DataView(m.buffer,m.byteOffset,m.length),v=g.getUint32(0);if(v>Math.pow(2,21)-1){h.enqueue(bh);break}o=v*Math.pow(2,32)+g.getUint32(4),l=3}else{if(Jo(i)<o)break;const m=eu(i,o);h.enqueue(um(c?m:Yd.decode(m),a)),l=0}if(o===0||o>n){h.enqueue(bh);break}}}})}const F_=4;function vt(n){if(n)return oM(n)}function oM(n){for(var a in vt.prototype)n[a]=vt.prototype[a];return n}vt.prototype.on=vt.prototype.addEventListener=function(n,a){return this._callbacks=this._callbacks||{},(this._callbacks["$"+n]=this._callbacks["$"+n]||[]).push(a),this};vt.prototype.once=function(n,a){function i(){this.off(n,i),a.apply(this,arguments)}return i.fn=a,this.on(n,i),this};vt.prototype.off=vt.prototype.removeListener=vt.prototype.removeAllListeners=vt.prototype.removeEventListener=function(n,a){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var i=this._callbacks["$"+n];if(!i)return this;if(arguments.length==1)return delete this._callbacks["$"+n],this;for(var l,o=0;o<i.length;o++)if(l=i[o],l===a||l.fn===a){i.splice(o,1);break}return i.length===0&&delete this._callbacks["$"+n],this};vt.prototype.emit=function(n){this._callbacks=this._callbacks||{};for(var a=new Array(arguments.length-1),i=this._callbacks["$"+n],l=1;l<arguments.length;l++)a[l-1]=arguments[l];if(i){i=i.slice(0);for(var l=0,o=i.length;l<o;++l)i[l].apply(this,a)}return this};vt.prototype.emitReserved=vt.prototype.emit;vt.prototype.listeners=function(n){return this._callbacks=this._callbacks||{},this._callbacks["$"+n]||[]};vt.prototype.hasListeners=function(n){return!!this.listeners(n).length};const wu=typeof Promise=="function"&&typeof Promise.resolve=="function"?a=>Promise.resolve().then(a):(a,i)=>i(a,0),On=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),uM="arraybuffer";function V_(n,...a){return a.reduce((i,l)=>(n.hasOwnProperty(l)&&(i[l]=n[l]),i),{})}const cM=On.setTimeout,fM=On.clearTimeout;function Nu(n,a){a.useNativeTimers?(n.setTimeoutFn=cM.bind(On),n.clearTimeoutFn=fM.bind(On)):(n.setTimeoutFn=On.setTimeout.bind(On),n.clearTimeoutFn=On.clearTimeout.bind(On))}const dM=1.33;function hM(n){return typeof n=="string"?mM(n):Math.ceil((n.byteLength||n.size)*dM)}function mM(n){let a=0,i=0;for(let l=0,o=n.length;l<o;l++)a=n.charCodeAt(l),a<128?i+=1:a<2048?i+=2:a<55296||a>=57344?i+=3:(l++,i+=4);return i}function Y_(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function pM(n){let a="";for(let i in n)n.hasOwnProperty(i)&&(a.length&&(a+="&"),a+=encodeURIComponent(i)+"="+encodeURIComponent(n[i]));return a}function gM(n){let a={},i=n.split("&");for(let l=0,o=i.length;l<o;l++){let c=i[l].split("=");a[decodeURIComponent(c[0])]=decodeURIComponent(c[1])}return a}class yM extends Error{constructor(a,i,l){super(a),this.description=i,this.context=l,this.type="TransportError"}}class cm extends vt{constructor(a){super(),this.writable=!1,Nu(this,a),this.opts=a,this.query=a.query,this.socket=a.socket,this.supportsBinary=!a.forceBase64}onError(a,i,l){return super.emitReserved("error",new yM(a,i,l)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(a){this.readyState==="open"&&this.write(a)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(a){const i=um(a,this.socket.binaryType);this.onPacket(i)}onPacket(a){super.emitReserved("packet",a)}onClose(a){this.readyState="closed",super.emitReserved("close",a)}pause(a){}createUri(a,i={}){return a+"://"+this._hostname()+this._port()+this.opts.path+this._query(i)}_hostname(){const a=this.opts.hostname;return a.indexOf(":")===-1?a:"["+a+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(a){const i=pM(a);return i.length?"?"+i:""}}class vM extends cm{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(a){this.readyState="pausing";const i=()=>{this.readyState="paused",a()};if(this._polling||!this.writable){let l=0;this._polling&&(l++,this.once("pollComplete",function(){--l||i()})),this.writable||(l++,this.once("drain",function(){--l||i()}))}else i()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(a){const i=l=>{if(this.readyState==="opening"&&l.type==="open"&&this.onOpen(),l.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(l)};iM(a,this.socket.binaryType).forEach(i),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const a=()=>{this.write([{type:"close"}])};this.readyState==="open"?a():this.once("open",a)}write(a){this.writable=!1,rM(a,i=>{this.doWrite(i,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const a=this.opts.secure?"https":"http",i=this.query||{};return this.opts.timestampRequests!==!1&&(i[this.opts.timestampParam]=Y_()),!this.supportsBinary&&!i.sid&&(i.b64=1),this.createUri(a,i)}}let P_=!1;try{P_=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const bM=P_;function _M(){}class EM extends vM{constructor(a){if(super(a),typeof location<"u"){const i=location.protocol==="https:";let l=location.port;l||(l=i?"443":"80"),this.xd=typeof location<"u"&&a.hostname!==location.hostname||l!==a.port}}doWrite(a,i){const l=this.request({method:"POST",data:a});l.on("success",i),l.on("error",(o,c)=>{this.onError("xhr post error",o,c)})}doPoll(){const a=this.request();a.on("data",this.onData.bind(this)),a.on("error",(i,l)=>{this.onError("xhr poll error",i,l)}),this.pollXhr=a}}class Jn extends vt{constructor(a,i,l){super(),this.createRequest=a,Nu(this,l),this._opts=l,this._method=l.method||"GET",this._uri=i,this._data=l.data!==void 0?l.data:null,this._create()}_create(){var a;const i=V_(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");i.xdomain=!!this._opts.xd;const l=this._xhr=this.createRequest(i);try{l.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){l.setDisableHeaderCheck&&l.setDisableHeaderCheck(!0);for(let o in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(o)&&l.setRequestHeader(o,this._opts.extraHeaders[o])}}catch{}if(this._method==="POST")try{l.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{l.setRequestHeader("Accept","*/*")}catch{}(a=this._opts.cookieJar)===null||a===void 0||a.addCookies(l),"withCredentials"in l&&(l.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(l.timeout=this._opts.requestTimeout),l.onreadystatechange=()=>{var o;l.readyState===3&&((o=this._opts.cookieJar)===null||o===void 0||o.parseCookies(l.getResponseHeader("set-cookie"))),l.readyState===4&&(l.status===200||l.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof l.status=="number"?l.status:0)},0))},l.send(this._data)}catch(o){this.setTimeoutFn(()=>{this._onError(o)},0);return}typeof document<"u"&&(this._index=Jn.requestsCount++,Jn.requests[this._index]=this)}_onError(a){this.emitReserved("error",a,this._xhr),this._cleanup(!0)}_cleanup(a){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=_M,a)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Jn.requests[this._index],this._xhr=null}}_onLoad(){const a=this._xhr.responseText;a!==null&&(this.emitReserved("data",a),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}Jn.requestsCount=0;Jn.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",zv);else if(typeof addEventListener=="function"){const n="onpagehide"in On?"pagehide":"unload";addEventListener(n,zv,!1)}}function zv(){for(let n in Jn.requests)Jn.requests.hasOwnProperty(n)&&Jn.requests[n].abort()}const SM=(function(){const n=X_({xdomain:!1});return n&&n.responseType!==null})();class TM extends EM{constructor(a){super(a);const i=a&&a.forceBase64;this.supportsBinary=SM&&!i}request(a={}){return Object.assign(a,{xd:this.xd},this.opts),new Jn(X_,this.uri(),a)}}function X_(n){const a=n.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!a||bM))return new XMLHttpRequest}catch{}if(!a)try{return new On[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const Z_=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class AM extends cm{get name(){return"websocket"}doOpen(){const a=this.uri(),i=this.opts.protocols,l=Z_?{}:V_(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(l.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(a,i,l)}catch(o){return this.emitReserved("error",o)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=a=>this.onClose({description:"websocket connection closed",context:a}),this.ws.onmessage=a=>this.onData(a.data),this.ws.onerror=a=>this.onError("websocket error",a)}write(a){this.writable=!1;for(let i=0;i<a.length;i++){const l=a[i],o=i===a.length-1;om(l,this.supportsBinary,c=>{try{this.doWrite(l,c)}catch{}o&&wu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const a=this.opts.secure?"wss":"ws",i=this.query||{};return this.opts.timestampRequests&&(i[this.opts.timestampParam]=Y_()),this.supportsBinary||(i.b64=1),this.createUri(a,i)}}const Pd=On.WebSocket||On.MozWebSocket;class OM extends AM{createSocket(a,i,l){return Z_?new Pd(a,i,l):i?new Pd(a,i):new Pd(a)}doWrite(a,i){this.ws.send(i)}}class xM extends cm{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(a){return this.emitReserved("error",a)}this._transport.closed.then(()=>{this.onClose()}).catch(a=>{this.onError("webtransport error",a)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(a=>{const i=sM(Number.MAX_SAFE_INTEGER,this.socket.binaryType),l=a.readable.pipeThrough(i).getReader(),o=lM();o.readable.pipeTo(a.writable),this._writer=o.writable.getWriter();const c=()=>{l.read().then(({done:h,value:m})=>{h||(this.onPacket(m),c())}).catch(h=>{})};c();const d={type:"open"};this.query.sid&&(d.data=`{"sid":"${this.query.sid}"}`),this._writer.write(d).then(()=>this.onOpen())})})}write(a){this.writable=!1;for(let i=0;i<a.length;i++){const l=a[i],o=i===a.length-1;this._writer.write(l).then(()=>{o&&wu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var a;(a=this._transport)===null||a===void 0||a.close()}}const CM={websocket:OM,webtransport:xM,polling:TM},RM=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,wM=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function _h(n){if(n.length>8e3)throw"URI too long";const a=n,i=n.indexOf("["),l=n.indexOf("]");i!=-1&&l!=-1&&(n=n.substring(0,i)+n.substring(i,l).replace(/:/g,";")+n.substring(l,n.length));let o=RM.exec(n||""),c={},d=14;for(;d--;)c[wM[d]]=o[d]||"";return i!=-1&&l!=-1&&(c.source=a,c.host=c.host.substring(1,c.host.length-1).replace(/;/g,":"),c.authority=c.authority.replace("[","").replace("]","").replace(/;/g,":"),c.ipv6uri=!0),c.pathNames=NM(c,c.path),c.queryKey=MM(c,c.query),c}function NM(n,a){const i=/\/{2,9}/g,l=a.replace(i,"/").split("/");return(a.slice(0,1)=="/"||a.length===0)&&l.splice(0,1),a.slice(-1)=="/"&&l.splice(l.length-1,1),l}function MM(n,a){const i={};return a.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(l,o,c){o&&(i[o]=c)}),i}const Eh=typeof addEventListener=="function"&&typeof removeEventListener=="function",iu=[];Eh&&addEventListener("offline",()=>{iu.forEach(n=>n())},!1);class fr extends vt{constructor(a,i){if(super(),this.binaryType=uM,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,a&&typeof a=="object"&&(i=a,a=null),a){const l=_h(a);i.hostname=l.host,i.secure=l.protocol==="https"||l.protocol==="wss",i.port=l.port,l.query&&(i.query=l.query)}else i.host&&(i.hostname=_h(i.host).host);Nu(this,i),this.secure=i.secure!=null?i.secure:typeof location<"u"&&location.protocol==="https:",i.hostname&&!i.port&&(i.port=this.secure?"443":"80"),this.hostname=i.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=i.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},i.transports.forEach(l=>{const o=l.prototype.name;this.transports.push(o),this._transportsByName[o]=l}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},i),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=gM(this.opts.query)),Eh&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},iu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(a){const i=Object.assign({},this.opts.query);i.EIO=F_,i.transport=a,this.id&&(i.sid=this.id);const l=Object.assign({},this.opts,{query:i,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[a]);return new this._transportsByName[a](l)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const a=this.opts.rememberUpgrade&&fr.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const i=this.createTransport(a);i.open(),this.setTransport(i)}setTransport(a){this.transport&&this.transport.removeAllListeners(),this.transport=a,a.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",i=>this._onClose("transport close",i))}onOpen(){this.readyState="open",fr.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(a){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",a),this.emitReserved("heartbeat"),a.type){case"open":this.onHandshake(JSON.parse(a.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const i=new Error("server error");i.code=a.data,this._onError(i);break;case"message":this.emitReserved("data",a.data),this.emitReserved("message",a.data);break}}onHandshake(a){this.emitReserved("handshake",a),this.id=a.sid,this.transport.query.sid=a.sid,this._pingInterval=a.pingInterval,this._pingTimeout=a.pingTimeout,this._maxPayload=a.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const a=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+a,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},a),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const a=this._getWritablePackets();this.transport.send(a),this._prevBufferLen=a.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let i=1;for(let l=0;l<this.writeBuffer.length;l++){const o=this.writeBuffer[l].data;if(o&&(i+=hM(o)),l>0&&i>this._maxPayload)return this.writeBuffer.slice(0,l);i+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const a=Date.now()>this._pingTimeoutTime;return a&&(this._pingTimeoutTime=0,wu(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),a}write(a,i,l){return this._sendPacket("message",a,i,l),this}send(a,i,l){return this._sendPacket("message",a,i,l),this}_sendPacket(a,i,l,o){if(typeof i=="function"&&(o=i,i=void 0),typeof l=="function"&&(o=l,l=null),this.readyState==="closing"||this.readyState==="closed")return;l=l||{},l.compress=l.compress!==!1;const c={type:a,data:i,options:l};this.emitReserved("packetCreate",c),this.writeBuffer.push(c),o&&this.once("flush",o),this.flush()}close(){const a=()=>{this._onClose("forced close"),this.transport.close()},i=()=>{this.off("upgrade",i),this.off("upgradeError",i),a()},l=()=>{this.once("upgrade",i),this.once("upgradeError",i)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?l():a()}):this.upgrading?l():a()),this}_onError(a){if(fr.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",a),this._onClose("transport error",a)}_onClose(a,i){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Eh&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const l=iu.indexOf(this._offlineEventListener);l!==-1&&iu.splice(l,1)}this.readyState="closed",this.id=null,this.emitReserved("close",a,i),this.writeBuffer=[],this._prevBufferLen=0}}}fr.protocol=F_;class DM extends fr{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let a=0;a<this._upgrades.length;a++)this._probe(this._upgrades[a])}_probe(a){let i=this.createTransport(a),l=!1;fr.priorWebsocketSuccess=!1;const o=()=>{l||(i.send([{type:"ping",data:"probe"}]),i.once("packet",E=>{if(!l)if(E.type==="pong"&&E.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",i),!i)return;fr.priorWebsocketSuccess=i.name==="websocket",this.transport.pause(()=>{l||this.readyState!=="closed"&&(v(),this.setTransport(i),i.send([{type:"upgrade"}]),this.emitReserved("upgrade",i),i=null,this.upgrading=!1,this.flush())})}else{const S=new Error("probe error");S.transport=i.name,this.emitReserved("upgradeError",S)}}))};function c(){l||(l=!0,v(),i.close(),i=null)}const d=E=>{const S=new Error("probe error: "+E);S.transport=i.name,c(),this.emitReserved("upgradeError",S)};function h(){d("transport closed")}function m(){d("socket closed")}function g(E){i&&E.name!==i.name&&c()}const v=()=>{i.removeListener("open",o),i.removeListener("error",d),i.removeListener("close",h),this.off("close",m),this.off("upgrading",g)};i.once("open",o),i.once("error",d),i.once("close",h),this.once("close",m),this.once("upgrading",g),this._upgrades.indexOf("webtransport")!==-1&&a!=="webtransport"?this.setTimeoutFn(()=>{l||i.open()},200):i.open()}onHandshake(a){this._upgrades=this._filterUpgrades(a.upgrades),super.onHandshake(a)}_filterUpgrades(a){const i=[];for(let l=0;l<a.length;l++)~this.transports.indexOf(a[l])&&i.push(a[l]);return i}}let LM=class extends DM{constructor(a,i={}){const l=typeof a=="object"?a:i;(!l.transports||l.transports&&typeof l.transports[0]=="string")&&(l.transports=(l.transports||["polling","websocket","webtransport"]).map(o=>CM[o]).filter(o=>!!o)),super(a,l)}};function BM(n,a="",i){let l=n;i=i||typeof location<"u"&&location,n==null&&(n=i.protocol+"//"+i.host),typeof n=="string"&&(n.charAt(0)==="/"&&(n.charAt(1)==="/"?n=i.protocol+n:n=i.host+n),/^(https?|wss?):\/\//.test(n)||(typeof i<"u"?n=i.protocol+"//"+n:n="https://"+n),l=_h(n)),l.port||(/^(http|ws)$/.test(l.protocol)?l.port="80":/^(http|ws)s$/.test(l.protocol)&&(l.port="443")),l.path=l.path||"/";const c=l.host.indexOf(":")!==-1?"["+l.host+"]":l.host;return l.id=l.protocol+"://"+c+":"+l.port+a,l.href=l.protocol+"://"+c+(i&&i.port===l.port?"":":"+l.port),l}const UM=typeof ArrayBuffer=="function",jM=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n.buffer instanceof ArrayBuffer,Q_=Object.prototype.toString,HM=typeof Blob=="function"||typeof Blob<"u"&&Q_.call(Blob)==="[object BlobConstructor]",IM=typeof File=="function"||typeof File<"u"&&Q_.call(File)==="[object FileConstructor]";function fm(n){return UM&&(n instanceof ArrayBuffer||jM(n))||HM&&n instanceof Blob||IM&&n instanceof File}function lu(n,a){if(!n||typeof n!="object")return!1;if(Array.isArray(n)){for(let i=0,l=n.length;i<l;i++)if(lu(n[i]))return!0;return!1}if(fm(n))return!0;if(n.toJSON&&typeof n.toJSON=="function"&&arguments.length===1)return lu(n.toJSON(),!0);for(const i in n)if(Object.prototype.hasOwnProperty.call(n,i)&&lu(n[i]))return!0;return!1}function zM(n){const a=[],i=n.data,l=n;return l.data=Sh(i,a),l.attachments=a.length,{packet:l,buffers:a}}function Sh(n,a){if(!n)return n;if(fm(n)){const i={_placeholder:!0,num:a.length};return a.push(n),i}else if(Array.isArray(n)){const i=new Array(n.length);for(let l=0;l<n.length;l++)i[l]=Sh(n[l],a);return i}else if(typeof n=="object"&&!(n instanceof Date)){const i={};for(const l in n)Object.prototype.hasOwnProperty.call(n,l)&&(i[l]=Sh(n[l],a));return i}return n}function GM(n,a){return n.data=Th(n.data,a),delete n.attachments,n}function Th(n,a){if(!n)return n;if(n&&n._placeholder===!0){if(typeof n.num=="number"&&n.num>=0&&n.num<a.length)return a[n.num];throw new Error("illegal attachments")}else if(Array.isArray(n))for(let i=0;i<n.length;i++)n[i]=Th(n[i],a);else if(typeof n=="object")for(const i in n)Object.prototype.hasOwnProperty.call(n,i)&&(n[i]=Th(n[i],a));return n}const kM=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],qM=5;var De;(function(n){n[n.CONNECT=0]="CONNECT",n[n.DISCONNECT=1]="DISCONNECT",n[n.EVENT=2]="EVENT",n[n.ACK=3]="ACK",n[n.CONNECT_ERROR=4]="CONNECT_ERROR",n[n.BINARY_EVENT=5]="BINARY_EVENT",n[n.BINARY_ACK=6]="BINARY_ACK"})(De||(De={}));class FM{constructor(a){this.replacer=a}encode(a){return(a.type===De.EVENT||a.type===De.ACK)&&lu(a)?this.encodeAsBinary({type:a.type===De.EVENT?De.BINARY_EVENT:De.BINARY_ACK,nsp:a.nsp,data:a.data,id:a.id}):[this.encodeAsString(a)]}encodeAsString(a){let i=""+a.type;return(a.type===De.BINARY_EVENT||a.type===De.BINARY_ACK)&&(i+=a.attachments+"-"),a.nsp&&a.nsp!=="/"&&(i+=a.nsp+","),a.id!=null&&(i+=a.id),a.data!=null&&(i+=JSON.stringify(a.data,this.replacer)),i}encodeAsBinary(a){const i=zM(a),l=this.encodeAsString(i.packet),o=i.buffers;return o.unshift(l),o}}function Gv(n){return Object.prototype.toString.call(n)==="[object Object]"}class dm extends vt{constructor(a){super(),this.reviver=a}add(a){let i;if(typeof a=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");i=this.decodeString(a);const l=i.type===De.BINARY_EVENT;l||i.type===De.BINARY_ACK?(i.type=l?De.EVENT:De.ACK,this.reconstructor=new VM(i),i.attachments===0&&super.emitReserved("decoded",i)):super.emitReserved("decoded",i)}else if(fm(a)||a.base64)if(this.reconstructor)i=this.reconstructor.takeBinaryData(a),i&&(this.reconstructor=null,super.emitReserved("decoded",i));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+a)}decodeString(a){let i=0;const l={type:Number(a.charAt(0))};if(De[l.type]===void 0)throw new Error("unknown packet type "+l.type);if(l.type===De.BINARY_EVENT||l.type===De.BINARY_ACK){const c=i+1;for(;a.charAt(++i)!=="-"&&i!=a.length;);const d=a.substring(c,i);if(d!=Number(d)||a.charAt(i)!=="-")throw new Error("Illegal attachments");l.attachments=Number(d)}if(a.charAt(i+1)==="/"){const c=i+1;for(;++i&&!(a.charAt(i)===","||i===a.length););l.nsp=a.substring(c,i)}else l.nsp="/";const o=a.charAt(i+1);if(o!==""&&Number(o)==o){const c=i+1;for(;++i;){const d=a.charAt(i);if(d==null||Number(d)!=d){--i;break}if(i===a.length)break}l.id=Number(a.substring(c,i+1))}if(a.charAt(++i)){const c=this.tryParse(a.substr(i));if(dm.isPayloadValid(l.type,c))l.data=c;else throw new Error("invalid payload")}return l}tryParse(a){try{return JSON.parse(a,this.reviver)}catch{return!1}}static isPayloadValid(a,i){switch(a){case De.CONNECT:return Gv(i);case De.DISCONNECT:return i===void 0;case De.CONNECT_ERROR:return typeof i=="string"||Gv(i);case De.EVENT:case De.BINARY_EVENT:return Array.isArray(i)&&(typeof i[0]=="number"||typeof i[0]=="string"&&kM.indexOf(i[0])===-1);case De.ACK:case De.BINARY_ACK:return Array.isArray(i)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class VM{constructor(a){this.packet=a,this.buffers=[],this.reconPack=a}takeBinaryData(a){if(this.buffers.push(a),this.buffers.length===this.reconPack.attachments){const i=GM(this.reconPack,this.buffers);return this.finishedReconstruction(),i}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const YM=Object.freeze(Object.defineProperty({__proto__:null,Decoder:dm,Encoder:FM,get PacketType(){return De},protocol:qM},Symbol.toStringTag,{value:"Module"}));function zn(n,a,i){return n.on(a,i),function(){n.off(a,i)}}const PM=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class K_ extends vt{constructor(a,i,l){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=a,this.nsp=i,l&&l.auth&&(this.auth=l.auth),this._opts=Object.assign({},l),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const a=this.io;this.subs=[zn(a,"open",this.onopen.bind(this)),zn(a,"packet",this.onpacket.bind(this)),zn(a,"error",this.onerror.bind(this)),zn(a,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...a){return a.unshift("message"),this.emit.apply(this,a),this}emit(a,...i){var l,o,c;if(PM.hasOwnProperty(a))throw new Error('"'+a.toString()+'" is a reserved event name');if(i.unshift(a),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(i),this;const d={type:De.EVENT,data:i};if(d.options={},d.options.compress=this.flags.compress!==!1,typeof i[i.length-1]=="function"){const v=this.ids++,E=i.pop();this._registerAckCallback(v,E),d.id=v}const h=(o=(l=this.io.engine)===null||l===void 0?void 0:l.transport)===null||o===void 0?void 0:o.writable,m=this.connected&&!(!((c=this.io.engine)===null||c===void 0)&&c._hasPingExpired());return this.flags.volatile&&!h||(m?(this.notifyOutgoingListeners(d),this.packet(d)):this.sendBuffer.push(d)),this.flags={},this}_registerAckCallback(a,i){var l;const o=(l=this.flags.timeout)!==null&&l!==void 0?l:this._opts.ackTimeout;if(o===void 0){this.acks[a]=i;return}const c=this.io.setTimeoutFn(()=>{delete this.acks[a];for(let h=0;h<this.sendBuffer.length;h++)this.sendBuffer[h].id===a&&this.sendBuffer.splice(h,1);i.call(this,new Error("operation has timed out"))},o),d=(...h)=>{this.io.clearTimeoutFn(c),i.apply(this,h)};d.withError=!0,this.acks[a]=d}emitWithAck(a,...i){return new Promise((l,o)=>{const c=(d,h)=>d?o(d):l(h);c.withError=!0,i.push(c),this.emit(a,...i)})}_addToQueue(a){let i;typeof a[a.length-1]=="function"&&(i=a.pop());const l={id:this._queueSeq++,tryCount:0,pending:!1,args:a,flags:Object.assign({fromQueue:!0},this.flags)};a.push((o,...c)=>l!==this._queue[0]?void 0:(o!==null?l.tryCount>this._opts.retries&&(this._queue.shift(),i&&i(o)):(this._queue.shift(),i&&i(null,...c)),l.pending=!1,this._drainQueue())),this._queue.push(l),this._drainQueue()}_drainQueue(a=!1){if(!this.connected||this._queue.length===0)return;const i=this._queue[0];i.pending&&!a||(i.pending=!0,i.tryCount++,this.flags=i.flags,this.emit.apply(this,i.args))}packet(a){a.nsp=this.nsp,this.io._packet(a)}onopen(){typeof this.auth=="function"?this.auth(a=>{this._sendConnectPacket(a)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(a){this.packet({type:De.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},a):a})}onerror(a){this.connected||this.emitReserved("connect_error",a)}onclose(a,i){this.connected=!1,delete this.id,this.emitReserved("disconnect",a,i),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(a=>{if(!this.sendBuffer.some(l=>String(l.id)===a)){const l=this.acks[a];delete this.acks[a],l.withError&&l.call(this,new Error("socket has been disconnected"))}})}onpacket(a){if(a.nsp===this.nsp)switch(a.type){case De.CONNECT:a.data&&a.data.sid?this.onconnect(a.data.sid,a.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case De.EVENT:case De.BINARY_EVENT:this.onevent(a);break;case De.ACK:case De.BINARY_ACK:this.onack(a);break;case De.DISCONNECT:this.ondisconnect();break;case De.CONNECT_ERROR:this.destroy();const l=new Error(a.data.message);l.data=a.data.data,this.emitReserved("connect_error",l);break}}onevent(a){const i=a.data||[];a.id!=null&&i.push(this.ack(a.id)),this.connected?this.emitEvent(i):this.receiveBuffer.push(Object.freeze(i))}emitEvent(a){if(this._anyListeners&&this._anyListeners.length){const i=this._anyListeners.slice();for(const l of i)l.apply(this,a)}super.emit.apply(this,a),this._pid&&a.length&&typeof a[a.length-1]=="string"&&(this._lastOffset=a[a.length-1])}ack(a){const i=this;let l=!1;return function(...o){l||(l=!0,i.packet({type:De.ACK,id:a,data:o}))}}onack(a){const i=this.acks[a.id];typeof i=="function"&&(delete this.acks[a.id],i.withError&&a.data.unshift(null),i.apply(this,a.data))}onconnect(a,i){this.id=a,this.recovered=i&&this._pid===i,this._pid=i,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(a=>this.emitEvent(a)),this.receiveBuffer=[],this.sendBuffer.forEach(a=>{this.notifyOutgoingListeners(a),this.packet(a)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(a=>a()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:De.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(a){return this.flags.compress=a,this}get volatile(){return this.flags.volatile=!0,this}timeout(a){return this.flags.timeout=a,this}onAny(a){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(a),this}prependAny(a){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(a),this}offAny(a){if(!this._anyListeners)return this;if(a){const i=this._anyListeners;for(let l=0;l<i.length;l++)if(a===i[l])return i.splice(l,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(a){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(a),this}prependAnyOutgoing(a){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(a),this}offAnyOutgoing(a){if(!this._anyOutgoingListeners)return this;if(a){const i=this._anyOutgoingListeners;for(let l=0;l<i.length;l++)if(a===i[l])return i.splice(l,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(a){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const i=this._anyOutgoingListeners.slice();for(const l of i)l.apply(this,a.data)}}}function Li(n){n=n||{},this.ms=n.min||100,this.max=n.max||1e4,this.factor=n.factor||2,this.jitter=n.jitter>0&&n.jitter<=1?n.jitter:0,this.attempts=0}Li.prototype.duration=function(){var n=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var a=Math.random(),i=Math.floor(a*this.jitter*n);n=(Math.floor(a*10)&1)==0?n-i:n+i}return Math.min(n,this.max)|0};Li.prototype.reset=function(){this.attempts=0};Li.prototype.setMin=function(n){this.ms=n};Li.prototype.setMax=function(n){this.max=n};Li.prototype.setJitter=function(n){this.jitter=n};class Ah extends vt{constructor(a,i){var l;super(),this.nsps={},this.subs=[],a&&typeof a=="object"&&(i=a,a=void 0),i=i||{},i.path=i.path||"/socket.io",this.opts=i,Nu(this,i),this.reconnection(i.reconnection!==!1),this.reconnectionAttempts(i.reconnectionAttempts||1/0),this.reconnectionDelay(i.reconnectionDelay||1e3),this.reconnectionDelayMax(i.reconnectionDelayMax||5e3),this.randomizationFactor((l=i.randomizationFactor)!==null&&l!==void 0?l:.5),this.backoff=new Li({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(i.timeout==null?2e4:i.timeout),this._readyState="closed",this.uri=a;const o=i.parser||YM;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=i.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(a){return arguments.length?(this._reconnection=!!a,a||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(a){return a===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=a,this)}reconnectionDelay(a){var i;return a===void 0?this._reconnectionDelay:(this._reconnectionDelay=a,(i=this.backoff)===null||i===void 0||i.setMin(a),this)}randomizationFactor(a){var i;return a===void 0?this._randomizationFactor:(this._randomizationFactor=a,(i=this.backoff)===null||i===void 0||i.setJitter(a),this)}reconnectionDelayMax(a){var i;return a===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=a,(i=this.backoff)===null||i===void 0||i.setMax(a),this)}timeout(a){return arguments.length?(this._timeout=a,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(a){if(~this._readyState.indexOf("open"))return this;this.engine=new LM(this.uri,this.opts);const i=this.engine,l=this;this._readyState="opening",this.skipReconnect=!1;const o=zn(i,"open",function(){l.onopen(),a&&a()}),c=h=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",h),a?a(h):this.maybeReconnectOnOpen()},d=zn(i,"error",c);if(this._timeout!==!1){const h=this._timeout,m=this.setTimeoutFn(()=>{o(),c(new Error("timeout")),i.close()},h);this.opts.autoUnref&&m.unref(),this.subs.push(()=>{this.clearTimeoutFn(m)})}return this.subs.push(o),this.subs.push(d),this}connect(a){return this.open(a)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const a=this.engine;this.subs.push(zn(a,"ping",this.onping.bind(this)),zn(a,"data",this.ondata.bind(this)),zn(a,"error",this.onerror.bind(this)),zn(a,"close",this.onclose.bind(this)),zn(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(a){try{this.decoder.add(a)}catch(i){this.onclose("parse error",i)}}ondecoded(a){wu(()=>{this.emitReserved("packet",a)},this.setTimeoutFn)}onerror(a){this.emitReserved("error",a)}socket(a,i){let l=this.nsps[a];return l?this._autoConnect&&!l.active&&l.connect():(l=new K_(this,a,i),this.nsps[a]=l),l}_destroy(a){const i=Object.keys(this.nsps);for(const l of i)if(this.nsps[l].active)return;this._close()}_packet(a){const i=this.encoder.encode(a);for(let l=0;l<i.length;l++)this.engine.write(i[l],a.options)}cleanup(){this.subs.forEach(a=>a()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(a,i){var l;this.cleanup(),(l=this.engine)===null||l===void 0||l.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",a,i),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const a=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const i=this.backoff.duration();this._reconnecting=!0;const l=this.setTimeoutFn(()=>{a.skipReconnect||(this.emitReserved("reconnect_attempt",a.backoff.attempts),!a.skipReconnect&&a.open(o=>{o?(a._reconnecting=!1,a.reconnect(),this.emitReserved("reconnect_error",o)):a.onreconnect()}))},i);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}}onreconnect(){const a=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",a)}}const Zl={};function su(n,a){typeof n=="object"&&(a=n,n=void 0),a=a||{};const i=BM(n,a.path||"/socket.io"),l=i.source,o=i.id,c=i.path,d=Zl[o]&&c in Zl[o].nsps,h=a.forceNew||a["force new connection"]||a.multiplex===!1||d;let m;return h?m=new Ah(l,a):(Zl[o]||(Zl[o]=new Ah(l,a)),m=Zl[o]),i.query&&!a.query&&(a.query=i.queryKey),m.socket(i.path,a)}Object.assign(su,{Manager:Ah,Socket:K_,io:su,connect:su});const XM=[Te.ActionTypes.MESSAGE_TO_GUEST,Te.ActionTypes.EVENT_TO_GUEST,Te.ActionTypes.TYPING_ON,Te.ActionTypes.TYPING_OFF,Te.ActionTypes.RESTART_CHAT_REQUEST,...Qx,...qO,"@@localize/SET_ACTIVE_LANGUAGE","@@localize/ADD_TRANSLATION_FOR_LANGUAGE"],ZM=({dispatch:n,getState:a})=>i=>{let l=null;return o=>{const c=i(o);if(o.type===Qh){l?.disconnect(),n(Wx());const d=`/chat?${Lh.stringify(o.querystrings)}`;l=su(`/${o.clientName}${d}`),l.on("action",n),l.on("connect",()=>n(Jx())),l.on("disconnect",()=>n(eC())),l.on("reconnect",()=>n(tC())),l.on("set-translations",(h,m)=>{n(F8({language:h,messages:H8(h,m)}))}),l.on("set-settings",h=>{n(P8(h))}),l.on("enable-conversation-rating",h=>n(XO(h))),l.on("speech-transcription",h=>n(VO(h))),l.on("restore-client-state",h=>{n($x(h.sessionId)),n(QO(h.messages))}),l.on("expand-window",({devices:h,initial:m=!1})=>{n({type:Lb,devices:h,initial:m})}),l.on("restart-chat",()=>{n(ls())}),l.on("login-success",h=>{n(kx({loginToken:h.loginToken}))})}else if(o.type==="start-screen/requestLogin")l?.emit("login-requested",o.payload);else if(o.type===xu)l?.emit("start-chat",o.payload);else if(o.type===Cu)l?.emit("terminate-session",o.payload);else if(o.type===kO)l?.emit("get-started",JSON.stringify(o));else if(o.type===Ih)l?.emit("audio-message",o.buffer);else if(o.type===Te.ActionTypes.CONVERSATION_RATING_FROM_GUEST)l?.emit("conversation-rating",o.payload);else if(o.type===Ub){const{connection:{sessionId:d}}=a();window.location.href=`/transcript-pdf/${d}`}else XM.indexOf(o.type)===-1&&o.meta===void 0&&l&&l.emit("action",JSON.stringify(o));return c}},$_=Vh(),QM={...K8($_),intl:D_},Oh=Cx({middleware:n=>n().concat(ZM),reducer:Z8,preloadedState:QM});Oh.subscribe(w8(()=>{const n=Oh.getState();$8($_,{connection:n.connection,startScreen:n.startScreen})},1e3));const KM=document.getElementById("root"),$M=pS.createRoot(KM);$M.render(y.jsx(mT,{store:Oh,children:y.jsx(x8,{})}));
131
- //# sourceMappingURL=index-53p4uF3W.js.map
131
+ //# sourceMappingURL=index-BSRLfRnW.js.map