@botfabrik/engine-webclient 4.102.3 → 4.102.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{index-Jdn76g_-.js → index-BcobPPJv.js} +2 -2
- package/dist/client/assets/{index-Jdn76g_-.js.map → index-BcobPPJv.js.map} +1 -1
- package/dist/client/assets/index-nVfX9aR5.css +1 -0
- package/dist/client/index.html +2 -2
- package/package.json +2 -2
- package/dist/client/assets/index-CkmOVxaG.css +0 -1
|
@@ -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 Jg;function GT(){if(Jg)return ze;Jg=1;var n=typeof Symbol=="function"&&Symbol.for,a=n?Symbol.for("react.element"):60103,i=n?Symbol.for("react.portal"):60106,s=n?Symbol.for("react.fragment"):60107,u=n?Symbol.for("react.strict_mode"):60108,f=n?Symbol.for("react.profiler"):60114,h=n?Symbol.for("react.provider"):60109,m=n?Symbol.for("react.context"):60110,p=n?Symbol.for("react.async_mode"):60111,g=n?Symbol.for("react.concurrent_mode"):60111,v=n?Symbol.for("react.forward_ref"):60112,S=n?Symbol.for("react.suspense"):60113,T=n?Symbol.for("react.suspense_list"):60120,M=n?Symbol.for("react.memo"):60115,_=n?Symbol.for("react.lazy"):60116,O=n?Symbol.for("react.block"):60121,x=n?Symbol.for("react.fundamental"):60117,L=n?Symbol.for("react.responder"):60118,z=n?Symbol.for("react.scope"):60119;function D(w){if(typeof w=="object"&&w!==null){var Z=w.$$typeof;switch(Z){case a:switch(w=w.type,w){case p:case g:case s:case f:case u:case S:return w;default:switch(w=w&&w.$$typeof,w){case m:case v:case _:case M:case h:return w;default:return Z}}case i:return Z}}}function k(w){return D(w)===g}return ze.AsyncMode=p,ze.ConcurrentMode=g,ze.ContextConsumer=m,ze.ContextProvider=h,ze.Element=a,ze.ForwardRef=v,ze.Fragment=s,ze.Lazy=_,ze.Memo=M,ze.Portal=i,ze.Profiler=f,ze.StrictMode=u,ze.Suspense=S,ze.isAsyncMode=function(w){return k(w)||D(w)===p},ze.isConcurrentMode=k,ze.isContextConsumer=function(w){return D(w)===m},ze.isContextProvider=function(w){return D(w)===h},ze.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===a},ze.isForwardRef=function(w){return D(w)===v},ze.isFragment=function(w){return D(w)===s},ze.isLazy=function(w){return D(w)===_},ze.isMemo=function(w){return D(w)===M},ze.isPortal=function(w){return D(w)===i},ze.isProfiler=function(w){return D(w)===f},ze.isStrictMode=function(w){return D(w)===u},ze.isSuspense=function(w){return D(w)===S},ze.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===s||w===g||w===f||w===u||w===S||w===T||typeof w=="object"&&w!==null&&(w.$$typeof===_||w.$$typeof===M||w.$$typeof===h||w.$$typeof===m||w.$$typeof===v||w.$$typeof===x||w.$$typeof===L||w.$$typeof===z||w.$$typeof===O)},ze.typeOf=D,ze}var Wg;function qT(){return Wg||(Wg=1,Mf.exports=GT()),Mf.exports}var Df,ey;function FT(){if(ey)return Df;ey=1;var n=qT(),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},s={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},u={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},f={};f[n.ForwardRef]=s,f[n.Memo]=u;function h(_){return n.isMemo(_)?u:f[_.$$typeof]||a}var m=Object.defineProperty,p=Object.getOwnPropertyNames,g=Object.getOwnPropertySymbols,v=Object.getOwnPropertyDescriptor,S=Object.getPrototypeOf,T=Object.prototype;function M(_,O,x){if(typeof O!="string"){if(T){var L=S(O);L&&L!==T&&M(_,L,x)}var z=p(O);g&&(z=z.concat(g(O)));for(var D=h(_),k=h(O),w=0;w<z.length;++w){var Z=z[w];if(!i[Z]&&!(x&&x[Z])&&!(k&&k[Z])&&!(D&&D[Z])){var P=v(O,Z);try{m(_,Z,P)}catch{}}}}return _}return Df=M,Df}FT();var Jh=typeof window<"u"&&!window.__REACT_INTL_BYPASS_GLOBAL_CONTEXT__?window.__REACT_INTL_CONTEXT__||(window.__REACT_INTL_CONTEXT__=U.createContext(null)):U.createContext(null);Jh.Consumer;var VT=Jh.Provider,YT=VT,ZT=Jh;function Jo(){var n=U.useContext(ZT);return ib(n),n}var Ah;(function(n){n.formatDate="FormattedDate",n.formatTime="FormattedTime",n.formatNumber="FormattedNumber",n.formatList="FormattedList",n.formatDisplayName="FormattedDisplayName"})(Ah||(Ah={}));var xh;(function(n){n.formatDate="FormattedDateParts",n.formatTime="FormattedTimeParts",n.formatNumber="FormattedNumberParts",n.formatList="FormattedListParts"})(xh||(xh={}));function ob(n){var a=function(i){var s=Jo(),u=i.value,f=i.children,h=$o(i,["value","children"]),m=typeof u=="string"?new Date(u||0):u,p=n==="formatDate"?s.formatDateToParts(m,h):s.formatTimeToParts(m,h);return f(p)};return a.displayName=xh[n],a}function Yl(n){var a=function(i){var s=Jo(),u=i.value,f=i.children,h=$o(i,["value","children"]),m=s[n](u,h);if(typeof f=="function")return f(m);var p=s.textComponent||U.Fragment;return U.createElement(p,null,m)};return a.displayName=Ah[n],a}function ub(n){return n&&Object.keys(n).reduce(function(a,i){var s=n[i];return a[i]=W1(s)?IT(s):s,a},{})}var ty=function(n,a,i,s){for(var u=[],f=4;f<arguments.length;f++)u[f-4]=arguments[f];var h=ub(s),m=Th.apply(void 0,Gn([n,a,i,h],u,!1));return Array.isArray(m)?sb(m):m},ny=function(n,a){var i=n.defaultRichTextElements,s=$o(n,["defaultRichTextElements"]),u=ub(i),f=jT(le(le(le({},lb),s),{defaultRichTextElements:u}),a),h={locale:f.locale,timeZone:f.timeZone,fallbackOnEmptyString:f.fallbackOnEmptyString,formats:f.formats,defaultLocale:f.defaultLocale,defaultFormats:f.defaultFormats,messages:f.messages,onError:f.onError,defaultRichTextElements:u};return le(le({},f),{formatMessage:ty.bind(null,h,f.formatters),$t:ty.bind(null,h,f.formatters)})};function Lf(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 XT=(function(n){_n(a,n);function a(){var i=n!==null&&n.apply(this,arguments)||this;return i.cache=nb(),i.state={cache:i.cache,intl:ny(Lf(i.props),i.cache),prevConfig:Lf(i.props)},i}return a.getDerivedStateFromProps=function(i,s){var u=s.prevConfig,f=s.cache,h=Lf(i);return kT(u,h)?null:{intl:ny(h,f),prevConfig:h}},a.prototype.render=function(){return ib(this.state.intl),U.createElement(YT,{value:this.state.intl},this.props.children)},a.displayName="IntlProvider",a.defaultProps=lb,a})(U.PureComponent);Yl("formatDate");Yl("formatTime");Yl("formatNumber");Yl("formatList");Yl("formatDisplayName");ob("formatDate");ob("formatTime");const QT="_app_1rj0t_1",PT={app:QT},xa=dE,et=gE,cb="%[a-f0-9]{2}",ay=new RegExp("("+cb+")|([^%]+?)","gi"),ry=new RegExp("("+cb+")+","gi");function Oh(n,a){try{return[decodeURIComponent(n.join(""))]}catch{}if(n.length===1)return n;a=a||1;const i=n.slice(0,a),s=n.slice(a);return Array.prototype.concat.call([],Oh(i),Oh(s))}function KT(n){try{return decodeURIComponent(n)}catch{let a=n.match(ay)||[];for(let i=1;i<a.length;i++)n=Oh(a,i).join(""),a=n.match(ay)||[];return n}}function $T(n){const a={"%FE%FF":"��","%FF%FE":"��"};let i=ry.exec(n);for(;i;){try{a[i[0]]=decodeURIComponent(i[0])}catch{const u=KT(i[0]);u!==i[0]&&(a[i[0]]=u)}i=ry.exec(n)}a["%C2"]="�";const s=Object.keys(a);for(const u of s)n=n.replace(new RegExp(u,"g"),a[u]);return n}function JT(n){if(typeof n!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof n+"`");try{return decodeURIComponent(n)}catch{return $T(n)}}function WT(n,a){const i={};if(Array.isArray(a))for(const s of a){const u=Object.getOwnPropertyDescriptor(n,s);u?.enumerable&&Object.defineProperty(i,s,u)}else for(const s of Reflect.ownKeys(n)){const u=Object.getOwnPropertyDescriptor(n,s);if(u.enumerable){const f=n[s];a(s,f,n)&&Object.defineProperty(i,s,u)}}return i}function fb(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 eA=n=>n==null,tA=n=>encodeURIComponent(n).replaceAll(/[!'()*]/g,a=>`%${a.charCodeAt(0).toString(16).toUpperCase()}`),Ch=Symbol("encodeFragmentIdentifier");function nA(n){switch(n.arrayFormat){case"index":return a=>(i,s)=>{const u=i.length;return s===void 0||n.skipNull&&s===null||n.skipEmptyString&&s===""?i:s===null?[...i,[dt(a,n),"[",u,"]"].join("")]:[...i,[dt(a,n),"[",dt(u,n),"]=",dt(s,n)].join("")]};case"bracket":return a=>(i,s)=>s===void 0||n.skipNull&&s===null||n.skipEmptyString&&s===""?i:s===null?[...i,[dt(a,n),"[]"].join("")]:[...i,[dt(a,n),"[]=",dt(s,n)].join("")];case"colon-list-separator":return a=>(i,s)=>s===void 0||n.skipNull&&s===null||n.skipEmptyString&&s===""?i:s===null?[...i,[dt(a,n),":list="].join("")]:[...i,[dt(a,n),":list=",dt(s,n)].join("")];case"comma":case"separator":case"bracket-separator":{const a=n.arrayFormat==="bracket-separator"?"[]=":"=";return i=>(s,u)=>u===void 0||n.skipNull&&u===null||n.skipEmptyString&&u===""?s:(u=u===null?"":u,s.length===0?[[dt(i,n),a,dt(u,n)].join("")]:[[s,dt(u,n)].join(n.arrayFormatSeparator)])}default:return a=>(i,s)=>s===void 0||n.skipNull&&s===null||n.skipEmptyString&&s===""?i:s===null?[...i,dt(a,n)]:[...i,[dt(a,n),"=",dt(s,n)].join("")]}}function aA(n){let a;switch(n.arrayFormat){case"index":return(i,s,u)=>{if(a=/\[(\d*)]$/.exec(i),i=i.replace(/\[\d*]$/,""),!a){u[i]=s;return}u[i]===void 0&&(u[i]={}),u[i][a[1]]=s};case"bracket":return(i,s,u)=>{if(a=/(\[])$/.exec(i),i=i.replace(/\[]$/,""),!a){u[i]=s;return}if(u[i]===void 0){u[i]=[s];return}u[i]=[...u[i],s]};case"colon-list-separator":return(i,s,u)=>{if(a=/(:list)$/.exec(i),i=i.replace(/:list$/,""),!a){u[i]=s;return}if(u[i]===void 0){u[i]=[s];return}u[i]=[...u[i],s]};case"comma":case"separator":return(i,s,u)=>{const h=typeof s=="string"&&s.includes(n.arrayFormatSeparator)?s.split(n.arrayFormatSeparator).map(m=>Nr(m,n)):s===null?s:Nr(s,n);u[i]=h};case"bracket-separator":return(i,s,u)=>{const f=/(\[])$/.test(i);if(i=i.replace(/\[]$/,""),!f){u[i]=s&&Nr(s,n);return}const h=s===null?[]:Nr(s,n).split(n.arrayFormatSeparator);if(u[i]===void 0){u[i]=h;return}u[i]=[...u[i],...h]};default:return(i,s,u)=>{if(u[i]===void 0){u[i]=s;return}u[i]=[...[u[i]].flat(),s]}}}function hb(n){if(typeof n!="string"||n.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function dt(n,a){return a.encode?a.strict?tA(n):encodeURIComponent(n):n}function Nr(n,a){return a.decode?JT(n):n}function db(n){return Array.isArray(n)?n.sort():typeof n=="object"?db(Object.keys(n)).sort((a,i)=>Number(a)-Number(i)).map(a=>n[a]):n}function mb(n){const a=n.indexOf("#");return a!==-1&&(n=n.slice(0,a)),n}function rA(n){let a="";const i=n.indexOf("#");return i!==-1&&(a=n.slice(i)),a}function iy(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 Wh(n){n=mb(n);const a=n.indexOf("?");return a===-1?"":n.slice(a+1)}function ed(n,a){a={decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1,types:Object.create(null),...a},hb(a.arrayFormatSeparator);const i=aA(a),s=Object.create(null);if(typeof n!="string"||(n=n.trim().replace(/^[?#&]/,""),!n))return s;for(const u of n.split("&")){if(u==="")continue;const f=a.decode?u.replaceAll("+"," "):u;let[h,m]=fb(f,"=");h===void 0&&(h=f),m=m===void 0?null:["comma","separator","bracket-separator"].includes(a.arrayFormat)?m:Nr(m,a),i(Nr(h,a),m,s)}for(const[u,f]of Object.entries(s))if(typeof f=="object"&&f!==null&&a.types[u]!=="string")for(const[h,m]of Object.entries(f)){const p=a.types[u],g=typeof p=="function"?p:p?p.replace("[]",""):void 0;f[h]=iy(m,a,g)}else typeof f=="object"&&f!==null&&a.types[u]==="string"?s[u]=Object.values(f).join(a.arrayFormatSeparator):s[u]=iy(f,a,a.types[u]);return a.sort===!1?s:(a.sort===!0?Object.keys(s).sort():Object.keys(s).sort(a.sort)).reduce((u,f)=>{const h=s[f];return u[f]=h&&typeof h=="object"&&!Array.isArray(h)?db(h):h,u},Object.create(null))}function pb(n,a){if(!n)return"";a={encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:",",...a},hb(a.arrayFormatSeparator);const i=h=>a.skipNull&&eA(n[h])||a.skipEmptyString&&n[h]==="",s=nA(a),u={};for(const[h,m]of Object.entries(n))i(h)||(u[h]=m);const f=Object.keys(u);return a.sort!==!1&&f.sort(a.sort),f.map(h=>{let m=n[h];if(a.replacer&&(m=a.replacer(h,m),m===void 0)||m===void 0)return"";if(m===null)return dt(h,a);if(Array.isArray(m)){if(m.length===0&&a.arrayFormat==="bracket-separator")return dt(h,a)+"[]";let p=m;return a.replacer&&(p=m.map((g,v)=>a.replacer(`${h}[${v}]`,g)).filter(g=>g!==void 0)),p.reduce(s(h),[]).join("&")}return dt(h,a)+"="+dt(m,a)}).filter(h=>h.length>0).join("&")}function gb(n,a){a={decode:!0,...a};let[i,s]=fb(n,"#");return i===void 0&&(i=n),{url:i?.split("?")?.[0]??"",query:ed(Wh(n),a),...a&&a.parseFragmentIdentifier&&s?{fragmentIdentifier:Nr(s,a)}:{}}}function yb(n,a){a={encode:!0,strict:!0,[Ch]:!0,...a};const i=mb(n.url).split("?")[0]||"",s=Wh(n.url),u={...ed(s,{sort:!1,...a}),...n.query};let f=pb(u,a);f&&=`?${f}`;let h=rA(n.url);if(typeof n.fragmentIdentifier=="string"){const m=new URL(i);m.hash=n.fragmentIdentifier,h=a[Ch]?m.hash:`#${n.fragmentIdentifier}`}return`${i}${f}${h}`}function bb(n,a,i){i={parseFragmentIdentifier:!0,[Ch]:!1,...i};const{url:s,query:u,fragmentIdentifier:f}=gb(n,i);return yb({url:s,query:WT(u,a),fragmentIdentifier:f},i)}function iA(n,a,i){const s=Array.isArray(a)?u=>!a.includes(u):(u,f)=>!a(u,f);return bb(n,s,i)}const td=Object.freeze(Object.defineProperty({__proto__:null,exclude:iA,extract:Wh,parse:ed,parseUrl:gb,pick:bb,stringify:pb,stringifyUrl:yb},Symbol.toStringTag,{value:"Module"})),vb="core.typing.on",_b="core.typing.off",nd="core.message.from.guest",Sb="core.message.without.analysis.from.guest",Eb="core.message.to.guest",lA="core.nlu.request.event",Tb="core.event.to.guest",sA="core.chat.restart.request",oA="core.transcript.mail.request",Ab="core.transcript.item.guest.reaction",ad="core.conversation.rating.from.guest",uA="core.drawer.open",cA="core.drawer.close",fA="core.guest.locale.changed";var zo;(function(n){n.WEB_URL="web_url",n.POSTBACK="postback"})(zo||(zo={}));var ly;(function(n){n.GOOD="GOOD",n.BAD="BAD"})(ly||(ly={}));let hA=class{type;sender;sources;quickReplies;constructor(a,i,s=[],u=[]){this.type=a,this.sender=i,this.sources=s,this.quickReplies=u}addQuickReply(a,i){this.quickReplies.push({label:a,payload:i})}},Wo=class extends hA{text;constructor(a,i,s=[],u=[]){super(vi.TEXT,i,s,u),this.text=a}};var vi;(function(n){n.TEXT="TEXT",n.DETAIL="DETAIL",n.MARKDOWN="MARKDOWN",n.VIDEO="VIDEO",n.IMAGE="IMAGE",n.FILE="FILE",n.AUDIO="AUDIO"})(vi||(vi={}));class xb{type;id;name;avatar;constructor(a,i,s,u){this.type=a,this.id=i,this.name=s,this.avatar=u}}class dA extends xb{constructor(){super(Ta.BOT,null,"Chatbot","bot.svg")}}class rd extends xb{constructor(){super(Ta.GUEST,null,"Guest","visitor.svg")}}var Ta;(function(n){n.GUEST="GUEST",n.BOT="BOT",n.PERSON="PERSON"})(Ta||(Ta={}));const mA=n=>{const a=new Wo(n,new rd);return{type:nd,message:a}},pA=(n,a={})=>{const i=new Wo(n,new rd);return{type:Sb,message:i,payload:a}},gA=n=>({type:lA,event:n}),yA=(n,a,i=null,s=null)=>({type:Ab,payload:{actionId:n,reaction:a,category:i,comment:s}}),Ob=n=>a=>(n.payload.type!==nd&&a(pA(n.label,n.payload)),a(n.payload)),Cb=n=>(a,i)=>{const{quickReplies:s}=i().chat,u=s.find(f=>n.toLocaleLowerCase().indexOf(f.label.toLocaleLowerCase())>-1);return a(u?Ob({...u,label:n}):JSON.parse(JSON.stringify(mA(n))))},id="MESSAGE_TO_PARENT_PAGE",ld="RESTORE_PREVIOUS_CHAT_MESSAGES",sd="AUDIO_MESSAGE_FROM_USER",od="RECEIVE_SPEECH_TRANSCRIPTION",ud="ENABLE_CONVERSATION_RATING",Rb="LOAD_SOURCE_INFOS_RESPONSE",cd="LOAD_SOURCE_INFOS_ERROR",fd="LOAD_SOURCE_INFOS_REQUEST",hd="CLOSE_SOURCE_INFOS",bA="webclient.get.started",Nb="webclient.window.expand",wb="webclient.window.close",Mb="webclient.transcript.pdf.download",vA=[id,ld,sd,od,ud,fd,hd],_A=n=>({type:sd,buffer:n}),SA=n=>({type:od,transcription:n}),EA=n=>({type:oA,payload:{parameters:{mailTo:n}}}),TA=()=>({type:Mb}),AA=({rating:n})=>({type:ud,payload:{rating:n}}),xA=(n,a)=>({type:ad,payload:{value:n,feedback:a}}),Db=n=>gA(n),OA=n=>({type:ld,messages:n}),CA=n=>{switch(n.type){case zo.WEB_URL:return Bb(n.url);case zo.POSTBACK:return n.payload;default:throw new Error(`unknown button type ${n.type}`)}},Lb=n=>Bb(n),Bb=n=>({type:id,message:{type:"webclient.change.url",url:n}});/*! js-cookie v3.0.5 | MIT */function yo(n){for(var a=1;a<arguments.length;a++){var i=arguments[a];for(var s in i)n[s]=i[s]}return n}var RA={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 Rh(n,a){function i(u,f,h){if(!(typeof document>"u")){h=yo({},a,h),typeof h.expires=="number"&&(h.expires=new Date(Date.now()+h.expires*864e5)),h.expires&&(h.expires=h.expires.toUTCString()),u=encodeURIComponent(u).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var m="";for(var p in h)h[p]&&(m+="; "+p,h[p]!==!0&&(m+="="+h[p].split(";")[0]));return document.cookie=u+"="+n.write(f,u)+m}}function s(u){if(!(typeof document>"u"||arguments.length&&!u)){for(var f=document.cookie?document.cookie.split("; "):[],h={},m=0;m<f.length;m++){var p=f[m].split("="),g=p.slice(1).join("=");try{var v=decodeURIComponent(p[0]);if(h[v]=n.read(g,v),u===v)break}catch{}}return u?h[u]:h}}return Object.create({set:i,get:s,remove:function(u,f){i(u,"",yo({},f,{expires:-1}))},withAttributes:function(u){return Rh(this.converter,yo({},this.attributes,u))},withConverter:function(u){return Rh(yo({},this.converter,u),this.attributes)}},{attributes:{value:Object.freeze(a)},converter:{value:Object.freeze(n)}})}var bo=Rh(RA,{path:"/"});const Nt=[];for(let n=0;n<256;++n)Nt.push((n+256).toString(16).slice(1));function NA(n,a=0){return(Nt[n[a+0]]+Nt[n[a+1]]+Nt[n[a+2]]+Nt[n[a+3]]+"-"+Nt[n[a+4]]+Nt[n[a+5]]+"-"+Nt[n[a+6]]+Nt[n[a+7]]+"-"+Nt[n[a+8]]+Nt[n[a+9]]+"-"+Nt[n[a+10]]+Nt[n[a+11]]+Nt[n[a+12]]+Nt[n[a+13]]+Nt[n[a+14]]+Nt[n[a+15]]).toLowerCase()}let Bf;const wA=new Uint8Array(16);function MA(){if(!Bf){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Bf=crypto.getRandomValues.bind(crypto)}return Bf(wA)}const DA=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),sy={randomUUID:DA};function LA(n,a,i){n=n||{};const s=n.random??n.rng?.()??MA();if(s.length<16)throw new Error("Random bytes length must be >= 16");return s[6]=s[6]&15|64,s[8]=s[8]&63|128,NA(s)}function Io(n,a,i){return sy.randomUUID&&!n?sy.randomUUID():LA(n)}const dd=()=>BA(window.location.pathname),BA=n=>{const a=n.split("/"),i=n.endsWith("/");return a[a.length-(i?2:1)]};function wt(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 HA=typeof Symbol=="function"&&Symbol.observable||"@@observable",oy=HA,Hf=()=>Math.random().toString(36).substring(7).split("").join("."),jA={INIT:`@@redux/INIT${Hf()}`,REPLACE:`@@redux/REPLACE${Hf()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Hf()}`},ko=jA;function md(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 Hb(n,a,i){if(typeof n!="function")throw new Error(wt(2));if(typeof a=="function"&&typeof i=="function"||typeof i=="function"&&typeof arguments[3]=="function")throw new Error(wt(0));if(typeof a=="function"&&typeof i>"u"&&(i=a,a=void 0),typeof i<"u"){if(typeof i!="function")throw new Error(wt(1));return i(Hb)(n,a)}let s=n,u=a,f=new Map,h=f,m=0,p=!1;function g(){h===f&&(h=new Map,f.forEach((x,L)=>{h.set(L,x)}))}function v(){if(p)throw new Error(wt(3));return u}function S(x){if(typeof x!="function")throw new Error(wt(4));if(p)throw new Error(wt(5));let L=!0;g();const z=m++;return h.set(z,x),function(){if(L){if(p)throw new Error(wt(6));L=!1,g(),h.delete(z),f=null}}}function T(x){if(!md(x))throw new Error(wt(7));if(typeof x.type>"u")throw new Error(wt(8));if(typeof x.type!="string")throw new Error(wt(17));if(p)throw new Error(wt(9));try{p=!0,u=s(u,x)}finally{p=!1}return(f=h).forEach(z=>{z()}),x}function M(x){if(typeof x!="function")throw new Error(wt(10));s=x,T({type:ko.REPLACE})}function _(){const x=S;return{subscribe(L){if(typeof L!="object"||L===null)throw new Error(wt(11));function z(){const k=L;k.next&&k.next(v())}return z(),{unsubscribe:x(z)}},[oy](){return this}}}return T({type:ko.INIT}),{dispatch:T,subscribe:S,getState:v,replaceReducer:M,[oy]:_}}function UA(n){Object.keys(n).forEach(a=>{const i=n[a];if(typeof i(void 0,{type:ko.INIT})>"u")throw new Error(wt(12));if(typeof i(void 0,{type:ko.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(wt(13))})}function jb(n){const a=Object.keys(n),i={};for(let f=0;f<a.length;f++){const h=a[f];typeof n[h]=="function"&&(i[h]=n[h])}const s=Object.keys(i);let u;try{UA(i)}catch(f){u=f}return function(h={},m){if(u)throw u;let p=!1;const g={};for(let v=0;v<s.length;v++){const S=s[v],T=i[S],M=h[S],_=T(M,m);if(typeof _>"u")throw m&&m.type,new Error(wt(14));g[S]=_,p=p||_!==M}return p=p||s.length!==Object.keys(h).length,p?g:h}}function Go(...n){return n.length===0?a=>a:n.length===1?n[0]:n.reduce((a,i)=>(...s)=>a(i(...s)))}function zA(...n){return a=>(i,s)=>{const u=a(i,s);let f=()=>{throw new Error(wt(15))};const h={getState:u.getState,dispatch:(p,...g)=>f(p,...g)},m=n.map(p=>p(h));return f=Go(...m)(u.dispatch),{...u,dispatch:f}}}function IA(n){return md(n)&&"type"in n&&typeof n.type=="string"}var Ub=Symbol.for("immer-nothing"),uy=Symbol.for("immer-draftable"),an=Symbol.for("immer-state");function wn(n,...a){throw new Error(`[Immer] minified error nr: ${n}. Full error at: https://bit.ly/3cXEKWf`)}var Il=Object.getPrototypeOf;function Dr(n){return!!n&&!!n[an]}function Aa(n){return n?zb(n)||Array.isArray(n)||!!n[uy]||!!n.constructor?.[uy]||Zl(n)||tu(n):!1}var kA=Object.prototype.constructor.toString(),cy=new WeakMap;function zb(n){if(!n||typeof n!="object")return!1;const a=Object.getPrototypeOf(n);if(a===null||a===Object.prototype)return!0;const i=Object.hasOwnProperty.call(a,"constructor")&&a.constructor;if(i===Object)return!0;if(typeof i!="function")return!1;let s=cy.get(i);return s===void 0&&(s=Function.toString.call(i),cy.set(i,s)),s===kA}function qo(n,a,i=!0){eu(n)===0?(i?Reflect.ownKeys(n):Object.keys(n)).forEach(u=>{a(u,n[u],n)}):n.forEach((s,u)=>a(u,s,n))}function eu(n){const a=n[an];return a?a.type_:Array.isArray(n)?1:Zl(n)?2:tu(n)?3:0}function Nh(n,a){return eu(n)===2?n.has(a):Object.prototype.hasOwnProperty.call(n,a)}function Ib(n,a,i){const s=eu(n);s===2?n.set(a,i):s===3?n.add(i):n[a]=i}function GA(n,a){return n===a?n!==0||1/n===1/a:n!==n&&a!==a}function Zl(n){return n instanceof Map}function tu(n){return n instanceof Set}function Rr(n){return n.copy_||n.base_}function wh(n,a){if(Zl(n))return new Map(n);if(tu(n))return new Set(n);if(Array.isArray(n))return Array.prototype.slice.call(n);const i=zb(n);if(a===!0||a==="class_only"&&!i){const s=Object.getOwnPropertyDescriptors(n);delete s[an];let u=Reflect.ownKeys(s);for(let f=0;f<u.length;f++){const h=u[f],m=s[h];m.writable===!1&&(m.writable=!0,m.configurable=!0),(m.get||m.set)&&(s[h]={configurable:!0,writable:!0,enumerable:m.enumerable,value:n[h]})}return Object.create(Il(n),s)}else{const s=Il(n);if(s!==null&&i)return{...n};const u=Object.create(s);return Object.assign(u,n)}}function pd(n,a=!1){return nu(n)||Dr(n)||!Aa(n)||(eu(n)>1&&Object.defineProperties(n,{set:vo,add:vo,clear:vo,delete:vo}),Object.freeze(n),a&&Object.values(n).forEach(i=>pd(i,!0))),n}function qA(){wn(2)}var vo={value:qA};function nu(n){return n===null||typeof n!="object"?!0:Object.isFrozen(n)}var FA={};function Lr(n){const a=FA[n];return a||wn(0,n),a}var kl;function kb(){return kl}function VA(n,a){return{drafts_:[],parent_:n,immer_:a,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function fy(n,a){a&&(Lr("Patches"),n.patches_=[],n.inversePatches_=[],n.patchListener_=a)}function Mh(n){Dh(n),n.drafts_.forEach(YA),n.drafts_=null}function Dh(n){n===kl&&(kl=n.parent_)}function hy(n){return kl=VA(kl,n)}function YA(n){const a=n[an];a.type_===0||a.type_===1?a.revoke_():a.revoked_=!0}function dy(n,a){a.unfinalizedDrafts_=a.drafts_.length;const i=a.drafts_[0];return n!==void 0&&n!==i?(i[an].modified_&&(Mh(a),wn(4)),Aa(n)&&(n=Fo(a,n),a.parent_||Vo(a,n)),a.patches_&&Lr("Patches").generateReplacementPatches_(i[an].base_,n,a.patches_,a.inversePatches_)):n=Fo(a,i,[]),Mh(a),a.patches_&&a.patchListener_(a.patches_,a.inversePatches_),n!==Ub?n:void 0}function Fo(n,a,i){if(nu(a))return a;const s=n.immer_.shouldUseStrictIteration(),u=a[an];if(!u)return qo(a,(f,h)=>my(n,u,a,f,h,i),s),a;if(u.scope_!==n)return a;if(!u.modified_)return Vo(n,u.base_,!0),u.base_;if(!u.finalized_){u.finalized_=!0,u.scope_.unfinalizedDrafts_--;const f=u.copy_;let h=f,m=!1;u.type_===3&&(h=new Set(f),f.clear(),m=!0),qo(h,(p,g)=>my(n,u,f,p,g,i,m),s),Vo(n,f,!1),i&&n.patches_&&Lr("Patches").generatePatches_(u,i,n.patches_,n.inversePatches_)}return u.copy_}function my(n,a,i,s,u,f,h){if(u==null||typeof u!="object"&&!h)return;const m=nu(u);if(!(m&&!h)){if(Dr(u)){const p=f&&a&&a.type_!==3&&!Nh(a.assigned_,s)?f.concat(s):void 0,g=Fo(n,u,p);if(Ib(i,s,g),Dr(g))n.canAutoFreeze_=!1;else return}else h&&i.add(u);if(Aa(u)&&!m){if(!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||a&&a.base_&&a.base_[s]===u&&m)return;Fo(n,u),(!a||!a.scope_.parent_)&&typeof s!="symbol"&&(Zl(i)?i.has(s):Object.prototype.propertyIsEnumerable.call(i,s))&&Vo(n,u)}}}function Vo(n,a,i=!1){!n.parent_&&n.immer_.autoFreeze_&&n.canAutoFreeze_&&pd(a,i)}function ZA(n,a){const i=Array.isArray(n),s={type_:i?1:0,scope_:a?a.scope_:kb(),modified_:!1,finalized_:!1,assigned_:{},parent_:a,base_:n,draft_:null,copy_:null,revoke_:null,isManual_:!1};let u=s,f=gd;i&&(u=[s],f=Gl);const{revoke:h,proxy:m}=Proxy.revocable(u,f);return s.draft_=m,s.revoke_=h,m}var gd={get(n,a){if(a===an)return n;const i=Rr(n);if(!Nh(i,a))return XA(n,i,a);const s=i[a];return n.finalized_||!Aa(s)?s:s===jf(n.base_,a)?(Uf(n),n.copy_[a]=Bh(s,n)):s},has(n,a){return a in Rr(n)},ownKeys(n){return Reflect.ownKeys(Rr(n))},set(n,a,i){const s=Gb(Rr(n),a);if(s?.set)return s.set.call(n.draft_,i),!0;if(!n.modified_){const u=jf(Rr(n),a),f=u?.[an];if(f&&f.base_===i)return n.copy_[a]=i,n.assigned_[a]=!1,!0;if(GA(i,u)&&(i!==void 0||Nh(n.base_,a)))return!0;Uf(n),Lh(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 jf(n.base_,a)!==void 0||a in n.base_?(n.assigned_[a]=!1,Uf(n),Lh(n)):delete n.assigned_[a],n.copy_&&delete n.copy_[a],!0},getOwnPropertyDescriptor(n,a){const i=Rr(n),s=Reflect.getOwnPropertyDescriptor(i,a);return s&&{writable:!0,configurable:n.type_!==1||a!=="length",enumerable:s.enumerable,value:i[a]}},defineProperty(){wn(11)},getPrototypeOf(n){return Il(n.base_)},setPrototypeOf(){wn(12)}},Gl={};qo(gd,(n,a)=>{Gl[n]=function(){return arguments[0]=arguments[0][0],a.apply(this,arguments)}});Gl.deleteProperty=function(n,a){return Gl.set.call(this,n,a,void 0)};Gl.set=function(n,a,i){return gd.set.call(this,n[0],a,i,n[0])};function jf(n,a){const i=n[an];return(i?Rr(i):n)[a]}function XA(n,a,i){const s=Gb(a,i);return s?"value"in s?s.value:s.get?.call(n.draft_):void 0}function Gb(n,a){if(!(a in n))return;let i=Il(n);for(;i;){const s=Object.getOwnPropertyDescriptor(i,a);if(s)return s;i=Il(i)}}function Lh(n){n.modified_||(n.modified_=!0,n.parent_&&Lh(n.parent_))}function Uf(n){n.copy_||(n.copy_=wh(n.base_,n.scope_.immer_.useStrictShallowCopy_))}var QA=class{constructor(n){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(a,i,s)=>{if(typeof a=="function"&&typeof i!="function"){const f=i;i=a;const h=this;return function(p=f,...g){return h.produce(p,v=>i.call(this,v,...g))}}typeof i!="function"&&wn(6),s!==void 0&&typeof s!="function"&&wn(7);let u;if(Aa(a)){const f=hy(this),h=Bh(a,void 0);let m=!0;try{u=i(h),m=!1}finally{m?Mh(f):Dh(f)}return fy(f,s),dy(u,f)}else if(!a||typeof a!="object"){if(u=i(a),u===void 0&&(u=a),u===Ub&&(u=void 0),this.autoFreeze_&&pd(u,!0),s){const f=[],h=[];Lr("Patches").generateReplacementPatches_(a,u,f,h),s(f,h)}return u}else wn(1,a)},this.produceWithPatches=(a,i)=>{if(typeof a=="function")return(h,...m)=>this.produceWithPatches(h,p=>a(p,...m));let s,u;return[this.produce(a,i,(h,m)=>{s=h,u=m}),s,u]},typeof n?.autoFreeze=="boolean"&&this.setAutoFreeze(n.autoFreeze),typeof n?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(n.useStrictShallowCopy),typeof n?.useStrictIteration=="boolean"&&this.setUseStrictIteration(n.useStrictIteration)}createDraft(n){Aa(n)||wn(8),Dr(n)&&(n=PA(n));const a=hy(this),i=Bh(n,void 0);return i[an].isManual_=!0,Dh(a),i}finishDraft(n,a){const i=n&&n[an];(!i||!i.isManual_)&&wn(9);const{scope_:s}=i;return fy(s,a),dy(void 0,s)}setAutoFreeze(n){this.autoFreeze_=n}setUseStrictShallowCopy(n){this.useStrictShallowCopy_=n}setUseStrictIteration(n){this.useStrictIteration_=n}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(n,a){let i;for(i=a.length-1;i>=0;i--){const u=a[i];if(u.path.length===0&&u.op==="replace"){n=u.value;break}}i>-1&&(a=a.slice(i+1));const s=Lr("Patches").applyPatches_;return Dr(n)?s(n,a):this.produce(n,u=>s(u,a))}};function Bh(n,a){const i=Zl(n)?Lr("MapSet").proxyMap_(n,a):tu(n)?Lr("MapSet").proxySet_(n,a):ZA(n,a);return(a?a.scope_:kb()).drafts_.push(i),i}function PA(n){return Dr(n)||wn(10,n),qb(n)}function qb(n){if(!Aa(n)||nu(n))return n;const a=n[an];let i,s=!0;if(a){if(!a.modified_)return a.base_;a.finalized_=!0,i=wh(n,a.scope_.immer_.useStrictShallowCopy_),s=a.scope_.immer_.shouldUseStrictIteration()}else i=wh(n,!0);return qo(i,(u,f)=>{Ib(i,u,qb(f))},s),a&&(a.finalized_=!1),i}var Hh=new QA,Fb=Hh.produce,KA=Hh.setUseStrictIteration.bind(Hh);function Vb(n){return({dispatch:i,getState:s})=>u=>f=>typeof f=="function"?f(i,s,n):u(f)}var $A=Vb(),JA=Vb,WA=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Go:Go.apply(null,arguments)};function py(n,a){function i(...s){if(a){let u=a(...s);if(!u)throw new Error(va(0));return{type:n,payload:u.payload,..."meta"in u&&{meta:u.meta},..."error"in u&&{error:u.error}}}return{type:n,payload:s[0]}}return i.toString=()=>`${n}`,i.type=n,i.match=s=>IA(s)&&s.type===n,i}var Yb=class Hl extends Array{constructor(...a){super(...a),Object.setPrototypeOf(this,Hl.prototype)}static get[Symbol.species](){return Hl}concat(...a){return super.concat.apply(this,a)}prepend(...a){return a.length===1&&Array.isArray(a[0])?new Hl(...a[0].concat(this)):new Hl(...a.concat(this))}};function gy(n){return Aa(n)?Fb(n,()=>{}):n}function _o(n,a,i){return n.has(a)?n.get(a):n.set(a,i(a)).get(a)}function ex(n){return typeof n=="boolean"}var tx=()=>function(a){const{thunk:i=!0,immutableCheck:s=!0,serializableCheck:u=!0,actionCreatorCheck:f=!0}=a??{};let h=new Yb;return i&&(ex(i)?h.push($A):h.push(JA(i.extraArgument))),h},nx="RTK_autoBatch",yy=n=>a=>{setTimeout(a,n)},ax=(n={type:"raf"})=>a=>(...i)=>{const s=a(...i);let u=!0,f=!1,h=!1;const m=new Set,p=n.type==="tick"?queueMicrotask:n.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:yy(10):n.type==="callback"?n.queueNotification:yy(n.timeout),g=()=>{h=!1,f&&(f=!1,m.forEach(v=>v()))};return Object.assign({},s,{subscribe(v){const S=()=>u&&v(),T=s.subscribe(S);return m.add(v),()=>{T(),m.delete(v)}},dispatch(v){try{return u=!v?.meta?.[nx],f=!u,f&&(h||(h=!0,p(g))),s.dispatch(v)}finally{u=!0}}})},rx=n=>function(i){const{autoBatch:s=!0}=i??{};let u=new Yb(n);return s&&u.push(ax(typeof s=="object"?s:void 0)),u};function ix(n){const a=tx(),{reducer:i=void 0,middleware:s,devTools:u=!0,preloadedState:f=void 0,enhancers:h=void 0}=n||{};let m;if(typeof i=="function")m=i;else if(md(i))m=jb(i);else throw new Error(va(1));let p;typeof s=="function"?p=s(a):p=a();let g=Go;u&&(g=WA({trace:!1,...typeof u=="object"&&u}));const v=zA(...p),S=rx(v);let T=typeof h=="function"?h(S):S();const M=g(...T);return Hb(m,f,M)}function Zb(n){const a={},i=[];let s;const u={addCase(f,h){const m=typeof f=="string"?f:f.type;if(!m)throw new Error(va(28));if(m in a)throw new Error(va(29));return a[m]=h,u},addAsyncThunk(f,h){return h.pending&&(a[f.pending.type]=h.pending),h.rejected&&(a[f.rejected.type]=h.rejected),h.fulfilled&&(a[f.fulfilled.type]=h.fulfilled),h.settled&&i.push({matcher:f.settled,reducer:h.settled}),u},addMatcher(f,h){return i.push({matcher:f,reducer:h}),u},addDefaultCase(f){return s=f,u}};return n(u),[a,i,s]}KA(!1);function lx(n){return typeof n=="function"}function sx(n,a){let[i,s,u]=Zb(a),f;if(lx(n))f=()=>gy(n());else{const m=gy(n);f=()=>m}function h(m=f(),p){let g=[i[p.type],...s.filter(({matcher:v})=>v(p)).map(({reducer:v})=>v)];return g.filter(v=>!!v).length===0&&(g=[u]),g.reduce((v,S)=>{if(S)if(Dr(v)){const M=S(v,p);return M===void 0?v:M}else{if(Aa(v))return Fb(v,T=>S(T,p));{const T=S(v,p);if(T===void 0){if(v===null)return v;throw Error("A case reducer on a non-draftable value must not return undefined")}return T}}return v},m)}return h.getInitialState=f,h}var ox=Symbol.for("rtk-slice-createasyncthunk");function ux(n,a){return`${n}/${a}`}function cx({creators:n}={}){const a=n?.asyncThunk?.[ox];return function(s){const{name:u,reducerPath:f=u}=s;if(!u)throw new Error(va(11));const h=(typeof s.reducers=="function"?s.reducers(hx()):s.reducers)||{},m=Object.keys(h),p={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},g={addCase(D,k){const w=typeof D=="string"?D:D.type;if(!w)throw new Error(va(12));if(w in p.sliceCaseReducersByType)throw new Error(va(13));return p.sliceCaseReducersByType[w]=k,g},addMatcher(D,k){return p.sliceMatchers.push({matcher:D,reducer:k}),g},exposeAction(D,k){return p.actionCreators[D]=k,g},exposeCaseReducer(D,k){return p.sliceCaseReducersByName[D]=k,g}};m.forEach(D=>{const k=h[D],w={reducerName:D,type:ux(u,D),createNotation:typeof s.reducers=="function"};mx(k)?gx(w,k,g,a):dx(w,k,g)});function v(){const[D={},k=[],w=void 0]=typeof s.extraReducers=="function"?Zb(s.extraReducers):[s.extraReducers],Z={...D,...p.sliceCaseReducersByType};return sx(s.initialState,P=>{for(let ae in Z)P.addCase(ae,Z[ae]);for(let ae of p.sliceMatchers)P.addMatcher(ae.matcher,ae.reducer);for(let ae of k)P.addMatcher(ae.matcher,ae.reducer);w&&P.addDefaultCase(w)})}const S=D=>D,T=new Map,M=new WeakMap;let _;function O(D,k){return _||(_=v()),_(D,k)}function x(){return _||(_=v()),_.getInitialState()}function L(D,k=!1){function w(P){let ae=P[D];return typeof ae>"u"&&k&&(ae=_o(M,w,x)),ae}function Z(P=S){const ae=_o(T,k,()=>new WeakMap);return _o(ae,P,()=>{const De={};for(const[He,pe]of Object.entries(s.selectors??{}))De[He]=fx(pe,P,()=>_o(M,P,x),k);return De})}return{reducerPath:D,getSelectors:Z,get selectors(){return Z(w)},selectSlice:w}}const z={name:u,reducer:O,actions:p.actionCreators,caseReducers:p.sliceCaseReducersByName,getInitialState:x,...L(f),injectInto(D,{reducerPath:k,...w}={}){const Z=k??f;return D.inject({reducerPath:Z,reducer:O},w),{...z,...L(Z,!0)}}};return z}}function fx(n,a,i,s){function u(f,...h){let m=a(f);return typeof m>"u"&&s&&(m=i()),n(m,...h)}return u.unwrapped=n,u}var yd=cx();function hx(){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 dx({type:n,reducerName:a,createNotation:i},s,u){let f,h;if("reducer"in s){if(i&&!px(s))throw new Error(va(17));f=s.reducer,h=s.prepare}else f=s;u.addCase(n,f).exposeCaseReducer(a,f).exposeAction(a,h?py(n,h):py(n))}function mx(n){return n._reducerDefinitionType==="asyncThunk"}function px(n){return n._reducerDefinitionType==="reducerWithPrepare"}function gx({type:n,reducerName:a},i,s,u){if(!u)throw new Error(va(18));const{payloadCreator:f,fulfilled:h,pending:m,rejected:p,settled:g,options:v}=i,S=u(n,f,v);s.exposeAction(a,S),h&&s.addCase(S.fulfilled,h),m&&s.addCase(S.pending,m),p&&s.addCase(S.rejected,p),g&&s.addMatcher(S.settled,g),s.exposeCaseReducer(a,{fulfilled:h||So,pending:m||So,rejected:p||So,settled:g||So})}function So(){}function va(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 yx={formValues:{}},Xb=yd({name:"start-screen",initialState:yx,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:bx,startAuthenticatedChat:vx,showStartScreen:_x,requestLogin:Sx,loginWindowClosed:Ex}=Xb.actions,Tx=Xb.reducer,Qb="RESET_CHAT_STATE",Pb="TOGGLE_TRANSCRIPT_MAIL_OVERLAY",Kb="SHOW_CONVERSATION_RATING_OVERLAY",$b="HIDE_CONVERSATION_RATING_OVERLAY",Jb=()=>({type:wb}),Ax=()=>({type:Qb}),Wb=()=>({type:Pb}),Yo=(n,a=void 0)=>({type:Kb,payload:{opener:n,defaultRating:a}}),xx=()=>({type:$b}),by=(n,a,i)=>(s,u)=>{try{const f=u().connection.sessionId;if(!f)throw new Error("Session ID is not available");s({type:fd,payload:{chunkId:i}}),vy(n,f,a,i,!1,s),vy(n,f,a,i,!0,s)}catch(f){console.error("Error loading source infos:",f),s({type:cd})}},vy=(n,a,i,s,u,f)=>{const h=`/${n}/me/chat-widget/transcript/${i}/chunks/${s}?highlight=${u}`;fetch(h,{headers:{"x-bubble-chat-session-id":a}}).then(m=>{if(!m.ok)throw new Error(`HTTP error! Status: ${m.status}`);return m.json()}).then(m=>{const p={...m,chunkId:s,highlighted:u};f({type:Rb,payload:p})}).catch(m=>{console.error("Error fetching source infos:",m),f({type:cd,payload:{highlighted:u}})})},Ox=()=>({type:hd}),bd="CONNECT",vd="CONNECTING",_d="CONNECTED",Sd="DISCONNECTED",Ed="RECONNECTED",Td="RESTORE_SESSION_ID",au="START",ru="CLEAR_SESSION_ID",Cx=[bd,vd,_d,Sd,Ed,Td],Rx=(n,a)=>({type:bd,clientName:n,querystrings:a}),Nx=n=>({type:Td,sessionId:n}),wx=()=>({type:vd}),Mx=()=>({type:_d}),Dx=()=>({type:Sd}),Lx=()=>({type:Ed}),ev=n=>(a,i)=>{const s=i().connection,{formValues:u,loginToken:f}=i().startScreen;let h=s.sessionId;h===void 0&&(h=Io());let m=s.userId;if(m===void 0){const g=bo.get("bubble-chat-user-id")||bo.get("bubble-chat-userId")||bo.get("bf-webclient-userId");m=g||Io(),bo.set("bubble-chat-user-id",m)}const p=td.parse(i().connection.queryString||"");a({type:au,payload:{sessionId:h,userId:m,clientName:n,loginToken:f,querystrings:{...p,...u}}})},Xl=()=>(n,a)=>{const i=a().connection.sessionId||"";if(n(Bx(i)),n(Ax()),a().settings.enableStartScreen)n(_x());else{const s=dd();return n(ev(s))}},Bx=n=>({type:ru,payload:{sessionId:n}}),Je=()=>{const n=Jo();return i=>{const s=n.formatMessage({id:i});return s===i?void 0:s}};var wr=(n=>(n[n.CONNECTING=0]="CONNECTING",n[n.CONNECTED=1]="CONNECTED",n[n.RECONNECTED=2]="RECONNECTED",n[n.DISCONNECTED=3]="DISCONNECTED",n))(wr||{}),Zo=(n=>(n.GUEST="GUEST",n.BOT="BOT",n.PERSON="PERSON",n))(Zo||{});const Hx="_container_q2uun_1",jx="_chatcontent_q2uun_6",Ux="_accessabilityHidden_q2uun_12",zf={container:Hx,chatcontent:jx,accessabilityHidden:Ux},zx="_messageContainer_ofi0g_1",Ix="_messages_ofi0g_12",_y={messageContainer:zx,messages:Ix};function qn(){return qn=Object.assign?Object.assign.bind():function(n){for(var a=1;a<arguments.length;a++){var i=arguments[a];for(var s in i)({}).hasOwnProperty.call(i,s)&&(n[s]=i[s])}return n},qn.apply(null,arguments)}const Eo=["strong","em","del","mark"],Sy=[["**",Eo[0]],["__",Eo[0]],["~~",Eo[2]],["==",Eo[3]],["*","em"],["_","em"]];function kx(n,a){for(var i=1,s=a+1;s<n.length&&i>0;)n[s]!=="\\"?(n[s]==="["&&i++,n[s]==="]"&&i--,s++):s+=2;if(i===0&&s<n.length&&(n[s]==="("||n[s]==="[")){var u=n[s]==="("?")":"]",f=1;for(s++;s<n.length&&f>0;)n[s]!=="\\"?(n[s]==="("&&u===")"&&f++,n[s]===u&&f--,s++):s+=2;if(f===0)return s}return-1}function Gx(n,a){if(!a||!a.inline&&!a.simple)return null;var i=n[0];if(i!=="*"&&i!=="_"&&i!=="~"&&i!=="=")return null;for(var s="",u=0,f="",h=0;h<6;h++){var m=Sy[h][0];if(n.startsWith(m)&&n.length>=2*m.length){s=m,u=m.length,f=Sy[h][1];break}}if(!s)return null;for(var p=u,g=!1,v=!1,S="",T=0,M="",_=!1,O="";p<n.length;){var x=n[p];if(_)M+=x,_=!1,O=x,p++;else if(x!=="\\")if(x!=="`"||T!==0){if(x==="["&&!g&&T===0){var L=kx(n,p);if(L!==-1){M+=n.slice(p,L),p=L,O=n[L-1];continue}}if(v)M+=x,S?x===S&&(S=""):x==='"'||x==="'"?S=x:x===">"&&(v=!1),O=x,p++;else if(x!=="<"||g){if(x===`
|
|
93
|
+
*/var Jg;function GT(){if(Jg)return ze;Jg=1;var n=typeof Symbol=="function"&&Symbol.for,a=n?Symbol.for("react.element"):60103,i=n?Symbol.for("react.portal"):60106,s=n?Symbol.for("react.fragment"):60107,u=n?Symbol.for("react.strict_mode"):60108,f=n?Symbol.for("react.profiler"):60114,h=n?Symbol.for("react.provider"):60109,m=n?Symbol.for("react.context"):60110,p=n?Symbol.for("react.async_mode"):60111,g=n?Symbol.for("react.concurrent_mode"):60111,v=n?Symbol.for("react.forward_ref"):60112,S=n?Symbol.for("react.suspense"):60113,T=n?Symbol.for("react.suspense_list"):60120,M=n?Symbol.for("react.memo"):60115,_=n?Symbol.for("react.lazy"):60116,O=n?Symbol.for("react.block"):60121,x=n?Symbol.for("react.fundamental"):60117,L=n?Symbol.for("react.responder"):60118,z=n?Symbol.for("react.scope"):60119;function D(w){if(typeof w=="object"&&w!==null){var Z=w.$$typeof;switch(Z){case a:switch(w=w.type,w){case p:case g:case s:case f:case u:case S:return w;default:switch(w=w&&w.$$typeof,w){case m:case v:case _:case M:case h:return w;default:return Z}}case i:return Z}}}function k(w){return D(w)===g}return ze.AsyncMode=p,ze.ConcurrentMode=g,ze.ContextConsumer=m,ze.ContextProvider=h,ze.Element=a,ze.ForwardRef=v,ze.Fragment=s,ze.Lazy=_,ze.Memo=M,ze.Portal=i,ze.Profiler=f,ze.StrictMode=u,ze.Suspense=S,ze.isAsyncMode=function(w){return k(w)||D(w)===p},ze.isConcurrentMode=k,ze.isContextConsumer=function(w){return D(w)===m},ze.isContextProvider=function(w){return D(w)===h},ze.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===a},ze.isForwardRef=function(w){return D(w)===v},ze.isFragment=function(w){return D(w)===s},ze.isLazy=function(w){return D(w)===_},ze.isMemo=function(w){return D(w)===M},ze.isPortal=function(w){return D(w)===i},ze.isProfiler=function(w){return D(w)===f},ze.isStrictMode=function(w){return D(w)===u},ze.isSuspense=function(w){return D(w)===S},ze.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===s||w===g||w===f||w===u||w===S||w===T||typeof w=="object"&&w!==null&&(w.$$typeof===_||w.$$typeof===M||w.$$typeof===h||w.$$typeof===m||w.$$typeof===v||w.$$typeof===x||w.$$typeof===L||w.$$typeof===z||w.$$typeof===O)},ze.typeOf=D,ze}var Wg;function qT(){return Wg||(Wg=1,Mf.exports=GT()),Mf.exports}var Df,ey;function FT(){if(ey)return Df;ey=1;var n=qT(),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},s={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},u={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},f={};f[n.ForwardRef]=s,f[n.Memo]=u;function h(_){return n.isMemo(_)?u:f[_.$$typeof]||a}var m=Object.defineProperty,p=Object.getOwnPropertyNames,g=Object.getOwnPropertySymbols,v=Object.getOwnPropertyDescriptor,S=Object.getPrototypeOf,T=Object.prototype;function M(_,O,x){if(typeof O!="string"){if(T){var L=S(O);L&&L!==T&&M(_,L,x)}var z=p(O);g&&(z=z.concat(g(O)));for(var D=h(_),k=h(O),w=0;w<z.length;++w){var Z=z[w];if(!i[Z]&&!(x&&x[Z])&&!(k&&k[Z])&&!(D&&D[Z])){var P=v(O,Z);try{m(_,Z,P)}catch{}}}}return _}return Df=M,Df}FT();var Jh=typeof window<"u"&&!window.__REACT_INTL_BYPASS_GLOBAL_CONTEXT__?window.__REACT_INTL_CONTEXT__||(window.__REACT_INTL_CONTEXT__=U.createContext(null)):U.createContext(null);Jh.Consumer;var VT=Jh.Provider,YT=VT,ZT=Jh;function Jo(){var n=U.useContext(ZT);return ib(n),n}var Ah;(function(n){n.formatDate="FormattedDate",n.formatTime="FormattedTime",n.formatNumber="FormattedNumber",n.formatList="FormattedList",n.formatDisplayName="FormattedDisplayName"})(Ah||(Ah={}));var xh;(function(n){n.formatDate="FormattedDateParts",n.formatTime="FormattedTimeParts",n.formatNumber="FormattedNumberParts",n.formatList="FormattedListParts"})(xh||(xh={}));function ob(n){var a=function(i){var s=Jo(),u=i.value,f=i.children,h=$o(i,["value","children"]),m=typeof u=="string"?new Date(u||0):u,p=n==="formatDate"?s.formatDateToParts(m,h):s.formatTimeToParts(m,h);return f(p)};return a.displayName=xh[n],a}function Yl(n){var a=function(i){var s=Jo(),u=i.value,f=i.children,h=$o(i,["value","children"]),m=s[n](u,h);if(typeof f=="function")return f(m);var p=s.textComponent||U.Fragment;return U.createElement(p,null,m)};return a.displayName=Ah[n],a}function ub(n){return n&&Object.keys(n).reduce(function(a,i){var s=n[i];return a[i]=W1(s)?IT(s):s,a},{})}var ty=function(n,a,i,s){for(var u=[],f=4;f<arguments.length;f++)u[f-4]=arguments[f];var h=ub(s),m=Th.apply(void 0,Gn([n,a,i,h],u,!1));return Array.isArray(m)?sb(m):m},ny=function(n,a){var i=n.defaultRichTextElements,s=$o(n,["defaultRichTextElements"]),u=ub(i),f=jT(le(le(le({},lb),s),{defaultRichTextElements:u}),a),h={locale:f.locale,timeZone:f.timeZone,fallbackOnEmptyString:f.fallbackOnEmptyString,formats:f.formats,defaultLocale:f.defaultLocale,defaultFormats:f.defaultFormats,messages:f.messages,onError:f.onError,defaultRichTextElements:u};return le(le({},f),{formatMessage:ty.bind(null,h,f.formatters),$t:ty.bind(null,h,f.formatters)})};function Lf(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 XT=(function(n){_n(a,n);function a(){var i=n!==null&&n.apply(this,arguments)||this;return i.cache=nb(),i.state={cache:i.cache,intl:ny(Lf(i.props),i.cache),prevConfig:Lf(i.props)},i}return a.getDerivedStateFromProps=function(i,s){var u=s.prevConfig,f=s.cache,h=Lf(i);return kT(u,h)?null:{intl:ny(h,f),prevConfig:h}},a.prototype.render=function(){return ib(this.state.intl),U.createElement(YT,{value:this.state.intl},this.props.children)},a.displayName="IntlProvider",a.defaultProps=lb,a})(U.PureComponent);Yl("formatDate");Yl("formatTime");Yl("formatNumber");Yl("formatList");Yl("formatDisplayName");ob("formatDate");ob("formatTime");const QT="_app_1rj0t_1",PT={app:QT},xa=dE,et=gE,cb="%[a-f0-9]{2}",ay=new RegExp("("+cb+")|([^%]+?)","gi"),ry=new RegExp("("+cb+")+","gi");function Oh(n,a){try{return[decodeURIComponent(n.join(""))]}catch{}if(n.length===1)return n;a=a||1;const i=n.slice(0,a),s=n.slice(a);return Array.prototype.concat.call([],Oh(i),Oh(s))}function KT(n){try{return decodeURIComponent(n)}catch{let a=n.match(ay)||[];for(let i=1;i<a.length;i++)n=Oh(a,i).join(""),a=n.match(ay)||[];return n}}function $T(n){const a={"%FE%FF":"��","%FF%FE":"��"};let i=ry.exec(n);for(;i;){try{a[i[0]]=decodeURIComponent(i[0])}catch{const u=KT(i[0]);u!==i[0]&&(a[i[0]]=u)}i=ry.exec(n)}a["%C2"]="�";const s=Object.keys(a);for(const u of s)n=n.replace(new RegExp(u,"g"),a[u]);return n}function JT(n){if(typeof n!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof n+"`");try{return decodeURIComponent(n)}catch{return $T(n)}}function WT(n,a){const i={};if(Array.isArray(a))for(const s of a){const u=Object.getOwnPropertyDescriptor(n,s);u?.enumerable&&Object.defineProperty(i,s,u)}else for(const s of Reflect.ownKeys(n)){const u=Object.getOwnPropertyDescriptor(n,s);if(u.enumerable){const f=n[s];a(s,f,n)&&Object.defineProperty(i,s,u)}}return i}function fb(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 eA=n=>n==null,tA=n=>encodeURIComponent(n).replaceAll(/[!'()*]/g,a=>`%${a.charCodeAt(0).toString(16).toUpperCase()}`),Ch=Symbol("encodeFragmentIdentifier");function nA(n){switch(n.arrayFormat){case"index":return a=>(i,s)=>{const u=i.length;return s===void 0||n.skipNull&&s===null||n.skipEmptyString&&s===""?i:s===null?[...i,[dt(a,n),"[",u,"]"].join("")]:[...i,[dt(a,n),"[",dt(u,n),"]=",dt(s,n)].join("")]};case"bracket":return a=>(i,s)=>s===void 0||n.skipNull&&s===null||n.skipEmptyString&&s===""?i:s===null?[...i,[dt(a,n),"[]"].join("")]:[...i,[dt(a,n),"[]=",dt(s,n)].join("")];case"colon-list-separator":return a=>(i,s)=>s===void 0||n.skipNull&&s===null||n.skipEmptyString&&s===""?i:s===null?[...i,[dt(a,n),":list="].join("")]:[...i,[dt(a,n),":list=",dt(s,n)].join("")];case"comma":case"separator":case"bracket-separator":{const a=n.arrayFormat==="bracket-separator"?"[]=":"=";return i=>(s,u)=>u===void 0||n.skipNull&&u===null||n.skipEmptyString&&u===""?s:(u=u===null?"":u,s.length===0?[[dt(i,n),a,dt(u,n)].join("")]:[[s,dt(u,n)].join(n.arrayFormatSeparator)])}default:return a=>(i,s)=>s===void 0||n.skipNull&&s===null||n.skipEmptyString&&s===""?i:s===null?[...i,dt(a,n)]:[...i,[dt(a,n),"=",dt(s,n)].join("")]}}function aA(n){let a;switch(n.arrayFormat){case"index":return(i,s,u)=>{if(a=/\[(\d*)]$/.exec(i),i=i.replace(/\[\d*]$/,""),!a){u[i]=s;return}u[i]===void 0&&(u[i]={}),u[i][a[1]]=s};case"bracket":return(i,s,u)=>{if(a=/(\[])$/.exec(i),i=i.replace(/\[]$/,""),!a){u[i]=s;return}if(u[i]===void 0){u[i]=[s];return}u[i]=[...u[i],s]};case"colon-list-separator":return(i,s,u)=>{if(a=/(:list)$/.exec(i),i=i.replace(/:list$/,""),!a){u[i]=s;return}if(u[i]===void 0){u[i]=[s];return}u[i]=[...u[i],s]};case"comma":case"separator":return(i,s,u)=>{const h=typeof s=="string"&&s.includes(n.arrayFormatSeparator)?s.split(n.arrayFormatSeparator).map(m=>Nr(m,n)):s===null?s:Nr(s,n);u[i]=h};case"bracket-separator":return(i,s,u)=>{const f=/(\[])$/.test(i);if(i=i.replace(/\[]$/,""),!f){u[i]=s&&Nr(s,n);return}const h=s===null?[]:Nr(s,n).split(n.arrayFormatSeparator);if(u[i]===void 0){u[i]=h;return}u[i]=[...u[i],...h]};default:return(i,s,u)=>{if(u[i]===void 0){u[i]=s;return}u[i]=[...[u[i]].flat(),s]}}}function hb(n){if(typeof n!="string"||n.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function dt(n,a){return a.encode?a.strict?tA(n):encodeURIComponent(n):n}function Nr(n,a){return a.decode?JT(n):n}function db(n){return Array.isArray(n)?n.sort():typeof n=="object"?db(Object.keys(n)).sort((a,i)=>Number(a)-Number(i)).map(a=>n[a]):n}function mb(n){const a=n.indexOf("#");return a!==-1&&(n=n.slice(0,a)),n}function rA(n){let a="";const i=n.indexOf("#");return i!==-1&&(a=n.slice(i)),a}function iy(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 Wh(n){n=mb(n);const a=n.indexOf("?");return a===-1?"":n.slice(a+1)}function ed(n,a){a={decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1,types:Object.create(null),...a},hb(a.arrayFormatSeparator);const i=aA(a),s=Object.create(null);if(typeof n!="string"||(n=n.trim().replace(/^[?#&]/,""),!n))return s;for(const u of n.split("&")){if(u==="")continue;const f=a.decode?u.replaceAll("+"," "):u;let[h,m]=fb(f,"=");h===void 0&&(h=f),m=m===void 0?null:["comma","separator","bracket-separator"].includes(a.arrayFormat)?m:Nr(m,a),i(Nr(h,a),m,s)}for(const[u,f]of Object.entries(s))if(typeof f=="object"&&f!==null&&a.types[u]!=="string")for(const[h,m]of Object.entries(f)){const p=a.types[u],g=typeof p=="function"?p:p?p.replace("[]",""):void 0;f[h]=iy(m,a,g)}else typeof f=="object"&&f!==null&&a.types[u]==="string"?s[u]=Object.values(f).join(a.arrayFormatSeparator):s[u]=iy(f,a,a.types[u]);return a.sort===!1?s:(a.sort===!0?Object.keys(s).sort():Object.keys(s).sort(a.sort)).reduce((u,f)=>{const h=s[f];return u[f]=h&&typeof h=="object"&&!Array.isArray(h)?db(h):h,u},Object.create(null))}function pb(n,a){if(!n)return"";a={encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:",",...a},hb(a.arrayFormatSeparator);const i=h=>a.skipNull&&eA(n[h])||a.skipEmptyString&&n[h]==="",s=nA(a),u={};for(const[h,m]of Object.entries(n))i(h)||(u[h]=m);const f=Object.keys(u);return a.sort!==!1&&f.sort(a.sort),f.map(h=>{let m=n[h];if(a.replacer&&(m=a.replacer(h,m),m===void 0)||m===void 0)return"";if(m===null)return dt(h,a);if(Array.isArray(m)){if(m.length===0&&a.arrayFormat==="bracket-separator")return dt(h,a)+"[]";let p=m;return a.replacer&&(p=m.map((g,v)=>a.replacer(`${h}[${v}]`,g)).filter(g=>g!==void 0)),p.reduce(s(h),[]).join("&")}return dt(h,a)+"="+dt(m,a)}).filter(h=>h.length>0).join("&")}function gb(n,a){a={decode:!0,...a};let[i,s]=fb(n,"#");return i===void 0&&(i=n),{url:i?.split("?")?.[0]??"",query:ed(Wh(n),a),...a&&a.parseFragmentIdentifier&&s?{fragmentIdentifier:Nr(s,a)}:{}}}function yb(n,a){a={encode:!0,strict:!0,[Ch]:!0,...a};const i=mb(n.url).split("?")[0]||"",s=Wh(n.url),u={...ed(s,{sort:!1,...a}),...n.query};let f=pb(u,a);f&&=`?${f}`;let h=rA(n.url);if(typeof n.fragmentIdentifier=="string"){const m=new URL(i);m.hash=n.fragmentIdentifier,h=a[Ch]?m.hash:`#${n.fragmentIdentifier}`}return`${i}${f}${h}`}function bb(n,a,i){i={parseFragmentIdentifier:!0,[Ch]:!1,...i};const{url:s,query:u,fragmentIdentifier:f}=gb(n,i);return yb({url:s,query:WT(u,a),fragmentIdentifier:f},i)}function iA(n,a,i){const s=Array.isArray(a)?u=>!a.includes(u):(u,f)=>!a(u,f);return bb(n,s,i)}const td=Object.freeze(Object.defineProperty({__proto__:null,exclude:iA,extract:Wh,parse:ed,parseUrl:gb,pick:bb,stringify:pb,stringifyUrl:yb},Symbol.toStringTag,{value:"Module"})),vb="core.typing.on",_b="core.typing.off",nd="core.message.from.guest",Sb="core.message.without.analysis.from.guest",Eb="core.message.to.guest",lA="core.nlu.request.event",Tb="core.event.to.guest",sA="core.chat.restart.request",oA="core.transcript.mail.request",Ab="core.transcript.item.guest.reaction",ad="core.conversation.rating.from.guest",uA="core.drawer.open",cA="core.drawer.close",fA="core.guest.locale.changed";var zo;(function(n){n.WEB_URL="web_url",n.POSTBACK="postback"})(zo||(zo={}));var ly;(function(n){n.GOOD="GOOD",n.BAD="BAD"})(ly||(ly={}));let hA=class{type;sender;sources;quickReplies;constructor(a,i,s=[],u=[]){this.type=a,this.sender=i,this.sources=s,this.quickReplies=u}addQuickReply(a,i){this.quickReplies.push({label:a,payload:i})}},Wo=class extends hA{text;constructor(a,i,s=[],u=[]){super(vi.TEXT,i,s,u),this.text=a}};var vi;(function(n){n.TEXT="TEXT",n.DETAIL="DETAIL",n.MARKDOWN="MARKDOWN",n.VIDEO="VIDEO",n.IMAGE="IMAGE",n.FILE="FILE",n.AUDIO="AUDIO"})(vi||(vi={}));class xb{type;id;name;avatar;constructor(a,i,s,u){this.type=a,this.id=i,this.name=s,this.avatar=u}}class dA extends xb{constructor(){super(Ta.BOT,null,"Chatbot","bot.svg")}}class rd extends xb{constructor(){super(Ta.GUEST,null,"Guest","visitor.svg")}}var Ta;(function(n){n.GUEST="GUEST",n.BOT="BOT",n.PERSON="PERSON"})(Ta||(Ta={}));const mA=n=>{const a=new Wo(n,new rd);return{type:nd,message:a}},pA=(n,a={})=>{const i=new Wo(n,new rd);return{type:Sb,message:i,payload:a}},gA=n=>({type:lA,event:n}),yA=(n,a,i=null,s=null)=>({type:Ab,payload:{actionId:n,reaction:a,category:i,comment:s}}),Ob=n=>a=>(n.payload.type!==nd&&a(pA(n.label,n.payload)),a(n.payload)),Cb=n=>(a,i)=>{const{quickReplies:s}=i().chat,u=s.find(f=>n.toLocaleLowerCase().indexOf(f.label.toLocaleLowerCase())>-1);return a(u?Ob({...u,label:n}):JSON.parse(JSON.stringify(mA(n))))},id="MESSAGE_TO_PARENT_PAGE",ld="RESTORE_PREVIOUS_CHAT_MESSAGES",sd="AUDIO_MESSAGE_FROM_USER",od="RECEIVE_SPEECH_TRANSCRIPTION",ud="ENABLE_CONVERSATION_RATING",Rb="LOAD_SOURCE_INFOS_RESPONSE",cd="LOAD_SOURCE_INFOS_ERROR",fd="LOAD_SOURCE_INFOS_REQUEST",hd="CLOSE_SOURCE_INFOS",bA="webclient.get.started",Nb="webclient.window.expand",wb="webclient.window.close",Mb="webclient.transcript.pdf.download",vA=[id,ld,sd,od,ud,fd,hd],_A=n=>({type:sd,buffer:n}),SA=n=>({type:od,transcription:n}),EA=n=>({type:oA,payload:{parameters:{mailTo:n}}}),TA=()=>({type:Mb}),AA=({rating:n})=>({type:ud,payload:{rating:n}}),xA=(n,a)=>({type:ad,payload:{value:n,feedback:a}}),Db=n=>gA(n),OA=n=>({type:ld,messages:n}),CA=n=>{switch(n.type){case zo.WEB_URL:return Bb(n.url);case zo.POSTBACK:return n.payload;default:throw new Error(`unknown button type ${n.type}`)}},Lb=n=>Bb(n),Bb=n=>({type:id,message:{type:"webclient.change.url",url:n}});/*! js-cookie v3.0.5 | MIT */function yo(n){for(var a=1;a<arguments.length;a++){var i=arguments[a];for(var s in i)n[s]=i[s]}return n}var RA={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 Rh(n,a){function i(u,f,h){if(!(typeof document>"u")){h=yo({},a,h),typeof h.expires=="number"&&(h.expires=new Date(Date.now()+h.expires*864e5)),h.expires&&(h.expires=h.expires.toUTCString()),u=encodeURIComponent(u).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var m="";for(var p in h)h[p]&&(m+="; "+p,h[p]!==!0&&(m+="="+h[p].split(";")[0]));return document.cookie=u+"="+n.write(f,u)+m}}function s(u){if(!(typeof document>"u"||arguments.length&&!u)){for(var f=document.cookie?document.cookie.split("; "):[],h={},m=0;m<f.length;m++){var p=f[m].split("="),g=p.slice(1).join("=");try{var v=decodeURIComponent(p[0]);if(h[v]=n.read(g,v),u===v)break}catch{}}return u?h[u]:h}}return Object.create({set:i,get:s,remove:function(u,f){i(u,"",yo({},f,{expires:-1}))},withAttributes:function(u){return Rh(this.converter,yo({},this.attributes,u))},withConverter:function(u){return Rh(yo({},this.converter,u),this.attributes)}},{attributes:{value:Object.freeze(a)},converter:{value:Object.freeze(n)}})}var bo=Rh(RA,{path:"/"});const Nt=[];for(let n=0;n<256;++n)Nt.push((n+256).toString(16).slice(1));function NA(n,a=0){return(Nt[n[a+0]]+Nt[n[a+1]]+Nt[n[a+2]]+Nt[n[a+3]]+"-"+Nt[n[a+4]]+Nt[n[a+5]]+"-"+Nt[n[a+6]]+Nt[n[a+7]]+"-"+Nt[n[a+8]]+Nt[n[a+9]]+"-"+Nt[n[a+10]]+Nt[n[a+11]]+Nt[n[a+12]]+Nt[n[a+13]]+Nt[n[a+14]]+Nt[n[a+15]]).toLowerCase()}let Bf;const wA=new Uint8Array(16);function MA(){if(!Bf){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Bf=crypto.getRandomValues.bind(crypto)}return Bf(wA)}const DA=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),sy={randomUUID:DA};function LA(n,a,i){n=n||{};const s=n.random??n.rng?.()??MA();if(s.length<16)throw new Error("Random bytes length must be >= 16");return s[6]=s[6]&15|64,s[8]=s[8]&63|128,NA(s)}function Io(n,a,i){return sy.randomUUID&&!n?sy.randomUUID():LA(n)}const dd=()=>BA(window.location.pathname),BA=n=>{const a=n.split("/"),i=n.endsWith("/");return a[a.length-(i?2:1)]};function wt(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 HA=typeof Symbol=="function"&&Symbol.observable||"@@observable",oy=HA,Hf=()=>Math.random().toString(36).substring(7).split("").join("."),jA={INIT:`@@redux/INIT${Hf()}`,REPLACE:`@@redux/REPLACE${Hf()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Hf()}`},ko=jA;function md(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 Hb(n,a,i){if(typeof n!="function")throw new Error(wt(2));if(typeof a=="function"&&typeof i=="function"||typeof i=="function"&&typeof arguments[3]=="function")throw new Error(wt(0));if(typeof a=="function"&&typeof i>"u"&&(i=a,a=void 0),typeof i<"u"){if(typeof i!="function")throw new Error(wt(1));return i(Hb)(n,a)}let s=n,u=a,f=new Map,h=f,m=0,p=!1;function g(){h===f&&(h=new Map,f.forEach((x,L)=>{h.set(L,x)}))}function v(){if(p)throw new Error(wt(3));return u}function S(x){if(typeof x!="function")throw new Error(wt(4));if(p)throw new Error(wt(5));let L=!0;g();const z=m++;return h.set(z,x),function(){if(L){if(p)throw new Error(wt(6));L=!1,g(),h.delete(z),f=null}}}function T(x){if(!md(x))throw new Error(wt(7));if(typeof x.type>"u")throw new Error(wt(8));if(typeof x.type!="string")throw new Error(wt(17));if(p)throw new Error(wt(9));try{p=!0,u=s(u,x)}finally{p=!1}return(f=h).forEach(z=>{z()}),x}function M(x){if(typeof x!="function")throw new Error(wt(10));s=x,T({type:ko.REPLACE})}function _(){const x=S;return{subscribe(L){if(typeof L!="object"||L===null)throw new Error(wt(11));function z(){const k=L;k.next&&k.next(v())}return z(),{unsubscribe:x(z)}},[oy](){return this}}}return T({type:ko.INIT}),{dispatch:T,subscribe:S,getState:v,replaceReducer:M,[oy]:_}}function UA(n){Object.keys(n).forEach(a=>{const i=n[a];if(typeof i(void 0,{type:ko.INIT})>"u")throw new Error(wt(12));if(typeof i(void 0,{type:ko.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(wt(13))})}function jb(n){const a=Object.keys(n),i={};for(let f=0;f<a.length;f++){const h=a[f];typeof n[h]=="function"&&(i[h]=n[h])}const s=Object.keys(i);let u;try{UA(i)}catch(f){u=f}return function(h={},m){if(u)throw u;let p=!1;const g={};for(let v=0;v<s.length;v++){const S=s[v],T=i[S],M=h[S],_=T(M,m);if(typeof _>"u")throw m&&m.type,new Error(wt(14));g[S]=_,p=p||_!==M}return p=p||s.length!==Object.keys(h).length,p?g:h}}function Go(...n){return n.length===0?a=>a:n.length===1?n[0]:n.reduce((a,i)=>(...s)=>a(i(...s)))}function zA(...n){return a=>(i,s)=>{const u=a(i,s);let f=()=>{throw new Error(wt(15))};const h={getState:u.getState,dispatch:(p,...g)=>f(p,...g)},m=n.map(p=>p(h));return f=Go(...m)(u.dispatch),{...u,dispatch:f}}}function IA(n){return md(n)&&"type"in n&&typeof n.type=="string"}var Ub=Symbol.for("immer-nothing"),uy=Symbol.for("immer-draftable"),an=Symbol.for("immer-state");function wn(n,...a){throw new Error(`[Immer] minified error nr: ${n}. Full error at: https://bit.ly/3cXEKWf`)}var Il=Object.getPrototypeOf;function Dr(n){return!!n&&!!n[an]}function Aa(n){return n?zb(n)||Array.isArray(n)||!!n[uy]||!!n.constructor?.[uy]||Zl(n)||tu(n):!1}var kA=Object.prototype.constructor.toString(),cy=new WeakMap;function zb(n){if(!n||typeof n!="object")return!1;const a=Object.getPrototypeOf(n);if(a===null||a===Object.prototype)return!0;const i=Object.hasOwnProperty.call(a,"constructor")&&a.constructor;if(i===Object)return!0;if(typeof i!="function")return!1;let s=cy.get(i);return s===void 0&&(s=Function.toString.call(i),cy.set(i,s)),s===kA}function qo(n,a,i=!0){eu(n)===0?(i?Reflect.ownKeys(n):Object.keys(n)).forEach(u=>{a(u,n[u],n)}):n.forEach((s,u)=>a(u,s,n))}function eu(n){const a=n[an];return a?a.type_:Array.isArray(n)?1:Zl(n)?2:tu(n)?3:0}function Nh(n,a){return eu(n)===2?n.has(a):Object.prototype.hasOwnProperty.call(n,a)}function Ib(n,a,i){const s=eu(n);s===2?n.set(a,i):s===3?n.add(i):n[a]=i}function GA(n,a){return n===a?n!==0||1/n===1/a:n!==n&&a!==a}function Zl(n){return n instanceof Map}function tu(n){return n instanceof Set}function Rr(n){return n.copy_||n.base_}function wh(n,a){if(Zl(n))return new Map(n);if(tu(n))return new Set(n);if(Array.isArray(n))return Array.prototype.slice.call(n);const i=zb(n);if(a===!0||a==="class_only"&&!i){const s=Object.getOwnPropertyDescriptors(n);delete s[an];let u=Reflect.ownKeys(s);for(let f=0;f<u.length;f++){const h=u[f],m=s[h];m.writable===!1&&(m.writable=!0,m.configurable=!0),(m.get||m.set)&&(s[h]={configurable:!0,writable:!0,enumerable:m.enumerable,value:n[h]})}return Object.create(Il(n),s)}else{const s=Il(n);if(s!==null&&i)return{...n};const u=Object.create(s);return Object.assign(u,n)}}function pd(n,a=!1){return nu(n)||Dr(n)||!Aa(n)||(eu(n)>1&&Object.defineProperties(n,{set:vo,add:vo,clear:vo,delete:vo}),Object.freeze(n),a&&Object.values(n).forEach(i=>pd(i,!0))),n}function qA(){wn(2)}var vo={value:qA};function nu(n){return n===null||typeof n!="object"?!0:Object.isFrozen(n)}var FA={};function Lr(n){const a=FA[n];return a||wn(0,n),a}var kl;function kb(){return kl}function VA(n,a){return{drafts_:[],parent_:n,immer_:a,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function fy(n,a){a&&(Lr("Patches"),n.patches_=[],n.inversePatches_=[],n.patchListener_=a)}function Mh(n){Dh(n),n.drafts_.forEach(YA),n.drafts_=null}function Dh(n){n===kl&&(kl=n.parent_)}function hy(n){return kl=VA(kl,n)}function YA(n){const a=n[an];a.type_===0||a.type_===1?a.revoke_():a.revoked_=!0}function dy(n,a){a.unfinalizedDrafts_=a.drafts_.length;const i=a.drafts_[0];return n!==void 0&&n!==i?(i[an].modified_&&(Mh(a),wn(4)),Aa(n)&&(n=Fo(a,n),a.parent_||Vo(a,n)),a.patches_&&Lr("Patches").generateReplacementPatches_(i[an].base_,n,a.patches_,a.inversePatches_)):n=Fo(a,i,[]),Mh(a),a.patches_&&a.patchListener_(a.patches_,a.inversePatches_),n!==Ub?n:void 0}function Fo(n,a,i){if(nu(a))return a;const s=n.immer_.shouldUseStrictIteration(),u=a[an];if(!u)return qo(a,(f,h)=>my(n,u,a,f,h,i),s),a;if(u.scope_!==n)return a;if(!u.modified_)return Vo(n,u.base_,!0),u.base_;if(!u.finalized_){u.finalized_=!0,u.scope_.unfinalizedDrafts_--;const f=u.copy_;let h=f,m=!1;u.type_===3&&(h=new Set(f),f.clear(),m=!0),qo(h,(p,g)=>my(n,u,f,p,g,i,m),s),Vo(n,f,!1),i&&n.patches_&&Lr("Patches").generatePatches_(u,i,n.patches_,n.inversePatches_)}return u.copy_}function my(n,a,i,s,u,f,h){if(u==null||typeof u!="object"&&!h)return;const m=nu(u);if(!(m&&!h)){if(Dr(u)){const p=f&&a&&a.type_!==3&&!Nh(a.assigned_,s)?f.concat(s):void 0,g=Fo(n,u,p);if(Ib(i,s,g),Dr(g))n.canAutoFreeze_=!1;else return}else h&&i.add(u);if(Aa(u)&&!m){if(!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||a&&a.base_&&a.base_[s]===u&&m)return;Fo(n,u),(!a||!a.scope_.parent_)&&typeof s!="symbol"&&(Zl(i)?i.has(s):Object.prototype.propertyIsEnumerable.call(i,s))&&Vo(n,u)}}}function Vo(n,a,i=!1){!n.parent_&&n.immer_.autoFreeze_&&n.canAutoFreeze_&&pd(a,i)}function ZA(n,a){const i=Array.isArray(n),s={type_:i?1:0,scope_:a?a.scope_:kb(),modified_:!1,finalized_:!1,assigned_:{},parent_:a,base_:n,draft_:null,copy_:null,revoke_:null,isManual_:!1};let u=s,f=gd;i&&(u=[s],f=Gl);const{revoke:h,proxy:m}=Proxy.revocable(u,f);return s.draft_=m,s.revoke_=h,m}var gd={get(n,a){if(a===an)return n;const i=Rr(n);if(!Nh(i,a))return XA(n,i,a);const s=i[a];return n.finalized_||!Aa(s)?s:s===jf(n.base_,a)?(Uf(n),n.copy_[a]=Bh(s,n)):s},has(n,a){return a in Rr(n)},ownKeys(n){return Reflect.ownKeys(Rr(n))},set(n,a,i){const s=Gb(Rr(n),a);if(s?.set)return s.set.call(n.draft_,i),!0;if(!n.modified_){const u=jf(Rr(n),a),f=u?.[an];if(f&&f.base_===i)return n.copy_[a]=i,n.assigned_[a]=!1,!0;if(GA(i,u)&&(i!==void 0||Nh(n.base_,a)))return!0;Uf(n),Lh(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 jf(n.base_,a)!==void 0||a in n.base_?(n.assigned_[a]=!1,Uf(n),Lh(n)):delete n.assigned_[a],n.copy_&&delete n.copy_[a],!0},getOwnPropertyDescriptor(n,a){const i=Rr(n),s=Reflect.getOwnPropertyDescriptor(i,a);return s&&{writable:!0,configurable:n.type_!==1||a!=="length",enumerable:s.enumerable,value:i[a]}},defineProperty(){wn(11)},getPrototypeOf(n){return Il(n.base_)},setPrototypeOf(){wn(12)}},Gl={};qo(gd,(n,a)=>{Gl[n]=function(){return arguments[0]=arguments[0][0],a.apply(this,arguments)}});Gl.deleteProperty=function(n,a){return Gl.set.call(this,n,a,void 0)};Gl.set=function(n,a,i){return gd.set.call(this,n[0],a,i,n[0])};function jf(n,a){const i=n[an];return(i?Rr(i):n)[a]}function XA(n,a,i){const s=Gb(a,i);return s?"value"in s?s.value:s.get?.call(n.draft_):void 0}function Gb(n,a){if(!(a in n))return;let i=Il(n);for(;i;){const s=Object.getOwnPropertyDescriptor(i,a);if(s)return s;i=Il(i)}}function Lh(n){n.modified_||(n.modified_=!0,n.parent_&&Lh(n.parent_))}function Uf(n){n.copy_||(n.copy_=wh(n.base_,n.scope_.immer_.useStrictShallowCopy_))}var QA=class{constructor(n){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(a,i,s)=>{if(typeof a=="function"&&typeof i!="function"){const f=i;i=a;const h=this;return function(p=f,...g){return h.produce(p,v=>i.call(this,v,...g))}}typeof i!="function"&&wn(6),s!==void 0&&typeof s!="function"&&wn(7);let u;if(Aa(a)){const f=hy(this),h=Bh(a,void 0);let m=!0;try{u=i(h),m=!1}finally{m?Mh(f):Dh(f)}return fy(f,s),dy(u,f)}else if(!a||typeof a!="object"){if(u=i(a),u===void 0&&(u=a),u===Ub&&(u=void 0),this.autoFreeze_&&pd(u,!0),s){const f=[],h=[];Lr("Patches").generateReplacementPatches_(a,u,f,h),s(f,h)}return u}else wn(1,a)},this.produceWithPatches=(a,i)=>{if(typeof a=="function")return(h,...m)=>this.produceWithPatches(h,p=>a(p,...m));let s,u;return[this.produce(a,i,(h,m)=>{s=h,u=m}),s,u]},typeof n?.autoFreeze=="boolean"&&this.setAutoFreeze(n.autoFreeze),typeof n?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(n.useStrictShallowCopy),typeof n?.useStrictIteration=="boolean"&&this.setUseStrictIteration(n.useStrictIteration)}createDraft(n){Aa(n)||wn(8),Dr(n)&&(n=PA(n));const a=hy(this),i=Bh(n,void 0);return i[an].isManual_=!0,Dh(a),i}finishDraft(n,a){const i=n&&n[an];(!i||!i.isManual_)&&wn(9);const{scope_:s}=i;return fy(s,a),dy(void 0,s)}setAutoFreeze(n){this.autoFreeze_=n}setUseStrictShallowCopy(n){this.useStrictShallowCopy_=n}setUseStrictIteration(n){this.useStrictIteration_=n}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(n,a){let i;for(i=a.length-1;i>=0;i--){const u=a[i];if(u.path.length===0&&u.op==="replace"){n=u.value;break}}i>-1&&(a=a.slice(i+1));const s=Lr("Patches").applyPatches_;return Dr(n)?s(n,a):this.produce(n,u=>s(u,a))}};function Bh(n,a){const i=Zl(n)?Lr("MapSet").proxyMap_(n,a):tu(n)?Lr("MapSet").proxySet_(n,a):ZA(n,a);return(a?a.scope_:kb()).drafts_.push(i),i}function PA(n){return Dr(n)||wn(10,n),qb(n)}function qb(n){if(!Aa(n)||nu(n))return n;const a=n[an];let i,s=!0;if(a){if(!a.modified_)return a.base_;a.finalized_=!0,i=wh(n,a.scope_.immer_.useStrictShallowCopy_),s=a.scope_.immer_.shouldUseStrictIteration()}else i=wh(n,!0);return qo(i,(u,f)=>{Ib(i,u,qb(f))},s),a&&(a.finalized_=!1),i}var Hh=new QA,Fb=Hh.produce,KA=Hh.setUseStrictIteration.bind(Hh);function Vb(n){return({dispatch:i,getState:s})=>u=>f=>typeof f=="function"?f(i,s,n):u(f)}var $A=Vb(),JA=Vb,WA=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Go:Go.apply(null,arguments)};function py(n,a){function i(...s){if(a){let u=a(...s);if(!u)throw new Error(va(0));return{type:n,payload:u.payload,..."meta"in u&&{meta:u.meta},..."error"in u&&{error:u.error}}}return{type:n,payload:s[0]}}return i.toString=()=>`${n}`,i.type=n,i.match=s=>IA(s)&&s.type===n,i}var Yb=class Hl extends Array{constructor(...a){super(...a),Object.setPrototypeOf(this,Hl.prototype)}static get[Symbol.species](){return Hl}concat(...a){return super.concat.apply(this,a)}prepend(...a){return a.length===1&&Array.isArray(a[0])?new Hl(...a[0].concat(this)):new Hl(...a.concat(this))}};function gy(n){return Aa(n)?Fb(n,()=>{}):n}function _o(n,a,i){return n.has(a)?n.get(a):n.set(a,i(a)).get(a)}function ex(n){return typeof n=="boolean"}var tx=()=>function(a){const{thunk:i=!0,immutableCheck:s=!0,serializableCheck:u=!0,actionCreatorCheck:f=!0}=a??{};let h=new Yb;return i&&(ex(i)?h.push($A):h.push(JA(i.extraArgument))),h},nx="RTK_autoBatch",yy=n=>a=>{setTimeout(a,n)},ax=(n={type:"raf"})=>a=>(...i)=>{const s=a(...i);let u=!0,f=!1,h=!1;const m=new Set,p=n.type==="tick"?queueMicrotask:n.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:yy(10):n.type==="callback"?n.queueNotification:yy(n.timeout),g=()=>{h=!1,f&&(f=!1,m.forEach(v=>v()))};return Object.assign({},s,{subscribe(v){const S=()=>u&&v(),T=s.subscribe(S);return m.add(v),()=>{T(),m.delete(v)}},dispatch(v){try{return u=!v?.meta?.[nx],f=!u,f&&(h||(h=!0,p(g))),s.dispatch(v)}finally{u=!0}}})},rx=n=>function(i){const{autoBatch:s=!0}=i??{};let u=new Yb(n);return s&&u.push(ax(typeof s=="object"?s:void 0)),u};function ix(n){const a=tx(),{reducer:i=void 0,middleware:s,devTools:u=!0,preloadedState:f=void 0,enhancers:h=void 0}=n||{};let m;if(typeof i=="function")m=i;else if(md(i))m=jb(i);else throw new Error(va(1));let p;typeof s=="function"?p=s(a):p=a();let g=Go;u&&(g=WA({trace:!1,...typeof u=="object"&&u}));const v=zA(...p),S=rx(v);let T=typeof h=="function"?h(S):S();const M=g(...T);return Hb(m,f,M)}function Zb(n){const a={},i=[];let s;const u={addCase(f,h){const m=typeof f=="string"?f:f.type;if(!m)throw new Error(va(28));if(m in a)throw new Error(va(29));return a[m]=h,u},addAsyncThunk(f,h){return h.pending&&(a[f.pending.type]=h.pending),h.rejected&&(a[f.rejected.type]=h.rejected),h.fulfilled&&(a[f.fulfilled.type]=h.fulfilled),h.settled&&i.push({matcher:f.settled,reducer:h.settled}),u},addMatcher(f,h){return i.push({matcher:f,reducer:h}),u},addDefaultCase(f){return s=f,u}};return n(u),[a,i,s]}KA(!1);function lx(n){return typeof n=="function"}function sx(n,a){let[i,s,u]=Zb(a),f;if(lx(n))f=()=>gy(n());else{const m=gy(n);f=()=>m}function h(m=f(),p){let g=[i[p.type],...s.filter(({matcher:v})=>v(p)).map(({reducer:v})=>v)];return g.filter(v=>!!v).length===0&&(g=[u]),g.reduce((v,S)=>{if(S)if(Dr(v)){const M=S(v,p);return M===void 0?v:M}else{if(Aa(v))return Fb(v,T=>S(T,p));{const T=S(v,p);if(T===void 0){if(v===null)return v;throw Error("A case reducer on a non-draftable value must not return undefined")}return T}}return v},m)}return h.getInitialState=f,h}var ox=Symbol.for("rtk-slice-createasyncthunk");function ux(n,a){return`${n}/${a}`}function cx({creators:n}={}){const a=n?.asyncThunk?.[ox];return function(s){const{name:u,reducerPath:f=u}=s;if(!u)throw new Error(va(11));const h=(typeof s.reducers=="function"?s.reducers(hx()):s.reducers)||{},m=Object.keys(h),p={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},g={addCase(D,k){const w=typeof D=="string"?D:D.type;if(!w)throw new Error(va(12));if(w in p.sliceCaseReducersByType)throw new Error(va(13));return p.sliceCaseReducersByType[w]=k,g},addMatcher(D,k){return p.sliceMatchers.push({matcher:D,reducer:k}),g},exposeAction(D,k){return p.actionCreators[D]=k,g},exposeCaseReducer(D,k){return p.sliceCaseReducersByName[D]=k,g}};m.forEach(D=>{const k=h[D],w={reducerName:D,type:ux(u,D),createNotation:typeof s.reducers=="function"};mx(k)?gx(w,k,g,a):dx(w,k,g)});function v(){const[D={},k=[],w=void 0]=typeof s.extraReducers=="function"?Zb(s.extraReducers):[s.extraReducers],Z={...D,...p.sliceCaseReducersByType};return sx(s.initialState,P=>{for(let ae in Z)P.addCase(ae,Z[ae]);for(let ae of p.sliceMatchers)P.addMatcher(ae.matcher,ae.reducer);for(let ae of k)P.addMatcher(ae.matcher,ae.reducer);w&&P.addDefaultCase(w)})}const S=D=>D,T=new Map,M=new WeakMap;let _;function O(D,k){return _||(_=v()),_(D,k)}function x(){return _||(_=v()),_.getInitialState()}function L(D,k=!1){function w(P){let ae=P[D];return typeof ae>"u"&&k&&(ae=_o(M,w,x)),ae}function Z(P=S){const ae=_o(T,k,()=>new WeakMap);return _o(ae,P,()=>{const De={};for(const[He,pe]of Object.entries(s.selectors??{}))De[He]=fx(pe,P,()=>_o(M,P,x),k);return De})}return{reducerPath:D,getSelectors:Z,get selectors(){return Z(w)},selectSlice:w}}const z={name:u,reducer:O,actions:p.actionCreators,caseReducers:p.sliceCaseReducersByName,getInitialState:x,...L(f),injectInto(D,{reducerPath:k,...w}={}){const Z=k??f;return D.inject({reducerPath:Z,reducer:O},w),{...z,...L(Z,!0)}}};return z}}function fx(n,a,i,s){function u(f,...h){let m=a(f);return typeof m>"u"&&s&&(m=i()),n(m,...h)}return u.unwrapped=n,u}var yd=cx();function hx(){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 dx({type:n,reducerName:a,createNotation:i},s,u){let f,h;if("reducer"in s){if(i&&!px(s))throw new Error(va(17));f=s.reducer,h=s.prepare}else f=s;u.addCase(n,f).exposeCaseReducer(a,f).exposeAction(a,h?py(n,h):py(n))}function mx(n){return n._reducerDefinitionType==="asyncThunk"}function px(n){return n._reducerDefinitionType==="reducerWithPrepare"}function gx({type:n,reducerName:a},i,s,u){if(!u)throw new Error(va(18));const{payloadCreator:f,fulfilled:h,pending:m,rejected:p,settled:g,options:v}=i,S=u(n,f,v);s.exposeAction(a,S),h&&s.addCase(S.fulfilled,h),m&&s.addCase(S.pending,m),p&&s.addCase(S.rejected,p),g&&s.addMatcher(S.settled,g),s.exposeCaseReducer(a,{fulfilled:h||So,pending:m||So,rejected:p||So,settled:g||So})}function So(){}function va(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 yx={formValues:{}},Xb=yd({name:"start-screen",initialState:yx,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:bx,startAuthenticatedChat:vx,showStartScreen:_x,requestLogin:Sx,loginWindowClosed:Ex}=Xb.actions,Tx=Xb.reducer,Qb="RESET_CHAT_STATE",Pb="TOGGLE_TRANSCRIPT_MAIL_OVERLAY",Kb="SHOW_CONVERSATION_RATING_OVERLAY",$b="HIDE_CONVERSATION_RATING_OVERLAY",Jb=()=>({type:wb}),Ax=()=>({type:Qb}),Wb=()=>({type:Pb}),Yo=(n,a=void 0)=>({type:Kb,payload:{opener:n,defaultRating:a}}),xx=()=>({type:$b}),by=(n,a,i)=>(s,u)=>{try{const f=u().connection.sessionId;if(!f)throw new Error("Session ID is not available");s({type:fd,payload:{chunkId:i}}),vy(n,f,a,i,!1,s),vy(n,f,a,i,!0,s)}catch(f){console.error("Error loading source infos:",f),s({type:cd})}},vy=(n,a,i,s,u,f)=>{const h=`/${n}/me/chat-widget/transcript/${i}/chunks/${s}?highlight=${u}`;fetch(h,{headers:{"x-bubble-chat-session-id":a}}).then(m=>{if(!m.ok)throw new Error(`HTTP error! Status: ${m.status}`);return m.json()}).then(m=>{const p={...m,chunkId:s,highlighted:u};f({type:Rb,payload:p})}).catch(m=>{console.error("Error fetching source infos:",m),f({type:cd,payload:{highlighted:u}})})},Ox=()=>({type:hd}),bd="CONNECT",vd="CONNECTING",_d="CONNECTED",Sd="DISCONNECTED",Ed="RECONNECTED",Td="RESTORE_SESSION_ID",au="START",ru="CLEAR_SESSION_ID",Cx=[bd,vd,_d,Sd,Ed,Td],Rx=(n,a)=>({type:bd,clientName:n,querystrings:a}),Nx=n=>({type:Td,sessionId:n}),wx=()=>({type:vd}),Mx=()=>({type:_d}),Dx=()=>({type:Sd}),Lx=()=>({type:Ed}),ev=n=>(a,i)=>{const s=i().connection,{formValues:u,loginToken:f}=i().startScreen;let h=s.sessionId;h===void 0&&(h=Io());let m=s.userId;if(m===void 0){const g=bo.get("bubble-chat-user-id")||bo.get("bubble-chat-userId")||bo.get("bf-webclient-userId");m=g||Io(),bo.set("bubble-chat-user-id",m)}const p=td.parse(i().connection.queryString||"");a({type:au,payload:{sessionId:h,userId:m,clientName:n,loginToken:f,querystrings:{...p,...u}}})},Xl=()=>(n,a)=>{const i=a().connection.sessionId||"";if(n(Bx(i)),n(Ax()),a().settings.enableStartScreen)n(_x());else{const s=dd();return n(ev(s))}},Bx=n=>({type:ru,payload:{sessionId:n}}),Je=()=>{const n=Jo();return i=>{const s=n.formatMessage({id:i});return s===i?void 0:s}};var wr=(n=>(n[n.CONNECTING=0]="CONNECTING",n[n.CONNECTED=1]="CONNECTED",n[n.RECONNECTED=2]="RECONNECTED",n[n.DISCONNECTED=3]="DISCONNECTED",n))(wr||{}),Zo=(n=>(n.GUEST="GUEST",n.BOT="BOT",n.PERSON="PERSON",n))(Zo||{});const Hx="_container_q2uun_1",jx="_chatcontent_q2uun_6",Ux="_accessabilityHidden_q2uun_12",zf={container:Hx,chatcontent:jx,accessabilityHidden:Ux},zx="_messageContainer_1t640_1",Ix="_messages_1t640_13",_y={messageContainer:zx,messages:Ix};function qn(){return qn=Object.assign?Object.assign.bind():function(n){for(var a=1;a<arguments.length;a++){var i=arguments[a];for(var s in i)({}).hasOwnProperty.call(i,s)&&(n[s]=i[s])}return n},qn.apply(null,arguments)}const Eo=["strong","em","del","mark"],Sy=[["**",Eo[0]],["__",Eo[0]],["~~",Eo[2]],["==",Eo[3]],["*","em"],["_","em"]];function kx(n,a){for(var i=1,s=a+1;s<n.length&&i>0;)n[s]!=="\\"?(n[s]==="["&&i++,n[s]==="]"&&i--,s++):s+=2;if(i===0&&s<n.length&&(n[s]==="("||n[s]==="[")){var u=n[s]==="("?")":"]",f=1;for(s++;s<n.length&&f>0;)n[s]!=="\\"?(n[s]==="("&&u===")"&&f++,n[s]===u&&f--,s++):s+=2;if(f===0)return s}return-1}function Gx(n,a){if(!a||!a.inline&&!a.simple)return null;var i=n[0];if(i!=="*"&&i!=="_"&&i!=="~"&&i!=="=")return null;for(var s="",u=0,f="",h=0;h<6;h++){var m=Sy[h][0];if(n.startsWith(m)&&n.length>=2*m.length){s=m,u=m.length,f=Sy[h][1];break}}if(!s)return null;for(var p=u,g=!1,v=!1,S="",T=0,M="",_=!1,O="";p<n.length;){var x=n[p];if(_)M+=x,_=!1,O=x,p++;else if(x!=="\\")if(x!=="`"||T!==0){if(x==="["&&!g&&T===0){var L=kx(n,p);if(L!==-1){M+=n.slice(p,L),p=L,O=n[L-1];continue}}if(v)M+=x,S?x===S&&(S=""):x==='"'||x==="'"?S=x:x===">"&&(v=!1),O=x,p++;else if(x!=="<"||g){if(x===`
|
|
94
94
|
`&&O===`
|
|
95
95
|
`&&!g&&T===0)return null;if(!g&&T===0){for(var z=0;p+z<n.length&&n[p+z]===s[0];)z++;if(z>=u&&(u!==1||s!=="*"&&s!=="_"||n[p-1]!==s&&n[p+1]!==s)){var D=[n.slice(0,p+z),f,M+n.slice(p+u,p+z)];return D.index=0,D.input=n,D}}M+=x,O=x,p++}else{var k=n[p+1],w=n.indexOf(">",p);if(w!==-1){var Z=n.slice(p,w+1).endsWith("/>");k==="/"?T=Math.max(0,T-1):Z||T++}v=!0,M+=x,O=x,p++}}else g=!g,M+=x,O=x,p++;else M+=x,_=!0,O=x,p++}return null}const qx=["children","options"],Fx={footnoteReference:"7"},Ey=["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"}),Ty={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},Vx=["style","script","pre"],Yx=["src","href","data","formAction","srcDoc","action"],Zx=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,Xx=/\n{2,}$/,Ay=/^(\s*>[\s\S]*?)(?=\n\n|$)/,Qx=/^ *> ?/gm,Px=/^(?:\[!([^\]]*)\]\n)?([\s\S]*)/,Kx=/^ {2,}\n/,$x=/^(?:([-*_])( *\1){2,}) *(?:\n *)+\n/,xy=/^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/,Oy=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,Jx=/^(`+)((?:\\`|(?!\1)`|[^`])+)\1/,Wx=/^(?:\n *)*\n/,eO=/\r\n?/g,tO=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,nO=/^\[\^([^\]]+)]/,aO=/\f/g,rO=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,iO=/^\[(x|\s)\]/,Cy=/^(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,Ry=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,Ny=/^([^\n]+)\n *(=|-)\2{2,} *\n/,Ad=/^<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>/i;function lO(n){const a=Ad.exec(n);if(!a)return null;const i=a[1],s=i.toLowerCase(),u=s.length+1;let f=a[0].length;n[f]===`
|
|
96
96
|
`&&f++;const h=f;let m=f,p=1;const g=n.length;for(;p>0;){const S=n.indexOf("<",f);if(S===-1)return null;let T=-1,M=-1;if(n[S+1]==="/")M=S;else if(n[S+1]===s[0]||n[S+1]===i[0]){let _=!0;for(let O=0;O<s.length;O++){const x=n[S+1+O];if(x!==s[O]&&x!==i[O]){_=!1;break}}!_||n[S+u]!==" "&&n[S+u]!==">"||(T=S)}if(T!==-1||M!==-1)if(T!==-1&&(M===-1||T<M))f=T+u+1,p++;else{let _=M+2;for(;_<g;){const x=n[_];if(x!==" "&&x!==" "&&x!==`
|
|
@@ -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"},mN=["de","en","fr","it"],Rv={locale:"de",messages:Cv},pN=(n,a)=>{if(mN.includes(n)){const i=gN(n),s=cN(a);return{...i,...s}}return a},gN=n=>{switch(n.toString()){case"en":return fN;case"fr":return hN;case"it":return dN;default:return Cv}},yN=(n=bN,a)=>{switch(a.type){case vd:return Object.assign({},n,{connectionState:wr.CONNECTING});case _d:return Object.assign({},n,{connectionState:wr.CONNECTED});case Sd:return Object.assign({},n,{connectionState:wr.DISCONNECTED});case Ed:return Object.assign({},n,{connectionState:wr.RECONNECTED});case Td:return Object.assign({},n,{sessionId:a.sessionId});case au:return Object.assign({},n,{sessionId:a.payload.sessionId,userId:a.payload.userId});case ru:return Object.assign({},n,{sessionId:void 0});default:return n}},bN={connectionState:wr.DISCONNECTED,sessionId:void 0,userId:void 0,queryString:window.location.search},vN=(n=E1,a)=>{switch(a.type){case Qb:return E1;case au:return Cr({type:"webclient.chat.started"}),n;case ru:return Cr({type:"webclient.chat.ended"}),n;case vb:return Object.assign({},n,{isBotTyping:!0});case _b:return Object.assign({},n,{isBotTyping:!1});case nd:case Sb:return S1(n,a.message);case Eb:{Cr(a);const i=Object.assign({},a.message,{_id:a.meta.actionId}),s=n.messages.filter(u=>u._id===a.meta.actionId).length>0;return Object.assign({},n,{isBotTyping:!1,messages:s?n.messages:n.messages.concat([i]),quickReplies:i.quickReplies?i.quickReplies:[]})}case ld:{const i=a.messages,s=i.length?i[i.length-1]:void 0;return Object.assign({},n,{isBotTyping:!1,messages:i,quickReplies:s?.quickReplies||[]})}case id:return Cr(a.message),n;case Tb:return Cr(a.event),n;case uA:return Object.assign({},n,{drawerContentUrl:a.payload.parameters.contentUrl});case cA:return Object.assign({},n,{drawerContentUrl:void 0});case fA:return Object.assign({},n,{locale:a.payload.locale});case Nb:return Cr(a),n;case wb:return Cr(a),{...n,conversationRating:{...n.conversationRating,opener:void 0}};case od:{const i=new Wo(a.transcription,new rd),s=Object.assign({},i,{_id:Io()});return S1(n,s)}case Ab:{const i=n.messages.map(s=>s._id===a.payload.actionId?Object.assign({},s,a.payload.reaction?{reaction:{type:a.payload.reaction,category:a.payload.category,comment:a.payload.comment}}:{reaction:void 0}):s);return Object.assign({},n,{messages:i})}case ud:{const i={enabled:!0,rating:a.payload.rating};return Object.assign({},n,{conversationRating:i})}case ad:{const i={...n.conversationRating,rating:a.payload};return Object.assign({},n,{conversationRating:i})}case Kb:{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 $b:{const i={...n.conversationRating,opener:void 0};return Object.assign({},n,{conversationRating:i})}case fd:return{...n,sourceInfos:{type:"loading",chunkId:a.payload.chunkId}};case cd:{const{highlighted:i}=a.payload;return n.sourceInfos?.type==="loaded"&&i?{...n,sourceInfos:{...n.sourceInfos,highlighted:!0}}:{...n,sourceInfos:{type:"loading-error"}}}case Rb:{const i=n.sourceInfos?.type,{chunkId:s,knowledgeBaseType:u,title:f,content:h,highlighted:m,url:p}=a.payload,g=n.sourceInfos?.type==="loading"||n.sourceInfos?.type==="loaded"?n.sourceInfos?.chunkId:void 0;return g&&g!==s?n:i==="loading"||i==="loaded"&&m?{...n,sourceInfos:{type:"loaded",chunkId:s,knowledgeBaseType:u,title:f,content:h,highlighted:m,url:p}}:n}case hd:return{...n,sourceInfos:void 0};case Pb:return{...n,showTranscriptMailOverlay:!n.showTranscriptMailOverlay,conversationRating:{...n.conversationRating,opener:void 0}};default:return n}},S1=(n,a)=>{const i=n.messages[n.messages.length-1],s=i?.text===a.text;return i&&i.sender.type===a.sender.type&&s?n:Object.assign({},n,{messages:n.messages.concat([a]),quickReplies:[]})},Cr=n=>{_N()?window.top?.postMessage(n,"*"):n.type==="webclient.change.url"&&window.open(n.url)},_N=()=>typeof window<"u"&&window.self!==window.top,E1={messages:[],quickReplies:[],isBotTyping:!1,showTranscriptMailOverlay:!1,conversationRating:{enabled:!1}},Nv=yd({name:"intl",initialState:Rv,reducers:{updateIntl:(n,a)=>{n.locale=a.payload.language,n.messages=a.payload.messages}}}),{updateIntl:SN}=Nv.actions,EN=Nv.reducer,TN={version:void 0,requiresUserAuthentication:!1,enableStartScreen:void 0,enableStandaloneView:!1,enableTranscriptExportEmail:!1,enableTranscriptExportPdf:!1,enableGeneralConditions:!1,enableSpeechSupport:!1,commands:[],menuItems:[]},wv=yd({name:"settings",initialState:TN,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:AN}=wv.actions,xN=wv.reducer,ON=jb({settings:xN,chat:vN,startScreen:Tx,connection:yN,intl:EN}),CN="bubble-chat",Mv="state-last-saved-at",Dv="state",RN=n=>{try{if(!MN())return;const a=T1(n,Mv);if(wN(a))return;{const i=T1(n,Dv);if(i===null)return;const s=JSON.parse(i),u=s.connection?.queryString;if(u!==void 0&&u!==window.location.search){console.log("Ignoring persisted state due to different query string");return}else return s}}catch(a){console.error(a);return}},NN=(n,a)=>{try{const i=JSON.stringify(a);A1(n,Dv,i);const s=new Date().toISOString();A1(n,Mv,s)}catch(i){console.error(i)}},wN=n=>{if(n===null)return!1;const a=new Date(n);return a.setHours(a.getHours()+12),new Date>a},MN=()=>typeof localStorage<"u",T1=(n,a)=>{const i=Lv(n,a);return localStorage.getItem(i)},A1=(n,a,i)=>{const s=Lv(n,a);return localStorage.setItem(s,i)},Lv=(n,a)=>`${CN}-${n}-${a}`,Yn=Object.create(null);Yn.open="0";Yn.close="1";Yn.ping="2";Yn.pong="3";Yn.message="4";Yn.upgrade="5";Yn.noop="6";const Lo=Object.create(null);Object.keys(Yn).forEach(n=>{Lo[Yn[n]]=n});const Gh={type:"error",data:"parser error"},Bv=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Hv=typeof ArrayBuffer=="function",jv=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n&&n.buffer instanceof ArrayBuffer,Md=({type:n,data:a},i,s)=>Bv&&a instanceof Blob?i?s(a):x1(a,s):Hv&&(a instanceof ArrayBuffer||jv(a))?i?s(a):x1(new Blob([a]),s):s(Yn[n]+(a||"")),x1=(n,a)=>{const i=new FileReader;return i.onload=function(){const s=i.result.split(",")[1];a("b"+(s||""))},i.readAsDataURL(n)};function O1(n){return n instanceof Uint8Array?n:n instanceof ArrayBuffer?new Uint8Array(n):new Uint8Array(n.buffer,n.byteOffset,n.byteLength)}let fh;function DN(n,a){if(Bv&&n.data instanceof Blob)return n.data.arrayBuffer().then(O1).then(a);if(Hv&&(n.data instanceof ArrayBuffer||jv(n.data)))return a(O1(n.data));Md(n,!1,i=>{fh||(fh=new TextEncoder),a(fh.encode(i))})}const C1="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ul=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let n=0;n<C1.length;n++)Ul[C1.charCodeAt(n)]=n;const LN=n=>{let a=n.length*.75,i=n.length,s,u=0,f,h,m,p;n[n.length-1]==="="&&(a--,n[n.length-2]==="="&&a--);const g=new ArrayBuffer(a),v=new Uint8Array(g);for(s=0;s<i;s+=4)f=Ul[n.charCodeAt(s)],h=Ul[n.charCodeAt(s+1)],m=Ul[n.charCodeAt(s+2)],p=Ul[n.charCodeAt(s+3)],v[u++]=f<<2|h>>4,v[u++]=(h&15)<<4|m>>2,v[u++]=(m&3)<<6|p&63;return g},BN=typeof ArrayBuffer=="function",Dd=(n,a)=>{if(typeof n!="string")return{type:"message",data:Uv(n,a)};const i=n.charAt(0);return i==="b"?{type:"message",data:HN(n.substring(1),a)}:Lo[i]?n.length>1?{type:Lo[i],data:n.substring(1)}:{type:Lo[i]}:Gh},HN=(n,a)=>{if(BN){const i=LN(n);return Uv(i,a)}else return{base64:!0,data:n}},Uv=(n,a)=>{switch(a){case"blob":return n instanceof Blob?n:new Blob([n]);case"arraybuffer":default:return n instanceof ArrayBuffer?n:n.buffer}},zv="",jN=(n,a)=>{const i=n.length,s=new Array(i);let u=0;n.forEach((f,h)=>{Md(f,!1,m=>{s[h]=m,++u===i&&a(s.join(zv))})})},UN=(n,a)=>{const i=n.split(zv),s=[];for(let u=0;u<i.length;u++){const f=Dd(i[u],a);if(s.push(f),f.type==="error")break}return s};function zN(){return new TransformStream({transform(n,a){DN(n,i=>{const s=i.length;let u;if(s<126)u=new Uint8Array(1),new DataView(u.buffer).setUint8(0,s);else if(s<65536){u=new Uint8Array(3);const f=new DataView(u.buffer);f.setUint8(0,126),f.setUint16(1,s)}else{u=new Uint8Array(9);const f=new DataView(u.buffer);f.setUint8(0,127),f.setBigUint64(1,BigInt(s))}n.data&&typeof n.data!="string"&&(u[0]|=128),a.enqueue(u),a.enqueue(i)})}})}let hh;function Ro(n){return n.reduce((a,i)=>a+i.length,0)}function No(n,a){if(n[0].length===a)return n.shift();const i=new Uint8Array(a);let s=0;for(let u=0;u<a;u++)i[u]=n[0][s++],s===n[0].length&&(n.shift(),s=0);return n.length&&s<n[0].length&&(n[0]=n[0].slice(s)),i}function IN(n,a){hh||(hh=new TextDecoder);const i=[];let s=0,u=-1,f=!1;return new TransformStream({transform(h,m){for(i.push(h);;){if(s===0){if(Ro(i)<1)break;const p=No(i,1);f=(p[0]&128)===128,u=p[0]&127,u<126?s=3:u===126?s=1:s=2}else if(s===1){if(Ro(i)<2)break;const p=No(i,2);u=new DataView(p.buffer,p.byteOffset,p.length).getUint16(0),s=3}else if(s===2){if(Ro(i)<8)break;const p=No(i,8),g=new DataView(p.buffer,p.byteOffset,p.length),v=g.getUint32(0);if(v>Math.pow(2,21)-1){m.enqueue(Gh);break}u=v*Math.pow(2,32)+g.getUint32(4),s=3}else{if(Ro(i)<u)break;const p=No(i,u);m.enqueue(Dd(f?p:hh.decode(p),a)),s=0}if(u===0||u>n){m.enqueue(Gh);break}}}})}const Iv=4;function mt(n){if(n)return kN(n)}function kN(n){for(var a in mt.prototype)n[a]=mt.prototype[a];return n}mt.prototype.on=mt.prototype.addEventListener=function(n,a){return this._callbacks=this._callbacks||{},(this._callbacks["$"+n]=this._callbacks["$"+n]||[]).push(a),this};mt.prototype.once=function(n,a){function i(){this.off(n,i),a.apply(this,arguments)}return i.fn=a,this.on(n,i),this};mt.prototype.off=mt.prototype.removeListener=mt.prototype.removeAllListeners=mt.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 s,u=0;u<i.length;u++)if(s=i[u],s===a||s.fn===a){i.splice(u,1);break}return i.length===0&&delete this._callbacks["$"+n],this};mt.prototype.emit=function(n){this._callbacks=this._callbacks||{};for(var a=new Array(arguments.length-1),i=this._callbacks["$"+n],s=1;s<arguments.length;s++)a[s-1]=arguments[s];if(i){i=i.slice(0);for(var s=0,u=i.length;s<u;++s)i[s].apply(this,a)}return this};mt.prototype.emitReserved=mt.prototype.emit;mt.prototype.listeners=function(n){return this._callbacks=this._callbacks||{},this._callbacks["$"+n]||[]};mt.prototype.hasListeners=function(n){return!!this.listeners(n).length};const lu=typeof Promise=="function"&&typeof Promise.resolve=="function"?a=>Promise.resolve().then(a):(a,i)=>i(a,0),bn=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),GN="arraybuffer";function kv(n,...a){return a.reduce((i,s)=>(n.hasOwnProperty(s)&&(i[s]=n[s]),i),{})}const qN=bn.setTimeout,FN=bn.clearTimeout;function su(n,a){a.useNativeTimers?(n.setTimeoutFn=qN.bind(bn),n.clearTimeoutFn=FN.bind(bn)):(n.setTimeoutFn=bn.setTimeout.bind(bn),n.clearTimeoutFn=bn.clearTimeout.bind(bn))}const VN=1.33;function YN(n){return typeof n=="string"?ZN(n):Math.ceil((n.byteLength||n.size)*VN)}function ZN(n){let a=0,i=0;for(let s=0,u=n.length;s<u;s++)a=n.charCodeAt(s),a<128?i+=1:a<2048?i+=2:a<55296||a>=57344?i+=3:(s++,i+=4);return i}function Gv(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function XN(n){let a="";for(let i in n)n.hasOwnProperty(i)&&(a.length&&(a+="&"),a+=encodeURIComponent(i)+"="+encodeURIComponent(n[i]));return a}function QN(n){let a={},i=n.split("&");for(let s=0,u=i.length;s<u;s++){let f=i[s].split("=");a[decodeURIComponent(f[0])]=decodeURIComponent(f[1])}return a}class PN extends Error{constructor(a,i,s){super(a),this.description=i,this.context=s,this.type="TransportError"}}class Ld extends mt{constructor(a){super(),this.writable=!1,su(this,a),this.opts=a,this.query=a.query,this.socket=a.socket,this.supportsBinary=!a.forceBase64}onError(a,i,s){return super.emitReserved("error",new PN(a,i,s)),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=Dd(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=XN(a);return i.length?"?"+i:""}}class KN extends Ld{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 s=0;this._polling&&(s++,this.once("pollComplete",function(){--s||i()})),this.writable||(s++,this.once("drain",function(){--s||i()}))}else i()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(a){const i=s=>{if(this.readyState==="opening"&&s.type==="open"&&this.onOpen(),s.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(s)};UN(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,jN(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]=Gv()),!this.supportsBinary&&!i.sid&&(i.b64=1),this.createUri(a,i)}}let qv=!1;try{qv=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const $N=qv;function JN(){}class WN extends KN{constructor(a){if(super(a),typeof location<"u"){const i=location.protocol==="https:";let s=location.port;s||(s=i?"443":"80"),this.xd=typeof location<"u"&&a.hostname!==location.hostname||s!==a.port}}doWrite(a,i){const s=this.request({method:"POST",data:a});s.on("success",i),s.on("error",(u,f)=>{this.onError("xhr post error",u,f)})}doPoll(){const a=this.request();a.on("data",this.onData.bind(this)),a.on("error",(i,s)=>{this.onError("xhr poll error",i,s)}),this.pollXhr=a}}class Fn extends mt{constructor(a,i,s){super(),this.createRequest=a,su(this,s),this._opts=s,this._method=s.method||"GET",this._uri=i,this._data=s.data!==void 0?s.data:null,this._create()}_create(){var a;const i=kv(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");i.xdomain=!!this._opts.xd;const s=this._xhr=this.createRequest(i);try{s.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){s.setDisableHeaderCheck&&s.setDisableHeaderCheck(!0);for(let u in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(u)&&s.setRequestHeader(u,this._opts.extraHeaders[u])}}catch{}if(this._method==="POST")try{s.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{s.setRequestHeader("Accept","*/*")}catch{}(a=this._opts.cookieJar)===null||a===void 0||a.addCookies(s),"withCredentials"in s&&(s.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(s.timeout=this._opts.requestTimeout),s.onreadystatechange=()=>{var u;s.readyState===3&&((u=this._opts.cookieJar)===null||u===void 0||u.parseCookies(s.getResponseHeader("set-cookie"))),s.readyState===4&&(s.status===200||s.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof s.status=="number"?s.status:0)},0))},s.send(this._data)}catch(u){this.setTimeoutFn(()=>{this._onError(u)},0);return}typeof document<"u"&&(this._index=Fn.requestsCount++,Fn.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=JN,a)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Fn.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()}}Fn.requestsCount=0;Fn.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",R1);else if(typeof addEventListener=="function"){const n="onpagehide"in bn?"pagehide":"unload";addEventListener(n,R1,!1)}}function R1(){for(let n in Fn.requests)Fn.requests.hasOwnProperty(n)&&Fn.requests[n].abort()}const ew=(function(){const n=Fv({xdomain:!1});return n&&n.responseType!==null})();class tw extends WN{constructor(a){super(a);const i=a&&a.forceBase64;this.supportsBinary=ew&&!i}request(a={}){return Object.assign(a,{xd:this.xd},this.opts),new Fn(Fv,this.uri(),a)}}function Fv(n){const a=n.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!a||$N))return new XMLHttpRequest}catch{}if(!a)try{return new bn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const Vv=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class nw extends Ld{get name(){return"websocket"}doOpen(){const a=this.uri(),i=this.opts.protocols,s=Vv?{}:kv(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(s.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(a,i,s)}catch(u){return this.emitReserved("error",u)}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 s=a[i],u=i===a.length-1;Md(s,this.supportsBinary,f=>{try{this.doWrite(s,f)}catch{}u&&lu(()=>{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]=Gv()),this.supportsBinary||(i.b64=1),this.createUri(a,i)}}const dh=bn.WebSocket||bn.MozWebSocket;class aw extends nw{createSocket(a,i,s){return Vv?new dh(a,i,s):i?new dh(a,i):new dh(a)}doWrite(a,i){this.ws.send(i)}}class rw extends Ld{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=IN(Number.MAX_SAFE_INTEGER,this.socket.binaryType),s=a.readable.pipeThrough(i).getReader(),u=zN();u.readable.pipeTo(a.writable),this._writer=u.writable.getWriter();const f=()=>{s.read().then(({done:m,value:p})=>{m||(this.onPacket(p),f())}).catch(m=>{})};f();const h={type:"open"};this.query.sid&&(h.data=`{"sid":"${this.query.sid}"}`),this._writer.write(h).then(()=>this.onOpen())})})}write(a){this.writable=!1;for(let i=0;i<a.length;i++){const s=a[i],u=i===a.length-1;this._writer.write(s).then(()=>{u&&lu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var a;(a=this._transport)===null||a===void 0||a.close()}}const iw={websocket:aw,webtransport:rw,polling:tw},lw=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,sw=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function qh(n){if(n.length>8e3)throw"URI too long";const a=n,i=n.indexOf("["),s=n.indexOf("]");i!=-1&&s!=-1&&(n=n.substring(0,i)+n.substring(i,s).replace(/:/g,";")+n.substring(s,n.length));let u=lw.exec(n||""),f={},h=14;for(;h--;)f[sw[h]]=u[h]||"";return i!=-1&&s!=-1&&(f.source=a,f.host=f.host.substring(1,f.host.length-1).replace(/;/g,":"),f.authority=f.authority.replace("[","").replace("]","").replace(/;/g,":"),f.ipv6uri=!0),f.pathNames=ow(f,f.path),f.queryKey=uw(f,f.query),f}function ow(n,a){const i=/\/{2,9}/g,s=a.replace(i,"/").split("/");return(a.slice(0,1)=="/"||a.length===0)&&s.splice(0,1),a.slice(-1)=="/"&&s.splice(s.length-1,1),s}function uw(n,a){const i={};return a.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(s,u,f){u&&(i[u]=f)}),i}const Fh=typeof addEventListener=="function"&&typeof removeEventListener=="function",Bo=[];Fh&&addEventListener("offline",()=>{Bo.forEach(n=>n())},!1);class nr extends mt{constructor(a,i){if(super(),this.binaryType=GN,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 s=qh(a);i.hostname=s.host,i.secure=s.protocol==="https"||s.protocol==="wss",i.port=s.port,s.query&&(i.query=s.query)}else i.host&&(i.hostname=qh(i.host).host);su(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(s=>{const u=s.prototype.name;this.transports.push(u),this._transportsByName[u]=s}),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=QN(this.opts.query)),Fh&&(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"})},Bo.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(a){const i=Object.assign({},this.opts.query);i.EIO=Iv,i.transport=a,this.id&&(i.sid=this.id);const s=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](s)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const a=this.opts.rememberUpgrade&&nr.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",nr.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 s=0;s<this.writeBuffer.length;s++){const u=this.writeBuffer[s].data;if(u&&(i+=YN(u)),s>0&&i>this._maxPayload)return this.writeBuffer.slice(0,s);i+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const a=Date.now()>this._pingTimeoutTime;return a&&(this._pingTimeoutTime=0,lu(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),a}write(a,i,s){return this._sendPacket("message",a,i,s),this}send(a,i,s){return this._sendPacket("message",a,i,s),this}_sendPacket(a,i,s,u){if(typeof i=="function"&&(u=i,i=void 0),typeof s=="function"&&(u=s,s=null),this.readyState==="closing"||this.readyState==="closed")return;s=s||{},s.compress=s.compress!==!1;const f={type:a,data:i,options:s};this.emitReserved("packetCreate",f),this.writeBuffer.push(f),u&&this.once("flush",u),this.flush()}close(){const a=()=>{this._onClose("forced close"),this.transport.close()},i=()=>{this.off("upgrade",i),this.off("upgradeError",i),a()},s=()=>{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?s():a()}):this.upgrading?s():a()),this}_onError(a){if(nr.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(),Fh&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const s=Bo.indexOf(this._offlineEventListener);s!==-1&&Bo.splice(s,1)}this.readyState="closed",this.id=null,this.emitReserved("close",a,i),this.writeBuffer=[],this._prevBufferLen=0}}}nr.protocol=Iv;class cw extends nr{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),s=!1;nr.priorWebsocketSuccess=!1;const u=()=>{s||(i.send([{type:"ping",data:"probe"}]),i.once("packet",S=>{if(!s)if(S.type==="pong"&&S.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",i),!i)return;nr.priorWebsocketSuccess=i.name==="websocket",this.transport.pause(()=>{s||this.readyState!=="closed"&&(v(),this.setTransport(i),i.send([{type:"upgrade"}]),this.emitReserved("upgrade",i),i=null,this.upgrading=!1,this.flush())})}else{const T=new Error("probe error");T.transport=i.name,this.emitReserved("upgradeError",T)}}))};function f(){s||(s=!0,v(),i.close(),i=null)}const h=S=>{const T=new Error("probe error: "+S);T.transport=i.name,f(),this.emitReserved("upgradeError",T)};function m(){h("transport closed")}function p(){h("socket closed")}function g(S){i&&S.name!==i.name&&f()}const v=()=>{i.removeListener("open",u),i.removeListener("error",h),i.removeListener("close",m),this.off("close",p),this.off("upgrading",g)};i.once("open",u),i.once("error",h),i.once("close",m),this.once("close",p),this.once("upgrading",g),this._upgrades.indexOf("webtransport")!==-1&&a!=="webtransport"?this.setTimeoutFn(()=>{s||i.open()},200):i.open()}onHandshake(a){this._upgrades=this._filterUpgrades(a.upgrades),super.onHandshake(a)}_filterUpgrades(a){const i=[];for(let s=0;s<a.length;s++)~this.transports.indexOf(a[s])&&i.push(a[s]);return i}}let fw=class extends cw{constructor(a,i={}){const s=typeof a=="object"?a:i;(!s.transports||s.transports&&typeof s.transports[0]=="string")&&(s.transports=(s.transports||["polling","websocket","webtransport"]).map(u=>iw[u]).filter(u=>!!u)),super(a,s)}};function hw(n,a="",i){let s=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),s=qh(n)),s.port||(/^(http|ws)$/.test(s.protocol)?s.port="80":/^(http|ws)s$/.test(s.protocol)&&(s.port="443")),s.path=s.path||"/";const f=s.host.indexOf(":")!==-1?"["+s.host+"]":s.host;return s.id=s.protocol+"://"+f+":"+s.port+a,s.href=s.protocol+"://"+f+(i&&i.port===s.port?"":":"+s.port),s}const dw=typeof ArrayBuffer=="function",mw=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n.buffer instanceof ArrayBuffer,Yv=Object.prototype.toString,pw=typeof Blob=="function"||typeof Blob<"u"&&Yv.call(Blob)==="[object BlobConstructor]",gw=typeof File=="function"||typeof File<"u"&&Yv.call(File)==="[object FileConstructor]";function Bd(n){return dw&&(n instanceof ArrayBuffer||mw(n))||pw&&n instanceof Blob||gw&&n instanceof File}function Ho(n,a){if(!n||typeof n!="object")return!1;if(Array.isArray(n)){for(let i=0,s=n.length;i<s;i++)if(Ho(n[i]))return!0;return!1}if(Bd(n))return!0;if(n.toJSON&&typeof n.toJSON=="function"&&arguments.length===1)return Ho(n.toJSON(),!0);for(const i in n)if(Object.prototype.hasOwnProperty.call(n,i)&&Ho(n[i]))return!0;return!1}function yw(n){const a=[],i=n.data,s=n;return s.data=Vh(i,a),s.attachments=a.length,{packet:s,buffers:a}}function Vh(n,a){if(!n)return n;if(Bd(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 s=0;s<n.length;s++)i[s]=Vh(n[s],a);return i}else if(typeof n=="object"&&!(n instanceof Date)){const i={};for(const s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=Vh(n[s],a));return i}return n}function bw(n,a){return n.data=Yh(n.data,a),delete n.attachments,n}function Yh(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]=Yh(n[i],a);else if(typeof n=="object")for(const i in n)Object.prototype.hasOwnProperty.call(n,i)&&(n[i]=Yh(n[i],a));return n}const vw=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],_w=5;var we;(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"})(we||(we={}));class Sw{constructor(a){this.replacer=a}encode(a){return(a.type===we.EVENT||a.type===we.ACK)&&Ho(a)?this.encodeAsBinary({type:a.type===we.EVENT?we.BINARY_EVENT:we.BINARY_ACK,nsp:a.nsp,data:a.data,id:a.id}):[this.encodeAsString(a)]}encodeAsString(a){let i=""+a.type;return(a.type===we.BINARY_EVENT||a.type===we.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=yw(a),s=this.encodeAsString(i.packet),u=i.buffers;return u.unshift(s),u}}function N1(n){return Object.prototype.toString.call(n)==="[object Object]"}class Hd extends mt{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 s=i.type===we.BINARY_EVENT;s||i.type===we.BINARY_ACK?(i.type=s?we.EVENT:we.ACK,this.reconstructor=new Ew(i),i.attachments===0&&super.emitReserved("decoded",i)):super.emitReserved("decoded",i)}else if(Bd(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 s={type:Number(a.charAt(0))};if(we[s.type]===void 0)throw new Error("unknown packet type "+s.type);if(s.type===we.BINARY_EVENT||s.type===we.BINARY_ACK){const f=i+1;for(;a.charAt(++i)!=="-"&&i!=a.length;);const h=a.substring(f,i);if(h!=Number(h)||a.charAt(i)!=="-")throw new Error("Illegal attachments");s.attachments=Number(h)}if(a.charAt(i+1)==="/"){const f=i+1;for(;++i&&!(a.charAt(i)===","||i===a.length););s.nsp=a.substring(f,i)}else s.nsp="/";const u=a.charAt(i+1);if(u!==""&&Number(u)==u){const f=i+1;for(;++i;){const h=a.charAt(i);if(h==null||Number(h)!=h){--i;break}if(i===a.length)break}s.id=Number(a.substring(f,i+1))}if(a.charAt(++i)){const f=this.tryParse(a.substr(i));if(Hd.isPayloadValid(s.type,f))s.data=f;else throw new Error("invalid payload")}return s}tryParse(a){try{return JSON.parse(a,this.reviver)}catch{return!1}}static isPayloadValid(a,i){switch(a){case we.CONNECT:return N1(i);case we.DISCONNECT:return i===void 0;case we.CONNECT_ERROR:return typeof i=="string"||N1(i);case we.EVENT:case we.BINARY_EVENT:return Array.isArray(i)&&(typeof i[0]=="number"||typeof i[0]=="string"&&vw.indexOf(i[0])===-1);case we.ACK:case we.BINARY_ACK:return Array.isArray(i)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Ew{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=bw(this.reconPack,this.buffers);return this.finishedReconstruction(),i}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Tw=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Hd,Encoder:Sw,get PacketType(){return we},protocol:_w},Symbol.toStringTag,{value:"Module"}));function Nn(n,a,i){return n.on(a,i),function(){n.off(a,i)}}const Aw=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Zv extends mt{constructor(a,i,s){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,s&&s.auth&&(this.auth=s.auth),this._opts=Object.assign({},s),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const a=this.io;this.subs=[Nn(a,"open",this.onopen.bind(this)),Nn(a,"packet",this.onpacket.bind(this)),Nn(a,"error",this.onerror.bind(this)),Nn(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 s,u,f;if(Aw.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 h={type:we.EVENT,data:i};if(h.options={},h.options.compress=this.flags.compress!==!1,typeof i[i.length-1]=="function"){const v=this.ids++,S=i.pop();this._registerAckCallback(v,S),h.id=v}const m=(u=(s=this.io.engine)===null||s===void 0?void 0:s.transport)===null||u===void 0?void 0:u.writable,p=this.connected&&!(!((f=this.io.engine)===null||f===void 0)&&f._hasPingExpired());return this.flags.volatile&&!m||(p?(this.notifyOutgoingListeners(h),this.packet(h)):this.sendBuffer.push(h)),this.flags={},this}_registerAckCallback(a,i){var s;const u=(s=this.flags.timeout)!==null&&s!==void 0?s:this._opts.ackTimeout;if(u===void 0){this.acks[a]=i;return}const f=this.io.setTimeoutFn(()=>{delete this.acks[a];for(let m=0;m<this.sendBuffer.length;m++)this.sendBuffer[m].id===a&&this.sendBuffer.splice(m,1);i.call(this,new Error("operation has timed out"))},u),h=(...m)=>{this.io.clearTimeoutFn(f),i.apply(this,m)};h.withError=!0,this.acks[a]=h}emitWithAck(a,...i){return new Promise((s,u)=>{const f=(h,m)=>h?u(h):s(m);f.withError=!0,i.push(f),this.emit(a,...i)})}_addToQueue(a){let i;typeof a[a.length-1]=="function"&&(i=a.pop());const s={id:this._queueSeq++,tryCount:0,pending:!1,args:a,flags:Object.assign({fromQueue:!0},this.flags)};a.push((u,...f)=>s!==this._queue[0]?void 0:(u!==null?s.tryCount>this._opts.retries&&(this._queue.shift(),i&&i(u)):(this._queue.shift(),i&&i(null,...f)),s.pending=!1,this._drainQueue())),this._queue.push(s),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:we.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(s=>String(s.id)===a)){const s=this.acks[a];delete this.acks[a],s.withError&&s.call(this,new Error("socket has been disconnected"))}})}onpacket(a){if(a.nsp===this.nsp)switch(a.type){case we.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 we.EVENT:case we.BINARY_EVENT:this.onevent(a);break;case we.ACK:case we.BINARY_ACK:this.onack(a);break;case we.DISCONNECT:this.ondisconnect();break;case we.CONNECT_ERROR:this.destroy();const s=new Error(a.data.message);s.data=a.data.data,this.emitReserved("connect_error",s);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 s of i)s.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 s=!1;return function(...u){s||(s=!0,i.packet({type:we.ACK,id:a,data:u}))}}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:we.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 s=0;s<i.length;s++)if(a===i[s])return i.splice(s,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 s=0;s<i.length;s++)if(a===i[s])return i.splice(s,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 s of i)s.apply(this,a.data)}}}function Ei(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}Ei.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};Ei.prototype.reset=function(){this.attempts=0};Ei.prototype.setMin=function(n){this.ms=n};Ei.prototype.setMax=function(n){this.max=n};Ei.prototype.setJitter=function(n){this.jitter=n};class Zh extends mt{constructor(a,i){var s;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,su(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((s=i.randomizationFactor)!==null&&s!==void 0?s:.5),this.backoff=new Ei({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(i.timeout==null?2e4:i.timeout),this._readyState="closed",this.uri=a;const u=i.parser||Tw;this.encoder=new u.Encoder,this.decoder=new u.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 fw(this.uri,this.opts);const i=this.engine,s=this;this._readyState="opening",this.skipReconnect=!1;const u=Nn(i,"open",function(){s.onopen(),a&&a()}),f=m=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",m),a?a(m):this.maybeReconnectOnOpen()},h=Nn(i,"error",f);if(this._timeout!==!1){const m=this._timeout,p=this.setTimeoutFn(()=>{u(),f(new Error("timeout")),i.close()},m);this.opts.autoUnref&&p.unref(),this.subs.push(()=>{this.clearTimeoutFn(p)})}return this.subs.push(u),this.subs.push(h),this}connect(a){return this.open(a)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const a=this.engine;this.subs.push(Nn(a,"ping",this.onping.bind(this)),Nn(a,"data",this.ondata.bind(this)),Nn(a,"error",this.onerror.bind(this)),Nn(a,"close",this.onclose.bind(this)),Nn(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){lu(()=>{this.emitReserved("packet",a)},this.setTimeoutFn)}onerror(a){this.emitReserved("error",a)}socket(a,i){let s=this.nsps[a];return s?this._autoConnect&&!s.active&&s.connect():(s=new Zv(this,a,i),this.nsps[a]=s),s}_destroy(a){const i=Object.keys(this.nsps);for(const s of i)if(this.nsps[s].active)return;this._close()}_packet(a){const i=this.encoder.encode(a);for(let s=0;s<i.length;s++)this.engine.write(i[s],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 s;this.cleanup(),(s=this.engine)===null||s===void 0||s.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 s=this.setTimeoutFn(()=>{a.skipReconnect||(this.emitReserved("reconnect_attempt",a.backoff.attempts),!a.skipReconnect&&a.open(u=>{u?(a._reconnecting=!1,a.reconnect(),this.emitReserved("reconnect_error",u)):a.onreconnect()}))},i);this.opts.autoUnref&&s.unref(),this.subs.push(()=>{this.clearTimeoutFn(s)})}}onreconnect(){const a=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",a)}}const Bl={};function jo(n,a){typeof n=="object"&&(a=n,n=void 0),a=a||{};const i=hw(n,a.path||"/socket.io"),s=i.source,u=i.id,f=i.path,h=Bl[u]&&f in Bl[u].nsps,m=a.forceNew||a["force new connection"]||a.multiplex===!1||h;let p;return m?p=new Zh(s,a):(Bl[u]||(Bl[u]=new Zh(s,a)),p=Bl[u]),i.query&&!a.query&&(a.query=i.queryKey),p.socket(i.path,a)}Object.assign(jo,{Manager:Zh,Socket:Zv,io:jo,connect:jo});const xw=[Eb,Tb,vb,_b,sA,...Cx,...vA,"@@localize/SET_ACTIVE_LANGUAGE","@@localize/ADD_TRANSLATION_FOR_LANGUAGE"],Ow=({dispatch:n,getState:a})=>i=>{let s=null;return u=>{const f=i(u);if(u.type===bd){s?.disconnect(),n(wx());const h=`/chat?${td.stringify(u.querystrings)}`;s=jo(`/${u.clientName}${h}`),s.on("action",n),s.on("connect",()=>n(Mx())),s.on("disconnect",()=>n(Dx())),s.on("reconnect",()=>n(Lx())),s.on("set-translations",(m,p)=>{n(SN({language:m,messages:pN(m,p)}))}),s.on("set-settings",m=>{n(AN(m))}),s.on("enable-conversation-rating",m=>n(AA(m))),s.on("speech-transcription",m=>n(SA(m))),s.on("restore-client-state",m=>{n(Nx(m.sessionId)),n(OA(m.messages))}),s.on("expand-window",({devices:m,initial:p=!1})=>{n({type:Nb,devices:m,initial:p})}),s.on("restart-chat",()=>{n(Xl())}),s.on("login-success",m=>{n(vx({loginToken:m.loginToken}))})}else if(u.type==="start-screen/requestLogin")s?.emit("login-requested",u.payload);else if(u.type===au)s?.emit("start-chat",u.payload);else if(u.type===ru)s?.emit("terminate-session",u.payload);else if(u.type===bA)s?.emit("get-started",JSON.stringify(u));else if(u.type===sd)s?.emit("audio-message",u.buffer);else if(u.type===ad)s?.emit("conversation-rating",u.payload);else if(u.type===Mb){const{connection:{sessionId:h}}=a();window.location.href=`/transcript-pdf/${h}`}else xw.indexOf(u.type)===-1&&u.meta===void 0&&s&&s.emit("action",JSON.stringify(u));return f}},Xv=dd(),Cw={...RN(Xv),intl:Rv},Xh=ix({middleware:n=>n().concat(Ow),reducer:ON,preloadedState:Cw});Xh.subscribe(sN(()=>{const n=Xh.getState();NN(Xv,{connection:n.connection,startScreen:n.startScreen})},1e3));const Rw=document.getElementById("root"),Nw=fS.createRoot(Rw);Nw.render(y.jsx(cE,{store:Xh,children:y.jsx(rN,{})}));
|
|
131
|
-
//# sourceMappingURL=index-
|
|
131
|
+
//# sourceMappingURL=index-BcobPPJv.js.map
|