@botfabrik/engine-webclient 4.66.1 → 4.66.3
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.
|
@@ -81,7 +81,7 @@ For more details see https://formatjs.io/docs/getting-started/message-distributi
|
|
|
81
81
|
Copyright (c) 2018 Jed Watson.
|
|
82
82
|
Licensed under the MIT License (MIT), see
|
|
83
83
|
http://jedwatson.github.io/classnames
|
|
84
|
-
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var o="",s=0;s<arguments.length;s++){var a=arguments[s];a&&(o=i(o,r(a)))}return o}function r(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return n.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var s="";for(var a in o)t.call(o,a)&&o[a]&&(s=i(s,a));return s}function i(o,s){return s?o?o+" "+s:o+s:o}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(_y);var Sw=_y.exports;const R=Ru(Sw),Ey="%[a-f0-9]{2}",lh=new RegExp("("+Ey+")|([^%]+?)","gi"),uh=new RegExp("("+Ey+")+","gi");function lu(e,t){try{return[decodeURIComponent(e.join(""))]}catch{}if(e.length===1)return e;t=t||1;const n=e.slice(0,t),r=e.slice(t);return Array.prototype.concat.call([],lu(n),lu(r))}function ww(e){try{return decodeURIComponent(e)}catch{let t=e.match(lh)||[];for(let n=1;n<t.length;n++)e=lu(t,n).join(""),t=e.match(lh)||[];return e}}function bw(e){const t={"%FE%FF":"��","%FF%FE":"��"};let n=uh.exec(e);for(;n;){try{t[n[0]]=decodeURIComponent(n[0])}catch{const i=ww(n[0]);i!==n[0]&&(t[n[0]]=i)}n=uh.exec(e)}t["%C2"]="�";const r=Object.keys(t);for(const i of r)e=e.replace(new RegExp(i,"g"),t[i]);return e}function xw(e){if(typeof e!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return decodeURIComponent(e)}catch{return bw(e)}}function Sy(e,t){if(!(typeof e=="string"&&typeof t=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(e===""||t==="")return[];const n=e.indexOf(t);return n===-1?[]:[e.slice(0,n),e.slice(n+t.length)]}function Tw(e,t){const n={};if(Array.isArray(t))for(const r of t){const i=Object.getOwnPropertyDescriptor(e,r);i!=null&&i.enumerable&&Object.defineProperty(n,r,i)}else for(const r of Reflect.ownKeys(e)){const i=Object.getOwnPropertyDescriptor(e,r);if(i.enumerable){const o=e[r];t(r,o,e)&&Object.defineProperty(n,r,i)}}return n}const Cw=e=>e==null,kw=e=>encodeURIComponent(e).replaceAll(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),uu=Symbol("encodeFragmentIdentifier");function Ow(e){switch(e.arrayFormat){case"index":return t=>(n,r)=>{const i=n.length;return r===void 0||e.skipNull&&r===null||e.skipEmptyString&&r===""?n:r===null?[...n,[ce(t,e),"[",i,"]"].join("")]:[...n,[ce(t,e),"[",ce(i,e),"]=",ce(r,e)].join("")]};case"bracket":return t=>(n,r)=>r===void 0||e.skipNull&&r===null||e.skipEmptyString&&r===""?n:r===null?[...n,[ce(t,e),"[]"].join("")]:[...n,[ce(t,e),"[]=",ce(r,e)].join("")];case"colon-list-separator":return t=>(n,r)=>r===void 0||e.skipNull&&r===null||e.skipEmptyString&&r===""?n:r===null?[...n,[ce(t,e),":list="].join("")]:[...n,[ce(t,e),":list=",ce(r,e)].join("")];case"comma":case"separator":case"bracket-separator":{const t=e.arrayFormat==="bracket-separator"?"[]=":"=";return n=>(r,i)=>i===void 0||e.skipNull&&i===null||e.skipEmptyString&&i===""?r:(i=i===null?"":i,r.length===0?[[ce(n,e),t,ce(i,e)].join("")]:[[r,ce(i,e)].join(e.arrayFormatSeparator)])}default:return t=>(n,r)=>r===void 0||e.skipNull&&r===null||e.skipEmptyString&&r===""?n:r===null?[...n,ce(t,e)]:[...n,[ce(t,e),"=",ce(r,e)].join("")]}}function Rw(e){let t;switch(e.arrayFormat){case"index":return(n,r,i)=>{if(t=/\[(\d*)]$/.exec(n),n=n.replace(/\[\d*]$/,""),!t){i[n]=r;return}i[n]===void 0&&(i[n]={}),i[n][t[1]]=r};case"bracket":return(n,r,i)=>{if(t=/(\[])$/.exec(n),n=n.replace(/\[]$/,""),!t){i[n]=r;return}if(i[n]===void 0){i[n]=[r];return}i[n]=[...i[n],r]};case"colon-list-separator":return(n,r,i)=>{if(t=/(:list)$/.exec(n),n=n.replace(/:list$/,""),!t){i[n]=r;return}if(i[n]===void 0){i[n]=[r];return}i[n]=[...i[n],r]};case"comma":case"separator":return(n,r,i)=>{const o=typeof r=="string"&&r.includes(e.arrayFormatSeparator),s=typeof r=="string"&&!o&&$t(r,e).includes(e.arrayFormatSeparator);r=s?$t(r,e):r;const a=o||s?r.split(e.arrayFormatSeparator).map(l=>$t(l,e)):r===null?r:$t(r,e);i[n]=a};case"bracket-separator":return(n,r,i)=>{const o=/(\[])$/.test(n);if(n=n.replace(/\[]$/,""),!o){i[n]=r&&$t(r,e);return}const s=r===null?[]:r.split(e.arrayFormatSeparator).map(a=>$t(a,e));if(i[n]===void 0){i[n]=s;return}i[n]=[...i[n],...s]};default:return(n,r,i)=>{if(i[n]===void 0){i[n]=r;return}i[n]=[...[i[n]].flat(),r]}}}function wy(e){if(typeof e!="string"||e.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function ce(e,t){return t.encode?t.strict?kw(e):encodeURIComponent(e):e}function $t(e,t){return t.decode?xw(e):e}function by(e){return Array.isArray(e)?e.sort():typeof e=="object"?by(Object.keys(e)).sort((t,n)=>Number(t)-Number(n)).map(t=>e[t]):e}function xy(e){const t=e.indexOf("#");return t!==-1&&(e=e.slice(0,t)),e}function Nw(e){let t="";const n=e.indexOf("#");return n!==-1&&(t=e.slice(n)),t}function ch(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&typeof e=="string"&&e.trim()!==""?e=Number(e):t.parseBooleans&&e!==null&&(e.toLowerCase()==="true"||e.toLowerCase()==="false")&&(e=e.toLowerCase()==="true"),e}function Mc(e){e=xy(e);const t=e.indexOf("?");return t===-1?"":e.slice(t+1)}function Fc(e,t){t={decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1,...t},wy(t.arrayFormatSeparator);const n=Rw(t),r=Object.create(null);if(typeof e!="string"||(e=e.trim().replace(/^[?#&]/,""),!e))return r;for(const i of e.split("&")){if(i==="")continue;const o=t.decode?i.replaceAll("+"," "):i;let[s,a]=Sy(o,"=");s===void 0&&(s=o),a=a===void 0?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?a:$t(a,t),n($t(s,t),a,r)}for(const[i,o]of Object.entries(r))if(typeof o=="object"&&o!==null)for(const[s,a]of Object.entries(o))o[s]=ch(a,t);else r[i]=ch(o,t);return t.sort===!1?r:(t.sort===!0?Object.keys(r).sort():Object.keys(r).sort(t.sort)).reduce((i,o)=>{const s=r[o];return i[o]=s&&typeof s=="object"&&!Array.isArray(s)?by(s):s,i},Object.create(null))}function Ty(e,t){if(!e)return"";t={encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:",",...t},wy(t.arrayFormatSeparator);const n=s=>t.skipNull&&Cw(e[s])||t.skipEmptyString&&e[s]==="",r=Ow(t),i={};for(const[s,a]of Object.entries(e))n(s)||(i[s]=a);const o=Object.keys(i);return t.sort!==!1&&o.sort(t.sort),o.map(s=>{const a=e[s];return a===void 0?"":a===null?ce(s,t):Array.isArray(a)?a.length===0&&t.arrayFormat==="bracket-separator"?ce(s,t)+"[]":a.reduce(r(s),[]).join("&"):ce(s,t)+"="+ce(a,t)}).filter(s=>s.length>0).join("&")}function Cy(e,t){var i;t={decode:!0,...t};let[n,r]=Sy(e,"#");return n===void 0&&(n=e),{url:((i=n==null?void 0:n.split("?"))==null?void 0:i[0])??"",query:Fc(Mc(e),t),...t&&t.parseFragmentIdentifier&&r?{fragmentIdentifier:$t(r,t)}:{}}}function ky(e,t){t={encode:!0,strict:!0,[uu]:!0,...t};const n=xy(e.url).split("?")[0]||"",r=Mc(e.url),i={...Fc(r,{sort:!1}),...e.query};let o=Ty(i,t);o&&(o=`?${o}`);let s=Nw(e.url);if(typeof e.fragmentIdentifier=="string"){const a=new URL(n);a.hash=e.fragmentIdentifier,s=t[uu]?a.hash:`#${e.fragmentIdentifier}`}return`${n}${o}${s}`}function Oy(e,t,n){n={parseFragmentIdentifier:!0,[uu]:!1,...n};const{url:r,query:i,fragmentIdentifier:o}=Cy(e,n);return ky({url:r,query:Tw(i,t),fragmentIdentifier:o},n)}function Aw(e,t,n){const r=Array.isArray(t)?i=>!t.includes(i):(i,o)=>!t(i,o);return Oy(e,r,n)}const Ry=Object.freeze(Object.defineProperty({__proto__:null,exclude:Aw,extract:Mc,parse:Fc,parseUrl:Cy,pick:Oy,stringify:Ty,stringifyUrl:ky},Symbol.toStringTag,{value:"Module"}));var U={},cu={},I={};Object.defineProperty(I,"__esModule",{value:!0});I.CONVERSATION_RATING_FROM_GUEST=I.PROBLEM_REPORT_FROM_GUEST=I.TRANSCRIPT_MAIL_REQUEST=I.INBOX_CONNECT_REQUEST=I.RESTART_CHAT_REQUEST=I.EVENT_TO_GUEST=I.NLU_REQUEST_EVENT=I.EXPERTS_DISCONNECTED=I.EXPERTS_DISCONNECT_REQUEST=I.EXPERTS_CONNECTED=I.EXPERTS_CONNECT_REQUEST=I.MESSAGE_TO_GUEST=I.MESSAGE_WITHOUT_ANALYSIS_FROM_GUEST=I.MESSAGE_FROM_GUEST=I.GUEST_FEEDBACK_RESPONSE=I.GUEST_DISCONNECTED=I.GUEST_CONNECTED=I.TYPING_OFF=I.TYPING_ON=void 0;I.TYPING_ON="core.typing.on";I.TYPING_OFF="core.typing.off";I.GUEST_CONNECTED="core.guest.connected";I.GUEST_DISCONNECTED="core.guest.disconnected";I.GUEST_FEEDBACK_RESPONSE="core.guest.feedback.response";I.MESSAGE_FROM_GUEST="core.message.from.guest";I.MESSAGE_WITHOUT_ANALYSIS_FROM_GUEST="core.message.without.analysis.from.guest";I.MESSAGE_TO_GUEST="core.message.to.guest";I.EXPERTS_CONNECT_REQUEST="core.experts.connect.request";I.EXPERTS_CONNECTED="core.experts.connected";I.EXPERTS_DISCONNECT_REQUEST="core.experts.disconnect.request";I.EXPERTS_DISCONNECTED="core.experts.disconnected";I.NLU_REQUEST_EVENT="core.nlu.request.event";I.EVENT_TO_GUEST="core.event.to.guest";I.RESTART_CHAT_REQUEST="core.chat.restart.request";I.INBOX_CONNECT_REQUEST="core.inbox.connect.request";I.TRANSCRIPT_MAIL_REQUEST="core.transcript.mail.request";I.PROBLEM_REPORT_FROM_GUEST="core.problem.report.from.guest";I.CONVERSATION_RATING_FROM_GUEST="core.conversation.rating.from.guest";var Ny={};Object.defineProperty(Ny,"__esModule",{value:!0});var Bc={};Object.defineProperty(Bc,"__esModule",{value:!0});const Pw=I,Iw=(e,t)=>({type:Pw.GUEST_FEEDBACK_RESPONSE,payload:{satisfaction:e,intent:t}});Bc.default=Iw;var Lc={};Object.defineProperty(Lc,"__esModule",{value:!0});const Dw=I,Mw=e=>({type:Dw.GUEST_CONNECTED,payload:{sessionId:e}});Lc.default=Mw;var jc={};Object.defineProperty(jc,"__esModule",{value:!0});const Fw=I,Bw=e=>({type:Fw.GUEST_DISCONNECTED,payload:{sessionId:e}});jc.default=Bw;var zc={},te={};Object.defineProperty(te,"__esModule",{value:!0});te.getStringRepresentationFromMessage=te.MessageTypeEnum=te.AudioMessage=te.FileMessage=te.ImageMessage=te.VideoMessage=te.MarkdownMessage=te.DetailMessage=te.TextMessage=te.Message=void 0;let Cn=class{constructor(t,n){V(this,"type");V(this,"sender");V(this,"quickReplies");this.type=t,this.sender=n,this.quickReplies=[]}addQuickReply(t,n){this.quickReplies.push({label:t,payload:n})}};te.Message=Cn;let Lw=class extends Cn{constructor(n,r){super(ke.TEXT,r);V(this,"text");this.text=n}};te.TextMessage=Lw;let jw=class extends Cn{constructor(n,r){super(ke.DETAIL,r);V(this,"title");V(this,"subtitle");V(this,"text");V(this,"imageUrl");V(this,"itemUrl");V(this,"buttons");this.title=n,this.text="",this.subtitle="",this.imageUrl="",this.itemUrl="",this.buttons=[]}setImageUrl(n){this.imageUrl=n}setItemUrl(n){this.itemUrl=n}setSubtitle(n){this.subtitle=n}setText(n){this.text=n}addButton(n){this.buttons.push(n)}};te.DetailMessage=jw;let zw=class extends Cn{constructor(n,r,i){super(ke.MARKDOWN,i);V(this,"markdown");V(this,"excerpt");V(this,"className");this.markdown=n,this.excerpt=r,this.className=""}setClassName(n){this.className=n}};te.MarkdownMessage=zw;class Uw extends Cn{constructor(n,r){super(ke.VIDEO,r);V(this,"url");this.url=n}}te.VideoMessage=Uw;class $w extends Cn{constructor(n,r){super(ke.IMAGE,r);V(this,"url");this.url=n}}te.ImageMessage=$w;class Hw extends Cn{constructor(n,r){super(ke.FILE,r);V(this,"url");this.url=n}}te.FileMessage=Hw;class Gw extends Cn{constructor(n,r){super(ke.AUDIO,r);V(this,"url");this.url=n}}te.AudioMessage=Gw;var ke;(function(e){e.TEXT="TEXT",e.DETAIL="DETAIL",e.MARKDOWN="MARKDOWN",e.VIDEO="VIDEO",e.IMAGE="IMAGE",e.FILE="FILE",e.AUDIO="AUDIO"})(ke||(te.MessageTypeEnum=ke={}));const Vw=e=>{switch(e.type){case ke.TEXT:return e.text;case ke.DETAIL:const n=e;return`${n.title} // ${n.subtitle}`;case ke.MARKDOWN:return e.excerpt;case ke.VIDEO:return`Video Url: ${e.url}`;case ke.IMAGE:return`Image Url: ${e.url}`;case ke.FILE:return`File Url: ${e.url}`;case ke.AUDIO:return`Audio Url: ${e.url}`;default:throw new Error("Unknown message type "+e.type)}};te.getStringRepresentationFromMessage=Vw;var Be={};Object.defineProperty(Be,"__esModule",{value:!0});Be.UserType=Be.PersonUser=Be.GuestUser=Be.BotUser=Be.User=void 0;class Ys{constructor(t,n,r,i){V(this,"type");V(this,"id");V(this,"name");V(this,"avatar");this.type=t,this.id=n,this.name=r,this.avatar=i}}Be.User=Ys;class Ww extends Ys{constructor(){super(Di.BOT,null,"Chatbot","bot.svg")}}Be.BotUser=Ww;class qw extends Ys{constructor(){super(Di.GUEST,null,"Guest","visitor.svg")}}Be.GuestUser=qw;class Xw extends Ys{constructor(t,n,r){super(Di.PERSON,t,n,r)}}Be.PersonUser=Xw;var Di;(function(e){e.GUEST="GUEST",e.BOT="BOT",e.PERSON="PERSON"})(Di||(Be.UserType=Di={}));Object.defineProperty(zc,"__esModule",{value:!0});const Qw=te,Kw=Be,Yw=I,Zw=e=>{const t=new Qw.TextMessage(e,new Kw.GuestUser);return{type:Yw.MESSAGE_FROM_GUEST,message:t}};zc.default=Zw;var Uc={};Object.defineProperty(Uc,"__esModule",{value:!0});const Jw=te,eb=Be,tb=I,nb=(e,t={})=>{const n=new Jw.TextMessage(e,new eb.GuestUser);return{type:tb.MESSAGE_WITHOUT_ANALYSIS_FROM_GUEST,message:n,payload:t}};Uc.default=nb;var $c={};Object.defineProperty($c,"__esModule",{value:!0});const rb=I,ib=(e,t)=>({type:rb.PROBLEM_REPORT_FROM_GUEST,payload:{actionId:e,problem:t}});$c.default=ib;var Hc={};Object.defineProperty(Hc,"__esModule",{value:!0});const ob=I,sb=e=>({type:ob.NLU_REQUEST_EVENT,event:e});Hc.default=sb;var Gc={};Object.defineProperty(Gc,"__esModule",{value:!0});const ab=I,lb=()=>({type:ab.RESTART_CHAT_REQUEST});Gc.default=lb;var Vc={};Object.defineProperty(Vc,"__esModule",{value:!0});const ub=I,cb=e=>({type:ub.MESSAGE_TO_GUEST,message:e});Vc.default=cb;(function(e){var t=q&&q.__createBinding||(Object.create?function(p,S,h,d){d===void 0&&(d=h);var m=Object.getOwnPropertyDescriptor(S,h);(!m||("get"in m?!S.__esModule:m.writable||m.configurable))&&(m={enumerable:!0,get:function(){return S[h]}}),Object.defineProperty(p,d,m)}:function(p,S,h,d){d===void 0&&(d=h),p[d]=S[h]}),n=q&&q.__setModuleDefault||(Object.create?function(p,S){Object.defineProperty(p,"default",{enumerable:!0,value:S})}:function(p,S){p.default=S}),r=q&&q.__importStar||function(p){if(p&&p.__esModule)return p;var S={};if(p!=null)for(var h in p)h!=="default"&&Object.prototype.hasOwnProperty.call(p,h)&&t(S,p,h);return n(S,p),S},i=q&&q.__exportStar||function(p,S){for(var h in p)h!=="default"&&!Object.prototype.hasOwnProperty.call(S,h)&&t(S,p,h)},o=q&&q.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(e,"__esModule",{value:!0}),e.sendMessageToGuest=e.restartChatRequest=e.requestNLUEvent=e.reportProblemFromGuest=e.receiveTextMessageWithoutAnalysisFromGuest=e.receiveTextMessageFromGuest=e.guestDisconnected=e.guestConnected=e.feedbackFromGuestResponse=e.ActionTypes=void 0,e.ActionTypes=r(I),i(Ny,e);const s=o(Bc);e.feedbackFromGuestResponse=s.default;const a=o(Lc);e.guestConnected=a.default;const l=o(jc);e.guestDisconnected=l.default;const u=o(zc);e.receiveTextMessageFromGuest=u.default;const c=o(Uc);e.receiveTextMessageWithoutAnalysisFromGuest=c.default;const g=o($c);e.reportProblemFromGuest=g.default;const y=o(Hc);e.requestNLUEvent=y.default;const f=o(Gc);e.restartChatRequest=f.default;const v=o(Vc);e.sendMessageToGuest=v.default})(cu);var Nr={},Ay={};Object.defineProperty(Ay,"__esModule",{value:!0});var Zs={};Object.defineProperty(Zs,"__esModule",{value:!0});Zs.NullableKnowledgeBaseAdapter=void 0;class fb{async upsertApiKnowledgeBase(t){throw new Error("Method not implemented.")}async findApiKnowledgeBaseByName(t){throw new Error("Method not implemented.")}async deleteApiKnowledgeBaseByName(t){throw new Error("Method not implemented.")}async setIndexingStatus(t,n){throw new Error("Method not implemented.")}async upsertKnowledgeBaseEntry(t,n){throw new Error("Method not implemented.")}async retrieveKnowledgeBaseEntryConfig(t,n){throw new Error("Method not implemented.")}async deleteKnowledgeBaseEntriesIndexedBeforeDate(t,n){throw new Error("Method not implemented.")}async subscribeToReindex(t,n){throw new Error("Method not implemented.")}isContentTypeSupported(t){throw new Error("Method not implemented.")}}Zs.NullableKnowledgeBaseAdapter=fb;var db=q&&q.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),hb=q&&q.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),pb=q&&q.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&db(t,e,n);return hb(t,e),t};Object.defineProperty(Nr,"__esModule",{value:!0});Nr.NullableCmsAdapter=Nr.KnowledgeBase=void 0;Nr.KnowledgeBase=pb(Ay);const mb=Zs;Nr.NullableCmsAdapter={knowledgeBase:new mb.NullableKnowledgeBaseAdapter};var fu={},Py={};Object.defineProperty(Py,"__esModule",{value:!0});var It={};Object.defineProperty(It,"__esModule",{value:!0});It.ButtonTypeEnum=It.PostbackButton=It.UrlButton=It.Button=void 0;class Wc{constructor(t,n){V(this,"title");V(this,"type");this.title=t,this.type=n}}It.Button=Wc;class gb extends Wc{constructor(n,r){super(n,hs.WEB_URL);V(this,"url");this.url=r}}It.UrlButton=gb;class yb extends Wc{constructor(n,r){super(n,hs.POSTBACK);V(this,"payload");this.payload=r}}It.PostbackButton=yb;var hs;(function(e){e.WEB_URL="web_url",e.POSTBACK="postback"})(hs||(It.ButtonTypeEnum=hs={}));var Iy={};Object.defineProperty(Iy,"__esModule",{value:!0});var Js={};Object.defineProperty(Js,"__esModule",{value:!0});Js.SatisfactionEnum=void 0;var fh;(function(e){e.GOOD="GOOD",e.BAD="BAD"})(fh||(Js.SatisfactionEnum=fh={}));(function(e){var t=q&&q.__createBinding||(Object.create?function(r,i,o,s){s===void 0&&(s=o);var a=Object.getOwnPropertyDescriptor(i,o);(!a||("get"in a?!i.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(r,s,a)}:function(r,i,o,s){s===void 0&&(s=o),r[s]=i[o]}),n=q&&q.__exportStar||function(r,i){for(var o in r)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&t(i,r,o)};Object.defineProperty(e,"__esModule",{value:!0}),n(Py,e),n(It,e),n(Iy,e),n(Js,e),n(te,e),n(Be,e)})(fu);(function(e){var t=q&&q.__createBinding||(Object.create?function(o,s,a,l){l===void 0&&(l=a);var u=Object.getOwnPropertyDescriptor(s,a);(!u||("get"in u?!s.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return s[a]}}),Object.defineProperty(o,l,u)}:function(o,s,a,l){l===void 0&&(l=a),o[l]=s[a]}),n=q&&q.__setModuleDefault||(Object.create?function(o,s){Object.defineProperty(o,"default",{enumerable:!0,value:s})}:function(o,s){o.default=s}),r=q&&q.__exportStar||function(o,s){for(var a in o)a!=="default"&&!Object.prototype.hasOwnProperty.call(s,a)&&t(s,o,a)},i=q&&q.__importStar||function(o){if(o&&o.__esModule)return o;var s={};if(o!=null)for(var a in o)a!=="default"&&Object.prototype.hasOwnProperty.call(o,a)&&t(s,o,a);return n(s,o),s};Object.defineProperty(e,"__esModule",{value:!0}),e.Model=e.CMS=e.Actions=void 0,r(cu,e),e.Actions=i(cu),e.CMS=i(Nr),r(fu,e),e.Model=i(fu)})(U);const Dy=e=>t=>(e.payload.type!==U.ActionTypes.MESSAGE_FROM_GUEST&&t(U.receiveTextMessageWithoutAnalysisFromGuest(e.label,e.payload)),t(e.payload)),My=e=>(t,n)=>{const{quickReplies:r}=n().chat,i=r.find(o=>e.toLocaleLowerCase().indexOf(o.label.toLocaleLowerCase())>-1);return t(i?Dy({...i,label:e}):U.receiveTextMessageFromGuest(e))},qc="MESSAGE_TO_PARENT_PAGE",Xc="RESTORE_PREVIOUS_CHAT_MESSAGES",Qc="AUDIO_MESSAGE_FROM_USER",Kc="ENABLE_SPEECH_SUPPORT",Yc="ENABLE_BOT_REPLIES_VOTING_SUPPORT",Zc="ENABLE_TRANSCRIPT_EXPORT",vb="EXPORT_TRANSCRIPT",Jc="RECEIVE_SPEECH_TRANSCRIPTION",ef="SHOW_GENERAL_CONDITIONS",tf="ENABLE_CONVERSATION_RATING",_b="webclient.get.started",Fy="webclient.expand.window",By="webclient.transcript.pdf.download",Eb=[qc,Xc,Qc,Kc,Yc,Zc,vb,Jc,ef,tf],Sb=e=>({type:Qc,buffer:e}),wb=()=>({type:Kc}),bb=()=>({type:Yc}),xb=e=>({type:Jc,transcription:e}),Tb=e=>({type:Zc,methods:e}),Cb=e=>({type:U.ActionTypes.TRANSCRIPT_MAIL_REQUEST,payload:{parameters:{mailTo:e}}}),kb=()=>({type:ef}),Ob=()=>({type:By}),Rb=({rating:e})=>({type:tf,payload:{rating:e}}),Nb=(e,t)=>({type:U.ActionTypes.CONVERSATION_RATING_FROM_GUEST,payload:{value:e,feedback:t}}),Ly=e=>U.requestNLUEvent(e),Ab=e=>({type:Xc,messages:e}),Pb=e=>{switch(e.type){case U.ButtonTypeEnum.WEB_URL:return jy(e.url);case U.ButtonTypeEnum.POSTBACK:return e.payload;default:throw new Error(`unknown button type ${e.type}`)}},Ib=e=>jy(e),jy=e=>({type:qc,message:{type:"webclient.change.url",url:e}});/*! js-cookie v3.0.5 | MIT */function po(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}var Db={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function du(e,t){function n(i,o,s){if(!(typeof document>"u")){s=po({},t,s),typeof s.expires=="number"&&(s.expires=new Date(Date.now()+s.expires*864e5)),s.expires&&(s.expires=s.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var l in s)s[l]&&(a+="; "+l,s[l]!==!0&&(a+="="+s[l].split(";")[0]));return document.cookie=i+"="+e.write(o,i)+a}}function r(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var o=document.cookie?document.cookie.split("; "):[],s={},a=0;a<o.length;a++){var l=o[a].split("="),u=l.slice(1).join("=");try{var c=decodeURIComponent(l[0]);if(s[c]=e.read(u,c),i===c)break}catch{}}return i?s[i]:s}}return Object.create({set:n,get:r,remove:function(i,o){n(i,"",po({},o,{expires:-1}))},withAttributes:function(i){return du(this.converter,po({},this.attributes,i))},withConverter:function(i){return du(po({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var Ua=du(Db,{path:"/"});const nf="CONNECT",rf="CONNECTING",of="CONNECTED",sf="DISCONNECTED",af="RECONNECTED",lf="RESTORE_SESSION_ID",uf="START",zy="RESTART",Mb=[nf,rf,of,sf,af,lf],Fb=(e,t)=>({type:nf,clientName:e,querystrings:t}),Bb=e=>({type:lf,sessionId:e}),Lb=()=>({type:rf}),jb=()=>({type:of}),zb=()=>({type:sf}),Ub=()=>({type:af}),Uy=(e,t)=>(n,r)=>{const i=r().connection;let o=i.sessionId;o===void 0&&(o=crypto.randomUUID());let s=i.userId;if(s===void 0){const a=Ua.get("bubble-chat-userId")||Ua.get("bf-webclient-userId");s=a||crypto.randomUUID(),Ua.set("bubble-chat-userId",s)}n({type:uf,payload:{sessionId:o,userId:s,clientName:e,querystrings:Ry.parse(t)}})},cf=(e,t)=>n=>(n($b()),n(Uy(e,t))),$b=()=>({type:zy});var an=(e=>(e[e.CONNECTING=0]="CONNECTING",e[e.CONNECTED=1]="CONNECTED",e[e.RECONNECTED=2]="RECONNECTED",e[e.DISCONNECTED=3]="DISCONNECTED",e))(an||{}),$y=(e=>(e.GUEST="GUEST",e.BOT="BOT",e.PERSON="PERSON",e))($y||{});const Hb="_button_1e5of_54",Gb="_buttonDefault_1e5of_66",Vb="_buttonPrimary_1e5of_80",Wb="_accessabilityHidden_1e5of_132",we={button:Hb,buttonDefault:Gb,buttonPrimary:Vb,accessabilityHidden:Wb},qb="_chatwindow_phukm_1",Xb="_chatcontent_phukm_13",Qb={chatwindow:qb,chatcontent:Xb},Kb="_messageContainer_1wdci_1",Yb="_messages_1wdci_10",dh={messageContainer:Kb,messages:Yb};function Mn(){return Mn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Mn.apply(this,arguments)}const Zb=["children","options"];var hh,ph;(function(e){e.blockQuote="0",e.breakLine="1",e.breakThematic="2",e.codeBlock="3",e.codeFenced="4",e.codeInline="5",e.footnote="6",e.footnoteReference="7",e.gfmTask="8",e.heading="9",e.headingSetext="10",e.htmlBlock="11",e.htmlComment="12",e.htmlSelfClosing="13",e.image="14",e.link="15",e.linkAngleBraceStyleDetector="16",e.linkBareUrlDetector="17",e.linkMailtoDetector="18",e.newlineCoalescer="19",e.orderedList="20",e.paragraph="21",e.ref="22",e.refImage="23",e.refLink="24",e.table="25",e.tableSeparator="26",e.text="27",e.textBolded="28",e.textEmphasized="29",e.textEscaped="30",e.textMarked="31",e.textStrikethroughed="32",e.unorderedList="33"})(hh||(hh={})),function(e){e[e.MAX=0]="MAX",e[e.HIGH=1]="HIGH",e[e.MED=2]="MED",e[e.LOW=3]="LOW",e[e.MIN=4]="MIN"}(ph||(ph={}));const mh=["allowFullScreen","allowTransparency","autoComplete","autoFocus","autoPlay","cellPadding","cellSpacing","charSet","className","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((e,t)=>(e[t.toLowerCase()]=t,e),{for:"htmlFor"}),gh={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},Jb=["style","script"],ex=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,tx=/mailto:/i,nx=/\n{2,}$/,Hy=/^(\s*>[\s\S]*?)(?=\n{2,})/,rx=/^ *> ?/gm,ix=/^ {2,}\n/,ox=/^(?:( *[-*_])){3,} *(?:\n *)+\n/,Gy=/^\s*(`{3,}|~{3,}) *(\S+)?([^\n]*?)?\n([\s\S]+?)\s*\1 *(?:\n *)*\n?/,Vy=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,sx=/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,ax=/^(?:\n *)*\n/,lx=/\r\n?/g,ux=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,cx=/^\[\^([^\]]+)]/,fx=/\f/g,dx=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,hx=/^\s*?\[(x|\s)\]/,Wy=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,qy=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,Xy=/^([^\n]+)\n *(=|-){3,} *(?:\n *)+\n/,hu=/^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i,px=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,Qy=/^<!--[\s\S]*?(?:-->)/,mx=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,pu=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,gx=/^\{.*\}$/,yx=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,vx=/^<([^ >]+@[^ >]+)>/,_x=/^<([^ >]+:\/[^ >]+)>/,Ex=/-([a-z])?/gi,Ky=/^(.*\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/,Sx=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,wx=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,bx=/^\[([^\]]*)\] ?\[([^\]]*)\]/,xx=/(\[|\])/g,Tx=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,Cx=/\t/g,kx=/(^ *\||\| *$)/g,Ox=/^ *:-+: *$/,Rx=/^ *:-+ *$/,Nx=/^ *-+: *$/,ea="((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|~~.*?~~|==.*?==|.|\\n)*?)",Ax=new RegExp(`^([*_])\\1${ea}\\1\\1(?!\\1)`),Px=new RegExp(`^([*_])${ea}\\1(?!\\1|\\w)`),Ix=new RegExp(`^==${ea}==`),Dx=new RegExp(`^~~${ea}~~`),Mx=/^\\([^0-9A-Za-z\s])/,Fx=/^[\s\S]+?(?=[^0-9A-Z\s\u00c0-\uffff&#;.()'"]|\d+\.|\n\n| {2,}\n|\w+:\S|$)/i,Bx=/^\n+/,Lx=/^([ \t]*)/,jx=/\\([^\\])/g,yh=/ *\n+$/,zx=/(?:^|\n)( *)$/,ff="(?:\\d+\\.)",df="(?:[*+-])";function Yy(e){return"( *)("+(e===1?ff:df)+") +"}const Zy=Yy(1),Jy=Yy(2);function ev(e){return new RegExp("^"+(e===1?Zy:Jy))}const Ux=ev(1),$x=ev(2);function tv(e){return new RegExp("^"+(e===1?Zy:Jy)+"[^\\n]*(?:\\n(?!\\1"+(e===1?ff:df)+" )[^\\n]*)*(\\n|$)","gm")}const nv=tv(1),rv=tv(2);function iv(e){const t=e===1?ff:df;return new RegExp("^( *)("+t+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+t+" (?!"+t+" ))\\n*|\\s*\\n*$)")}const ov=iv(1),sv=iv(2);function vh(e,t){const n=t===1,r=n?ov:sv,i=n?nv:rv,o=n?Ux:$x;return{match(s,a,l){const u=zx.exec(l);return u&&(a.list||!a.inline&&!a.simple)?r.exec(s=u[1]+s):null},order:1,parse(s,a,l){const u=n?+s[2]:void 0,c=s[0].replace(nx,`
|
|
84
|
+
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var o="",s=0;s<arguments.length;s++){var a=arguments[s];a&&(o=i(o,r(a)))}return o}function r(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return n.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var s="";for(var a in o)t.call(o,a)&&o[a]&&(s=i(s,a));return s}function i(o,s){return s?o?o+" "+s:o+s:o}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(_y);var Sw=_y.exports;const R=Ru(Sw),Ey="%[a-f0-9]{2}",lh=new RegExp("("+Ey+")|([^%]+?)","gi"),uh=new RegExp("("+Ey+")+","gi");function lu(e,t){try{return[decodeURIComponent(e.join(""))]}catch{}if(e.length===1)return e;t=t||1;const n=e.slice(0,t),r=e.slice(t);return Array.prototype.concat.call([],lu(n),lu(r))}function ww(e){try{return decodeURIComponent(e)}catch{let t=e.match(lh)||[];for(let n=1;n<t.length;n++)e=lu(t,n).join(""),t=e.match(lh)||[];return e}}function bw(e){const t={"%FE%FF":"��","%FF%FE":"��"};let n=uh.exec(e);for(;n;){try{t[n[0]]=decodeURIComponent(n[0])}catch{const i=ww(n[0]);i!==n[0]&&(t[n[0]]=i)}n=uh.exec(e)}t["%C2"]="�";const r=Object.keys(t);for(const i of r)e=e.replace(new RegExp(i,"g"),t[i]);return e}function xw(e){if(typeof e!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return decodeURIComponent(e)}catch{return bw(e)}}function Sy(e,t){if(!(typeof e=="string"&&typeof t=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(e===""||t==="")return[];const n=e.indexOf(t);return n===-1?[]:[e.slice(0,n),e.slice(n+t.length)]}function Tw(e,t){const n={};if(Array.isArray(t))for(const r of t){const i=Object.getOwnPropertyDescriptor(e,r);i!=null&&i.enumerable&&Object.defineProperty(n,r,i)}else for(const r of Reflect.ownKeys(e)){const i=Object.getOwnPropertyDescriptor(e,r);if(i.enumerable){const o=e[r];t(r,o,e)&&Object.defineProperty(n,r,i)}}return n}const Cw=e=>e==null,kw=e=>encodeURIComponent(e).replaceAll(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),uu=Symbol("encodeFragmentIdentifier");function Ow(e){switch(e.arrayFormat){case"index":return t=>(n,r)=>{const i=n.length;return r===void 0||e.skipNull&&r===null||e.skipEmptyString&&r===""?n:r===null?[...n,[ce(t,e),"[",i,"]"].join("")]:[...n,[ce(t,e),"[",ce(i,e),"]=",ce(r,e)].join("")]};case"bracket":return t=>(n,r)=>r===void 0||e.skipNull&&r===null||e.skipEmptyString&&r===""?n:r===null?[...n,[ce(t,e),"[]"].join("")]:[...n,[ce(t,e),"[]=",ce(r,e)].join("")];case"colon-list-separator":return t=>(n,r)=>r===void 0||e.skipNull&&r===null||e.skipEmptyString&&r===""?n:r===null?[...n,[ce(t,e),":list="].join("")]:[...n,[ce(t,e),":list=",ce(r,e)].join("")];case"comma":case"separator":case"bracket-separator":{const t=e.arrayFormat==="bracket-separator"?"[]=":"=";return n=>(r,i)=>i===void 0||e.skipNull&&i===null||e.skipEmptyString&&i===""?r:(i=i===null?"":i,r.length===0?[[ce(n,e),t,ce(i,e)].join("")]:[[r,ce(i,e)].join(e.arrayFormatSeparator)])}default:return t=>(n,r)=>r===void 0||e.skipNull&&r===null||e.skipEmptyString&&r===""?n:r===null?[...n,ce(t,e)]:[...n,[ce(t,e),"=",ce(r,e)].join("")]}}function Rw(e){let t;switch(e.arrayFormat){case"index":return(n,r,i)=>{if(t=/\[(\d*)]$/.exec(n),n=n.replace(/\[\d*]$/,""),!t){i[n]=r;return}i[n]===void 0&&(i[n]={}),i[n][t[1]]=r};case"bracket":return(n,r,i)=>{if(t=/(\[])$/.exec(n),n=n.replace(/\[]$/,""),!t){i[n]=r;return}if(i[n]===void 0){i[n]=[r];return}i[n]=[...i[n],r]};case"colon-list-separator":return(n,r,i)=>{if(t=/(:list)$/.exec(n),n=n.replace(/:list$/,""),!t){i[n]=r;return}if(i[n]===void 0){i[n]=[r];return}i[n]=[...i[n],r]};case"comma":case"separator":return(n,r,i)=>{const o=typeof r=="string"&&r.includes(e.arrayFormatSeparator),s=typeof r=="string"&&!o&&$t(r,e).includes(e.arrayFormatSeparator);r=s?$t(r,e):r;const a=o||s?r.split(e.arrayFormatSeparator).map(l=>$t(l,e)):r===null?r:$t(r,e);i[n]=a};case"bracket-separator":return(n,r,i)=>{const o=/(\[])$/.test(n);if(n=n.replace(/\[]$/,""),!o){i[n]=r&&$t(r,e);return}const s=r===null?[]:r.split(e.arrayFormatSeparator).map(a=>$t(a,e));if(i[n]===void 0){i[n]=s;return}i[n]=[...i[n],...s]};default:return(n,r,i)=>{if(i[n]===void 0){i[n]=r;return}i[n]=[...[i[n]].flat(),r]}}}function wy(e){if(typeof e!="string"||e.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function ce(e,t){return t.encode?t.strict?kw(e):encodeURIComponent(e):e}function $t(e,t){return t.decode?xw(e):e}function by(e){return Array.isArray(e)?e.sort():typeof e=="object"?by(Object.keys(e)).sort((t,n)=>Number(t)-Number(n)).map(t=>e[t]):e}function xy(e){const t=e.indexOf("#");return t!==-1&&(e=e.slice(0,t)),e}function Nw(e){let t="";const n=e.indexOf("#");return n!==-1&&(t=e.slice(n)),t}function ch(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&typeof e=="string"&&e.trim()!==""?e=Number(e):t.parseBooleans&&e!==null&&(e.toLowerCase()==="true"||e.toLowerCase()==="false")&&(e=e.toLowerCase()==="true"),e}function Mc(e){e=xy(e);const t=e.indexOf("?");return t===-1?"":e.slice(t+1)}function Fc(e,t){t={decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1,...t},wy(t.arrayFormatSeparator);const n=Rw(t),r=Object.create(null);if(typeof e!="string"||(e=e.trim().replace(/^[?#&]/,""),!e))return r;for(const i of e.split("&")){if(i==="")continue;const o=t.decode?i.replaceAll("+"," "):i;let[s,a]=Sy(o,"=");s===void 0&&(s=o),a=a===void 0?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?a:$t(a,t),n($t(s,t),a,r)}for(const[i,o]of Object.entries(r))if(typeof o=="object"&&o!==null)for(const[s,a]of Object.entries(o))o[s]=ch(a,t);else r[i]=ch(o,t);return t.sort===!1?r:(t.sort===!0?Object.keys(r).sort():Object.keys(r).sort(t.sort)).reduce((i,o)=>{const s=r[o];return i[o]=s&&typeof s=="object"&&!Array.isArray(s)?by(s):s,i},Object.create(null))}function Ty(e,t){if(!e)return"";t={encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:",",...t},wy(t.arrayFormatSeparator);const n=s=>t.skipNull&&Cw(e[s])||t.skipEmptyString&&e[s]==="",r=Ow(t),i={};for(const[s,a]of Object.entries(e))n(s)||(i[s]=a);const o=Object.keys(i);return t.sort!==!1&&o.sort(t.sort),o.map(s=>{const a=e[s];return a===void 0?"":a===null?ce(s,t):Array.isArray(a)?a.length===0&&t.arrayFormat==="bracket-separator"?ce(s,t)+"[]":a.reduce(r(s),[]).join("&"):ce(s,t)+"="+ce(a,t)}).filter(s=>s.length>0).join("&")}function Cy(e,t){var i;t={decode:!0,...t};let[n,r]=Sy(e,"#");return n===void 0&&(n=e),{url:((i=n==null?void 0:n.split("?"))==null?void 0:i[0])??"",query:Fc(Mc(e),t),...t&&t.parseFragmentIdentifier&&r?{fragmentIdentifier:$t(r,t)}:{}}}function ky(e,t){t={encode:!0,strict:!0,[uu]:!0,...t};const n=xy(e.url).split("?")[0]||"",r=Mc(e.url),i={...Fc(r,{sort:!1}),...e.query};let o=Ty(i,t);o&&(o=`?${o}`);let s=Nw(e.url);if(typeof e.fragmentIdentifier=="string"){const a=new URL(n);a.hash=e.fragmentIdentifier,s=t[uu]?a.hash:`#${e.fragmentIdentifier}`}return`${n}${o}${s}`}function Oy(e,t,n){n={parseFragmentIdentifier:!0,[uu]:!1,...n};const{url:r,query:i,fragmentIdentifier:o}=Cy(e,n);return ky({url:r,query:Tw(i,t),fragmentIdentifier:o},n)}function Aw(e,t,n){const r=Array.isArray(t)?i=>!t.includes(i):(i,o)=>!t(i,o);return Oy(e,r,n)}const Ry=Object.freeze(Object.defineProperty({__proto__:null,exclude:Aw,extract:Mc,parse:Fc,parseUrl:Cy,pick:Oy,stringify:Ty,stringifyUrl:ky},Symbol.toStringTag,{value:"Module"}));var U={},cu={},I={};Object.defineProperty(I,"__esModule",{value:!0});I.CONVERSATION_RATING_FROM_GUEST=I.PROBLEM_REPORT_FROM_GUEST=I.TRANSCRIPT_MAIL_REQUEST=I.INBOX_CONNECT_REQUEST=I.RESTART_CHAT_REQUEST=I.EVENT_TO_GUEST=I.NLU_REQUEST_EVENT=I.EXPERTS_DISCONNECTED=I.EXPERTS_DISCONNECT_REQUEST=I.EXPERTS_CONNECTED=I.EXPERTS_CONNECT_REQUEST=I.MESSAGE_TO_GUEST=I.MESSAGE_WITHOUT_ANALYSIS_FROM_GUEST=I.MESSAGE_FROM_GUEST=I.GUEST_FEEDBACK_RESPONSE=I.GUEST_DISCONNECTED=I.GUEST_CONNECTED=I.TYPING_OFF=I.TYPING_ON=void 0;I.TYPING_ON="core.typing.on";I.TYPING_OFF="core.typing.off";I.GUEST_CONNECTED="core.guest.connected";I.GUEST_DISCONNECTED="core.guest.disconnected";I.GUEST_FEEDBACK_RESPONSE="core.guest.feedback.response";I.MESSAGE_FROM_GUEST="core.message.from.guest";I.MESSAGE_WITHOUT_ANALYSIS_FROM_GUEST="core.message.without.analysis.from.guest";I.MESSAGE_TO_GUEST="core.message.to.guest";I.EXPERTS_CONNECT_REQUEST="core.experts.connect.request";I.EXPERTS_CONNECTED="core.experts.connected";I.EXPERTS_DISCONNECT_REQUEST="core.experts.disconnect.request";I.EXPERTS_DISCONNECTED="core.experts.disconnected";I.NLU_REQUEST_EVENT="core.nlu.request.event";I.EVENT_TO_GUEST="core.event.to.guest";I.RESTART_CHAT_REQUEST="core.chat.restart.request";I.INBOX_CONNECT_REQUEST="core.inbox.connect.request";I.TRANSCRIPT_MAIL_REQUEST="core.transcript.mail.request";I.PROBLEM_REPORT_FROM_GUEST="core.problem.report.from.guest";I.CONVERSATION_RATING_FROM_GUEST="core.conversation.rating.from.guest";var Ny={};Object.defineProperty(Ny,"__esModule",{value:!0});var Bc={};Object.defineProperty(Bc,"__esModule",{value:!0});const Pw=I,Iw=(e,t)=>({type:Pw.GUEST_FEEDBACK_RESPONSE,payload:{satisfaction:e,intent:t}});Bc.default=Iw;var Lc={};Object.defineProperty(Lc,"__esModule",{value:!0});const Dw=I,Mw=e=>({type:Dw.GUEST_CONNECTED,payload:{sessionId:e}});Lc.default=Mw;var jc={};Object.defineProperty(jc,"__esModule",{value:!0});const Fw=I,Bw=e=>({type:Fw.GUEST_DISCONNECTED,payload:{sessionId:e}});jc.default=Bw;var zc={},te={};Object.defineProperty(te,"__esModule",{value:!0});te.getStringRepresentationFromMessage=te.MessageTypeEnum=te.AudioMessage=te.FileMessage=te.ImageMessage=te.VideoMessage=te.MarkdownMessage=te.DetailMessage=te.TextMessage=te.Message=void 0;let Cn=class{constructor(t,n){V(this,"type");V(this,"sender");V(this,"quickReplies");this.type=t,this.sender=n,this.quickReplies=[]}addQuickReply(t,n){this.quickReplies.push({label:t,payload:n})}};te.Message=Cn;let Lw=class extends Cn{constructor(n,r){super(ke.TEXT,r);V(this,"text");this.text=n}};te.TextMessage=Lw;let jw=class extends Cn{constructor(n,r){super(ke.DETAIL,r);V(this,"title");V(this,"subtitle");V(this,"text");V(this,"imageUrl");V(this,"itemUrl");V(this,"buttons");this.title=n,this.text="",this.subtitle="",this.imageUrl="",this.itemUrl="",this.buttons=[]}setImageUrl(n){this.imageUrl=n}setItemUrl(n){this.itemUrl=n}setSubtitle(n){this.subtitle=n}setText(n){this.text=n}addButton(n){this.buttons.push(n)}};te.DetailMessage=jw;let zw=class extends Cn{constructor(n,r,i){super(ke.MARKDOWN,i);V(this,"markdown");V(this,"excerpt");V(this,"className");this.markdown=n,this.excerpt=r,this.className=""}setClassName(n){this.className=n}};te.MarkdownMessage=zw;class Uw extends Cn{constructor(n,r){super(ke.VIDEO,r);V(this,"url");this.url=n}}te.VideoMessage=Uw;class $w extends Cn{constructor(n,r){super(ke.IMAGE,r);V(this,"url");this.url=n}}te.ImageMessage=$w;class Hw extends Cn{constructor(n,r){super(ke.FILE,r);V(this,"url");this.url=n}}te.FileMessage=Hw;class Gw extends Cn{constructor(n,r){super(ke.AUDIO,r);V(this,"url");this.url=n}}te.AudioMessage=Gw;var ke;(function(e){e.TEXT="TEXT",e.DETAIL="DETAIL",e.MARKDOWN="MARKDOWN",e.VIDEO="VIDEO",e.IMAGE="IMAGE",e.FILE="FILE",e.AUDIO="AUDIO"})(ke||(te.MessageTypeEnum=ke={}));const Vw=e=>{switch(e.type){case ke.TEXT:return e.text;case ke.DETAIL:const n=e;return`${n.title} // ${n.subtitle}`;case ke.MARKDOWN:return e.excerpt;case ke.VIDEO:return`Video Url: ${e.url}`;case ke.IMAGE:return`Image Url: ${e.url}`;case ke.FILE:return`File Url: ${e.url}`;case ke.AUDIO:return`Audio Url: ${e.url}`;default:throw new Error("Unknown message type "+e.type)}};te.getStringRepresentationFromMessage=Vw;var Be={};Object.defineProperty(Be,"__esModule",{value:!0});Be.UserType=Be.PersonUser=Be.GuestUser=Be.BotUser=Be.User=void 0;class Ys{constructor(t,n,r,i){V(this,"type");V(this,"id");V(this,"name");V(this,"avatar");this.type=t,this.id=n,this.name=r,this.avatar=i}}Be.User=Ys;class Ww extends Ys{constructor(){super(Di.BOT,null,"Chatbot","bot.svg")}}Be.BotUser=Ww;class qw extends Ys{constructor(){super(Di.GUEST,null,"Guest","visitor.svg")}}Be.GuestUser=qw;class Xw extends Ys{constructor(t,n,r){super(Di.PERSON,t,n,r)}}Be.PersonUser=Xw;var Di;(function(e){e.GUEST="GUEST",e.BOT="BOT",e.PERSON="PERSON"})(Di||(Be.UserType=Di={}));Object.defineProperty(zc,"__esModule",{value:!0});const Qw=te,Kw=Be,Yw=I,Zw=e=>{const t=new Qw.TextMessage(e,new Kw.GuestUser);return{type:Yw.MESSAGE_FROM_GUEST,message:t}};zc.default=Zw;var Uc={};Object.defineProperty(Uc,"__esModule",{value:!0});const Jw=te,eb=Be,tb=I,nb=(e,t={})=>{const n=new Jw.TextMessage(e,new eb.GuestUser);return{type:tb.MESSAGE_WITHOUT_ANALYSIS_FROM_GUEST,message:n,payload:t}};Uc.default=nb;var $c={};Object.defineProperty($c,"__esModule",{value:!0});const rb=I,ib=(e,t)=>({type:rb.PROBLEM_REPORT_FROM_GUEST,payload:{actionId:e,problem:t}});$c.default=ib;var Hc={};Object.defineProperty(Hc,"__esModule",{value:!0});const ob=I,sb=e=>({type:ob.NLU_REQUEST_EVENT,event:e});Hc.default=sb;var Gc={};Object.defineProperty(Gc,"__esModule",{value:!0});const ab=I,lb=()=>({type:ab.RESTART_CHAT_REQUEST});Gc.default=lb;var Vc={};Object.defineProperty(Vc,"__esModule",{value:!0});const ub=I,cb=e=>({type:ub.MESSAGE_TO_GUEST,message:e});Vc.default=cb;(function(e){var t=q&&q.__createBinding||(Object.create?function(p,S,h,d){d===void 0&&(d=h);var m=Object.getOwnPropertyDescriptor(S,h);(!m||("get"in m?!S.__esModule:m.writable||m.configurable))&&(m={enumerable:!0,get:function(){return S[h]}}),Object.defineProperty(p,d,m)}:function(p,S,h,d){d===void 0&&(d=h),p[d]=S[h]}),n=q&&q.__setModuleDefault||(Object.create?function(p,S){Object.defineProperty(p,"default",{enumerable:!0,value:S})}:function(p,S){p.default=S}),r=q&&q.__importStar||function(p){if(p&&p.__esModule)return p;var S={};if(p!=null)for(var h in p)h!=="default"&&Object.prototype.hasOwnProperty.call(p,h)&&t(S,p,h);return n(S,p),S},i=q&&q.__exportStar||function(p,S){for(var h in p)h!=="default"&&!Object.prototype.hasOwnProperty.call(S,h)&&t(S,p,h)},o=q&&q.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(e,"__esModule",{value:!0}),e.sendMessageToGuest=e.restartChatRequest=e.requestNLUEvent=e.reportProblemFromGuest=e.receiveTextMessageWithoutAnalysisFromGuest=e.receiveTextMessageFromGuest=e.guestDisconnected=e.guestConnected=e.feedbackFromGuestResponse=e.ActionTypes=void 0,e.ActionTypes=r(I),i(Ny,e);const s=o(Bc);e.feedbackFromGuestResponse=s.default;const a=o(Lc);e.guestConnected=a.default;const l=o(jc);e.guestDisconnected=l.default;const u=o(zc);e.receiveTextMessageFromGuest=u.default;const c=o(Uc);e.receiveTextMessageWithoutAnalysisFromGuest=c.default;const g=o($c);e.reportProblemFromGuest=g.default;const y=o(Hc);e.requestNLUEvent=y.default;const f=o(Gc);e.restartChatRequest=f.default;const v=o(Vc);e.sendMessageToGuest=v.default})(cu);var Nr={},Ay={};Object.defineProperty(Ay,"__esModule",{value:!0});var Zs={};Object.defineProperty(Zs,"__esModule",{value:!0});Zs.NullableKnowledgeBaseAdapter=void 0;class fb{async upsertApiKnowledgeBase(t){throw new Error("Method not implemented.")}async findApiKnowledgeBaseByName(t){throw new Error("Method not implemented.")}async deleteApiKnowledgeBaseByName(t){throw new Error("Method not implemented.")}async setIndexingStatus(t,n){throw new Error("Method not implemented.")}async upsertKnowledgeBaseEntry(t,n){throw new Error("Method not implemented.")}async retrieveKnowledgeBaseEntryConfig(t,n){throw new Error("Method not implemented.")}async deleteKnowledgeBaseEntriesIndexedBeforeDate(t,n){throw new Error("Method not implemented.")}async subscribeToReindex(t,n){throw new Error("Method not implemented.")}isContentTypeSupported(t){throw new Error("Method not implemented.")}}Zs.NullableKnowledgeBaseAdapter=fb;var db=q&&q.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),hb=q&&q.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),pb=q&&q.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&db(t,e,n);return hb(t,e),t};Object.defineProperty(Nr,"__esModule",{value:!0});Nr.NullableCmsAdapter=Nr.KnowledgeBase=void 0;Nr.KnowledgeBase=pb(Ay);const mb=Zs;Nr.NullableCmsAdapter={knowledgeBase:new mb.NullableKnowledgeBaseAdapter};var fu={},Py={};Object.defineProperty(Py,"__esModule",{value:!0});var It={};Object.defineProperty(It,"__esModule",{value:!0});It.ButtonTypeEnum=It.PostbackButton=It.UrlButton=It.Button=void 0;class Wc{constructor(t,n){V(this,"title");V(this,"type");this.title=t,this.type=n}}It.Button=Wc;class gb extends Wc{constructor(n,r){super(n,hs.WEB_URL);V(this,"url");this.url=r}}It.UrlButton=gb;class yb extends Wc{constructor(n,r){super(n,hs.POSTBACK);V(this,"payload");this.payload=r}}It.PostbackButton=yb;var hs;(function(e){e.WEB_URL="web_url",e.POSTBACK="postback"})(hs||(It.ButtonTypeEnum=hs={}));var Iy={};Object.defineProperty(Iy,"__esModule",{value:!0});var Js={};Object.defineProperty(Js,"__esModule",{value:!0});Js.SatisfactionEnum=void 0;var fh;(function(e){e.GOOD="GOOD",e.BAD="BAD"})(fh||(Js.SatisfactionEnum=fh={}));(function(e){var t=q&&q.__createBinding||(Object.create?function(r,i,o,s){s===void 0&&(s=o);var a=Object.getOwnPropertyDescriptor(i,o);(!a||("get"in a?!i.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(r,s,a)}:function(r,i,o,s){s===void 0&&(s=o),r[s]=i[o]}),n=q&&q.__exportStar||function(r,i){for(var o in r)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&t(i,r,o)};Object.defineProperty(e,"__esModule",{value:!0}),n(Py,e),n(It,e),n(Iy,e),n(Js,e),n(te,e),n(Be,e)})(fu);(function(e){var t=q&&q.__createBinding||(Object.create?function(o,s,a,l){l===void 0&&(l=a);var u=Object.getOwnPropertyDescriptor(s,a);(!u||("get"in u?!s.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return s[a]}}),Object.defineProperty(o,l,u)}:function(o,s,a,l){l===void 0&&(l=a),o[l]=s[a]}),n=q&&q.__setModuleDefault||(Object.create?function(o,s){Object.defineProperty(o,"default",{enumerable:!0,value:s})}:function(o,s){o.default=s}),r=q&&q.__exportStar||function(o,s){for(var a in o)a!=="default"&&!Object.prototype.hasOwnProperty.call(s,a)&&t(s,o,a)},i=q&&q.__importStar||function(o){if(o&&o.__esModule)return o;var s={};if(o!=null)for(var a in o)a!=="default"&&Object.prototype.hasOwnProperty.call(o,a)&&t(s,o,a);return n(s,o),s};Object.defineProperty(e,"__esModule",{value:!0}),e.Model=e.CMS=e.Actions=void 0,r(cu,e),e.Actions=i(cu),e.CMS=i(Nr),r(fu,e),e.Model=i(fu)})(U);const Dy=e=>t=>(e.payload.type!==U.ActionTypes.MESSAGE_FROM_GUEST&&t(U.receiveTextMessageWithoutAnalysisFromGuest(e.label,e.payload)),t(e.payload)),My=e=>(t,n)=>{const{quickReplies:r}=n().chat,i=r.find(o=>e.toLocaleLowerCase().indexOf(o.label.toLocaleLowerCase())>-1);return t(i?Dy({...i,label:e}):U.receiveTextMessageFromGuest(e))},qc="MESSAGE_TO_PARENT_PAGE",Xc="RESTORE_PREVIOUS_CHAT_MESSAGES",Qc="AUDIO_MESSAGE_FROM_USER",Kc="ENABLE_SPEECH_SUPPORT",Yc="ENABLE_BOT_REPLIES_VOTING_SUPPORT",Zc="ENABLE_TRANSCRIPT_EXPORT",vb="EXPORT_TRANSCRIPT",Jc="RECEIVE_SPEECH_TRANSCRIPTION",ef="SHOW_GENERAL_CONDITIONS",tf="ENABLE_CONVERSATION_RATING",_b="webclient.get.started",Fy="webclient.expand.window",By="webclient.transcript.pdf.download",Eb=[qc,Xc,Qc,Kc,Yc,Zc,vb,Jc,ef,tf],Sb=e=>({type:Qc,buffer:e}),wb=()=>({type:Kc}),bb=()=>({type:Yc}),xb=e=>({type:Jc,transcription:e}),Tb=e=>({type:Zc,methods:e}),Cb=e=>({type:U.ActionTypes.TRANSCRIPT_MAIL_REQUEST,payload:{parameters:{mailTo:e}}}),kb=()=>({type:ef}),Ob=()=>({type:By}),Rb=({rating:e})=>({type:tf,payload:{rating:e}}),Nb=(e,t)=>({type:U.ActionTypes.CONVERSATION_RATING_FROM_GUEST,payload:{value:e,feedback:t}}),Ly=e=>U.requestNLUEvent(e),Ab=e=>({type:Xc,messages:e}),Pb=e=>{switch(e.type){case U.ButtonTypeEnum.WEB_URL:return jy(e.url);case U.ButtonTypeEnum.POSTBACK:return e.payload;default:throw new Error(`unknown button type ${e.type}`)}},Ib=e=>jy(e),jy=e=>({type:qc,message:{type:"webclient.change.url",url:e}});/*! js-cookie v3.0.5 | MIT */function po(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}var Db={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function du(e,t){function n(i,o,s){if(!(typeof document>"u")){s=po({},t,s),typeof s.expires=="number"&&(s.expires=new Date(Date.now()+s.expires*864e5)),s.expires&&(s.expires=s.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var l in s)s[l]&&(a+="; "+l,s[l]!==!0&&(a+="="+s[l].split(";")[0]));return document.cookie=i+"="+e.write(o,i)+a}}function r(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var o=document.cookie?document.cookie.split("; "):[],s={},a=0;a<o.length;a++){var l=o[a].split("="),u=l.slice(1).join("=");try{var c=decodeURIComponent(l[0]);if(s[c]=e.read(u,c),i===c)break}catch{}}return i?s[i]:s}}return Object.create({set:n,get:r,remove:function(i,o){n(i,"",po({},o,{expires:-1}))},withAttributes:function(i){return du(this.converter,po({},this.attributes,i))},withConverter:function(i){return du(po({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var Ua=du(Db,{path:"/"});const nf="CONNECT",rf="CONNECTING",of="CONNECTED",sf="DISCONNECTED",af="RECONNECTED",lf="RESTORE_SESSION_ID",uf="START",zy="RESTART",Mb=[nf,rf,of,sf,af,lf],Fb=(e,t)=>({type:nf,clientName:e,querystrings:t}),Bb=e=>({type:lf,sessionId:e}),Lb=()=>({type:rf}),jb=()=>({type:of}),zb=()=>({type:sf}),Ub=()=>({type:af}),Uy=(e,t,n)=>(r,i)=>{const o=i().connection;let s=o.sessionId;s===void 0&&(s=crypto.randomUUID());let a=o.userId;if(a===void 0){const l=Ua.get("bubble-chat-userId")||Ua.get("bf-webclient-userId");a=l||crypto.randomUUID(),Ua.set("bubble-chat-userId",a)}r({type:uf,payload:{sessionId:s,sessionIdToTerminate:n,userId:a,clientName:e,querystrings:Ry.parse(t)}})},cf=(e,t)=>(n,r)=>{const i=r().connection.sessionId;return n($b()),n(Uy(e,t,i))},$b=()=>({type:zy});var an=(e=>(e[e.CONNECTING=0]="CONNECTING",e[e.CONNECTED=1]="CONNECTED",e[e.RECONNECTED=2]="RECONNECTED",e[e.DISCONNECTED=3]="DISCONNECTED",e))(an||{}),$y=(e=>(e.GUEST="GUEST",e.BOT="BOT",e.PERSON="PERSON",e))($y||{});const Hb="_button_1e5of_54",Gb="_buttonDefault_1e5of_66",Vb="_buttonPrimary_1e5of_80",Wb="_accessabilityHidden_1e5of_132",we={button:Hb,buttonDefault:Gb,buttonPrimary:Vb,accessabilityHidden:Wb},qb="_chatwindow_phukm_1",Xb="_chatcontent_phukm_13",Qb={chatwindow:qb,chatcontent:Xb},Kb="_messageContainer_1wdci_1",Yb="_messages_1wdci_10",dh={messageContainer:Kb,messages:Yb};function Mn(){return Mn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Mn.apply(this,arguments)}const Zb=["children","options"];var hh,ph;(function(e){e.blockQuote="0",e.breakLine="1",e.breakThematic="2",e.codeBlock="3",e.codeFenced="4",e.codeInline="5",e.footnote="6",e.footnoteReference="7",e.gfmTask="8",e.heading="9",e.headingSetext="10",e.htmlBlock="11",e.htmlComment="12",e.htmlSelfClosing="13",e.image="14",e.link="15",e.linkAngleBraceStyleDetector="16",e.linkBareUrlDetector="17",e.linkMailtoDetector="18",e.newlineCoalescer="19",e.orderedList="20",e.paragraph="21",e.ref="22",e.refImage="23",e.refLink="24",e.table="25",e.tableSeparator="26",e.text="27",e.textBolded="28",e.textEmphasized="29",e.textEscaped="30",e.textMarked="31",e.textStrikethroughed="32",e.unorderedList="33"})(hh||(hh={})),function(e){e[e.MAX=0]="MAX",e[e.HIGH=1]="HIGH",e[e.MED=2]="MED",e[e.LOW=3]="LOW",e[e.MIN=4]="MIN"}(ph||(ph={}));const mh=["allowFullScreen","allowTransparency","autoComplete","autoFocus","autoPlay","cellPadding","cellSpacing","charSet","className","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((e,t)=>(e[t.toLowerCase()]=t,e),{for:"htmlFor"}),gh={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},Jb=["style","script"],ex=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,tx=/mailto:/i,nx=/\n{2,}$/,Hy=/^(\s*>[\s\S]*?)(?=\n{2,})/,rx=/^ *> ?/gm,ix=/^ {2,}\n/,ox=/^(?:( *[-*_])){3,} *(?:\n *)+\n/,Gy=/^\s*(`{3,}|~{3,}) *(\S+)?([^\n]*?)?\n([\s\S]+?)\s*\1 *(?:\n *)*\n?/,Vy=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,sx=/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,ax=/^(?:\n *)*\n/,lx=/\r\n?/g,ux=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,cx=/^\[\^([^\]]+)]/,fx=/\f/g,dx=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,hx=/^\s*?\[(x|\s)\]/,Wy=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,qy=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,Xy=/^([^\n]+)\n *(=|-){3,} *(?:\n *)+\n/,hu=/^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i,px=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,Qy=/^<!--[\s\S]*?(?:-->)/,mx=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,pu=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,gx=/^\{.*\}$/,yx=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,vx=/^<([^ >]+@[^ >]+)>/,_x=/^<([^ >]+:\/[^ >]+)>/,Ex=/-([a-z])?/gi,Ky=/^(.*\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/,Sx=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,wx=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,bx=/^\[([^\]]*)\] ?\[([^\]]*)\]/,xx=/(\[|\])/g,Tx=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,Cx=/\t/g,kx=/(^ *\||\| *$)/g,Ox=/^ *:-+: *$/,Rx=/^ *:-+ *$/,Nx=/^ *-+: *$/,ea="((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|~~.*?~~|==.*?==|.|\\n)*?)",Ax=new RegExp(`^([*_])\\1${ea}\\1\\1(?!\\1)`),Px=new RegExp(`^([*_])${ea}\\1(?!\\1|\\w)`),Ix=new RegExp(`^==${ea}==`),Dx=new RegExp(`^~~${ea}~~`),Mx=/^\\([^0-9A-Za-z\s])/,Fx=/^[\s\S]+?(?=[^0-9A-Z\s\u00c0-\uffff&#;.()'"]|\d+\.|\n\n| {2,}\n|\w+:\S|$)/i,Bx=/^\n+/,Lx=/^([ \t]*)/,jx=/\\([^\\])/g,yh=/ *\n+$/,zx=/(?:^|\n)( *)$/,ff="(?:\\d+\\.)",df="(?:[*+-])";function Yy(e){return"( *)("+(e===1?ff:df)+") +"}const Zy=Yy(1),Jy=Yy(2);function ev(e){return new RegExp("^"+(e===1?Zy:Jy))}const Ux=ev(1),$x=ev(2);function tv(e){return new RegExp("^"+(e===1?Zy:Jy)+"[^\\n]*(?:\\n(?!\\1"+(e===1?ff:df)+" )[^\\n]*)*(\\n|$)","gm")}const nv=tv(1),rv=tv(2);function iv(e){const t=e===1?ff:df;return new RegExp("^( *)("+t+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+t+" (?!"+t+" ))\\n*|\\s*\\n*$)")}const ov=iv(1),sv=iv(2);function vh(e,t){const n=t===1,r=n?ov:sv,i=n?nv:rv,o=n?Ux:$x;return{match(s,a,l){const u=zx.exec(l);return u&&(a.list||!a.inline&&!a.simple)?r.exec(s=u[1]+s):null},order:1,parse(s,a,l){const u=n?+s[2]:void 0,c=s[0].replace(nx,`
|
|
85
85
|
`).match(i);let g=!1;return{items:c.map(function(y,f){const v=o.exec(y)[0].length,p=new RegExp("^ {1,"+v+"}","gm"),S=y.replace(p,"").replace(o,""),h=f===c.length-1,d=S.indexOf(`
|
|
86
86
|
|
|
87
87
|
`)!==-1||h&&g;g=d;const m=l.inline,E=l.list;let w;l.list=!0,d?(l.inline=!1,w=S.replace(yh,`
|
|
@@ -95,7 +95,7 @@ For more details see https://formatjs.io/docs/getting-started/message-distributi
|
|
|
95
95
|
`,{inline:v}));for(;typeof p[p.length-1]=="string"&&!p[p.length-1].trim();)p.pop();if(t.wrapper===null)return p;const S=t.wrapper||(v?"span":"div");let h;if(p.length>1||t.forceWrapper)h=p;else{if(p.length===1)return h=p[0],typeof h=="string"?r("span",{key:"outer"},h):h;h=null}return N.createElement(S,{key:"outer"},h)}function o(f){const v=f.match(ex);return v?v.reduce(function(p,S,h){const d=S.indexOf("=");if(d!==-1){const m=function(x){return x.indexOf("-")!==-1&&x.match(mx)===null&&(x=x.replace(Ex,function(T,M){return M.toUpperCase()})),x}(S.slice(0,d)).trim(),E=function(x){const T=x[0];return(T==='"'||T==="'")&&x.length>=2&&x[x.length-1]===T?x.slice(1,-1):x}(S.slice(d+1).trim()),w=mh[m]||m,b=p[w]=function(x,T){return x==="style"?T.split(/;\s?/).reduce(function(M,P){const se=P.slice(0,P.indexOf(":"));return M[se.trim().replace(/(-[a-z])/g,ve=>ve[1].toUpperCase())]=P.slice(se.length+1).trim(),M},{}):x==="href"||x==="src"?er(T):(T.match(gx)&&(T=T.slice(1,T.length-1)),T==="true"||T!=="false"&&T)}(m,E);typeof b=="string"&&(hu.test(b)||pu.test(b))&&(p[w]=N.cloneElement(i(b.trim()),{key:h}))}else S!=="style"&&(p[mh[S]||S]=!0);return p},{}):null}const s=[],a={},l={0:{match:jt(Hy),order:1,parse:(f,v,p)=>({children:v(f[0].replace(rx,""),p)}),render:(f,v,p)=>r("blockquote",{key:p.key},v(f.children,p))},1:{match:qr(ix),order:1,parse:Ha,render:(f,v,p)=>r("br",{key:p.key})},2:{match:jt(ox),order:1,parse:Ha,render:(f,v,p)=>r("hr",{key:p.key})},3:{match:jt(Vy),order:0,parse:f=>({lang:void 0,text:f[0].replace(/^ {4}/gm,"").replace(/\n+$/,"")}),render:(f,v,p)=>r("pre",{key:p.key},r("code",Mn({},f.attrs,{className:f.lang?`lang-${f.lang}`:""}),f.text))},4:{match:jt(Gy),order:0,parse:f=>({attrs:o(f[3]||""),lang:f[2]||void 0,text:f[4],type:"3"})},5:{match:tn(sx),order:3,parse:f=>({text:f[2]}),render:(f,v,p)=>r("code",{key:p.key},f.text)},6:{match:jt(ux),order:0,parse:f=>(s.push({footnote:f[2],identifier:f[1]}),{}),render:Ga},7:{match:en(cx),order:1,parse:f=>({target:`#${t.slugify(f[1])}`,text:f[1]}),render:(f,v,p)=>r("a",{key:p.key,href:er(f.target)},r("sup",{key:p.key},f.text))},8:{match:en(hx),order:1,parse:f=>({completed:f[1].toLowerCase()==="x"}),render:(f,v,p)=>r("input",{checked:f.completed,key:p.key,readOnly:!0,type:"checkbox"})},9:{match:jt(t.enforceAtxHeadings?qy:Wy),order:1,parse:(f,v,p)=>({children:Fo(v,f[2],p),id:t.slugify(f[2]),level:f[1].length}),render:(f,v,p)=>r(`h${f.level}`,{id:f.id,key:p.key},v(f.children,p))},10:{match:jt(Xy),order:0,parse:(f,v,p)=>({children:Fo(v,f[1],p),level:f[2]==="="?1:2,type:"9"})},11:{match:qr(hu),order:1,parse(f,v,p){const[,S]=f[3].match(Lx),h=new RegExp(`^${S}`,"gm"),d=f[3].replace(h,""),m=(E=d,Vx.some(T=>T.test(E))?Yx:Fo);var E;const w=f[1].toLowerCase(),b=Jb.indexOf(w)!==-1,x={attrs:o(f[2]),noInnerParse:b,tag:(b?w:f[1]).trim()};return p.inAnchor=p.inAnchor||w==="a",b?x.text=f[3]:x.children=m(v,d,p),p.inAnchor=!1,x},render:(f,v,p)=>r(f.tag,Mn({key:p.key},f.attrs),f.text||v(f.children,p))},13:{match:qr(pu),order:1,parse:f=>({attrs:o(f[2]||""),tag:f[1].trim()}),render:(f,v,p)=>r(f.tag,Mn({},f.attrs,{key:p.key}))},12:{match:qr(Qy),order:1,parse:()=>({}),render:Ga},14:{match:tn(Gx),order:1,parse:f=>({alt:f[1],target:Sh(f[2]),title:f[3]}),render:(f,v,p)=>r("img",{key:p.key,alt:f.alt||void 0,title:f.title||void 0,src:er(f.target)})},15:{match:en(Hx),order:3,parse:(f,v,p)=>({children:Kx(v,f[1],p),target:Sh(f[2]),title:f[3]}),render:(f,v,p)=>r("a",{key:p.key,href:er(f.target),title:f.title},v(f.children,p))},16:{match:en(_x),order:0,parse:f=>({children:[{text:f[1],type:"27"}],target:f[1],type:"15"})},17:{match:(f,v)=>v.inAnchor?null:en(yx)(f,v),order:0,parse:f=>({children:[{text:f[1],type:"27"}],target:f[1],title:void 0,type:"15"})},18:{match:en(vx),order:0,parse(f){let v=f[1],p=f[1];return tx.test(p)||(p="mailto:"+p),{children:[{text:v.replace("mailto:",""),type:"27"}],target:p,type:"15"}}},20:vh(r,1),33:vh(r,2),19:{match:jt(ax),order:3,parse:Ha,render:()=>`
|
|
96
96
|
`},21:{match:Qx,order:3,parse:$a,render:(f,v,p)=>r("p",{key:p.key},v(f.children,p))},22:{match:en(Sx),order:0,parse:f=>(a[f[1]]={target:f[2],title:f[4]},{}),render:Ga},23:{match:tn(wx),order:0,parse:f=>({alt:f[1]||void 0,ref:f[2]}),render:(f,v,p)=>a[f.ref]?r("img",{key:p.key,alt:f.alt,src:er(a[f.ref].target),title:a[f.ref].title}):null},24:{match:en(bx),order:0,parse:(f,v,p)=>({children:v(f[1],p),fallbackChildren:v(f[0].replace(xx,"\\$1"),p),ref:f[2]}),render:(f,v,p)=>a[f.ref]?r("a",{key:p.key,href:er(a[f.ref].target),title:a[f.ref].title},v(f.children,p)):r("span",{key:p.key},v(f.fallbackChildren,p))},25:{match:jt(Ky),order:1,parse:Xx,render(f,v,p){const S=f;return r("table",{key:p.key},r("thead",null,r("tr",null,S.header.map(function(h,d){return r("th",{key:d,style:Eh(S,d)},v(h,p))}))),r("tbody",null,S.cells.map(function(h,d){return r("tr",{key:d},h.map(function(m,E){return r("td",{key:E,style:Eh(S,E)},v(m,p))}))})))}},27:{match:qr(Fx),order:4,parse:f=>({text:f[0].replace(px,(v,p)=>t.namedCodesToUnicode[p]?t.namedCodesToUnicode[p]:v)}),render:f=>f.text},28:{match:tn(Ax),order:2,parse:(f,v,p)=>({children:v(f[2],p)}),render:(f,v,p)=>r("strong",{key:p.key},v(f.children,p))},29:{match:tn(Px),order:3,parse:(f,v,p)=>({children:v(f[2],p)}),render:(f,v,p)=>r("em",{key:p.key},v(f.children,p))},30:{match:tn(Mx),order:1,parse:f=>({text:f[1],type:"27"})},31:{match:tn(Ix),order:3,parse:$a,render:(f,v,p)=>r("mark",{key:p.key},v(f.children,p))},32:{match:tn(Dx),order:3,parse:$a,render:(f,v,p)=>r("del",{key:p.key},v(f.children,p))}};t.disableParsingRawHTML===!0&&(delete l[11],delete l[13]);const u=function(f){let v=Object.keys(f);function p(S,h){let d=[],m="";for(;S;){let E=0;for(;E<v.length;){const w=v[E],b=f[w],x=b.match(S,h,m);if(x){const T=x[0];S=S.substring(T.length);const M=b.parse(x,p,h);M.type==null&&(M.type=w),d.push(M),m=T;break}E++}}return d}return v.sort(function(S,h){let d=f[S].order,m=f[h].order;return d!==m?d-m:S<h?-1:1}),function(S,h){return p(function(d){return d.replace(lx,`
|
|
97
97
|
`).replace(fx,"").replace(Cx," ")}(S),h)}}(l),c=(g=function(f,v){return function(p,S,h){const d=f[p.type].render;return v?v(()=>d(p,S,h),p,S,h):d(p,S,h)}}(l,t.renderRule),function f(v,p={}){if(Array.isArray(v)){const S=p.key,h=[];let d=!1;for(let m=0;m<v.length;m++){p.key=m;const E=f(v[m],p),w=typeof E=="string";w&&d?h[h.length-1]+=E:E!==null&&h.push(E),d=w}return p.key=S,h}return g(v,f,p)});var g;const y=i(e);return s.length?r("div",null,y,r("footer",{key:"footer"},s.map(function(f){return r("div",{id:t.slugify(f.identifier),key:f.identifier},f.identifier,c(u(f.footnote,{inline:!0})))}))):y}const vn=e=>{let{children:t="",options:n}=e,r=function(i,o){if(i==null)return{};var s,a,l={},u=Object.keys(i);for(a=0;a<u.length;a++)o.indexOf(s=u[a])>=0||(l[s]=i[s]);return l}(e,Zb);return N.cloneElement(Jx(t,n),r)};var lv={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},wh=vt.createContext&&vt.createContext(lv),eT=["attr","size","title"];function tT(e,t){if(e==null)return{};var n=nT(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function nT(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function ps(){return ps=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ps.apply(this,arguments)}function bh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ms(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?bh(Object(n),!0).forEach(function(r){rT(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bh(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function rT(e,t,n){return t=iT(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function iT(e){var t=oT(e,"string");return typeof t=="symbol"?t:t+""}function oT(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function uv(e){return e&&e.map((t,n)=>vt.createElement(t.tag,ms({key:n},t.attr),uv(t.child)))}function cv(e){return t=>vt.createElement(sT,ps({attr:ms({},e.attr)},t),uv(e.child))}function sT(e){var t=n=>{var{attr:r,size:i,title:o}=e,s=tT(e,eT),a=i||n.size||"1em",l;return n.className&&(l=n.className),e.className&&(l=(l?l+" ":"")+e.className),vt.createElement("svg",ps({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,s,{className:l,style:ms(ms({color:e.color||n.color},n.style),e.style),height:a,width:a,xmlns:"http://www.w3.org/2000/svg"}),o&&vt.createElement("title",null,o),e.children)};return wh!==void 0?vt.createElement(wh.Consumer,null,n=>t(n)):t(lv)}function aT(e){return cv({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M143 352.3L7 216.3c-9.4-9.4-9.4-24.6 0-33.9l22.6-22.6c9.4-9.4 24.6-9.4 33.9 0l96.4 96.4 96.4-96.4c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9l-136 136c-9.2 9.4-24.4 9.4-33.8 0z"},child:[]}]})(e)}function lT(e){return cv({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M177 159.7l136 136c9.4 9.4 9.4 24.6 0 33.9l-22.6 22.6c-9.4 9.4-24.6 9.4-33.9 0L160 255.9l-96.4 96.4c-9.4 9.4-24.6 9.4-33.9 0L7 329.7c-9.4-9.4-9.4-24.6 0-33.9l136-136c9.4-9.5 24.6-9.5 34-.1z"},child:[]}]})(e)}const wt=()=>{const e=Ks();return n=>{const r=e.formatMessage({id:n});return r===n?void 0:r}},uT="_generalConditionsContainer_1ijeb_1",cT="_generalConditions_1ijeb_1",fT="_generalConditionsHeader_1ijeb_15",dT="_generalConditionsBody_1ijeb_25",hT="_generalConditionsAccept_1ijeb_33",Xr={generalConditionsContainer:uT,generalConditions:cT,generalConditionsHeader:fT,generalConditionsBody:dT,generalConditionsAccept:hT},pT="general-conditions.header",mT="general-conditions.body",xh="general-conditions.accept-conditions-note",gT=()=>{const e=wt(),[t,n]=N.useState(!1),r=()=>n(!t),i=a=>{a.key==="ArrowDown"||a.key==="ArrowRight"?n(!0):a.key==="ArrowUp"||a.key==="ArrowLeft"||a.key==="Escape"?n(!1):(a.key==="Enter"||a.key==="Space"||a.key===" ")&&r()},o=e(pT),s=e(xh);return _.jsxs("div",{className:R(Xr.generalConditionsContainer,"chat__generalConditions"),children:[!!(o!=null&&o.length)&&_.jsxs("div",{className:Xr.generalConditions,children:[_.jsxs("div",{role:"button",onClick:r,onKeyDown:i,tabIndex:0,className:R(Xr.generalConditionsHeader,"chat__generalConditions__header"),"aria-controls":"general-conditions-body","aria-expanded":t?"true":"false","aria-pressed":t?"true":"false",children:[_.jsx(vn,{children:o}),t?_.jsx(lT,{}):_.jsx(aT,{})]}),_.jsx("div",{className:R(Xr.generalConditionsBody,"chat__generalConditions__body"),id:"general-conditions-body",role:"region",tabIndex:-1,children:t&&_.jsx(vn,{children:e(mT)||""})})]}),!!(s!=null&&s.length)&&_.jsx("div",{className:R(Xr.generalConditionsAccept,"chat__generalConditions__accept"),tabIndex:0,children:_.jsx(vn,{children:e(xh)||""})})]})},yT="_message_1exlf_5",vT="_messageBot_1exlf_11",_T="_messageBotLast_1exlf_15",ET="_avatar_1exlf_15",ST="_messageBotFirst_1exlf_19",wT="_messageBotAnimated_1exlf_32",bT="_fadeInLeft_1exlf_1",xT="_messageGuest_1exlf_43",TT="_messageGuestFirst_1exlf_49",CT="_messageGuestLast_1exlf_55",kT="_botAvatar_1exlf_69",OT="_agentAvatar_1exlf_73",RT="_bubble_1exlf_77",NT="_bubbleContent_1exlf_83",AT="_bubbleLeft_1exlf_174",PT="_leftText_1exlf_183",IT="_bubbleRight_1exlf_190",DT="_rightText_1exlf_198",B={message:yT,messageBot:vT,messageBotLast:_T,avatar:ET,messageBotFirst:ST,messageBotAnimated:wT,fadeInLeft:bT,messageGuest:xT,messageGuestFirst:TT,messageGuestLast:CT,botAvatar:kT,agentAvatar:OT,bubble:RT,bubbleContent:NT,bubbleLeft:AT,leftText:PT,bubbleRight:IT,rightText:DT},MT="_problemReport_j3gru_1",FT="_problemReportIcon_j3gru_7",BT="_problemReportIconActive_j3gru_13",LT="_problemReportIconInactive_j3gru_21",Qr={problemReport:MT,problemReportIcon:FT,problemReportIconActive:BT,problemReportIconInactive:LT},jT=({reported:e,onReport:t})=>{const n=wt(),r=o=>()=>t(o),i=o=>s=>{s.key==="Enter"&&t(o)};return _.jsx("div",{className:Qr.problemReport,children:e?_.jsx("div",{role:"button",onClick:r(null),onKeyDown:i(null),tabIndex:0,className:R(Qr.problemReportIcon,"chat__problemReportIcon","chat_problemReportIcon",Qr.problemReportIconActive,"chat__problemReportIcon-active","chat_problemReportIcon-active"),children:_.jsx("img",{src:"problem-report-active.svg",title:n("problem-report.action.unmark"),alt:"Report"})}):_.jsx("div",{role:"button",onClick:r("unspecified"),onKeyDown:i("unspecified"),tabIndex:0,className:R(Qr.problemReportIcon,"chat_problemReportIcon",Qr.problemReportIconInactive,"chat_problemReportIcon-inactive"),children:_.jsx("img",{src:"problem-report-inactive.svg",title:n("problem-report.action.mark"),alt:"Report"})})})},fv=N.forwardRef(({message:e,problemReportingEnabled:t,isAnimated:n,isFirstMessageBySender:r,isLastMessageBySender:i,children:o,onProblemReport:s},a)=>{var c;const l=wt(),u=e.sender.type===U.UserType.BOT;return _.jsxs("li",{ref:a,className:R(B.message,B.messageBot,r&&B.messageBotFirst,i&&B.messageBotLast,"chat__bubbleContainer",n&&B.messageBotAnimated,n&&"chat__bubbleContainer--animated",u?"chat__botBubbleContainer":"chat__agentBubbleContainer",r&&"chat__bubbleContainer--first",i&&"chat__bubbleContainer--last"),children:[_.jsx("img",{className:R(B.avatar,u?B.botAvatar:B.agentAvatar,"chat__avatar",u?"chat__botAvatar":"chat__agentAvatar"),src:`${e.sender.avatar}`,alt:u?"Bot":"Agent",referrerPolicy:"no-referrer"}),_.jsx("div",{className:R(B.bubble,B.bubbleLeft,"chat__bubble",u?"chat__botBubble":"chat__agentBubble"),tabIndex:0,"aria-label":l(u?"bot-bubble.label":"agent-bubble.label"),children:_.jsx("div",{className:R(B.leftText),children:o})}),t&&s&&_.jsx(jT,{reported:!!((c=e.problemReport)!=null&&c.length),onReport:s})]})}),zT="_title_1mhh2_1",UT="_subtitle_1mhh2_6",$T="_buttons_1mhh2_11",HT="_button_1mhh2_11",GT="_imageContainer_1mhh2_33",VT="_image_1mhh2_33",WT="_video_container_1mhh2_44",qT="_video_1mhh2_44",XT="_only_1mhh2_54",Me={title:zT,subtitle:UT,buttons:$T,button:HT,imageContainer:GT,image:VT,video_container:WT,video:qT,only:XT},QT=({buttons:e,onButtonClick:t})=>_.jsx("div",{className:R(Me.buttons,"chat__bubbleButtons"),children:e.map((n,r)=>_.jsx("button",{className:R(Me.button,we.button,"chat__bubbleButton"),onClick:()=>t(n),children:n.title},r))});var dv={},hf={},pf={};Object.defineProperty(pf,"__esModule",{value:!0});var KT=N,YT=ZT(KT);function ZT(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}pf.default=function(e,t,n){return YT.createElement("a",{href:e,key:n},t)};var mf={};Object.defineProperty(mf,"__esModule",{value:!0});mf.default=function(e){return e};var gf={},Wa,Th;function JT(){return Th||(Th=1,Wa=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/),Wa}var qa,Ch;function e2(){return Ch||(Ch=1,qa=/[\0-\x1F\x7F-\x9F]/),qa}var Xa,kh;function t2(){return kh||(kh=1,Xa=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/),Xa}var Qa,Oh;function n2(){return Oh||(Oh=1,Qa=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4E\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/),Qa}var Ka,Rh;function r2(){return Rh||(Rh=1,Ka=function(e){var t={};t.src_Any=JT().source,t.src_Cc=e2().source,t.src_Z=t2().source,t.src_P=n2().source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");var n="[><|]";return t.src_pseudo_letter="(?:(?!"+n+"|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|"+n+"|"+t.src_ZPCc+")(?!-|_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+n+`|[()[\\]{}.,"'?!\\-]).|\\[(?:(?!`+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+`|["]).)+\\"|\\'(?:(?!`+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-]).|\\.{2,4}[a-zA-Z0-9%/]|\\.(?!"+t.src_ZCc+"|[.]).|"+(e&&e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+"\\,(?!"+t.src_ZCc+").|\\!(?!"+t.src_ZCc+"|[!]).|\\?(?!"+t.src_ZCc+"|[?]).)+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy="(^|"+n+'|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}),Ka}function mu(e){var t=Array.prototype.slice.call(arguments,1);return t.forEach(function(n){n&&Object.keys(n).forEach(function(r){e[r]=n[r]})}),e}function ta(e){return Object.prototype.toString.call(e)}function i2(e){return ta(e)==="[object String]"}function o2(e){return ta(e)==="[object Object]"}function s2(e){return ta(e)==="[object RegExp]"}function Nh(e){return ta(e)==="[object Function]"}function a2(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var hv={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function l2(e){return Object.keys(e||{}).reduce(function(t,n){return t||hv.hasOwnProperty(n)},!1)}var u2={"http:":{validate:function(e,t,n){var r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){var r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){var r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},c2="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",f2="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function d2(e){e.__index__=-1,e.__text_cache__=""}function h2(e){return function(t,n){var r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}function Ah(){return function(e,t){t.normalize(e)}}function gs(e){var t=e.re=r2()(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(c2),n.push(t.src_xn),t.src_tlds=n.join("|");function r(a){return a.replace("%TLDS%",t.src_tlds)}t.email_fuzzy=RegExp(r(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(r(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(r(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(r(t.tpl_host_fuzzy_test),"i");var i=[];e.__compiled__={};function o(a,l){throw new Error('(LinkifyIt) Invalid schema "'+a+'": '+l)}Object.keys(e.__schemas__).forEach(function(a){var l=e.__schemas__[a];if(l!==null){var u={validate:null,link:null};if(e.__compiled__[a]=u,o2(l)){s2(l.validate)?u.validate=h2(l.validate):Nh(l.validate)?u.validate=l.validate:o(a,l),Nh(l.normalize)?u.normalize=l.normalize:l.normalize?o(a,l):u.normalize=Ah();return}if(i2(l)){i.push(a);return}o(a,l)}}),i.forEach(function(a){e.__compiled__[e.__schemas__[a]]&&(e.__compiled__[a].validate=e.__compiled__[e.__schemas__[a]].validate,e.__compiled__[a].normalize=e.__compiled__[e.__schemas__[a]].normalize)}),e.__compiled__[""]={validate:null,normalize:Ah()};var s=Object.keys(e.__compiled__).filter(function(a){return a.length>0&&e.__compiled__[a]}).map(a2).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+s+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+s+")","ig"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),d2(e)}function p2(e,t){var n=e.__index__,r=e.__last_index__,i=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=i,this.text=i,this.url=i}function Ph(e,t){var n=new p2(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function st(e,t){if(!(this instanceof st))return new st(e,t);t||l2(e)&&(t=e,e={}),this.__opts__=mu({},hv,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=mu({},u2,e),this.__compiled__={},this.__tlds__=f2,this.__tlds_replaced__=!1,this.re={},gs(this)}st.prototype.add=function(t,n){return this.__schemas__[t]=n,gs(this),this};st.prototype.set=function(t){return this.__opts__=mu(this.__opts__,t),this};st.prototype.test=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return!1;var n,r,i,o,s,a,l,u,c;if(this.re.schema_test.test(t)){for(l=this.re.schema_search,l.lastIndex=0;(n=l.exec(t))!==null;)if(o=this.testSchemaAt(t,n[2],l.lastIndex),o){this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+o;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(u=t.search(this.re.host_fuzzy_test),u>=0&&(this.__index__<0||u<this.__index__)&&(r=t.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))!==null&&(s=r.index+r[1].length,(this.__index__<0||s<this.__index__)&&(this.__schema__="",this.__index__=s,this.__last_index__=r.index+r[0].length))),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&(c=t.indexOf("@"),c>=0&&(i=t.match(this.re.email_fuzzy))!==null&&(s=i.index+i[1].length,a=i.index+i[0].length,(this.__index__<0||s<this.__index__||s===this.__index__&&a>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=s,this.__last_index__=a))),this.__index__>=0};st.prototype.pretest=function(t){return this.re.pretest.test(t)};st.prototype.testSchemaAt=function(t,n,r){return this.__compiled__[n.toLowerCase()]?this.__compiled__[n.toLowerCase()].validate(t,r,this):0};st.prototype.match=function(t){var n=0,r=[];this.__index__>=0&&this.__text_cache__===t&&(r.push(Ph(this,n)),n=this.__last_index__);for(var i=n?t.slice(n):t;this.test(i);)r.push(Ph(this,n)),i=i.slice(this.__last_index__),n+=this.__last_index__;return r.length?r:null};st.prototype.tlds=function(t,n){return t=Array.isArray(t)?t:[t],n?(this.__tlds__=this.__tlds__.concat(t).sort().filter(function(r,i,o){return r!==o[i-1]}).reverse(),gs(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,gs(this),this)};st.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url="mailto:"+t.url)};st.prototype.onCompile=function(){};var m2=st;const g2=["aaa","aarp","abb","abbott","abbvie","abc","able","abogado","abudhabi","ac","academy","accenture","accountant","accountants","aco","actor","ad","ads","adult","ae","aeg","aero","aetna","af","afl","africa","ag","agakhan","agency","ai","aig","airbus","airforce","airtel","akdn","al","alibaba","alipay","allfinanz","allstate","ally","alsace","alstom","am","amazon","americanexpress","americanfamily","amex","amfam","amica","amsterdam","analytics","android","anquan","anz","ao","aol","apartments","app","apple","aq","aquarelle","ar","arab","aramco","archi","army","arpa","art","arte","as","asda","asia","associates","at","athleta","attorney","au","auction","audi","audible","audio","auspost","author","auto","autos","avianca","aw","aws","ax","axa","az","azure","ba","baby","baidu","banamex","bananarepublic","band","bank","bar","barcelona","barclaycard","barclays","barefoot","bargains","baseball","basketball","bauhaus","bayern","bb","bbc","bbt","bbva","bcg","bcn","bd","be","beats","beauty","beer","bentley","berlin","best","bestbuy","bet","bf","bg","bh","bharti","bi","bible","bid","bike","bing","bingo","bio","biz","bj","black","blackfriday","blockbuster","blog","bloomberg","blue","bm","bms","bmw","bn","bnpparibas","bo","boats","boehringer","bofa","bom","bond","boo","book","booking","bosch","bostik","boston","bot","boutique","box","br","bradesco","bridgestone","broadway","broker","brother","brussels","bs","bt","build","builders","business","buy","buzz","bv","bw","by","bz","bzh","ca","cab","cafe","cal","call","calvinklein","cam","camera","camp","canon","capetown","capital","capitalone","car","caravan","cards","care","career","careers","cars","casa","case","cash","casino","cat","catering","catholic","cba","cbn","cbre","cbs","cc","cd","center","ceo","cern","cf","cfa","cfd","cg","ch","chanel","channel","charity","chase","chat","cheap","chintai","christmas","chrome","church","ci","cipriani","circle","cisco","citadel","citi","citic","city","cityeats","ck","cl","claims","cleaning","click","clinic","clinique","clothing","cloud","club","clubmed","cm","cn","co","coach","codes","coffee","college","cologne","com","comcast","commbank","community","company","compare","computer","comsec","condos","construction","consulting","contact","contractors","cooking","cool","coop","corsica","country","coupon","coupons","courses","cpa","cr","credit","creditcard","creditunion","cricket","crown","crs","cruise","cruises","cu","cuisinella","cv","cw","cx","cy","cymru","cyou","cz","dabur","dad","dance","data","date","dating","datsun","day","dclk","dds","de","deal","dealer","deals","degree","delivery","dell","deloitte","delta","democrat","dental","dentist","desi","design","dev","dhl","diamonds","diet","digital","direct","directory","discount","discover","dish","diy","dj","dk","dm","dnp","do","docs","doctor","dog","domains","dot","download","drive","dtv","dubai","dunlop","dupont","durban","dvag","dvr","dz","earth","eat","ec","eco","edeka","edu","education","ee","eg","email","emerck","energy","engineer","engineering","enterprises","epson","equipment","er","ericsson","erni","es","esq","estate","et","etisalat","eu","eurovision","eus","events","exchange","expert","exposed","express","extraspace","fage","fail","fairwinds","faith","family","fan","fans","farm","farmers","fashion","fast","fedex","feedback","ferrari","ferrero","fi","fidelity","fido","film","final","finance","financial","fire","firestone","firmdale","fish","fishing","fit","fitness","fj","fk","flickr","flights","flir","florist","flowers","fly","fm","fo","foo","food","football","ford","forex","forsale","forum","foundation","fox","fr","free","fresenius","frl","frogans","frontdoor","frontier","ftr","fujitsu","fun","fund","furniture","futbol","fyi","ga","gal","gallery","gallo","gallup","game","games","gap","garden","gay","gb","gbiz","gd","gdn","ge","gea","gent","genting","george","gf","gg","ggee","gh","gi","gift","gifts","gives","giving","gl","glass","gle","global","globo","gm","gmail","gmbh","gmo","gmx","gn","godaddy","gold","goldpoint","golf","goo","goodyear","goog","google","gop","got","gov","gp","gq","gr","grainger","graphics","gratis","green","gripe","grocery","group","gs","gt","gu","guardian","gucci","guge","guide","guitars","guru","gw","gy","hair","hamburg","hangout","haus","hbo","hdfc","hdfcbank","health","healthcare","help","helsinki","here","hermes","hiphop","hisamitsu","hitachi","hiv","hk","hkt","hm","hn","hockey","holdings","holiday","homedepot","homegoods","homes","homesense","honda","horse","hospital","host","hosting","hot","hotels","hotmail","house","how","hr","hsbc","ht","hu","hughes","hyatt","hyundai","ibm","icbc","ice","icu","id","ie","ieee","ifm","ikano","il","im","imamat","imdb","immo","immobilien","in","inc","industries","infiniti","info","ing","ink","institute","insurance","insure","int","international","intuit","investments","io","ipiranga","iq","ir","irish","is","ismaili","ist","istanbul","it","itau","itv","jaguar","java","jcb","je","jeep","jetzt","jewelry","jio","jll","jm","jmp","jnj","jo","jobs","joburg","jot","joy","jp","jpmorgan","jprs","juegos","juniper","kaufen","kddi","ke","kerryhotels","kerrylogistics","kerryproperties","kfh","kg","kh","ki","kia","kids","kim","kinder","kindle","kitchen","kiwi","km","kn","koeln","komatsu","kosher","kp","kpmg","kpn","kr","krd","kred","kuokgroup","kw","ky","kyoto","kz","la","lacaixa","lamborghini","lamer","lancaster","land","landrover","lanxess","lasalle","lat","latino","latrobe","law","lawyer","lb","lc","lds","lease","leclerc","lefrak","legal","lego","lexus","lgbt","li","lidl","life","lifeinsurance","lifestyle","lighting","like","lilly","limited","limo","lincoln","link","lipsy","live","living","lk","llc","llp","loan","loans","locker","locus","lol","london","lotte","lotto","love","lpl","lplfinancial","lr","ls","lt","ltd","ltda","lu","lundbeck","luxe","luxury","lv","ly","ma","madrid","maif","maison","makeup","man","management","mango","map","market","marketing","markets","marriott","marshalls","mattel","mba","mc","mckinsey","md","me","med","media","meet","melbourne","meme","memorial","men","menu","merckmsd","mg","mh","miami","microsoft","mil","mini","mint","mit","mitsubishi","mk","ml","mlb","mls","mm","mma","mn","mo","mobi","mobile","moda","moe","moi","mom","monash","money","monster","mormon","mortgage","moscow","moto","motorcycles","mov","movie","mp","mq","mr","ms","msd","mt","mtn","mtr","mu","museum","music","mv","mw","mx","my","mz","na","nab","nagoya","name","natura","navy","nba","nc","ne","nec","net","netbank","netflix","network","neustar","new","news","next","nextdirect","nexus","nf","nfl","ng","ngo","nhk","ni","nico","nike","nikon","ninja","nissan","nissay","nl","no","nokia","norton","now","nowruz","nowtv","np","nr","nra","nrw","ntt","nu","nyc","nz","obi","observer","office","okinawa","olayan","olayangroup","oldnavy","ollo","om","omega","one","ong","onl","online","ooo","open","oracle","orange","org","organic","origins","osaka","otsuka","ott","ovh","pa","page","panasonic","paris","pars","partners","parts","party","pay","pccw","pe","pet","pf","pfizer","pg","ph","pharmacy","phd","philips","phone","photo","photography","photos","physio","pics","pictet","pictures","pid","pin","ping","pink","pioneer","pizza","pk","pl","place","play","playstation","plumbing","plus","pm","pn","pnc","pohl","poker","politie","porn","post","pr","pramerica","praxi","press","prime","pro","prod","productions","prof","progressive","promo","properties","property","protection","pru","prudential","ps","pt","pub","pw","pwc","py","qa","qpon","quebec","quest","racing","radio","re","read","realestate","realtor","realty","recipes","red","redstone","redumbrella","rehab","reise","reisen","reit","reliance","ren","rent","rentals","repair","report","republican","rest","restaurant","review","reviews","rexroth","rich","richardli","ricoh","ril","rio","rip","ro","rocher","rocks","rodeo","rogers","room","rs","rsvp","ru","rugby","ruhr","run","rw","rwe","ryukyu","sa","saarland","safe","safety","sakura","sale","salon","samsclub","samsung","sandvik","sandvikcoromant","sanofi","sap","sarl","sas","save","saxo","sb","sbi","sbs","sc","sca","scb","schaeffler","schmidt","scholarships","school","schule","schwarz","science","scot","sd","se","search","seat","secure","security","seek","select","sener","services","seven","sew","sex","sexy","sfr","sg","sh","shangrila","sharp","shaw","shell","shia","shiksha","shoes","shop","shopping","shouji","show","showtime","si","silk","sina","singles","site","sj","sk","ski","skin","sky","skype","sl","sling","sm","smart","smile","sn","sncf","so","soccer","social","softbank","software","sohu","solar","solutions","song","sony","soy","spa","space","sport","spot","sr","srl","ss","st","stada","staples","star","statebank","statefarm","stc","stcgroup","stockholm","storage","store","stream","studio","study","style","su","sucks","supplies","supply","support","surf","surgery","suzuki","sv","swatch","swiss","sx","sy","sydney","systems","sz","tab","taipei","talk","taobao","target","tatamotors","tatar","tattoo","tax","taxi","tc","tci","td","tdk","team","tech","technology","tel","temasek","tennis","teva","tf","tg","th","thd","theater","theatre","tiaa","tickets","tienda","tips","tires","tirol","tj","tjmaxx","tjx","tk","tkmaxx","tl","tm","tmall","tn","to","today","tokyo","tools","top","toray","toshiba","total","tours","town","toyota","toys","tr","trade","trading","training","travel","travelers","travelersinsurance","trust","trv","tt","tube","tui","tunes","tushu","tv","tvs","tw","tz","ua","ubank","ubs","ug","uk","unicom","university","uno","uol","ups","us","uy","uz","va","vacations","vana","vanguard","vc","ve","vegas","ventures","verisign","vermögensberater","vermögensberatung","versicherung","vet","vg","vi","viajes","video","vig","viking","villas","vin","vip","virgin","visa","vision","viva","vivo","vlaanderen","vn","vodka","volkswagen","volvo","vote","voting","voto","voyage","vu","wales","walmart","walter","wang","wanggou","watch","watches","weather","weatherchannel","webcam","weber","website","wed","wedding","weibo","weir","wf","whoswho","wien","wiki","williamhill","win","windows","wine","winners","wme","wolterskluwer","woodside","work","works","world","wow","ws","wtc","wtf","xbox","xerox","xfinity","xihuan","xin","xxx","xyz","yachts","yahoo","yamaxun","yandex","ye","yodobashi","yoga","yokohama","you","youtube","yt","yun","za","zappos","zara","zero","zip","zm","zone","zuerich","zw","ελ","ευ","бг","бел","дети","ею","католик","ком","мкд","мон","москва","онлайн","орг","рус","рф","сайт","срб","укр","қаз","հայ","ישראל","קום","ابوظبي","اتصالات","ارامكو","الاردن","البحرين","الجزائر","السعودية","العليان","المغرب","امارات","ایران","بارت","بازار","بيتك","بھارت","تونس","سودان","سورية","شبكة","عراق","عرب","عمان","فلسطين","قطر","كاثوليك","كوم","مصر","مليسيا","موريتانيا","موقع","همراه","پاکستان","ڀارت","कॉम","नेट","भारत","भारतम्","भारोत","संगठन","বাংলা","ভারত","ভাৰত","ਭਾਰਤ","ભારત","ଭାରତ","இந்தியா","இலங்கை","சிங்கப்பூர்","భారత్","ಭಾರತ","ഭാരതം","ලංකා","คอม","ไทย","ລາວ","გე","みんな","アマゾン","クラウド","グーグル","コム","ストア","セール","ファッション","ポイント","世界","中信","中国","中國","中文网","亚马逊","企业","佛山","信息","健康","八卦","公司","公益","台湾","台灣","商城","商店","商标","嘉里","嘉里大酒店","在线","大拿","天主教","娱乐","家電","广东","微博","慈善","我爱你","手机","招聘","政务","政府","新加坡","新闻","时尚","書籍","机构","淡马锡","游戏","澳門","点看","移动","组织机构","网址","网店","网站","网络","联通","谷歌","购物","通販","集团","電訊盈科","飞利浦","食品","餐厅","香格里拉","香港","닷넷","닷컴","삼성","한국"];Object.defineProperty(gf,"__esModule",{value:!0});var y2=m2,v2=pv(y2),_2=g2,E2=pv(_2);function pv(e){return e&&e.__esModule?e:{default:e}}var mv=new v2.default;mv.tlds(E2.default);gf.default=function(e){return mv.match(e)};var yf={};Object.defineProperty(yf,"__esModule",{value:!0});yf.default=function(e){return e};Object.defineProperty(hf,"__esModule",{value:!0});var S2=function(){function e(t,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),w2=N,Kr=A2(w2),b2=pf,x2=na(b2),T2=mf,C2=na(T2),k2=gf,O2=na(k2),R2=yf,N2=na(R2);function na(e){return e&&e.__esModule?e:{default:e}}function A2(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function P2(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function I2(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function D2(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var gv=function(e){D2(t,e);function t(){return P2(this,t),I2(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return S2(t,[{key:"parseString",value:function(r){var i=this;if(r==="")return r;var o=this.props.matchDecorator(r);if(!o)return r;var s=[],a=0;return o.forEach(function(l,u){l.index>a&&s.push(r.substring(a,l.index));var c=i.props.hrefDecorator(l.url),g=i.props.textDecorator(l.text),y=i.props.componentDecorator(c,g,u);s.push(y),a=l.lastIndex}),r.length>a&&s.push(r.substring(a)),s.length===1?s[0]:s}},{key:"parse",value:function(r){var i=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof r=="string"?this.parseString(r):Kr.isValidElement(r)&&r.type!=="a"&&r.type!=="button"?Kr.cloneElement(r,{key:o},this.parse(r.props.children)):Array.isArray(r)?r.map(function(s,a){return i.parse(s,a)}):r}},{key:"render",value:function(){return Kr.createElement(Kr.Fragment,null,this.parse(this.props.children))}}]),t}(Kr.Component);gv.defaultProps={componentDecorator:x2.default,hrefDecorator:C2.default,matchDecorator:O2.default,textDecorator:N2.default};hf.default=gv;Object.defineProperty(dv,"__esModule",{value:!0});var M2=hf,F2=B2(M2);function B2(e){return e&&e.__esModule?e:{default:e}}var L2=dv.default=F2.default;const j2="_text_1k7aq_1",z2={text:j2},yv=({text:e,onLinkClick:t})=>{const n=i=>o=>(o.preventDefault(),i&&t(i),!1),r=(i,o,s)=>_.jsx("a",{onClick:n(i),role:"button",children:o},s);return _.jsx("div",{children:e.split(`
|
|
98
|
-
`).map((i,o)=>_.jsxs("span",{className:z2.text,children:[_.jsx(L2,{componentDecorator:r,children:i}),_.jsx("br",{})]},o))})},U2=({subtitle:e,onLinkClick:t})=>e?_.jsx("div",{className:Me.subtitle,children:_.jsx(yv,{text:e,onLinkClick:t})}):null,Ih="newtab#",vv=({markdown:e,onLinkClick:t})=>{const n=i=>o=>(o.preventDefault(),i&&t(i),!1),r=({title:i,href:o,children:s})=>o.indexOf(Ih)===0?_.jsx("a",{href:o.slice(Ih.length),title:i,target:"_blank",rel:"noopener noreferrer",children:s}):_.jsx("a",{onClick:n(o),title:i,children:s});return _.jsx(vn,{options:{overrides:{a:r}},children:e})},$2=({text:e,onLinkClick:t})=>e?_.jsx("div",{children:_.jsx(vv,{markdown:e,onLinkClick:t})}):null,H2=({title:e})=>e?_.jsx("h1",{className:Me.title,children:e}):null,G2=({title:e,text:t,subtitle:n,buttons:r,onButtonClick:i,onLinkClick:o})=>(e==null?void 0:e.length)||(t==null?void 0:t.length)||(n==null?void 0:n.length)||(r==null?void 0:r.length)?_.jsxs("div",{className:R(B.bubbleContent),children:[_.jsx(H2,{title:e}),_.jsx($2,{text:t,onLinkClick:o}),_.jsx(U2,{subtitle:n,onLinkClick:o}),_.jsx(QT,{buttons:r,onButtonClick:i})]}):null,V2=({alt:e,imageUrl:t,itemUrl:n,hasBody:r})=>t?n?n.indexOf("youtube.com")>-1?_.jsx("div",{className:Me.video_container,children:_.jsx("iframe",{className:R(Me.video,{[Me.only]:!r}),title:"Youtube",width:"100%",src:n+"?rel=0",frameBorder:"0",allowFullScreen:!0})}):_.jsx("a",{href:n,target:"_blank",rel:"noopener noreferrer",children:_.jsx("div",{className:Me.imageContainer,children:_.jsx("img",{className:R(Me.image,{[Me.only]:!r}),src:t,alt:e})})}):_.jsx("div",{className:Me.imageContainer,children:_.jsx("img",{className:R(Me.image,{[Me.only]:!r}),src:t,alt:e})}):null,W2=({title:e,text:t,subtitle:n,imageUrl:r,itemUrl:i,buttons:o,onButtonClick:s,onLinkClick:a})=>{const l=!!(e!=null&&e.length)||!!(t!=null&&t.length)||!!(n!=null&&n.length)||!!(o!=null&&o.length);return _.jsxs("div",{className:R(Me.detailMessage),children:[_.jsx(V2,{hasBody:l,imageUrl:r,itemUrl:i,alt:e||n}),l&&_.jsx(G2,{title:e,text:t,subtitle:n,buttons:o,onLinkClick:a,onButtonClick:s})]})},q2=N.forwardRef(({isFirstMessageBySender:e,isLastMessageBySender:t,children:n},r)=>{const i=wt();return _.jsx("li",{ref:r,className:R(B.message,B.messageGuest,e&&B.messageGuestFirst,t&&B.messageGuestLast,"chat__bubbleContainer","chat__guestBubbleContainer",e&&"chat__bubbleContainer--first",t&&"chat__bubbleContainer--last"),children:_.jsx("div",{className:R(B.bubble,B.bubbleRight,"chat__bubble","chat__guestBubble"),tabIndex:0,"aria-label":i("guest-bubble.label"),children:_.jsx("div",{className:R(B.rightText),children:n})})})}),X2=({markdown:e,className:t,onLinkClick:n})=>_.jsx("div",{className:R(B.bubbleContent,t),children:_.jsx(vv,{markdown:e,onLinkClick:n})}),Q2=({text:e,onLinkClick:t})=>_.jsx("div",{className:B.bubbleContent,children:_.jsx(yv,{text:e,onLinkClick:t})}),K2=N.forwardRef(({message:e,problemReportingEnabled:t,isFirstMessageBySender:n,isLastMessageBySender:r,onProblemReport:i,onButtonClick:o,onLinkClick:s},a)=>{const l=Y2(e,o,s);switch(e.sender.type){case U.UserType.GUEST:return _.jsx(q2,{ref:a,isFirstMessageBySender:n,isLastMessageBySender:r,children:l});default:const u=c=>i(e._id,c);return _.jsx(fv,{ref:a,message:e,problemReportingEnabled:t,isAnimated:!1,isFirstMessageBySender:n,isLastMessageBySender:r,onProblemReport:u,children:l})}}),Y2=(e,t,n)=>{switch(e.type){case U.MessageTypeEnum.TEXT:const r=e;return _.jsx(Q2,{text:r.text,onLinkClick:n});case U.MessageTypeEnum.DETAIL:const i=e;return _.jsx(W2,{title:i.title,text:i.text,subtitle:i.subtitle,imageUrl:i.imageUrl,itemUrl:i.itemUrl,buttons:i.buttons,onButtonClick:t,onLinkClick:n});case U.MessageTypeEnum.MARKDOWN:const o=e;return _.jsx(X2,{markdown:o.markdown,className:o.className,onLinkClick:n})}},Z2=(e,t)=>e.message._id===t.message._id&&e.message.problemReport===t.message.problemReport&&e.problemReportingEnabled===t.problemReportingEnabled&&e.isFirstMessageBySender===t.isFirstMessageBySender&&e.isLastMessageBySender===t.isLastMessageBySender,J2=vt.memo(K2,Z2),eC="_ticontainer_wftg7_1",tC="_tiblock_wftg7_5",nC="_tidot_wftg7_12",rC="_mercuryTypingAnimation_wftg7_1",Yr={ticontainer:eC,tiblock:tC,tidot:nC,mercuryTypingAnimation:rC},iC=({isTyping:e=!1})=>_.jsx("div",{className:Yr.ticontainer,children:_.jsx("div",{className:Yr.tiblock,children:e?_.jsxs(_.Fragment,{children:[_.jsx("div",{className:R(Yr.tidot,"chat__typingIndicator")}),_.jsx("div",{className:R(Yr.tidot,"chat__typingIndicator")}),_.jsx("div",{className:R(Yr.tidot,"chat__typingIndicator")})]}):null})}),oC=Object.assign({_id:"typing-indicator"},new U.TextMessage("",new U.BotUser)),sC=({messages:e,isBotTyping:t,showGeneralConditions:n,problemReportingEnabled:r,onProblemReport:i,onButtonClick:o,onLinkClick:s})=>{const a=N.useRef(!0),l=N.useRef(null),u=N.useRef(null),c=N.useRef(null);N.useLayoutEffect(()=>{if(e.length&&l.current){if(u.current){const f=u.current.offsetTop;l.current.scrollTop=f}else if(c.current){const f=c.current.offsetTop;l.current.scrollTop=f}a.current&&(a.current=!1)}},[e,u.current,c.current,a]);let g;const y=e.length;return _.jsxs("div",{ref:l,className:R(dh.messageContainer,"chat__messageContainer"),style:{scrollBehavior:e.length&&a.current?"auto":"smooth"},id:"MessageContainer",role:"log","aria-live":"polite",children:[n&&_.jsx(gT,{}),_.jsxs("ul",{className:dh.messages,children:[e.map((f,v)=>{const p=aC(f,g),S=lC(f,v,e,t);g=f.sender.type;const h=v+1===y;return _.jsx(J2,{ref:h?c:null,message:f,problemReportingEnabled:r,isFirstMessageBySender:p,isLastMessageBySender:S,onButtonClick:o,onLinkClick:s,onProblemReport:i},h&&!t?"last":f._id)}),t&&_.jsx(fv,{ref:u,message:oC,problemReportingEnabled:!1,isAnimated:!0,isFirstMessageBySender:g!==U.UserType.BOT,isLastMessageBySender:!0,children:_.jsx(iC,{isTyping:!0})},"last")]})]})},aC=(e,t)=>!t||t!==e.sender.type,lC=(e,t,n,r)=>{var a;const i=e.sender.type,o=n.length;return t+1===o?!(i===U.UserType.BOT&&r):i!==((a=n.at(t+1))==null?void 0:a.sender.type)},uC="_container_t5oqt_1",cC={container:uC},fC=({title:e,href:t,children:n})=>_.jsx("a",{href:t,title:e,target:"_blank",rel:"noopener noreferrer",children:n}),dC=()=>{const t=wt()("powered-by");return t&&t.length?_.jsx("div",{className:R(cC.container,"chat__poweredBy"),children:_.jsx(vn,{options:{overrides:{a:fC}},children:t})}):null},hC="_container_fgqz2_1",pC="_containerOpen_fgqz2_48",mC="_containerClose_fgqz2_52",gC="_formContainer_fgqz2_56",yC="_emailInput_fgqz2_61",vC="_description_fgqz2_90",_C="_actions_fgqz2_95",EC="_validationError_fgqz2_105",SC="_submitted_fgqz2_112",dt={container:hC,containerOpen:pC,"slide-in":"_slide-in_fgqz2_1",containerClose:mC,"slide-out":"_slide-out_fgqz2_1",formContainer:gC,emailInput:yC,description:vC,actions:_C,validationError:EC,submitted:SC},wC=({visible:e,methods:t,onEmailExport:n,onPdfExport:r,onClose:i})=>{const o=wt(),[s,a]=N.useState(void 0),[l,u]=N.useState(!1),[c,g]=N.useState(!1),[y,f]=N.useState(void 0),v=N.useRef(null);N.useEffect(()=>{var d;e?((d=v.current)==null||d.focus(),u(!1),g(!1),a(e)):s===!0&&a(!1)},[e,s]);const p=d=>{d.preventDefault(),y&&y.length>0&&(n(y),u(!0),setTimeout(i,3*1e3))},S=d=>{const m=d.target.value.trim(),E=/^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/.test(m);f(E?m:"")},h=()=>{g(!0),r(),setTimeout(i,3*1e3)};return _.jsxs("div",{className:R(dt.container,{[dt.containerOpen]:s===!0,[dt.containerClose]:s===!1}),children:[t.pdf&&_.jsxs(_.Fragment,{children:[_.jsx("h2",{children:o("export-transcript.pdf.title")}),_.jsx(vn,{className:dt.description,children:o("export-transcript.pdf.description")||""}),_.jsxs("div",{className:dt.actions,children:[_.jsx("button",{type:"button",className:R(we.button,we.buttonDefault),onClick:i,children:o("export-transcript.pdf.cancel")}),_.jsx("button",{className:R(we.button,we.buttonPrimary),onClick:h,disabled:c,children:o("export-transcript.pdf.download")})]})]}),t.email&&_.jsxs(_.Fragment,{children:[_.jsx("h2",{children:o("export-transcript.email.title")}),_.jsx(vn,{className:dt.description,children:o("export-transcript.email.description")||""}),_.jsxs("form",{onSubmit:p,className:dt.formContainer,children:[_.jsxs("div",{children:[_.jsx("input",{disabled:l,ref:v,type:"email",placeholder:o("export-transcript.email.placeholder"),className:dt.emailInput,onChange:S}),(y==null?void 0:y.length)===0?_.jsx("div",{className:dt.validationError,children:o("export-transcript.email.invalid")}):null]}),_.jsxs("div",{className:dt.actions,children:[_.jsx("button",{type:"button",className:R(we.button,we.buttonDefault),onClick:i,children:o("export-transcript.email.cancel")}),_.jsx("button",{type:"submit",disabled:l||y===void 0||y.length===0,className:R(we.button,we.buttonPrimary),children:o("export-transcript.email.send")})]})]}),l&&_.jsx("div",{className:dt.submitted,children:o("export-transcript.email.success")})]})]})},bC="_inputContainer_1px77_1",xC={inputContainer:bC},TC="_blockUserInput_rv0dg_1",CC={blockUserInput:TC,"append-animate":"_append-animate_rv0dg_1"},kC=({visible:e})=>{const t=wt();return e?_.jsx("div",{className:R(CC.blockUserInput,"chat__blockUserInput"),children:t("block-user-input.title")}):null},OC="_callToActionContainer_1t611_1",RC="_callToActionTitle_1t611_24",NC="_rateOverlay_1t611_31",AC="_body_1t611_61",PC="_rateOverlayOpen_1t611_92",IC="_rateOverlayClose_1t611_96",DC="_footer_1t611_100",MC="_actions_1t611_115",FC="_bubbles_1t611_127",BC="_rateFeedbackBotBubble_1t611_154",LC="_rateFeedbackGuestBubble_1t611_160",jC="_avatar_1t611_166",zC="_fadeInLeft_1t611_1",UC="_bubble_1t611_127",$C="_appear_1t611_1",HC="_botBubble_1t611_192",GC="_guestBubble_1t611_202",VC="_rateText_1t611_218",WC="_stars_1t611_223",qC="_starsSmall_1t611_236",XC="_starsLarge_1t611_240",QC="_star_1t611_223",KC="_starReadonly_1t611_257",YC="_starIcon_1t611_265",ZC="_starsDescriptionContainer_1t611_283",JC="_starsDescription_1t611_283",Se={callToActionContainer:OC,"append-animate":"_append-animate_1t611_1",callToActionTitle:RC,rateOverlay:NC,body:AC,rateOverlayOpen:PC,"slide-in":"_slide-in_1t611_1",rateOverlayClose:IC,"slide-out":"_slide-out_1t611_1",footer:DC,actions:MC,bubbles:FC,rateFeedbackBotBubble:BC,rateFeedbackGuestBubble:LC,avatar:jC,fadeInLeft:zC,bubble:UC,appear:$C,botBubble:HC,guestBubble:GC,rateText:VC,stars:WC,starsSmall:qC,starsLarge:XC,star:QC,starReadonly:KC,starIcon:YC,starsDescriptionContainer:ZC,starsDescription:JC},ek=({value:e,index:t,count:n,readonly:r,onHover:i,onClick:o})=>{const s=a=>{o&&a.key==="Enter"&&o()};return _.jsx("li",{className:R(Se.star,{[Se.starReadonly]:r},"chat__conversationRating__star"),children:_.jsx("div",{role:"radio","aria-checked":e>t?"true":"false","aria-posinset":t+1,"aria-setsize":n,tabIndex:0,onMouseOver:i,onKeyDown:s,onClick:o,children:_.jsx("span",{role:"img","aria-label":"Star",className:R(Se.starIcon),children:_.jsx("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"star",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:_.jsx("path",{d:"M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3z"})})})})})},Dh=5,_v=({value:e,size:t,readonly:n=!1,onChange:r})=>{const[i,o]=N.useState(void 0),s=()=>{o(void 0)},a=u=>()=>{if(!n){const c=u+1;o(c)}},l=u=>()=>{r&&!n&&(r(u===0&&e===1?0:u+1),o(void 0))};return _.jsx("ul",{tabIndex:0,role:"radiogroup",className:R(Se.stars,{[Se.starsSmall]:t==="small",[Se.starsLarge]:t==="large"},"chat__conversationRating__stars",{chat__conversationRating__stars__small:t==="small",chat__conversationRating__stars__large:t==="large"}),onMouseOut:s,children:Array(Dh).fill(0).map((u,c)=>_.jsx(ek,{value:i===void 0?e:i,index:c,count:Dh,readonly:n,onHover:a(c),onClick:l(c)},c))})},tk=({visible:e,onRate:t})=>{const n=wt();return e?_.jsxs("div",{className:R(Se.callToActionContainer,"chat__conversationRating__callToAction"),children:[_.jsx("div",{className:R(Se.callToActionTitle,"chat__conversationRating__callToAction__title"),children:n("conversation-rating.call-to-action.title")}),_.jsx(_v,{value:0,size:"small",onChange:t})]}):null},Mh=({isFirstMessageBySender:e,isLastMessageBySender:t,children:n})=>_.jsxs("div",{className:R(B.message,B.messageBot,e&&B.messageBotFirst,t&&B.messageBotLast,"chat__bubbleContainer","chat__botBubbleContainer",e&&"chat__bubbleContainer--first",t&&"chat__bubbleContainer--last"),children:[_.jsx("img",{className:R(B.avatar,B.botAvatar),src:"bot.svg",alt:"Bot"}),_.jsx("div",{className:R(B.bubble,B.bubbleLeft,"chat__bubble","chat__botBubble"),children:_.jsx("div",{className:R(B.leftText,B.bubbleContent),children:n})})]}),nk=({children:e})=>_.jsx("div",{className:R(B.message,B.messageGuest,B.messageGuestFirst,B.messageGuestLast,"chat__bubbleContainer","chat__guestBubbleContainer","chat__bubbleContainer--first","chat__bubbleContainer--last"),children:_.jsx("div",{className:R(B.bubble,B.bubbleRight,"chat__bubble","chat__guestBubble"),children:_.jsx("div",{className:R(B.rightText,B.bubbleContent),children:e})})}),rk=({visible:e,rating:t,onRate:n,onClose:r})=>{const i=wt(),[o,s]=N.useState(t),[a,l]=N.useState(void 0),[u,c]=N.useState(void 0),[g,y]=N.useState({submitted:!1,feedback:""}),[f,v]=N.useState(!1),p=N.useRef(null);N.useEffect(()=>{e?(y({submitted:!1,feedback:""}),c(e)):u===!0&&c(!1)},[e,u]),N.useEffect(()=>{s(t)},[t]),N.useEffect(()=>{const h=i(`conversation-rating.overlay.bot-message.rate-feedback.value-${o}`);l(h!=null&&h.length?h:void 0)},[o,i]),N.useEffect(()=>{g.submitted?setTimeout(()=>v(!0),g.feedback.length?500:0):v(!1)},[g]);const S=h=>{var m,E;h.preventDefault();const d=((E=(m=p.current)==null?void 0:m.value)==null?void 0:E.trim())||"";n(o,d),y({submitted:!0,feedback:d})};return _.jsx("div",{className:R(Se.rateOverlay,"chat__conversationRating__overlay",{[Se.rateOverlayOpen]:u===!0,[Se.rateOverlayClose]:u===!1}),children:_.jsxs("form",{onSubmit:S,children:[_.jsxs("div",{className:R(Se.body,"chat__conversationRating__overlay__body"),children:[_.jsxs("div",{children:[_.jsx("h2",{children:i("conversation-rating.overlay.title")}),_.jsxs("div",{className:R(Se.starsDescriptionContainer),children:[_.jsx(_v,{value:o,size:"large",readonly:g.submitted,onChange:s}),_.jsxs("div",{className:R(Se.starsDescription),children:[_.jsx("div",{children:i("conversation-rating.overlay.star.very-bad")}),_.jsx("div",{children:i("conversation-rating.overlay.star.very-good")})]})]})]}),_.jsx("div",{className:R(Se.bubbles),children:e&&a&&_.jsxs(_.Fragment,{children:[_.jsx(Mh,{isFirstMessageBySender:!0,isLastMessageBySender:!f||!!g.feedback.length,children:_.jsx("div",{children:a})}),!!g.feedback.length&&_.jsx(nk,{children:g.feedback}),f&&_.jsx(Mh,{isFirstMessageBySender:!!g.feedback.length,isLastMessageBySender:!0,children:_.jsx("div",{children:i("conversation-rating.overlay.bot-message.submit-feedback")})})]})})]}),_.jsxs("div",{className:R(Se.footer,"chat__conversationRating__overlay__footer"),children:[!g.submitted&&_.jsx("input",{ref:p,placeholder:i("conversation-rating.overlay.guest-feedback.input-placeholder")}),_.jsx("div",{className:R(Se.actions,"chat__conversationRating__overlay__footer__actions"),children:g.submitted?_.jsx("button",{type:"button",className:R(we.button,we.buttonPrimary),onClick:r,children:i("conversation-rating.overlay.action.close")}):_.jsx("button",{type:"submit",className:R(we.button,we.buttonPrimary),children:i("conversation-rating.overlay.action.submit")})})]})]})})},ik=({conversationRating:{enabled:e,rating:t},numberOfMessagesFromGuest:n,showRatingOverlay:r,setShowRatingOverlay:i,onRate:o})=>{const[s,a]=N.useState(0),l=g=>{a(g),i(!0)},u=()=>i(!1),c=!t&&n>=1;return e?_.jsxs(_.Fragment,{children:[_.jsx(tk,{visible:c,onRate:l}),_.jsx(rk,{visible:r,rating:s,onRate:o,onClose:u})]}):null},ok="_inputWrapper_lbrof_5",sk="_messageInputWrapper_lbrof_14",ak="_messageInput_lbrof_14",lk="_buttons_lbrof_36",uk="_button_lbrof_36",tr={inputWrapper:ok,messageInputWrapper:sk,messageInput:ak,buttons:lk,button:uk},ck="_audioRecorder_12g22_5",fk="_recordButton_12g22_10",dk="_submitButton_12g22_37",hk="_cancelButton_12g22_64",pk="_recorderIcon_12g22_91",mk="_pulse_12g22_1",gk="_spinning_12g22_113",yk="_spin_12g22_113",An={audioRecorder:ck,recordButton:fk,submitButton:dk,cancelButton:hk,recorderIcon:pk,pulse:mk,spinning:gk,spin:yk},Fh=2048,ys=16e3;class vk extends vt.Component{constructor(n){super(n);V(this,"audioInput",null);V(this,"volume",null);V(this,"leftchannel",[]);V(this,"recorder",null);V(this,"recordingLength",0);V(this,"sampleRate",null);V(this,"mediaStream",null);this.state={recordingState:"none"},this.triggerAudioRecording=this.triggerAudioRecording.bind(this),this.triggerAudioRecordingSuccess=this.triggerAudioRecordingSuccess.bind(this),this.initRecording=this.initRecording.bind(this),this.processRecordingInput=this.processRecordingInput.bind(this),this.handleClickSubmitAudio=this.handleClickSubmitAudio.bind(this),this.handleClickStopAudio=this.handleClickStopAudio.bind(this)}triggerAudioRecording(){this.setState({recordingState:"connecting"}),navigator.mediaDevices.getUserMedia({audio:!0,video:!1}).then(this.triggerAudioRecordingSuccess)}triggerAudioRecordingSuccess(n){this.mediaStream=n,this.leftchannel.length=0,this.recordingLength=0,this.initRecording(n)}initRecording(n){var r=window.AudioContext||window.webkitAudioContext,i=new r;this.sampleRate=i.sampleRate,this.volume=i.createGain(),this.audioInput=i.createMediaStreamSource(n),this.audioInput.connect(this.volume),this.recorder=i.createScriptProcessor(Fh,1,1),this.recorder.onaudioprocess=this.processRecordingInput,this.volume.connect(this.recorder),this.recorder.connect(i.destination)}processRecordingInput(n){if(this.state.recordingState==="connecting"&&this.setState({recordingState:"recording"}),this.state.recordingState!=="none"){const r=n.inputBuffer.getChannelData(0);this.leftchannel.push(new Float32Array(r)),this.recordingLength+=Fh}}handleClickSubmitAudio(){const n=Ek(this.leftchannel,this.recordingLength),r=Sk(n,this.sampleRate||0),i=_k(r);this.props.onAudioRecorded(i),this.handleClickStopAudio()}handleClickStopAudio(){var n,r,i,o;this.setState({recordingState:"none"}),(n=this.audioInput)==null||n.disconnect(),(r=this.volume)==null||r.disconnect(),(i=this.recorder)==null||i.disconnect(),this.mediaStream&&((o=this.mediaStream)==null||o.getAudioTracks().forEach(s=>{s.stop()}))}render(){return _.jsxs("div",{className:An.audioRecorder,children:[this.state.recordingState==="none"&&_.jsx("button",{className:R(An.recordButton,"chat__button"),type:"submit","aria-label":this.props.translate("message-input.actions.start-audio-recording.label"),tabIndex:0,onClick:this.triggerAudioRecording,children:_.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[_.jsx("path",{d:"M12 14c1.66 0 2.99-1.34 2.99-3L15 5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3zm5.3-3c0 3-2.54 5.1-5.3 5.1S6.7 14 6.7 11H5c0 3.41 2.72 6.23 6 6.72V21h2v-3.28c3.28-.48 6-3.3 6-6.72h-1.7z"}),_.jsx("path",{d:"M0 0h24v24H0z",fill:"none"})]})}),this.state.recordingState==="connecting"&&_.jsxs("svg",{className:An.spinning,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[_.jsx("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"}),_.jsx("path",{d:"M0 0h24v24H0z",fill:"none"})]}),this.state.recordingState==="recording"&&_.jsxs("div",{className:An.audioRecorder,children:[_.jsx("button",{className:R(An.cancelButton),onClick:this.handleClickStopAudio,"aria-label":this.props.translate("message-input.actions.stop-audio-recording.label"),tabIndex:0,children:_.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[_.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),_.jsx("path",{d:"M0 0h24v24H0z",fill:"none"})]})}),_.jsx("div",{className:An.recorderIcon}),_.jsx("button",{className:R(An.submitButton),type:"submit",onClick:this.handleClickSubmitAudio,"aria-label":this.props.translate("message-input.actions.submit-audio-recording.label"),tabIndex:0,autoFocus:!0,children:_.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[_.jsx("path",{d:"M0 0h24v24H0z",fill:"none"}),_.jsx("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})]})})]})]})}}const _k=e=>{const t=new ArrayBuffer(44+e.length*2),n=new DataView(t);mo(n,0,"RIFF"),n.setUint32(4,44+e.length*2,!0),mo(n,8,"WAVE"),mo(n,12,"fmt "),n.setUint32(16,16,!0),n.setUint16(20,1,!0),n.setUint16(22,1,!0),n.setUint32(24,ys,!0),n.setUint32(28,ys*4,!0),n.setUint16(32,4,!0),n.setUint16(34,16,!0),mo(n,36,"data"),n.setUint32(40,e.length*2,!0);const r=e.length;let i=44;const o=1;for(var s=0;s<r;s++)n.setInt16(i,e[s]*(32767*o),!0),i+=2;return new Blob([n],{type:"audio/wav"})},mo=(e,t,n)=>{for(var r=0;r<n.length;r++)e.setUint8(t+r,n.charCodeAt(r))},Ek=(e,t)=>{const n=new Float32Array(t);let r=0;const i=e.length;for(var o=0;o<i;o++){const s=e[o];n.set(s,r),r+=s.length}return n},Sk=(e,t)=>{if(ys===t)return e;const n=t/ys,r=Math.round(e.length/n),i=new Float32Array(r);let o=0,s=0;for(;o<i.length;){let l=Math.round((o+1)*n),u=0,c=0;for(var a=s;a<l&&a<e.length;a++)u+=e[a],c++;i[o]=u/c,o++,s=l}return i},wk=({speechSupport:e,transcriptExportEnabled:t,disabled:n,onTextInput:r,onAudioRecorded:i,onOpenTranscriptExportModal:o})=>{const s=wt(),[a,l]=N.useState(!1),u=N.useRef(null),c=()=>{const v=u.current;v&&v.value.trim().length>=1&&r(v.value.trim())&&(v.value="",v.style.height="",l(!1),v.focus())},g=v=>{v.preventDefault(),c()},y=v=>{const p=v.target.value.trim();l(p.length>0),v.target.style.height="";const{scrollHeight:S}=v.target;v.target.style.height=`${S>150?150:S}px`},f=v=>{v.code==="Enter"&&!v.shiftKey&&(v.repeat||c(),v.preventDefault())};return _.jsxs("form",{className:R(tr.inputWrapper,"chat__textInput"),onSubmit:g,children:[_.jsx("div",{className:tr.messageInputWrapper,children:_.jsx("textarea",{id:"user_input",ref:u,className:tr.messageInput,tabIndex:0,placeholder:s("message-input-placeholder"),onChange:y,onKeyDown:f,"aria-label":s("message-input-label")})}),_.jsxs("div",{className:R(tr.buttons,"chat__buttons"),children:[!a&&t&&_.jsx("button",{type:"button",className:R(tr.button,"chat__button"),"aria-label":s("message-input.actions.export-transcript.label"),tabIndex:0,onClick:o,children:_.jsx("svg",{viewBox:"64 64 896 896",focusable:"false",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:_.jsx("path",{d:"M456 231a56 56 0 10112 0 56 56 0 10-112 0zm0 280a56 56 0 10112 0 56 56 0 10-112 0zm0 280a56 56 0 10112 0 56 56 0 10-112 0z"})})}),a||!e||navigator.mediaDevices===void 0?_.jsx("button",{className:R(tr.button,"chat__button"),type:"submit","aria-label":s("message-input.actions.submit.label"),tabIndex:0,disabled:n,children:_.jsx("svg",{viewBox:"64 64 896 896",focusable:"false",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:_.jsx("path",{d:"M931.4 498.9L94.9 79.5c-3.4-1.7-7.3-2.1-11-1.2a15.99 15.99 0 00-11.7 19.3l86.2 352.2c1.3 5.3 5.2 9.6 10.4 11.3l147.7 50.7-147.6 50.7c-5.2 1.8-9.1 6-10.3 11.3L72.2 926.5c-.9 3.7-.5 7.6 1.2 10.9 3.9 7.9 13.5 11.1 21.5 7.2l836.5-417c3.1-1.5 5.6-4.1 7.2-7.1 3.9-8 .7-17.6-7.2-21.6zM170.8 826.3l50.3-205.6 295.2-101.3c2.3-.8 4.2-2.6 5-5 1.4-4.2-.8-8.7-5-10.2L221.1 403 171 198.2l628 314.9-628.2 313.2z"})})}):e&&navigator.mediaDevices!==void 0&&_.jsx(vk,{translate:s,onAudioRecorded:i})]})]})},bk="_quickReplies_11l22_1",xk="_quickReply_11l22_9",Bh={quickReplies:bk,quickReply:xk},Tk=({quickReplies:e,onQuickReplyClick:t})=>e.length?_.jsx("div",{className:R(Bh.quickReplies,"chat__quickReplies"),children:e.map(n=>_.jsx("button",{tabIndex:0,className:R(Bh.quickReply,we.button,"chat__button","chat__quickReply"),onClick:()=>t(n),children:n.label},n.label))}):null,Lh=5e3,Ck=1e3,kk=({isBotTyping:e,quickReplies:t,speechSupport:n,transcriptExportEnabled:r,conversationRating:i,numberOfMessagesFromGuest:o,showRatingOverlay:s,setShowRatingOverlay:a,onTextInput:l,onRate:u,onQuickReplyClick:c,onAudioRecorded:g,onOpenTranscriptExportModal:y})=>{const[f,v]=N.useState(!1),p=N.useRef(),S=N.useRef(0);N.useEffect(()=>{if(f&&!e){const d=p.current?Date.now()-p.current:0;d>Lh?v(!1):setTimeout(()=>{v(!1)},Lh-d)}},[f,e]),N.useEffect(()=>{f&&(p.current=Date.now())},[f]);const h=d=>{const m=Date.now()-S.current<Ck;return e||m?(v(!0),!1):(l(d),S.current=Date.now(),!0)};return _.jsxs("div",{className:R(xC.inputContainer),children:[_.jsx(Tk,{quickReplies:t,onQuickReplyClick:c}),_.jsx(kC,{visible:f}),!f&&_.jsx(ik,{conversationRating:i,numberOfMessagesFromGuest:o,onRate:u,showRatingOverlay:s,setShowRatingOverlay:a}),_.jsx(wk,{onTextInput:h,onAudioRecorded:g,speechSupport:n,onOpenTranscriptExportModal:y,transcriptExportEnabled:r,disabled:f})]})},Ok=({clientName:e,messages:t,quickReplies:n,isBotTyping:r,speechSupport:i,problemReportingEnabled:o,transcriptExportEnabled:s,conversationRating:a,showGeneralConditions:l,onMessageFromUser:u,onRate:c,onQuickReplyClick:g,onButtonClick:y,onLinkClick:f,onAudioRecorded:v,onTranscriptExport:p,onPdfExport:S,onProblemReport:h})=>{const d=Dc(),m=Ii(P=>P.connection.connectionState),[E,w]=N.useState(!1),[b,x]=N.useState(!1),T=s.email||s.pdf,M=t.filter(P=>P.sender.type===$y.GUEST).length;return N.useEffect(()=>{m===an.CONNECTED&&d(Uy(e,window.location.search))},[m,d]),_.jsxs("div",{children:[_.jsxs("div",{className:`${Qb.chatcontent} ${E||b?we.accessabilityHidden:""}`,children:[_.jsx(sC,{messages:t,isBotTyping:r,showGeneralConditions:l,problemReportingEnabled:o,onButtonClick:y,onLinkClick:f,onProblemReport:h}),_.jsx(kk,{isBotTyping:r,quickReplies:r?[]:n,numberOfMessagesFromGuest:M,speechSupport:i,transcriptExportEnabled:T,conversationRating:E?{enabled:!1}:a,showRatingOverlay:b,setShowRatingOverlay:x,onRate:c,onQuickReplyClick:g,onTextInput:u,onAudioRecorded:v,onOpenTranscriptExportModal:()=>w(!E)}),_.jsx(dC,{})]}),T&&_.jsx(wC,{methods:s,visible:E,onEmailExport:p,onPdfExport:S,onClose:()=>w(!1)})]})},Rk=e=>{const{messages:t,quickReplies:n,isBotTyping:r,speechSupport:i,problemReportingEnabled:o,transcriptExportEnabled:s,conversationRating:a,showGeneralConditions:l}=e.chat;return{messages:t,quickReplies:n,isBotTyping:r,speechSupport:i,problemReportingEnabled:o,transcriptExportEnabled:s,conversationRating:a,showGeneralConditions:l}},Nk=e=>({onRestartChat:(t,n)=>e(cf(t,n)),onMessageFromUser:t=>e(My(t)),onRate:(t,n)=>e(Nb(t,n)),onAudioRecorded:t=>e(Sb(t)),onActionFromUser:t=>e(t),onQuickReplyClick:t=>e(Dy(t)),onNluEvent:t=>e(Ly(t)),onButtonClick:t=>e(Pb(t)),onLinkClick:t=>e(Ib(t)),onTranscriptExport:t=>e(Cb(t)),onPdfExport:()=>e(Ob()),onProblemReport:(t,n)=>e(U.reportProblemFromGuest(t,n))}),Ak=BE(Rk,Nk)(Ok),Pk="_chatwindow_phukm_1",Ik="_chatcontent_phukm_13",Dk={chatwindow:Pk,chatcontent:Ik};function _e(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Mk=typeof Symbol=="function"&&Symbol.observable||"@@observable",jh=Mk,Ya=()=>Math.random().toString(36).substring(7).split("").join("."),Fk={INIT:`@@redux/INIT${Ya()}`,REPLACE:`@@redux/REPLACE${Ya()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Ya()}`},vs=Fk;function vf(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function Ev(e,t,n){if(typeof e!="function")throw new Error(_e(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(_e(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(_e(1));return n(Ev)(e,t)}let r=e,i=t,o=new Map,s=o,a=0,l=!1;function u(){s===o&&(s=new Map,o.forEach((S,h)=>{s.set(h,S)}))}function c(){if(l)throw new Error(_e(3));return i}function g(S){if(typeof S!="function")throw new Error(_e(4));if(l)throw new Error(_e(5));let h=!0;u();const d=a++;return s.set(d,S),function(){if(h){if(l)throw new Error(_e(6));h=!1,u(),s.delete(d),o=null}}}function y(S){if(!vf(S))throw new Error(_e(7));if(typeof S.type>"u")throw new Error(_e(8));if(typeof S.type!="string")throw new Error(_e(17));if(l)throw new Error(_e(9));try{l=!0,i=r(i,S)}finally{l=!1}return(o=s).forEach(d=>{d()}),S}function f(S){if(typeof S!="function")throw new Error(_e(10));r=S,y({type:vs.REPLACE})}function v(){const S=g;return{subscribe(h){if(typeof h!="object"||h===null)throw new Error(_e(11));function d(){const E=h;E.next&&E.next(c())}return d(),{unsubscribe:S(d)}},[jh](){return this}}}return y({type:vs.INIT}),{dispatch:y,subscribe:g,getState:c,replaceReducer:f,[jh]:v}}function Bk(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:vs.INIT})>"u")throw new Error(_e(12));if(typeof n(void 0,{type:vs.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(_e(13))})}function Sv(e){const t=Object.keys(e),n={};for(let o=0;o<t.length;o++){const s=t[o];typeof e[s]=="function"&&(n[s]=e[s])}const r=Object.keys(n);let i;try{Bk(n)}catch(o){i=o}return function(s={},a){if(i)throw i;let l=!1;const u={};for(let c=0;c<r.length;c++){const g=r[c],y=n[g],f=s[g],v=y(f,a);if(typeof v>"u")throw a&&a.type,new Error(_e(14));u[g]=v,l=l||v!==f}return l=l||r.length!==Object.keys(s).length,l?u:s}}function _s(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function Lk(...e){return t=>(n,r)=>{const i=t(n,r);let o=()=>{throw new Error(_e(15))};const s={getState:i.getState,dispatch:(l,...u)=>o(l,...u)},a=e.map(l=>l(s));return o=_s(...a)(i.dispatch),{...i,dispatch:o}}}function jk(e){return vf(e)&&"type"in e&&typeof e.type=="string"}var wv=Symbol.for("immer-nothing"),zh=Symbol.for("immer-draftable"),qe=Symbol.for("immer-state");function yt(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ar=Object.getPrototypeOf;function Sn(e){return!!e&&!!e[qe]}function Yt(e){var t;return e?bv(e)||Array.isArray(e)||!!e[zh]||!!((t=e.constructor)!=null&&t[zh])||ia(e)||oa(e):!1}var zk=Object.prototype.constructor.toString();function bv(e){if(!e||typeof e!="object")return!1;const t=Ar(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===zk}function Mi(e,t){ra(e)===0?Object.entries(e).forEach(([n,r])=>{t(n,r,e)}):e.forEach((n,r)=>t(r,n,e))}function ra(e){const t=e[qe];return t?t.type_:Array.isArray(e)?1:ia(e)?2:oa(e)?3:0}function gu(e,t){return ra(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function xv(e,t,n){const r=ra(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function Uk(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function ia(e){return e instanceof Map}function oa(e){return e instanceof Set}function Dn(e){return e.copy_||e.base_}function yu(e,t){if(ia(e))return new Map(e);if(oa(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&bv(e))return Ar(e)?{...e}:Object.assign(Object.create(null),e);const n=Object.getOwnPropertyDescriptors(e);delete n[qe];let r=Reflect.ownKeys(n);for(let i=0;i<r.length;i++){const o=r[i],s=n[o];s.writable===!1&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(n[o]={configurable:!0,writable:!0,enumerable:s.enumerable,value:e[o]})}return Object.create(Ar(e),n)}function _f(e,t=!1){return sa(e)||Sn(e)||!Yt(e)||(ra(e)>1&&(e.set=e.add=e.clear=e.delete=$k),Object.freeze(e),t&&Mi(e,(n,r)=>_f(r,!0))),e}function $k(){yt(2)}function sa(e){return Object.isFrozen(e)}var Hk={};function qn(e){const t=Hk[e];return t||yt(0,e),t}var Fi;function Tv(){return Fi}function Gk(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Uh(e,t){t&&(qn("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function vu(e){_u(e),e.drafts_.forEach(Vk),e.drafts_=null}function _u(e){e===Fi&&(Fi=e.parent_)}function $h(e){return Fi=Gk(Fi,e)}function Vk(e){const t=e[qe];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Hh(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[qe].modified_&&(vu(t),yt(4)),Yt(e)&&(e=Es(t,e),t.parent_||Ss(t,e)),t.patches_&&qn("Patches").generateReplacementPatches_(n[qe].base_,e,t.patches_,t.inversePatches_)):e=Es(t,n,[]),vu(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==wv?e:void 0}function Es(e,t,n){if(sa(t))return t;const r=t[qe];if(!r)return Mi(t,(i,o)=>Gh(e,r,t,i,o,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Ss(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const i=r.copy_;let o=i,s=!1;r.type_===3&&(o=new Set(i),i.clear(),s=!0),Mi(o,(a,l)=>Gh(e,r,i,a,l,n,s)),Ss(e,i,!1),n&&e.patches_&&qn("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function Gh(e,t,n,r,i,o,s){if(Sn(i)){const a=o&&t&&t.type_!==3&&!gu(t.assigned_,r)?o.concat(r):void 0,l=Es(e,i,a);if(xv(n,r,l),Sn(l))e.canAutoFreeze_=!1;else return}else s&&n.add(i);if(Yt(i)&&!sa(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Es(e,i),(!t||!t.scope_.parent_)&&Ss(e,i)}}function Ss(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&_f(t,n)}function Wk(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:Tv(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,o=Ef;n&&(i=[r],o=Bi);const{revoke:s,proxy:a}=Proxy.revocable(i,o);return r.draft_=a,r.revoke_=s,a}var Ef={get(e,t){if(t===qe)return e;const n=Dn(e);if(!gu(n,t))return qk(e,n,t);const r=n[t];return e.finalized_||!Yt(r)?r:r===Za(e.base_,t)?(Ja(e),e.copy_[t]=Su(r,e)):r},has(e,t){return t in Dn(e)},ownKeys(e){return Reflect.ownKeys(Dn(e))},set(e,t,n){const r=Cv(Dn(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=Za(Dn(e),t),o=i==null?void 0:i[qe];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(Uk(n,i)&&(n!==void 0||gu(e.base_,t)))return!0;Ja(e),Eu(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return Za(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Ja(e),Eu(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Dn(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){yt(11)},getPrototypeOf(e){return Ar(e.base_)},setPrototypeOf(){yt(12)}},Bi={};Mi(Ef,(e,t)=>{Bi[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Bi.deleteProperty=function(e,t){return Bi.set.call(this,e,t,void 0)};Bi.set=function(e,t,n){return Ef.set.call(this,e[0],t,n,e[0])};function Za(e,t){const n=e[qe];return(n?Dn(n):e)[t]}function qk(e,t,n){var i;const r=Cv(t,n);return r?"value"in r?r.value:(i=r.get)==null?void 0:i.call(e.draft_):void 0}function Cv(e,t){if(!(t in e))return;let n=Ar(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Ar(n)}}function Eu(e){e.modified_||(e.modified_=!0,e.parent_&&Eu(e.parent_))}function Ja(e){e.copy_||(e.copy_=yu(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Xk=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const o=n;n=t;const s=this;return function(l=o,...u){return s.produce(l,c=>n.call(this,c,...u))}}typeof n!="function"&&yt(6),r!==void 0&&typeof r!="function"&&yt(7);let i;if(Yt(t)){const o=$h(this),s=Su(t,void 0);let a=!0;try{i=n(s),a=!1}finally{a?vu(o):_u(o)}return Uh(o,r),Hh(i,o)}else if(!t||typeof t!="object"){if(i=n(t),i===void 0&&(i=t),i===wv&&(i=void 0),this.autoFreeze_&&_f(i,!0),r){const o=[],s=[];qn("Patches").generateReplacementPatches_(t,i,o,s),r(o,s)}return i}else yt(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(s,...a)=>this.produceWithPatches(s,l=>t(l,...a));let r,i;return[this.produce(t,n,(s,a)=>{r=s,i=a}),r,i]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Yt(e)||yt(8),Sn(e)&&(e=kv(e));const t=$h(this),n=Su(e,void 0);return n[qe].isManual_=!0,_u(t),n}finishDraft(e,t){const n=e&&e[qe];(!n||!n.isManual_)&&yt(9);const{scope_:r}=n;return Uh(r,t),Hh(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const i=t[n];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}n>-1&&(t=t.slice(n+1));const r=qn("Patches").applyPatches_;return Sn(e)?r(e,t):this.produce(e,i=>r(i,t))}};function Su(e,t){const n=ia(e)?qn("MapSet").proxyMap_(e,t):oa(e)?qn("MapSet").proxySet_(e,t):Wk(e,t);return(t?t.scope_:Tv()).drafts_.push(n),n}function kv(e){return Sn(e)||yt(10,e),Ov(e)}function Ov(e){if(!Yt(e)||sa(e))return e;const t=e[qe];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=yu(e,t.scope_.immer_.useStrictShallowCopy_)}else n=yu(e,!0);return Mi(n,(r,i)=>{xv(n,r,Ov(i))}),t&&(t.finalized_=!1),n}var Xe=new Xk,Rv=Xe.produce;Xe.produceWithPatches.bind(Xe);Xe.setAutoFreeze.bind(Xe);Xe.setUseStrictShallowCopy.bind(Xe);Xe.applyPatches.bind(Xe);Xe.createDraft.bind(Xe);Xe.finishDraft.bind(Xe);function Qk(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function Kk(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function Yk(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var Vh=e=>Array.isArray(e)?e:[e];function Zk(e){const t=Array.isArray(e[0])?e[0]:e;return Yk(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Jk(e,t){const n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}var eO=class{constructor(e){this.value=e}deref(){return this.value}},tO=typeof WeakRef<"u"?WeakRef:eO,nO=0,Wh=1;function go(){return{s:nO,v:void 0,o:null,p:null}}function Sf(e,t={}){let n=go();const{resultEqualityCheck:r}=t;let i,o=0;function s(){var g;let a=n;const{length:l}=arguments;for(let y=0,f=l;y<f;y++){const v=arguments[y];if(typeof v=="function"||typeof v=="object"&&v!==null){let p=a.o;p===null&&(a.o=p=new WeakMap);const S=p.get(v);S===void 0?(a=go(),p.set(v,a)):a=S}else{let p=a.p;p===null&&(a.p=p=new Map);const S=p.get(v);S===void 0?(a=go(),p.set(v,a)):a=S}}const u=a;let c;if(a.s===Wh)c=a.v;else if(c=e.apply(null,arguments),o++,r){const y=((g=i==null?void 0:i.deref)==null?void 0:g.call(i))??i;y!=null&&r(y,c)&&(c=y,o!==0&&o--),i=typeof c=="object"&&c!==null||typeof c=="function"?new tO(c):c}return u.s=Wh,u.v=c,c}return s.clearCache=()=>{n=go(),s.resetResultsCount()},s.resultsCount=()=>o,s.resetResultsCount=()=>{o=0},s}function Nv(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...i)=>{let o=0,s=0,a,l={},u=i.pop();typeof u=="object"&&(l=u,u=i.pop()),Qk(u,`createSelector expects an output function after the inputs, but received: [${typeof u}]`);const c={...n,...l},{memoize:g,memoizeOptions:y=[],argsMemoize:f=Sf,argsMemoizeOptions:v=[],devModeChecks:p={}}=c,S=Vh(y),h=Vh(v),d=Zk(i),m=g(function(){return o++,u.apply(null,arguments)},...S),E=f(function(){s++;const b=Jk(d,arguments);return a=m.apply(null,b),a},...h);return Object.assign(E,{resultFunc:u,memoizedResultFunc:m,dependencies:d,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>a,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:g,argsMemoize:f})};return Object.assign(r,{withTypes:()=>r}),r}var rO=Nv(Sf),iO=Object.assign((e,t=rO)=>{Kk(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(o=>e[o]);return t(r,(...o)=>o.reduce((s,a,l)=>(s[n[l]]=a,s),{}))},{withTypes:()=>iO});function Av(e){return({dispatch:n,getState:r})=>i=>o=>typeof o=="function"?o(n,r,e):i(o)}var oO=Av(),sO=Av,aO=(...e)=>{const t=Nv(...e),n=Object.assign((...r)=>{const i=t(...r),o=(s,...a)=>i(Sn(s)?kv(s):s,...a);return Object.assign(o,i),o},{withTypes:()=>n});return n};aO(Sf);var lO=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?_s:_s.apply(null,arguments)};function Pr(e,t){function n(...r){if(t){let i=t(...r);if(!i)throw new Error($e(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>jk(r)&&r.type===e,n}var Pv=class ii extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,ii.prototype)}static get[Symbol.species](){return ii}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new ii(...t[0].concat(this)):new ii(...t.concat(this))}};function qh(e){return Yt(e)?Rv(e,()=>{}):e}function Xh(e,t,n){if(e.has(t)){let i=e.get(t);return n.update&&(i=n.update(i,t,e),e.set(t,i)),i}if(!n.insert)throw new Error($e(10));const r=n.insert(t,e);return e.set(t,r),r}function uO(e){return typeof e=="boolean"}var cO=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=t??{};let s=new Pv;return n&&(uO(n)?s.push(oO):s.push(sO(n.extraArgument))),s},fO="RTK_autoBatch",Iv=e=>t=>{setTimeout(t,e)},dO=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Iv(10),hO=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let i=!0,o=!1,s=!1;const a=new Set,l=e.type==="tick"?queueMicrotask:e.type==="raf"?dO:e.type==="callback"?e.queueNotification:Iv(e.timeout),u=()=>{s=!1,o&&(o=!1,a.forEach(c=>c()))};return Object.assign({},r,{subscribe(c){const g=()=>i&&c(),y=r.subscribe(g);return a.add(c),()=>{y(),a.delete(c)}},dispatch(c){var g;try{return i=!((g=c==null?void 0:c.meta)!=null&&g[fO]),o=!i,o&&(s||(s=!0,l(u))),r.dispatch(c)}finally{i=!0}}})},pO=e=>function(n){const{autoBatch:r=!0}=n??{};let i=new Pv(e);return r&&i.push(hO(typeof r=="object"?r:void 0)),i},mO=!0;function gO(e){const t=cO(),{reducer:n=void 0,middleware:r,devTools:i=!0,preloadedState:o=void 0,enhancers:s=void 0}=e||{};let a;if(typeof n=="function")a=n;else if(vf(n))a=Sv(n);else throw new Error($e(1));let l;typeof r=="function"?l=r(t):l=t();let u=_s;i&&(u=lO({trace:!mO,...typeof i=="object"&&i}));const c=Lk(...l),g=pO(c);let y=typeof s=="function"?s(g):g();const f=u(...y);return Ev(a,o,f)}function Dv(e){const t={},n=[];let r;const i={addCase(o,s){const a=typeof o=="string"?o:o.type;if(!a)throw new Error($e(28));if(a in t)throw new Error($e(29));return t[a]=s,i},addMatcher(o,s){return n.push({matcher:o,reducer:s}),i},addDefaultCase(o){return r=o,i}};return e(i),[t,n,r]}function yO(e){return typeof e=="function"}function vO(e,t){let[n,r,i]=Dv(t),o;if(yO(e))o=()=>qh(e());else{const a=qh(e);o=()=>a}function s(a=o(),l){let u=[n[l.type],...r.filter(({matcher:c})=>c(l)).map(({reducer:c})=>c)];return u.filter(c=>!!c).length===0&&(u=[i]),u.reduce((c,g)=>{if(g)if(Sn(c)){const f=g(c,l);return f===void 0?c:f}else{if(Yt(c))return Rv(c,y=>g(y,l));{const y=g(c,l);if(y===void 0){if(c===null)return c;throw new Error($e(9))}return y}}return c},a)}return s.getInitialState=o,s}var _O="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",EO=(e=21)=>{let t="",n=e;for(;n--;)t+=_O[Math.random()*64|0];return t},SO=Symbol.for("rtk-slice-createasyncthunk");function wO(e,t){return`${e}/${t}`}function bO({creators:e}={}){var n;const t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[SO];return function(i){const{name:o,reducerPath:s=o}=i;if(!o)throw new Error($e(11));typeof process<"u";const a=(typeof i.reducers=="function"?i.reducers(TO()):i.reducers)||{},l=Object.keys(a),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},c={addCase(m,E){const w=typeof m=="string"?m:m.type;if(!w)throw new Error($e(12));if(w in u.sliceCaseReducersByType)throw new Error($e(13));return u.sliceCaseReducersByType[w]=E,c},addMatcher(m,E){return u.sliceMatchers.push({matcher:m,reducer:E}),c},exposeAction(m,E){return u.actionCreators[m]=E,c},exposeCaseReducer(m,E){return u.sliceCaseReducersByName[m]=E,c}};l.forEach(m=>{const E=a[m],w={reducerName:m,type:wO(o,m),createNotation:typeof i.reducers=="function"};kO(E)?RO(w,E,c,t):CO(w,E,c)});function g(){const[m={},E=[],w=void 0]=typeof i.extraReducers=="function"?Dv(i.extraReducers):[i.extraReducers],b={...m,...u.sliceCaseReducersByType};return vO(i.initialState,x=>{for(let T in b)x.addCase(T,b[T]);for(let T of u.sliceMatchers)x.addMatcher(T.matcher,T.reducer);for(let T of E)x.addMatcher(T.matcher,T.reducer);w&&x.addDefaultCase(w)})}const y=m=>m,f=new Map;let v;function p(m,E){return v||(v=g()),v(m,E)}function S(){return v||(v=g()),v.getInitialState()}function h(m,E=!1){function w(x){let T=x[m];return typeof T>"u"&&E&&(T=S()),T}function b(x=y){const T=Xh(f,E,{insert:()=>new WeakMap});return Xh(T,x,{insert:()=>{const M={};for(const[P,se]of Object.entries(i.selectors??{}))M[P]=xO(se,x,S,E);return M}})}return{reducerPath:m,getSelectors:b,get selectors(){return b(w)},selectSlice:w}}const d={name:o,reducer:p,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:S,...h(s),injectInto(m,{reducerPath:E,...w}={}){const b=E??s;return m.inject({reducerPath:b,reducer:p},w),{...d,...h(b,!0)}}};return d}}function xO(e,t,n,r){function i(o,...s){let a=t(o);return typeof a>"u"&&r&&(a=n()),e(a,...s)}return i.unwrapped=e,i}var Mv=bO();function TO(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function CO({type:e,reducerName:t,createNotation:n},r,i){let o,s;if("reducer"in r){if(n&&!OO(r))throw new Error($e(17));o=r.reducer,s=r.prepare}else o=r;i.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,s?Pr(e,s):Pr(e))}function kO(e){return e._reducerDefinitionType==="asyncThunk"}function OO(e){return e._reducerDefinitionType==="reducerWithPrepare"}function RO({type:e,reducerName:t},n,r,i){if(!i)throw new Error($e(18));const{payloadCreator:o,fulfilled:s,pending:a,rejected:l,settled:u,options:c}=n,g=i(e,o,c);r.exposeAction(t,g),s&&r.addCase(g.fulfilled,s),a&&r.addCase(g.pending,a),l&&r.addCase(g.rejected,l),u&&r.addMatcher(g.settled,u),r.exposeCaseReducer(t,{fulfilled:s||yo,pending:a||yo,rejected:l||yo,settled:u||yo})}function yo(){}var NO=(e,t)=>{if(typeof e!="function")throw new Error($e(32))},wf="listenerMiddleware",AO=e=>{let{type:t,actionCreator:n,matcher:r,predicate:i,effect:o}=e;if(t)i=Pr(t).match;else if(n)t=n.type,i=n.match;else if(r)i=r;else if(!i)throw new Error($e(21));return NO(o),{predicate:i,type:t,effect:o}},PO=Object.assign(e=>{const{type:t,predicate:n,effect:r}=AO(e);return{id:EO(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error($e(22))}}},{withTypes:()=>PO}),IO=Object.assign(Pr(`${wf}/add`),{withTypes:()=>IO});Pr(`${wf}/removeAll`);var DO=Object.assign(Pr(`${wf}/remove`),{withTypes:()=>DO});function $e(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}const MO={useStartScreen:void 0},Fv=Mv({name:"start-screen",initialState:MO,reducers:{enableStartScreen(e){e.useStartScreen=!0},disableStartScreen(e){e.useStartScreen=!1},setStartScreenStatus(e,t){e.startScreenStatus=t.payload}}}),{enableStartScreen:FO,disableStartScreen:BO,setStartScreenStatus:LO}=Fv.actions,jO=Fv.reducer,zO="_container_7ypo3_1",UO="_startChatButton_7ypo3_14",Qh={container:zO,startChatButton:UO},$O="start-screen.body",HO="start-screen.start-chat",GO=()=>{const e=wt(),t=Dc(),n=()=>t(LO("HIDDEN")),r=e($O),i=e(HO);return _.jsxs("div",{className:R(Qh.container,"chat__startScreen"),children:[r&&_.jsx(vn,{options:{overrides:{a:VO}},children:r}),_.jsx("button",{className:R(we.button,we.buttonPrimary,Qh.startChatButton),onClick:n,children:i})]})},VO=({title:e,href:t,children:n})=>_.jsx("a",{href:t,title:e,target:"_blank",rel:"noopener noreferrer",children:n}),WO=()=>{const e=Ks();N.useEffect(()=>{window.document.documentElement.lang=e.locale},[e.locale])},nr={TRIGGER_ACTION:"TRIGGER_ACTION",TRIGGER_STORY:"TRIGGER_STORY",CHAT_MESSAGE_FROM_GUEST:"CHAT_MESSAGE_FROM_GUEST",ON_CHAT_WINDOW_OPEN:"ON_CHAT_WINDOW_OPEN",ON_CHAT_WINDOW_CLOSE:"ON_CHAT_WINDOW_CLOSE",RESTART_CHAT:"RESTART_CHAT"},qO=({clientName:e})=>{WO();const t=Dc(),n=Ii(s=>s.startScreen.useStartScreen),r=Ii(s=>s.startScreen.startScreenStatus),[i,o]=N.useState(void 0);return N.useEffect(()=>{const s=window.location.search,a=Ry.parse(s);a.cssClassName&&o(a.cssClassName);const l=u=>{switch(u.data.type){case nr.TRIGGER_ACTION:t(u.data.action);break;case nr.TRIGGER_STORY:t(Ly(u.data.story));break;case nr.ON_CHAT_WINDOW_OPEN:t({type:"webclient.chatwindow.opened"});break;case nr.ON_CHAT_WINDOW_CLOSE:t({type:"webclient.chatwindow.closed"});break;case nr.CHAT_MESSAGE_FROM_GUEST:t(My(u.data.text));break;case nr.RESTART_CHAT:t(cf(e,s));break}};return t(Fb(e,s)),window.addEventListener("message",u=>l(u),!1),()=>window.removeEventListener("message",l)},[e,t]),_.jsx("div",{className:R(Dk.chatwindow,"chat__chatwindow",i),children:n===void 0?null:!n||r==="HIDDEN"?_.jsx(Ak,{clientName:e}):_.jsx(GO,{})})},XO=()=>{const e=vy(),t=Ii(r=>r.intl.locale),n=Ii(r=>r.intl.messages);return _.jsx(yw,{locale:t,messages:n,children:_.jsx("div",{className:_w.app,children:_.jsx(qO,{clientName:e})})})};function QO(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var bf=QO,KO=typeof q=="object"&&q&&q.Object===Object&&q,YO=KO,ZO=YO,JO=typeof self=="object"&&self&&self.Object===Object&&self,eR=ZO||JO||Function("return this")(),Bv=eR,tR=Bv,nR=function(){return tR.Date.now()},rR=nR,iR=/\s/;function oR(e){for(var t=e.length;t--&&iR.test(e.charAt(t)););return t}var sR=oR,aR=sR,lR=/^\s+/;function uR(e){return e&&e.slice(0,aR(e)+1).replace(lR,"")}var cR=uR,fR=Bv,dR=fR.Symbol,Lv=dR,Kh=Lv,jv=Object.prototype,hR=jv.hasOwnProperty,pR=jv.toString,Zr=Kh?Kh.toStringTag:void 0;function mR(e){var t=hR.call(e,Zr),n=e[Zr];try{e[Zr]=void 0;var r=!0}catch{}var i=pR.call(e);return r&&(t?e[Zr]=n:delete e[Zr]),i}var gR=mR,yR=Object.prototype,vR=yR.toString;function _R(e){return vR.call(e)}var ER=_R,Yh=Lv,SR=gR,wR=ER,bR="[object Null]",xR="[object Undefined]",Zh=Yh?Yh.toStringTag:void 0;function TR(e){return e==null?e===void 0?xR:bR:Zh&&Zh in Object(e)?SR(e):wR(e)}var CR=TR;function kR(e){return e!=null&&typeof e=="object"}var OR=kR,RR=CR,NR=OR,AR="[object Symbol]";function PR(e){return typeof e=="symbol"||NR(e)&&RR(e)==AR}var IR=PR,DR=cR,Jh=bf,MR=IR,ep=NaN,FR=/^[-+]0x[0-9a-f]+$/i,BR=/^0b[01]+$/i,LR=/^0o[0-7]+$/i,jR=parseInt;function zR(e){if(typeof e=="number")return e;if(MR(e))return ep;if(Jh(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Jh(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=DR(e);var n=BR.test(e);return n||LR.test(e)?jR(e.slice(2),n?2:8):FR.test(e)?ep:+e}var UR=zR,$R=bf,el=rR,tp=UR,HR="Expected a function",GR=Math.max,VR=Math.min;function WR(e,t,n){var r,i,o,s,a,l,u=0,c=!1,g=!1,y=!0;if(typeof e!="function")throw new TypeError(HR);t=tp(t)||0,$R(n)&&(c=!!n.leading,g="maxWait"in n,o=g?GR(tp(n.maxWait)||0,t):o,y="trailing"in n?!!n.trailing:y);function f(b){var x=r,T=i;return r=i=void 0,u=b,s=e.apply(T,x),s}function v(b){return u=b,a=setTimeout(h,t),c?f(b):s}function p(b){var x=b-l,T=b-u,M=t-x;return g?VR(M,o-T):M}function S(b){var x=b-l,T=b-u;return l===void 0||x>=t||x<0||g&&T>=o}function h(){var b=el();if(S(b))return d(b);a=setTimeout(h,p(b))}function d(b){return a=void 0,y&&r?f(b):(r=i=void 0,s)}function m(){a!==void 0&&clearTimeout(a),u=0,r=l=i=a=void 0}function E(){return a===void 0?s:d(el())}function w(){var b=el(),x=S(b);if(r=arguments,i=this,l=b,x){if(a===void 0)return v(l);if(g)return clearTimeout(a),a=setTimeout(h,t),f(l)}return a===void 0&&(a=setTimeout(h,t)),s}return w.cancel=m,w.flush=E,w}var qR=WR,XR=qR,QR=bf,KR="Expected a function";function YR(e,t,n){var r=!0,i=!0;if(typeof e!="function")throw new TypeError(KR);return QR(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),XR(e,t,{leading:r,maxWait:t,trailing:i})}var ZR=YR;const JR=Ru(ZR);function Yn(e,t){var n,r;if(typeof t=="function")r=t(e),r!==void 0&&(e=r);else if(Array.isArray(t))for(n=0;n<t.length;n++)r=t[n](e),r!==void 0&&(e=r);return e}function eN(e,t){return e[0]==="-"&&Array.isArray(t)&&/^-\d+$/.test(e)?t.length+parseInt(e,10):e}function tN(e){return/^\d+$/.test(e)}function Bo(e){return Object.prototype.toString.call(e)==="[object Object]"}function oi(e){return Object(e)===e}function Lo(e){return Object.keys(e).length===0}var nN=["__proto__","prototype","constructor"],rN=function(e){return nN.indexOf(e)===-1};function aa(e,t){e.indexOf("[")>=0&&(e=e.replace(/\[/g,t).replace(/]/g,""));var n=e.split(t),r=n.filter(rN);if(r.length!==n.length)throw Error("Refusing to update blacklisted property "+e);return n}var np=Object.prototype.hasOwnProperty;function G(e,t,n,r){if(!(this instanceof G))return new G(e,t,n,r);typeof t>"u"&&(t=!1),typeof n>"u"&&(n=!0),typeof r>"u"&&(r=!0),this.separator=e||".",this.override=t,this.useArray=n,this.useBrackets=r,this.keepArray=!1,this.cleanup=[]}var Ir=new G(".",!1,!0,!0);function bt(e){return function(){return Ir[e].apply(Ir,arguments)}}G.prototype._fill=function(e,t,n,r){var i=e.shift();if(e.length>0){if(t[i]=t[i]||(this.useArray&&tN(e[0])?[]:{}),!oi(t[i]))if(this.override)t[i]={};else{if(!(oi(n)&&Lo(n)))throw new Error("Trying to redefine `"+i+"` which is a "+typeof t[i]);return}this._fill(e,t[i],n,r)}else{if(!this.override&&oi(t[i])&&!Lo(t[i])){if(!(oi(n)&&Lo(n)))throw new Error("Trying to redefine non-empty obj['"+i+"']");return}t[i]=Yn(n,r)}};G.prototype.object=function(e,t){var n=this;return Object.keys(e).forEach(function(r){var i=t===void 0?null:t[r],o=aa(r,n.separator).join(n.separator);o.indexOf(n.separator)!==-1?(n._fill(o.split(n.separator),e,e[r],i),delete e[r]):e[r]=Yn(e[r],i)}),e};G.prototype.str=function(e,t,n,r){var i=aa(e,this.separator).join(this.separator);return e.indexOf(this.separator)!==-1?this._fill(i.split(this.separator),n,t,r):n[e]=Yn(t,r),n};G.prototype.pick=function(e,t,n,r){var i,o,s,a,l;for(o=aa(e,this.separator),i=0;i<o.length;i++)if(a=eN(o[i],t),t&&typeof t=="object"&&a in t){if(i===o.length-1)return n?(s=t[a],r&&Array.isArray(t)?t.splice(a,1):delete t[a],Array.isArray(t)&&(l=o.slice(0,-1).join("."),this.cleanup.indexOf(l)===-1&&this.cleanup.push(l)),s):t[a];t=t[a]}else return;return n&&Array.isArray(t)&&(t=t.filter(function(u){return u!==void 0})),t};G.prototype.delete=function(e,t){return this.remove(e,t,!0)};G.prototype.remove=function(e,t,n){var r;if(this.cleanup=[],Array.isArray(e)){for(r=0;r<e.length;r++)this.pick(e[r],t,!0,n);return n||this._cleanup(t),t}else return this.pick(e,t,!0,n)};G.prototype._cleanup=function(e){var t,n,r,i;if(this.cleanup.length){for(n=0;n<this.cleanup.length;n++)r=this.cleanup[n].split("."),i=r.splice(0,-1).join("."),t=i?this.pick(i,e):e,t=t[r[0]].filter(function(o){return o!==void 0}),this.set(this.cleanup[n],t,e);this.cleanup=[]}};G.prototype.del=G.prototype.remove;G.prototype.move=function(e,t,n,r,i){return typeof r=="function"||Array.isArray(r)?this.set(t,Yn(this.pick(e,n,!0),r),n,i):(i=r,this.set(t,this.pick(e,n,!0),n,i)),n};G.prototype.transfer=function(e,t,n,r,i,o){return typeof i=="function"||Array.isArray(i)?this.set(t,Yn(this.pick(e,n,!0),i),r,o):(o=i,this.set(t,this.pick(e,n,!0),r,o)),r};G.prototype.copy=function(e,t,n,r,i,o){return typeof i=="function"||Array.isArray(i)?this.set(t,Yn(JSON.parse(JSON.stringify(this.pick(e,n,!1))),i),r,o):(o=i,this.set(t,this.pick(e,n,!1),r,o)),r};G.prototype.set=function(e,t,n,r){var i,o,s,a;if(typeof t>"u")return n;for(s=aa(e,this.separator),i=0;i<s.length;i++){if(a=s[i],i===s.length-1)if(r&&Bo(t)&&Bo(n[a]))for(o in t)np.call(t,o)&&(n[a][o]=t[o]);else if(r&&Array.isArray(n[a])&&Array.isArray(t))for(var l=0;l<t.length;l++)n[s[i]].push(t[l]);else n[a]=t;else(!np.call(n,a)||!Bo(n[a])&&!Array.isArray(n[a]))&&(/^\d+$/.test(s[i+1])?n[a]=[]:n[a]={});n=n[a]}return n};G.prototype.transform=function(e,t,n){return t=t||{},n=n||{},Object.keys(e).forEach((function(r){this.set(e[r],this.pick(r,t),n)}).bind(this)),n};G.prototype.dot=function(e,t,n){t=t||{},n=n||[];var r=Array.isArray(e);return Object.keys(e).forEach((function(i){var o=r&&this.useBrackets?"["+i+"]":i;if(oi(e[i])&&(Bo(e[i])&&!Lo(e[i])||Array.isArray(e[i])&&!this.keepArray&&e[i].length!==0))if(r&&this.useBrackets){var s=n[n.length-1]||"";return this.dot(e[i],t,n.slice(0,-1).concat(s+o))}else return this.dot(e[i],t,n.concat(o));else r&&this.useBrackets?t[n.join(this.separator).concat("["+i+"]")]=e[i]:t[n.concat(o).join(this.separator)]=e[i]}).bind(this)),t};G.pick=bt("pick");G.move=bt("move");G.transfer=bt("transfer");G.transform=bt("transform");G.copy=bt("copy");G.object=bt("object");G.str=bt("str");G.set=bt("set");G.delete=bt("delete");G.del=G.remove=bt("remove");G.dot=bt("dot");["override","overwrite"].forEach(function(e){Object.defineProperty(G,e,{get:function(){return Ir.override},set:function(t){Ir.override=!!t}})});["useArray","keepArray","useBrackets"].forEach(function(e){Object.defineProperty(G,e,{get:function(){return Ir[e]},set:function(t){Ir[e]=t}})});G._process=Yn;var iN=G;const zv={"message-input-label":"Benutzereingabe","message-input-placeholder":"Nachricht","message-input.actions.submit.label":"Nachricht senden","message-input.actions.export-transcript.label":"Konversation per E-Mail erhalten","message-input.actions.start-audio-recording.label":"Spracheingabe starten","message-input.actions.stop-audio-recording.label":"Spracheingabe stoppen","message-input.actions.submit-audio-recording.label":"Spracheingabe übermitteln","guest-bubble.label":"Ihre Nachricht","bot-bubble.label":"Nachricht des Chatbots","agent-bubble.label":"Nachricht des Live-Agenten","export-transcript.email.title":"Konversation per E-Mail versenden","export-transcript.email.description":"Geben Sie Ihre E-Mail-Adresse ein, um den Chatverlauf zu erhalten.","export-transcript.email.cancel":"Abbrechen","export-transcript.email.send":"Senden","export-transcript.email.placeholder":"Ihre E-Mail-Adresse","export-transcript.email.invalid":"Bitte gültige E-Mail-Adresse eingeben.","export-transcript.email.success":"Ich habe den Chatverlauf an Ihre E-Mail-Adresse gesendet.","export-transcript.pdf.title":"Konversation als PDF erhalten","export-transcript.pdf.description":"Laden Sie die Konversation als PDF herunter.","export-transcript.pdf.cancel":"Abbrechen","export-transcript.pdf.download":"Herunterladen","general-conditions.header":"**Nutzungsbedingungen**","general-conditions.body":`Bitte berücksichtigen Sie die folgenden Punkte:
|
|
98
|
+
`).map((i,o)=>_.jsxs("span",{className:z2.text,children:[_.jsx(L2,{componentDecorator:r,children:i}),_.jsx("br",{})]},o))})},U2=({subtitle:e,onLinkClick:t})=>e?_.jsx("div",{className:Me.subtitle,children:_.jsx(yv,{text:e,onLinkClick:t})}):null,Ih="newtab#",vv=({markdown:e,onLinkClick:t})=>{const n=i=>o=>(o.preventDefault(),i&&t(i),!1),r=({title:i,href:o,children:s})=>o.indexOf(Ih)===0?_.jsx("a",{href:o.slice(Ih.length),title:i,target:"_blank",rel:"noopener noreferrer",children:s}):_.jsx("a",{onClick:n(o),title:i,children:s});return _.jsx(vn,{options:{overrides:{a:r}},children:e})},$2=({text:e,onLinkClick:t})=>e?_.jsx("div",{children:_.jsx(vv,{markdown:e,onLinkClick:t})}):null,H2=({title:e})=>e?_.jsx("h1",{className:Me.title,children:e}):null,G2=({title:e,text:t,subtitle:n,buttons:r,onButtonClick:i,onLinkClick:o})=>(e==null?void 0:e.length)||(t==null?void 0:t.length)||(n==null?void 0:n.length)||(r==null?void 0:r.length)?_.jsxs("div",{className:R(B.bubbleContent),children:[_.jsx(H2,{title:e}),_.jsx($2,{text:t,onLinkClick:o}),_.jsx(U2,{subtitle:n,onLinkClick:o}),_.jsx(QT,{buttons:r,onButtonClick:i})]}):null,V2=({alt:e,imageUrl:t,itemUrl:n,hasBody:r})=>t?n?n.indexOf("youtube.com")>-1?_.jsx("div",{className:Me.video_container,children:_.jsx("iframe",{className:R(Me.video,{[Me.only]:!r}),title:"Youtube",width:"100%",src:n+"?rel=0",frameBorder:"0",allowFullScreen:!0})}):_.jsx("a",{href:n,target:"_blank",rel:"noopener noreferrer",children:_.jsx("div",{className:Me.imageContainer,children:_.jsx("img",{className:R(Me.image,{[Me.only]:!r}),src:t,alt:e})})}):_.jsx("div",{className:Me.imageContainer,children:_.jsx("img",{className:R(Me.image,{[Me.only]:!r}),src:t,alt:e})}):null,W2=({title:e,text:t,subtitle:n,imageUrl:r,itemUrl:i,buttons:o,onButtonClick:s,onLinkClick:a})=>{const l=!!(e!=null&&e.length)||!!(t!=null&&t.length)||!!(n!=null&&n.length)||!!(o!=null&&o.length);return _.jsxs("div",{className:R(Me.detailMessage),children:[_.jsx(V2,{hasBody:l,imageUrl:r,itemUrl:i,alt:e||n}),l&&_.jsx(G2,{title:e,text:t,subtitle:n,buttons:o,onLinkClick:a,onButtonClick:s})]})},q2=N.forwardRef(({isFirstMessageBySender:e,isLastMessageBySender:t,children:n},r)=>{const i=wt();return _.jsx("li",{ref:r,className:R(B.message,B.messageGuest,e&&B.messageGuestFirst,t&&B.messageGuestLast,"chat__bubbleContainer","chat__guestBubbleContainer",e&&"chat__bubbleContainer--first",t&&"chat__bubbleContainer--last"),children:_.jsx("div",{className:R(B.bubble,B.bubbleRight,"chat__bubble","chat__guestBubble"),tabIndex:0,"aria-label":i("guest-bubble.label"),children:_.jsx("div",{className:R(B.rightText),children:n})})})}),X2=({markdown:e,className:t,onLinkClick:n})=>_.jsx("div",{className:R(B.bubbleContent,t),children:_.jsx(vv,{markdown:e,onLinkClick:n})}),Q2=({text:e,onLinkClick:t})=>_.jsx("div",{className:B.bubbleContent,children:_.jsx(yv,{text:e,onLinkClick:t})}),K2=N.forwardRef(({message:e,problemReportingEnabled:t,isFirstMessageBySender:n,isLastMessageBySender:r,onProblemReport:i,onButtonClick:o,onLinkClick:s},a)=>{const l=Y2(e,o,s);switch(e.sender.type){case U.UserType.GUEST:return _.jsx(q2,{ref:a,isFirstMessageBySender:n,isLastMessageBySender:r,children:l});default:const u=c=>i(e._id,c);return _.jsx(fv,{ref:a,message:e,problemReportingEnabled:t,isAnimated:!1,isFirstMessageBySender:n,isLastMessageBySender:r,onProblemReport:u,children:l})}}),Y2=(e,t,n)=>{switch(e.type){case U.MessageTypeEnum.TEXT:const r=e;return _.jsx(Q2,{text:r.text,onLinkClick:n});case U.MessageTypeEnum.DETAIL:const i=e;return _.jsx(W2,{title:i.title,text:i.text,subtitle:i.subtitle,imageUrl:i.imageUrl,itemUrl:i.itemUrl,buttons:i.buttons,onButtonClick:t,onLinkClick:n});case U.MessageTypeEnum.MARKDOWN:const o=e;return _.jsx(X2,{markdown:o.markdown,className:o.className,onLinkClick:n})}},Z2=(e,t)=>e.message._id===t.message._id&&e.message.problemReport===t.message.problemReport&&e.problemReportingEnabled===t.problemReportingEnabled&&e.isFirstMessageBySender===t.isFirstMessageBySender&&e.isLastMessageBySender===t.isLastMessageBySender,J2=vt.memo(K2,Z2),eC="_ticontainer_wftg7_1",tC="_tiblock_wftg7_5",nC="_tidot_wftg7_12",rC="_mercuryTypingAnimation_wftg7_1",Yr={ticontainer:eC,tiblock:tC,tidot:nC,mercuryTypingAnimation:rC},iC=({isTyping:e=!1})=>_.jsx("div",{className:Yr.ticontainer,children:_.jsx("div",{className:Yr.tiblock,children:e?_.jsxs(_.Fragment,{children:[_.jsx("div",{className:R(Yr.tidot,"chat__typingIndicator")}),_.jsx("div",{className:R(Yr.tidot,"chat__typingIndicator")}),_.jsx("div",{className:R(Yr.tidot,"chat__typingIndicator")})]}):null})}),oC=Object.assign({_id:"typing-indicator"},new U.TextMessage("",new U.BotUser)),sC=({messages:e,isBotTyping:t,showGeneralConditions:n,problemReportingEnabled:r,onProblemReport:i,onButtonClick:o,onLinkClick:s})=>{const a=N.useRef(!0),l=N.useRef(null),u=N.useRef(null),c=N.useRef(null);N.useLayoutEffect(()=>{if(e.length&&l.current){if(u.current){const f=u.current.offsetTop;l.current.scrollTop=f}else if(c.current){const f=c.current.offsetTop;l.current.scrollTop=f}a.current&&(a.current=!1)}},[e,u.current,c.current,a]);let g;const y=e.length;return _.jsxs("div",{ref:l,className:R(dh.messageContainer,"chat__messageContainer"),style:{scrollBehavior:e.length&&a.current?"auto":"smooth"},id:"MessageContainer",role:"log","aria-live":"polite",children:[n&&_.jsx(gT,{}),_.jsxs("ul",{className:dh.messages,children:[e.map((f,v)=>{const p=aC(f,g),S=lC(f,v,e,t);g=f.sender.type;const h=v+1===y;return _.jsx(J2,{ref:h?c:null,message:f,problemReportingEnabled:r,isFirstMessageBySender:p,isLastMessageBySender:S,onButtonClick:o,onLinkClick:s,onProblemReport:i},h&&!t?"last":f._id)}),t&&_.jsx(fv,{ref:u,message:oC,problemReportingEnabled:!1,isAnimated:!0,isFirstMessageBySender:g!==U.UserType.BOT,isLastMessageBySender:!0,children:_.jsx(iC,{isTyping:!0})},"last")]})]})},aC=(e,t)=>!t||t!==e.sender.type,lC=(e,t,n,r)=>{var a;const i=e.sender.type,o=n.length;return t+1===o?!(i===U.UserType.BOT&&r):i!==((a=n.at(t+1))==null?void 0:a.sender.type)},uC="_container_t5oqt_1",cC={container:uC},fC=({title:e,href:t,children:n})=>_.jsx("a",{href:t,title:e,target:"_blank",rel:"noopener noreferrer",children:n}),dC=()=>{const t=wt()("powered-by");return t&&t.length?_.jsx("div",{className:R(cC.container,"chat__poweredBy"),children:_.jsx(vn,{options:{overrides:{a:fC}},children:t})}):null},hC="_container_fgqz2_1",pC="_containerOpen_fgqz2_48",mC="_containerClose_fgqz2_52",gC="_formContainer_fgqz2_56",yC="_emailInput_fgqz2_61",vC="_description_fgqz2_90",_C="_actions_fgqz2_95",EC="_validationError_fgqz2_105",SC="_submitted_fgqz2_112",dt={container:hC,containerOpen:pC,"slide-in":"_slide-in_fgqz2_1",containerClose:mC,"slide-out":"_slide-out_fgqz2_1",formContainer:gC,emailInput:yC,description:vC,actions:_C,validationError:EC,submitted:SC},wC=({visible:e,methods:t,onEmailExport:n,onPdfExport:r,onClose:i})=>{const o=wt(),[s,a]=N.useState(void 0),[l,u]=N.useState(!1),[c,g]=N.useState(!1),[y,f]=N.useState(void 0),v=N.useRef(null);N.useEffect(()=>{var d;e?((d=v.current)==null||d.focus(),u(!1),g(!1),a(e)):s===!0&&a(!1)},[e,s]);const p=d=>{d.preventDefault(),y&&y.length>0&&(n(y),u(!0),setTimeout(i,3*1e3))},S=d=>{const m=d.target.value.trim(),E=/^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/.test(m);f(E?m:"")},h=()=>{g(!0),r(),setTimeout(i,3*1e3)};return _.jsxs("div",{className:R(dt.container,{[dt.containerOpen]:s===!0,[dt.containerClose]:s===!1}),children:[t.pdf&&_.jsxs(_.Fragment,{children:[_.jsx("h2",{children:o("export-transcript.pdf.title")}),_.jsx(vn,{className:dt.description,children:o("export-transcript.pdf.description")||""}),_.jsxs("div",{className:dt.actions,children:[_.jsx("button",{type:"button",className:R(we.button,we.buttonDefault),onClick:i,children:o("export-transcript.pdf.cancel")}),_.jsx("button",{className:R(we.button,we.buttonPrimary),onClick:h,disabled:c,children:o("export-transcript.pdf.download")})]})]}),t.email&&_.jsxs(_.Fragment,{children:[_.jsx("h2",{children:o("export-transcript.email.title")}),_.jsx(vn,{className:dt.description,children:o("export-transcript.email.description")||""}),_.jsxs("form",{onSubmit:p,className:dt.formContainer,children:[_.jsxs("div",{children:[_.jsx("input",{disabled:l,ref:v,type:"email",placeholder:o("export-transcript.email.placeholder"),className:dt.emailInput,onChange:S}),(y==null?void 0:y.length)===0?_.jsx("div",{className:dt.validationError,children:o("export-transcript.email.invalid")}):null]}),_.jsxs("div",{className:dt.actions,children:[_.jsx("button",{type:"button",className:R(we.button,we.buttonDefault),onClick:i,children:o("export-transcript.email.cancel")}),_.jsx("button",{type:"submit",disabled:l||y===void 0||y.length===0,className:R(we.button,we.buttonPrimary),children:o("export-transcript.email.send")})]})]}),l&&_.jsx("div",{className:dt.submitted,children:o("export-transcript.email.success")})]})]})},bC="_inputContainer_1px77_1",xC={inputContainer:bC},TC="_blockUserInput_rv0dg_1",CC={blockUserInput:TC,"append-animate":"_append-animate_rv0dg_1"},kC=({visible:e})=>{const t=wt();return e?_.jsx("div",{className:R(CC.blockUserInput,"chat__blockUserInput"),children:t("block-user-input.title")}):null},OC="_callToActionContainer_1t611_1",RC="_callToActionTitle_1t611_24",NC="_rateOverlay_1t611_31",AC="_body_1t611_61",PC="_rateOverlayOpen_1t611_92",IC="_rateOverlayClose_1t611_96",DC="_footer_1t611_100",MC="_actions_1t611_115",FC="_bubbles_1t611_127",BC="_rateFeedbackBotBubble_1t611_154",LC="_rateFeedbackGuestBubble_1t611_160",jC="_avatar_1t611_166",zC="_fadeInLeft_1t611_1",UC="_bubble_1t611_127",$C="_appear_1t611_1",HC="_botBubble_1t611_192",GC="_guestBubble_1t611_202",VC="_rateText_1t611_218",WC="_stars_1t611_223",qC="_starsSmall_1t611_236",XC="_starsLarge_1t611_240",QC="_star_1t611_223",KC="_starReadonly_1t611_257",YC="_starIcon_1t611_265",ZC="_starsDescriptionContainer_1t611_283",JC="_starsDescription_1t611_283",Se={callToActionContainer:OC,"append-animate":"_append-animate_1t611_1",callToActionTitle:RC,rateOverlay:NC,body:AC,rateOverlayOpen:PC,"slide-in":"_slide-in_1t611_1",rateOverlayClose:IC,"slide-out":"_slide-out_1t611_1",footer:DC,actions:MC,bubbles:FC,rateFeedbackBotBubble:BC,rateFeedbackGuestBubble:LC,avatar:jC,fadeInLeft:zC,bubble:UC,appear:$C,botBubble:HC,guestBubble:GC,rateText:VC,stars:WC,starsSmall:qC,starsLarge:XC,star:QC,starReadonly:KC,starIcon:YC,starsDescriptionContainer:ZC,starsDescription:JC},ek=({value:e,index:t,count:n,readonly:r,onHover:i,onClick:o})=>{const s=a=>{o&&a.key==="Enter"&&o()};return _.jsx("li",{className:R(Se.star,{[Se.starReadonly]:r},"chat__conversationRating__star"),children:_.jsx("div",{role:"radio","aria-checked":e>t?"true":"false","aria-posinset":t+1,"aria-setsize":n,tabIndex:0,onMouseOver:i,onKeyDown:s,onClick:o,children:_.jsx("span",{role:"img","aria-label":"Star",className:R(Se.starIcon),children:_.jsx("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"star",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:_.jsx("path",{d:"M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3z"})})})})})},Dh=5,_v=({value:e,size:t,readonly:n=!1,onChange:r})=>{const[i,o]=N.useState(void 0),s=()=>{o(void 0)},a=u=>()=>{if(!n){const c=u+1;o(c)}},l=u=>()=>{r&&!n&&(r(u===0&&e===1?0:u+1),o(void 0))};return _.jsx("ul",{tabIndex:0,role:"radiogroup",className:R(Se.stars,{[Se.starsSmall]:t==="small",[Se.starsLarge]:t==="large"},"chat__conversationRating__stars",{chat__conversationRating__stars__small:t==="small",chat__conversationRating__stars__large:t==="large"}),onMouseOut:s,children:Array(Dh).fill(0).map((u,c)=>_.jsx(ek,{value:i===void 0?e:i,index:c,count:Dh,readonly:n,onHover:a(c),onClick:l(c)},c))})},tk=({visible:e,onRate:t})=>{const n=wt();return e?_.jsxs("div",{className:R(Se.callToActionContainer,"chat__conversationRating__callToAction"),children:[_.jsx("div",{className:R(Se.callToActionTitle,"chat__conversationRating__callToAction__title"),children:n("conversation-rating.call-to-action.title")}),_.jsx(_v,{value:0,size:"small",onChange:t})]}):null},Mh=({isFirstMessageBySender:e,isLastMessageBySender:t,children:n})=>_.jsxs("div",{className:R(B.message,B.messageBot,e&&B.messageBotFirst,t&&B.messageBotLast,"chat__bubbleContainer","chat__botBubbleContainer",e&&"chat__bubbleContainer--first",t&&"chat__bubbleContainer--last"),children:[_.jsx("img",{className:R(B.avatar,B.botAvatar),src:"bot.svg",alt:"Bot"}),_.jsx("div",{className:R(B.bubble,B.bubbleLeft,"chat__bubble","chat__botBubble"),children:_.jsx("div",{className:R(B.leftText,B.bubbleContent),children:n})})]}),nk=({children:e})=>_.jsx("div",{className:R(B.message,B.messageGuest,B.messageGuestFirst,B.messageGuestLast,"chat__bubbleContainer","chat__guestBubbleContainer","chat__bubbleContainer--first","chat__bubbleContainer--last"),children:_.jsx("div",{className:R(B.bubble,B.bubbleRight,"chat__bubble","chat__guestBubble"),children:_.jsx("div",{className:R(B.rightText,B.bubbleContent),children:e})})}),rk=({visible:e,rating:t,onRate:n,onClose:r})=>{const i=wt(),[o,s]=N.useState(t),[a,l]=N.useState(void 0),[u,c]=N.useState(void 0),[g,y]=N.useState({submitted:!1,feedback:""}),[f,v]=N.useState(!1),p=N.useRef(null);N.useEffect(()=>{e?(y({submitted:!1,feedback:""}),c(e)):u===!0&&c(!1)},[e,u]),N.useEffect(()=>{s(t)},[t]),N.useEffect(()=>{const h=i(`conversation-rating.overlay.bot-message.rate-feedback.value-${o}`);l(h!=null&&h.length?h:void 0)},[o,i]),N.useEffect(()=>{g.submitted?setTimeout(()=>v(!0),g.feedback.length?500:0):v(!1)},[g]);const S=h=>{var m,E;h.preventDefault();const d=((E=(m=p.current)==null?void 0:m.value)==null?void 0:E.trim())||"";n(o,d),y({submitted:!0,feedback:d})};return _.jsx("div",{className:R(Se.rateOverlay,"chat__conversationRating__overlay",{[Se.rateOverlayOpen]:u===!0,[Se.rateOverlayClose]:u===!1}),children:_.jsxs("form",{onSubmit:S,children:[_.jsxs("div",{className:R(Se.body,"chat__conversationRating__overlay__body"),children:[_.jsxs("div",{children:[_.jsx("h2",{children:i("conversation-rating.overlay.title")}),_.jsxs("div",{className:R(Se.starsDescriptionContainer),children:[_.jsx(_v,{value:o,size:"large",readonly:g.submitted,onChange:s}),_.jsxs("div",{className:R(Se.starsDescription),children:[_.jsx("div",{children:i("conversation-rating.overlay.star.very-bad")}),_.jsx("div",{children:i("conversation-rating.overlay.star.very-good")})]})]})]}),_.jsx("div",{className:R(Se.bubbles),children:e&&a&&_.jsxs(_.Fragment,{children:[_.jsx(Mh,{isFirstMessageBySender:!0,isLastMessageBySender:!f||!!g.feedback.length,children:_.jsx("div",{children:a})}),!!g.feedback.length&&_.jsx(nk,{children:g.feedback}),f&&_.jsx(Mh,{isFirstMessageBySender:!!g.feedback.length,isLastMessageBySender:!0,children:_.jsx("div",{children:i("conversation-rating.overlay.bot-message.submit-feedback")})})]})})]}),_.jsxs("div",{className:R(Se.footer,"chat__conversationRating__overlay__footer"),children:[!g.submitted&&_.jsx("input",{ref:p,placeholder:i("conversation-rating.overlay.guest-feedback.input-placeholder")}),_.jsx("div",{className:R(Se.actions,"chat__conversationRating__overlay__footer__actions"),children:g.submitted?_.jsx("button",{type:"button",className:R(we.button,we.buttonPrimary),onClick:r,children:i("conversation-rating.overlay.action.close")}):_.jsx("button",{type:"submit",className:R(we.button,we.buttonPrimary),children:i("conversation-rating.overlay.action.submit")})})]})]})})},ik=({conversationRating:{enabled:e,rating:t},numberOfMessagesFromGuest:n,showRatingOverlay:r,setShowRatingOverlay:i,onRate:o})=>{const[s,a]=N.useState(0),l=g=>{a(g),i(!0)},u=()=>i(!1),c=!t&&n>=1;return e?_.jsxs(_.Fragment,{children:[_.jsx(tk,{visible:c,onRate:l}),_.jsx(rk,{visible:r,rating:s,onRate:o,onClose:u})]}):null},ok="_inputWrapper_lbrof_5",sk="_messageInputWrapper_lbrof_14",ak="_messageInput_lbrof_14",lk="_buttons_lbrof_36",uk="_button_lbrof_36",tr={inputWrapper:ok,messageInputWrapper:sk,messageInput:ak,buttons:lk,button:uk},ck="_audioRecorder_12g22_5",fk="_recordButton_12g22_10",dk="_submitButton_12g22_37",hk="_cancelButton_12g22_64",pk="_recorderIcon_12g22_91",mk="_pulse_12g22_1",gk="_spinning_12g22_113",yk="_spin_12g22_113",An={audioRecorder:ck,recordButton:fk,submitButton:dk,cancelButton:hk,recorderIcon:pk,pulse:mk,spinning:gk,spin:yk},Fh=2048,ys=16e3;class vk extends vt.Component{constructor(n){super(n);V(this,"audioInput",null);V(this,"volume",null);V(this,"leftchannel",[]);V(this,"recorder",null);V(this,"recordingLength",0);V(this,"sampleRate",null);V(this,"mediaStream",null);this.state={recordingState:"none"},this.triggerAudioRecording=this.triggerAudioRecording.bind(this),this.triggerAudioRecordingSuccess=this.triggerAudioRecordingSuccess.bind(this),this.initRecording=this.initRecording.bind(this),this.processRecordingInput=this.processRecordingInput.bind(this),this.handleClickSubmitAudio=this.handleClickSubmitAudio.bind(this),this.handleClickStopAudio=this.handleClickStopAudio.bind(this)}triggerAudioRecording(){this.setState({recordingState:"connecting"}),navigator.mediaDevices.getUserMedia({audio:!0,video:!1}).then(this.triggerAudioRecordingSuccess)}triggerAudioRecordingSuccess(n){this.mediaStream=n,this.leftchannel.length=0,this.recordingLength=0,this.initRecording(n)}initRecording(n){var r=window.AudioContext||window.webkitAudioContext,i=new r;this.sampleRate=i.sampleRate,this.volume=i.createGain(),this.audioInput=i.createMediaStreamSource(n),this.audioInput.connect(this.volume),this.recorder=i.createScriptProcessor(Fh,1,1),this.recorder.onaudioprocess=this.processRecordingInput,this.volume.connect(this.recorder),this.recorder.connect(i.destination)}processRecordingInput(n){if(this.state.recordingState==="connecting"&&this.setState({recordingState:"recording"}),this.state.recordingState!=="none"){const r=n.inputBuffer.getChannelData(0);this.leftchannel.push(new Float32Array(r)),this.recordingLength+=Fh}}handleClickSubmitAudio(){const n=Ek(this.leftchannel,this.recordingLength),r=Sk(n,this.sampleRate||0),i=_k(r);this.props.onAudioRecorded(i),this.handleClickStopAudio()}handleClickStopAudio(){var n,r,i,o;this.setState({recordingState:"none"}),(n=this.audioInput)==null||n.disconnect(),(r=this.volume)==null||r.disconnect(),(i=this.recorder)==null||i.disconnect(),this.mediaStream&&((o=this.mediaStream)==null||o.getAudioTracks().forEach(s=>{s.stop()}))}render(){return _.jsxs("div",{className:An.audioRecorder,children:[this.state.recordingState==="none"&&_.jsx("button",{className:R(An.recordButton,"chat__button"),type:"submit","aria-label":this.props.translate("message-input.actions.start-audio-recording.label"),tabIndex:0,onClick:this.triggerAudioRecording,children:_.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[_.jsx("path",{d:"M12 14c1.66 0 2.99-1.34 2.99-3L15 5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3zm5.3-3c0 3-2.54 5.1-5.3 5.1S6.7 14 6.7 11H5c0 3.41 2.72 6.23 6 6.72V21h2v-3.28c3.28-.48 6-3.3 6-6.72h-1.7z"}),_.jsx("path",{d:"M0 0h24v24H0z",fill:"none"})]})}),this.state.recordingState==="connecting"&&_.jsxs("svg",{className:An.spinning,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[_.jsx("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"}),_.jsx("path",{d:"M0 0h24v24H0z",fill:"none"})]}),this.state.recordingState==="recording"&&_.jsxs("div",{className:An.audioRecorder,children:[_.jsx("button",{className:R(An.cancelButton),onClick:this.handleClickStopAudio,"aria-label":this.props.translate("message-input.actions.stop-audio-recording.label"),tabIndex:0,children:_.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[_.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),_.jsx("path",{d:"M0 0h24v24H0z",fill:"none"})]})}),_.jsx("div",{className:An.recorderIcon}),_.jsx("button",{className:R(An.submitButton),type:"submit",onClick:this.handleClickSubmitAudio,"aria-label":this.props.translate("message-input.actions.submit-audio-recording.label"),tabIndex:0,autoFocus:!0,children:_.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[_.jsx("path",{d:"M0 0h24v24H0z",fill:"none"}),_.jsx("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})]})})]})]})}}const _k=e=>{const t=new ArrayBuffer(44+e.length*2),n=new DataView(t);mo(n,0,"RIFF"),n.setUint32(4,44+e.length*2,!0),mo(n,8,"WAVE"),mo(n,12,"fmt "),n.setUint32(16,16,!0),n.setUint16(20,1,!0),n.setUint16(22,1,!0),n.setUint32(24,ys,!0),n.setUint32(28,ys*4,!0),n.setUint16(32,4,!0),n.setUint16(34,16,!0),mo(n,36,"data"),n.setUint32(40,e.length*2,!0);const r=e.length;let i=44;const o=1;for(var s=0;s<r;s++)n.setInt16(i,e[s]*(32767*o),!0),i+=2;return new Blob([n],{type:"audio/wav"})},mo=(e,t,n)=>{for(var r=0;r<n.length;r++)e.setUint8(t+r,n.charCodeAt(r))},Ek=(e,t)=>{const n=new Float32Array(t);let r=0;const i=e.length;for(var o=0;o<i;o++){const s=e[o];n.set(s,r),r+=s.length}return n},Sk=(e,t)=>{if(ys===t)return e;const n=t/ys,r=Math.round(e.length/n),i=new Float32Array(r);let o=0,s=0;for(;o<i.length;){let l=Math.round((o+1)*n),u=0,c=0;for(var a=s;a<l&&a<e.length;a++)u+=e[a],c++;i[o]=u/c,o++,s=l}return i},wk=({speechSupport:e,transcriptExportEnabled:t,disabled:n,onTextInput:r,onAudioRecorded:i,onOpenTranscriptExportModal:o})=>{const s=wt(),[a,l]=N.useState(!1),u=N.useRef(null),c=()=>{const v=u.current;v&&v.value.trim().length>=1&&r(v.value.trim())&&(v.value="",v.style.height="",l(!1),v.focus())},g=v=>{v.preventDefault(),c()},y=v=>{const p=v.target.value.trim();l(p.length>0),v.target.style.height="";const{scrollHeight:S}=v.target;v.target.style.height=`${S>150?150:S}px`},f=v=>{v.code==="Enter"&&!v.shiftKey&&(v.repeat||c(),v.preventDefault())};return _.jsxs("form",{className:R(tr.inputWrapper,"chat__textInput"),onSubmit:g,children:[_.jsx("div",{className:tr.messageInputWrapper,children:_.jsx("textarea",{id:"user_input",ref:u,className:tr.messageInput,tabIndex:0,placeholder:s("message-input-placeholder"),onChange:y,onKeyDown:f,"aria-label":s("message-input-label")})}),_.jsxs("div",{className:R(tr.buttons,"chat__buttons"),children:[!a&&t&&_.jsx("button",{type:"button",className:R(tr.button,"chat__button"),"aria-label":s("message-input.actions.export-transcript.label"),tabIndex:0,onClick:o,children:_.jsx("svg",{viewBox:"64 64 896 896",focusable:"false",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:_.jsx("path",{d:"M456 231a56 56 0 10112 0 56 56 0 10-112 0zm0 280a56 56 0 10112 0 56 56 0 10-112 0zm0 280a56 56 0 10112 0 56 56 0 10-112 0z"})})}),a||!e||navigator.mediaDevices===void 0?_.jsx("button",{className:R(tr.button,"chat__button"),type:"submit","aria-label":s("message-input.actions.submit.label"),tabIndex:0,disabled:n,children:_.jsx("svg",{viewBox:"64 64 896 896",focusable:"false",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:_.jsx("path",{d:"M931.4 498.9L94.9 79.5c-3.4-1.7-7.3-2.1-11-1.2a15.99 15.99 0 00-11.7 19.3l86.2 352.2c1.3 5.3 5.2 9.6 10.4 11.3l147.7 50.7-147.6 50.7c-5.2 1.8-9.1 6-10.3 11.3L72.2 926.5c-.9 3.7-.5 7.6 1.2 10.9 3.9 7.9 13.5 11.1 21.5 7.2l836.5-417c3.1-1.5 5.6-4.1 7.2-7.1 3.9-8 .7-17.6-7.2-21.6zM170.8 826.3l50.3-205.6 295.2-101.3c2.3-.8 4.2-2.6 5-5 1.4-4.2-.8-8.7-5-10.2L221.1 403 171 198.2l628 314.9-628.2 313.2z"})})}):e&&navigator.mediaDevices!==void 0&&_.jsx(vk,{translate:s,onAudioRecorded:i})]})]})},bk="_quickReplies_11l22_1",xk="_quickReply_11l22_9",Bh={quickReplies:bk,quickReply:xk},Tk=({quickReplies:e,onQuickReplyClick:t})=>e.length?_.jsx("div",{className:R(Bh.quickReplies,"chat__quickReplies"),children:e.map(n=>_.jsx("button",{tabIndex:0,className:R(Bh.quickReply,we.button,"chat__button","chat__quickReply"),onClick:()=>t(n),children:n.label},n.label))}):null,Lh=5e3,Ck=1e3,kk=({isBotTyping:e,quickReplies:t,speechSupport:n,transcriptExportEnabled:r,conversationRating:i,numberOfMessagesFromGuest:o,showRatingOverlay:s,setShowRatingOverlay:a,onTextInput:l,onRate:u,onQuickReplyClick:c,onAudioRecorded:g,onOpenTranscriptExportModal:y})=>{const[f,v]=N.useState(!1),p=N.useRef(),S=N.useRef(0);N.useEffect(()=>{if(f&&!e){const d=p.current?Date.now()-p.current:0;d>Lh?v(!1):setTimeout(()=>{v(!1)},Lh-d)}},[f,e]),N.useEffect(()=>{f&&(p.current=Date.now())},[f]);const h=d=>{const m=Date.now()-S.current<Ck;return e||m?(v(!0),!1):(l(d),S.current=Date.now(),!0)};return _.jsxs("div",{className:R(xC.inputContainer),children:[_.jsx(Tk,{quickReplies:t,onQuickReplyClick:c}),_.jsx(kC,{visible:f}),!f&&_.jsx(ik,{conversationRating:i,numberOfMessagesFromGuest:o,onRate:u,showRatingOverlay:s,setShowRatingOverlay:a}),_.jsx(wk,{onTextInput:h,onAudioRecorded:g,speechSupport:n,onOpenTranscriptExportModal:y,transcriptExportEnabled:r,disabled:f})]})},Ok=({clientName:e,messages:t,quickReplies:n,isBotTyping:r,speechSupport:i,problemReportingEnabled:o,transcriptExportEnabled:s,conversationRating:a,showGeneralConditions:l,onMessageFromUser:u,onRate:c,onQuickReplyClick:g,onButtonClick:y,onLinkClick:f,onAudioRecorded:v,onTranscriptExport:p,onPdfExport:S,onProblemReport:h})=>{const d=Dc(),m=Ii(P=>P.connection.connectionState),[E,w]=N.useState(!1),[b,x]=N.useState(!1),T=s.email||s.pdf,M=t.filter(P=>P.sender.type===$y.GUEST).length;return N.useEffect(()=>{m===an.CONNECTED&&d(Uy(e,window.location.search,void 0))},[m,d]),_.jsxs("div",{children:[_.jsxs("div",{className:`${Qb.chatcontent} ${E||b?we.accessabilityHidden:""}`,children:[_.jsx(sC,{messages:t,isBotTyping:r,showGeneralConditions:l,problemReportingEnabled:o,onButtonClick:y,onLinkClick:f,onProblemReport:h}),_.jsx(kk,{isBotTyping:r,quickReplies:r?[]:n,numberOfMessagesFromGuest:M,speechSupport:i,transcriptExportEnabled:T,conversationRating:E?{enabled:!1}:a,showRatingOverlay:b,setShowRatingOverlay:x,onRate:c,onQuickReplyClick:g,onTextInput:u,onAudioRecorded:v,onOpenTranscriptExportModal:()=>w(!E)}),_.jsx(dC,{})]}),T&&_.jsx(wC,{methods:s,visible:E,onEmailExport:p,onPdfExport:S,onClose:()=>w(!1)})]})},Rk=e=>{const{messages:t,quickReplies:n,isBotTyping:r,speechSupport:i,problemReportingEnabled:o,transcriptExportEnabled:s,conversationRating:a,showGeneralConditions:l}=e.chat;return{messages:t,quickReplies:n,isBotTyping:r,speechSupport:i,problemReportingEnabled:o,transcriptExportEnabled:s,conversationRating:a,showGeneralConditions:l}},Nk=e=>({onRestartChat:(t,n)=>e(cf(t,n)),onMessageFromUser:t=>e(My(t)),onRate:(t,n)=>e(Nb(t,n)),onAudioRecorded:t=>e(Sb(t)),onActionFromUser:t=>e(t),onQuickReplyClick:t=>e(Dy(t)),onNluEvent:t=>e(Ly(t)),onButtonClick:t=>e(Pb(t)),onLinkClick:t=>e(Ib(t)),onTranscriptExport:t=>e(Cb(t)),onPdfExport:()=>e(Ob()),onProblemReport:(t,n)=>e(U.reportProblemFromGuest(t,n))}),Ak=BE(Rk,Nk)(Ok),Pk="_chatwindow_phukm_1",Ik="_chatcontent_phukm_13",Dk={chatwindow:Pk,chatcontent:Ik};function _e(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Mk=typeof Symbol=="function"&&Symbol.observable||"@@observable",jh=Mk,Ya=()=>Math.random().toString(36).substring(7).split("").join("."),Fk={INIT:`@@redux/INIT${Ya()}`,REPLACE:`@@redux/REPLACE${Ya()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Ya()}`},vs=Fk;function vf(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function Ev(e,t,n){if(typeof e!="function")throw new Error(_e(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(_e(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(_e(1));return n(Ev)(e,t)}let r=e,i=t,o=new Map,s=o,a=0,l=!1;function u(){s===o&&(s=new Map,o.forEach((S,h)=>{s.set(h,S)}))}function c(){if(l)throw new Error(_e(3));return i}function g(S){if(typeof S!="function")throw new Error(_e(4));if(l)throw new Error(_e(5));let h=!0;u();const d=a++;return s.set(d,S),function(){if(h){if(l)throw new Error(_e(6));h=!1,u(),s.delete(d),o=null}}}function y(S){if(!vf(S))throw new Error(_e(7));if(typeof S.type>"u")throw new Error(_e(8));if(typeof S.type!="string")throw new Error(_e(17));if(l)throw new Error(_e(9));try{l=!0,i=r(i,S)}finally{l=!1}return(o=s).forEach(d=>{d()}),S}function f(S){if(typeof S!="function")throw new Error(_e(10));r=S,y({type:vs.REPLACE})}function v(){const S=g;return{subscribe(h){if(typeof h!="object"||h===null)throw new Error(_e(11));function d(){const E=h;E.next&&E.next(c())}return d(),{unsubscribe:S(d)}},[jh](){return this}}}return y({type:vs.INIT}),{dispatch:y,subscribe:g,getState:c,replaceReducer:f,[jh]:v}}function Bk(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:vs.INIT})>"u")throw new Error(_e(12));if(typeof n(void 0,{type:vs.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(_e(13))})}function Sv(e){const t=Object.keys(e),n={};for(let o=0;o<t.length;o++){const s=t[o];typeof e[s]=="function"&&(n[s]=e[s])}const r=Object.keys(n);let i;try{Bk(n)}catch(o){i=o}return function(s={},a){if(i)throw i;let l=!1;const u={};for(let c=0;c<r.length;c++){const g=r[c],y=n[g],f=s[g],v=y(f,a);if(typeof v>"u")throw a&&a.type,new Error(_e(14));u[g]=v,l=l||v!==f}return l=l||r.length!==Object.keys(s).length,l?u:s}}function _s(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function Lk(...e){return t=>(n,r)=>{const i=t(n,r);let o=()=>{throw new Error(_e(15))};const s={getState:i.getState,dispatch:(l,...u)=>o(l,...u)},a=e.map(l=>l(s));return o=_s(...a)(i.dispatch),{...i,dispatch:o}}}function jk(e){return vf(e)&&"type"in e&&typeof e.type=="string"}var wv=Symbol.for("immer-nothing"),zh=Symbol.for("immer-draftable"),qe=Symbol.for("immer-state");function yt(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ar=Object.getPrototypeOf;function Sn(e){return!!e&&!!e[qe]}function Yt(e){var t;return e?bv(e)||Array.isArray(e)||!!e[zh]||!!((t=e.constructor)!=null&&t[zh])||ia(e)||oa(e):!1}var zk=Object.prototype.constructor.toString();function bv(e){if(!e||typeof e!="object")return!1;const t=Ar(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===zk}function Mi(e,t){ra(e)===0?Object.entries(e).forEach(([n,r])=>{t(n,r,e)}):e.forEach((n,r)=>t(r,n,e))}function ra(e){const t=e[qe];return t?t.type_:Array.isArray(e)?1:ia(e)?2:oa(e)?3:0}function gu(e,t){return ra(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function xv(e,t,n){const r=ra(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function Uk(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function ia(e){return e instanceof Map}function oa(e){return e instanceof Set}function Dn(e){return e.copy_||e.base_}function yu(e,t){if(ia(e))return new Map(e);if(oa(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&bv(e))return Ar(e)?{...e}:Object.assign(Object.create(null),e);const n=Object.getOwnPropertyDescriptors(e);delete n[qe];let r=Reflect.ownKeys(n);for(let i=0;i<r.length;i++){const o=r[i],s=n[o];s.writable===!1&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(n[o]={configurable:!0,writable:!0,enumerable:s.enumerable,value:e[o]})}return Object.create(Ar(e),n)}function _f(e,t=!1){return sa(e)||Sn(e)||!Yt(e)||(ra(e)>1&&(e.set=e.add=e.clear=e.delete=$k),Object.freeze(e),t&&Mi(e,(n,r)=>_f(r,!0))),e}function $k(){yt(2)}function sa(e){return Object.isFrozen(e)}var Hk={};function qn(e){const t=Hk[e];return t||yt(0,e),t}var Fi;function Tv(){return Fi}function Gk(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Uh(e,t){t&&(qn("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function vu(e){_u(e),e.drafts_.forEach(Vk),e.drafts_=null}function _u(e){e===Fi&&(Fi=e.parent_)}function $h(e){return Fi=Gk(Fi,e)}function Vk(e){const t=e[qe];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Hh(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[qe].modified_&&(vu(t),yt(4)),Yt(e)&&(e=Es(t,e),t.parent_||Ss(t,e)),t.patches_&&qn("Patches").generateReplacementPatches_(n[qe].base_,e,t.patches_,t.inversePatches_)):e=Es(t,n,[]),vu(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==wv?e:void 0}function Es(e,t,n){if(sa(t))return t;const r=t[qe];if(!r)return Mi(t,(i,o)=>Gh(e,r,t,i,o,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Ss(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const i=r.copy_;let o=i,s=!1;r.type_===3&&(o=new Set(i),i.clear(),s=!0),Mi(o,(a,l)=>Gh(e,r,i,a,l,n,s)),Ss(e,i,!1),n&&e.patches_&&qn("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function Gh(e,t,n,r,i,o,s){if(Sn(i)){const a=o&&t&&t.type_!==3&&!gu(t.assigned_,r)?o.concat(r):void 0,l=Es(e,i,a);if(xv(n,r,l),Sn(l))e.canAutoFreeze_=!1;else return}else s&&n.add(i);if(Yt(i)&&!sa(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Es(e,i),(!t||!t.scope_.parent_)&&Ss(e,i)}}function Ss(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&_f(t,n)}function Wk(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:Tv(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,o=Ef;n&&(i=[r],o=Bi);const{revoke:s,proxy:a}=Proxy.revocable(i,o);return r.draft_=a,r.revoke_=s,a}var Ef={get(e,t){if(t===qe)return e;const n=Dn(e);if(!gu(n,t))return qk(e,n,t);const r=n[t];return e.finalized_||!Yt(r)?r:r===Za(e.base_,t)?(Ja(e),e.copy_[t]=Su(r,e)):r},has(e,t){return t in Dn(e)},ownKeys(e){return Reflect.ownKeys(Dn(e))},set(e,t,n){const r=Cv(Dn(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=Za(Dn(e),t),o=i==null?void 0:i[qe];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(Uk(n,i)&&(n!==void 0||gu(e.base_,t)))return!0;Ja(e),Eu(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return Za(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Ja(e),Eu(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Dn(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){yt(11)},getPrototypeOf(e){return Ar(e.base_)},setPrototypeOf(){yt(12)}},Bi={};Mi(Ef,(e,t)=>{Bi[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Bi.deleteProperty=function(e,t){return Bi.set.call(this,e,t,void 0)};Bi.set=function(e,t,n){return Ef.set.call(this,e[0],t,n,e[0])};function Za(e,t){const n=e[qe];return(n?Dn(n):e)[t]}function qk(e,t,n){var i;const r=Cv(t,n);return r?"value"in r?r.value:(i=r.get)==null?void 0:i.call(e.draft_):void 0}function Cv(e,t){if(!(t in e))return;let n=Ar(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Ar(n)}}function Eu(e){e.modified_||(e.modified_=!0,e.parent_&&Eu(e.parent_))}function Ja(e){e.copy_||(e.copy_=yu(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Xk=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const o=n;n=t;const s=this;return function(l=o,...u){return s.produce(l,c=>n.call(this,c,...u))}}typeof n!="function"&&yt(6),r!==void 0&&typeof r!="function"&&yt(7);let i;if(Yt(t)){const o=$h(this),s=Su(t,void 0);let a=!0;try{i=n(s),a=!1}finally{a?vu(o):_u(o)}return Uh(o,r),Hh(i,o)}else if(!t||typeof t!="object"){if(i=n(t),i===void 0&&(i=t),i===wv&&(i=void 0),this.autoFreeze_&&_f(i,!0),r){const o=[],s=[];qn("Patches").generateReplacementPatches_(t,i,o,s),r(o,s)}return i}else yt(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(s,...a)=>this.produceWithPatches(s,l=>t(l,...a));let r,i;return[this.produce(t,n,(s,a)=>{r=s,i=a}),r,i]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Yt(e)||yt(8),Sn(e)&&(e=kv(e));const t=$h(this),n=Su(e,void 0);return n[qe].isManual_=!0,_u(t),n}finishDraft(e,t){const n=e&&e[qe];(!n||!n.isManual_)&&yt(9);const{scope_:r}=n;return Uh(r,t),Hh(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const i=t[n];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}n>-1&&(t=t.slice(n+1));const r=qn("Patches").applyPatches_;return Sn(e)?r(e,t):this.produce(e,i=>r(i,t))}};function Su(e,t){const n=ia(e)?qn("MapSet").proxyMap_(e,t):oa(e)?qn("MapSet").proxySet_(e,t):Wk(e,t);return(t?t.scope_:Tv()).drafts_.push(n),n}function kv(e){return Sn(e)||yt(10,e),Ov(e)}function Ov(e){if(!Yt(e)||sa(e))return e;const t=e[qe];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=yu(e,t.scope_.immer_.useStrictShallowCopy_)}else n=yu(e,!0);return Mi(n,(r,i)=>{xv(n,r,Ov(i))}),t&&(t.finalized_=!1),n}var Xe=new Xk,Rv=Xe.produce;Xe.produceWithPatches.bind(Xe);Xe.setAutoFreeze.bind(Xe);Xe.setUseStrictShallowCopy.bind(Xe);Xe.applyPatches.bind(Xe);Xe.createDraft.bind(Xe);Xe.finishDraft.bind(Xe);function Qk(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function Kk(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function Yk(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var Vh=e=>Array.isArray(e)?e:[e];function Zk(e){const t=Array.isArray(e[0])?e[0]:e;return Yk(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Jk(e,t){const n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}var eO=class{constructor(e){this.value=e}deref(){return this.value}},tO=typeof WeakRef<"u"?WeakRef:eO,nO=0,Wh=1;function go(){return{s:nO,v:void 0,o:null,p:null}}function Sf(e,t={}){let n=go();const{resultEqualityCheck:r}=t;let i,o=0;function s(){var g;let a=n;const{length:l}=arguments;for(let y=0,f=l;y<f;y++){const v=arguments[y];if(typeof v=="function"||typeof v=="object"&&v!==null){let p=a.o;p===null&&(a.o=p=new WeakMap);const S=p.get(v);S===void 0?(a=go(),p.set(v,a)):a=S}else{let p=a.p;p===null&&(a.p=p=new Map);const S=p.get(v);S===void 0?(a=go(),p.set(v,a)):a=S}}const u=a;let c;if(a.s===Wh)c=a.v;else if(c=e.apply(null,arguments),o++,r){const y=((g=i==null?void 0:i.deref)==null?void 0:g.call(i))??i;y!=null&&r(y,c)&&(c=y,o!==0&&o--),i=typeof c=="object"&&c!==null||typeof c=="function"?new tO(c):c}return u.s=Wh,u.v=c,c}return s.clearCache=()=>{n=go(),s.resetResultsCount()},s.resultsCount=()=>o,s.resetResultsCount=()=>{o=0},s}function Nv(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...i)=>{let o=0,s=0,a,l={},u=i.pop();typeof u=="object"&&(l=u,u=i.pop()),Qk(u,`createSelector expects an output function after the inputs, but received: [${typeof u}]`);const c={...n,...l},{memoize:g,memoizeOptions:y=[],argsMemoize:f=Sf,argsMemoizeOptions:v=[],devModeChecks:p={}}=c,S=Vh(y),h=Vh(v),d=Zk(i),m=g(function(){return o++,u.apply(null,arguments)},...S),E=f(function(){s++;const b=Jk(d,arguments);return a=m.apply(null,b),a},...h);return Object.assign(E,{resultFunc:u,memoizedResultFunc:m,dependencies:d,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>a,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:g,argsMemoize:f})};return Object.assign(r,{withTypes:()=>r}),r}var rO=Nv(Sf),iO=Object.assign((e,t=rO)=>{Kk(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(o=>e[o]);return t(r,(...o)=>o.reduce((s,a,l)=>(s[n[l]]=a,s),{}))},{withTypes:()=>iO});function Av(e){return({dispatch:n,getState:r})=>i=>o=>typeof o=="function"?o(n,r,e):i(o)}var oO=Av(),sO=Av,aO=(...e)=>{const t=Nv(...e),n=Object.assign((...r)=>{const i=t(...r),o=(s,...a)=>i(Sn(s)?kv(s):s,...a);return Object.assign(o,i),o},{withTypes:()=>n});return n};aO(Sf);var lO=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?_s:_s.apply(null,arguments)};function Pr(e,t){function n(...r){if(t){let i=t(...r);if(!i)throw new Error($e(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>jk(r)&&r.type===e,n}var Pv=class ii extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,ii.prototype)}static get[Symbol.species](){return ii}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new ii(...t[0].concat(this)):new ii(...t.concat(this))}};function qh(e){return Yt(e)?Rv(e,()=>{}):e}function Xh(e,t,n){if(e.has(t)){let i=e.get(t);return n.update&&(i=n.update(i,t,e),e.set(t,i)),i}if(!n.insert)throw new Error($e(10));const r=n.insert(t,e);return e.set(t,r),r}function uO(e){return typeof e=="boolean"}var cO=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=t??{};let s=new Pv;return n&&(uO(n)?s.push(oO):s.push(sO(n.extraArgument))),s},fO="RTK_autoBatch",Iv=e=>t=>{setTimeout(t,e)},dO=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Iv(10),hO=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let i=!0,o=!1,s=!1;const a=new Set,l=e.type==="tick"?queueMicrotask:e.type==="raf"?dO:e.type==="callback"?e.queueNotification:Iv(e.timeout),u=()=>{s=!1,o&&(o=!1,a.forEach(c=>c()))};return Object.assign({},r,{subscribe(c){const g=()=>i&&c(),y=r.subscribe(g);return a.add(c),()=>{y(),a.delete(c)}},dispatch(c){var g;try{return i=!((g=c==null?void 0:c.meta)!=null&&g[fO]),o=!i,o&&(s||(s=!0,l(u))),r.dispatch(c)}finally{i=!0}}})},pO=e=>function(n){const{autoBatch:r=!0}=n??{};let i=new Pv(e);return r&&i.push(hO(typeof r=="object"?r:void 0)),i},mO=!0;function gO(e){const t=cO(),{reducer:n=void 0,middleware:r,devTools:i=!0,preloadedState:o=void 0,enhancers:s=void 0}=e||{};let a;if(typeof n=="function")a=n;else if(vf(n))a=Sv(n);else throw new Error($e(1));let l;typeof r=="function"?l=r(t):l=t();let u=_s;i&&(u=lO({trace:!mO,...typeof i=="object"&&i}));const c=Lk(...l),g=pO(c);let y=typeof s=="function"?s(g):g();const f=u(...y);return Ev(a,o,f)}function Dv(e){const t={},n=[];let r;const i={addCase(o,s){const a=typeof o=="string"?o:o.type;if(!a)throw new Error($e(28));if(a in t)throw new Error($e(29));return t[a]=s,i},addMatcher(o,s){return n.push({matcher:o,reducer:s}),i},addDefaultCase(o){return r=o,i}};return e(i),[t,n,r]}function yO(e){return typeof e=="function"}function vO(e,t){let[n,r,i]=Dv(t),o;if(yO(e))o=()=>qh(e());else{const a=qh(e);o=()=>a}function s(a=o(),l){let u=[n[l.type],...r.filter(({matcher:c})=>c(l)).map(({reducer:c})=>c)];return u.filter(c=>!!c).length===0&&(u=[i]),u.reduce((c,g)=>{if(g)if(Sn(c)){const f=g(c,l);return f===void 0?c:f}else{if(Yt(c))return Rv(c,y=>g(y,l));{const y=g(c,l);if(y===void 0){if(c===null)return c;throw new Error($e(9))}return y}}return c},a)}return s.getInitialState=o,s}var _O="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",EO=(e=21)=>{let t="",n=e;for(;n--;)t+=_O[Math.random()*64|0];return t},SO=Symbol.for("rtk-slice-createasyncthunk");function wO(e,t){return`${e}/${t}`}function bO({creators:e}={}){var n;const t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[SO];return function(i){const{name:o,reducerPath:s=o}=i;if(!o)throw new Error($e(11));typeof process<"u";const a=(typeof i.reducers=="function"?i.reducers(TO()):i.reducers)||{},l=Object.keys(a),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},c={addCase(m,E){const w=typeof m=="string"?m:m.type;if(!w)throw new Error($e(12));if(w in u.sliceCaseReducersByType)throw new Error($e(13));return u.sliceCaseReducersByType[w]=E,c},addMatcher(m,E){return u.sliceMatchers.push({matcher:m,reducer:E}),c},exposeAction(m,E){return u.actionCreators[m]=E,c},exposeCaseReducer(m,E){return u.sliceCaseReducersByName[m]=E,c}};l.forEach(m=>{const E=a[m],w={reducerName:m,type:wO(o,m),createNotation:typeof i.reducers=="function"};kO(E)?RO(w,E,c,t):CO(w,E,c)});function g(){const[m={},E=[],w=void 0]=typeof i.extraReducers=="function"?Dv(i.extraReducers):[i.extraReducers],b={...m,...u.sliceCaseReducersByType};return vO(i.initialState,x=>{for(let T in b)x.addCase(T,b[T]);for(let T of u.sliceMatchers)x.addMatcher(T.matcher,T.reducer);for(let T of E)x.addMatcher(T.matcher,T.reducer);w&&x.addDefaultCase(w)})}const y=m=>m,f=new Map;let v;function p(m,E){return v||(v=g()),v(m,E)}function S(){return v||(v=g()),v.getInitialState()}function h(m,E=!1){function w(x){let T=x[m];return typeof T>"u"&&E&&(T=S()),T}function b(x=y){const T=Xh(f,E,{insert:()=>new WeakMap});return Xh(T,x,{insert:()=>{const M={};for(const[P,se]of Object.entries(i.selectors??{}))M[P]=xO(se,x,S,E);return M}})}return{reducerPath:m,getSelectors:b,get selectors(){return b(w)},selectSlice:w}}const d={name:o,reducer:p,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:S,...h(s),injectInto(m,{reducerPath:E,...w}={}){const b=E??s;return m.inject({reducerPath:b,reducer:p},w),{...d,...h(b,!0)}}};return d}}function xO(e,t,n,r){function i(o,...s){let a=t(o);return typeof a>"u"&&r&&(a=n()),e(a,...s)}return i.unwrapped=e,i}var Mv=bO();function TO(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function CO({type:e,reducerName:t,createNotation:n},r,i){let o,s;if("reducer"in r){if(n&&!OO(r))throw new Error($e(17));o=r.reducer,s=r.prepare}else o=r;i.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,s?Pr(e,s):Pr(e))}function kO(e){return e._reducerDefinitionType==="asyncThunk"}function OO(e){return e._reducerDefinitionType==="reducerWithPrepare"}function RO({type:e,reducerName:t},n,r,i){if(!i)throw new Error($e(18));const{payloadCreator:o,fulfilled:s,pending:a,rejected:l,settled:u,options:c}=n,g=i(e,o,c);r.exposeAction(t,g),s&&r.addCase(g.fulfilled,s),a&&r.addCase(g.pending,a),l&&r.addCase(g.rejected,l),u&&r.addMatcher(g.settled,u),r.exposeCaseReducer(t,{fulfilled:s||yo,pending:a||yo,rejected:l||yo,settled:u||yo})}function yo(){}var NO=(e,t)=>{if(typeof e!="function")throw new Error($e(32))},wf="listenerMiddleware",AO=e=>{let{type:t,actionCreator:n,matcher:r,predicate:i,effect:o}=e;if(t)i=Pr(t).match;else if(n)t=n.type,i=n.match;else if(r)i=r;else if(!i)throw new Error($e(21));return NO(o),{predicate:i,type:t,effect:o}},PO=Object.assign(e=>{const{type:t,predicate:n,effect:r}=AO(e);return{id:EO(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error($e(22))}}},{withTypes:()=>PO}),IO=Object.assign(Pr(`${wf}/add`),{withTypes:()=>IO});Pr(`${wf}/removeAll`);var DO=Object.assign(Pr(`${wf}/remove`),{withTypes:()=>DO});function $e(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}const MO={useStartScreen:void 0},Fv=Mv({name:"start-screen",initialState:MO,reducers:{enableStartScreen(e){e.useStartScreen=!0},disableStartScreen(e){e.useStartScreen=!1},setStartScreenStatus(e,t){e.startScreenStatus=t.payload}}}),{enableStartScreen:FO,disableStartScreen:BO,setStartScreenStatus:LO}=Fv.actions,jO=Fv.reducer,zO="_container_7ypo3_1",UO="_startChatButton_7ypo3_14",Qh={container:zO,startChatButton:UO},$O="start-screen.body",HO="start-screen.start-chat",GO=()=>{const e=wt(),t=Dc(),n=()=>t(LO("HIDDEN")),r=e($O),i=e(HO);return _.jsxs("div",{className:R(Qh.container,"chat__startScreen"),children:[r&&_.jsx(vn,{options:{overrides:{a:VO}},children:r}),_.jsx("button",{className:R(we.button,we.buttonPrimary,Qh.startChatButton),onClick:n,children:i})]})},VO=({title:e,href:t,children:n})=>_.jsx("a",{href:t,title:e,target:"_blank",rel:"noopener noreferrer",children:n}),WO=()=>{const e=Ks();N.useEffect(()=>{window.document.documentElement.lang=e.locale},[e.locale])},nr={TRIGGER_ACTION:"TRIGGER_ACTION",TRIGGER_STORY:"TRIGGER_STORY",CHAT_MESSAGE_FROM_GUEST:"CHAT_MESSAGE_FROM_GUEST",ON_CHAT_WINDOW_OPEN:"ON_CHAT_WINDOW_OPEN",ON_CHAT_WINDOW_CLOSE:"ON_CHAT_WINDOW_CLOSE",RESTART_CHAT:"RESTART_CHAT"},qO=({clientName:e})=>{WO();const t=Dc(),n=Ii(s=>s.startScreen.useStartScreen),r=Ii(s=>s.startScreen.startScreenStatus),[i,o]=N.useState(void 0);return N.useEffect(()=>{const s=window.location.search,a=Ry.parse(s);a.cssClassName&&o(a.cssClassName);const l=u=>{switch(u.data.type){case nr.TRIGGER_ACTION:t(u.data.action);break;case nr.TRIGGER_STORY:t(Ly(u.data.story));break;case nr.ON_CHAT_WINDOW_OPEN:t({type:"webclient.chatwindow.opened"});break;case nr.ON_CHAT_WINDOW_CLOSE:t({type:"webclient.chatwindow.closed"});break;case nr.CHAT_MESSAGE_FROM_GUEST:t(My(u.data.text));break;case nr.RESTART_CHAT:t(cf(e,s));break}};return t(Fb(e,s)),window.addEventListener("message",u=>l(u),!1),()=>window.removeEventListener("message",l)},[e,t]),_.jsx("div",{className:R(Dk.chatwindow,"chat__chatwindow",i),children:n===void 0?null:!n||r==="HIDDEN"?_.jsx(Ak,{clientName:e}):_.jsx(GO,{})})},XO=()=>{const e=vy(),t=Ii(r=>r.intl.locale),n=Ii(r=>r.intl.messages);return _.jsx(yw,{locale:t,messages:n,children:_.jsx("div",{className:_w.app,children:_.jsx(qO,{clientName:e})})})};function QO(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var bf=QO,KO=typeof q=="object"&&q&&q.Object===Object&&q,YO=KO,ZO=YO,JO=typeof self=="object"&&self&&self.Object===Object&&self,eR=ZO||JO||Function("return this")(),Bv=eR,tR=Bv,nR=function(){return tR.Date.now()},rR=nR,iR=/\s/;function oR(e){for(var t=e.length;t--&&iR.test(e.charAt(t)););return t}var sR=oR,aR=sR,lR=/^\s+/;function uR(e){return e&&e.slice(0,aR(e)+1).replace(lR,"")}var cR=uR,fR=Bv,dR=fR.Symbol,Lv=dR,Kh=Lv,jv=Object.prototype,hR=jv.hasOwnProperty,pR=jv.toString,Zr=Kh?Kh.toStringTag:void 0;function mR(e){var t=hR.call(e,Zr),n=e[Zr];try{e[Zr]=void 0;var r=!0}catch{}var i=pR.call(e);return r&&(t?e[Zr]=n:delete e[Zr]),i}var gR=mR,yR=Object.prototype,vR=yR.toString;function _R(e){return vR.call(e)}var ER=_R,Yh=Lv,SR=gR,wR=ER,bR="[object Null]",xR="[object Undefined]",Zh=Yh?Yh.toStringTag:void 0;function TR(e){return e==null?e===void 0?xR:bR:Zh&&Zh in Object(e)?SR(e):wR(e)}var CR=TR;function kR(e){return e!=null&&typeof e=="object"}var OR=kR,RR=CR,NR=OR,AR="[object Symbol]";function PR(e){return typeof e=="symbol"||NR(e)&&RR(e)==AR}var IR=PR,DR=cR,Jh=bf,MR=IR,ep=NaN,FR=/^[-+]0x[0-9a-f]+$/i,BR=/^0b[01]+$/i,LR=/^0o[0-7]+$/i,jR=parseInt;function zR(e){if(typeof e=="number")return e;if(MR(e))return ep;if(Jh(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Jh(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=DR(e);var n=BR.test(e);return n||LR.test(e)?jR(e.slice(2),n?2:8):FR.test(e)?ep:+e}var UR=zR,$R=bf,el=rR,tp=UR,HR="Expected a function",GR=Math.max,VR=Math.min;function WR(e,t,n){var r,i,o,s,a,l,u=0,c=!1,g=!1,y=!0;if(typeof e!="function")throw new TypeError(HR);t=tp(t)||0,$R(n)&&(c=!!n.leading,g="maxWait"in n,o=g?GR(tp(n.maxWait)||0,t):o,y="trailing"in n?!!n.trailing:y);function f(b){var x=r,T=i;return r=i=void 0,u=b,s=e.apply(T,x),s}function v(b){return u=b,a=setTimeout(h,t),c?f(b):s}function p(b){var x=b-l,T=b-u,M=t-x;return g?VR(M,o-T):M}function S(b){var x=b-l,T=b-u;return l===void 0||x>=t||x<0||g&&T>=o}function h(){var b=el();if(S(b))return d(b);a=setTimeout(h,p(b))}function d(b){return a=void 0,y&&r?f(b):(r=i=void 0,s)}function m(){a!==void 0&&clearTimeout(a),u=0,r=l=i=a=void 0}function E(){return a===void 0?s:d(el())}function w(){var b=el(),x=S(b);if(r=arguments,i=this,l=b,x){if(a===void 0)return v(l);if(g)return clearTimeout(a),a=setTimeout(h,t),f(l)}return a===void 0&&(a=setTimeout(h,t)),s}return w.cancel=m,w.flush=E,w}var qR=WR,XR=qR,QR=bf,KR="Expected a function";function YR(e,t,n){var r=!0,i=!0;if(typeof e!="function")throw new TypeError(KR);return QR(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),XR(e,t,{leading:r,maxWait:t,trailing:i})}var ZR=YR;const JR=Ru(ZR);function Yn(e,t){var n,r;if(typeof t=="function")r=t(e),r!==void 0&&(e=r);else if(Array.isArray(t))for(n=0;n<t.length;n++)r=t[n](e),r!==void 0&&(e=r);return e}function eN(e,t){return e[0]==="-"&&Array.isArray(t)&&/^-\d+$/.test(e)?t.length+parseInt(e,10):e}function tN(e){return/^\d+$/.test(e)}function Bo(e){return Object.prototype.toString.call(e)==="[object Object]"}function oi(e){return Object(e)===e}function Lo(e){return Object.keys(e).length===0}var nN=["__proto__","prototype","constructor"],rN=function(e){return nN.indexOf(e)===-1};function aa(e,t){e.indexOf("[")>=0&&(e=e.replace(/\[/g,t).replace(/]/g,""));var n=e.split(t),r=n.filter(rN);if(r.length!==n.length)throw Error("Refusing to update blacklisted property "+e);return n}var np=Object.prototype.hasOwnProperty;function G(e,t,n,r){if(!(this instanceof G))return new G(e,t,n,r);typeof t>"u"&&(t=!1),typeof n>"u"&&(n=!0),typeof r>"u"&&(r=!0),this.separator=e||".",this.override=t,this.useArray=n,this.useBrackets=r,this.keepArray=!1,this.cleanup=[]}var Ir=new G(".",!1,!0,!0);function bt(e){return function(){return Ir[e].apply(Ir,arguments)}}G.prototype._fill=function(e,t,n,r){var i=e.shift();if(e.length>0){if(t[i]=t[i]||(this.useArray&&tN(e[0])?[]:{}),!oi(t[i]))if(this.override)t[i]={};else{if(!(oi(n)&&Lo(n)))throw new Error("Trying to redefine `"+i+"` which is a "+typeof t[i]);return}this._fill(e,t[i],n,r)}else{if(!this.override&&oi(t[i])&&!Lo(t[i])){if(!(oi(n)&&Lo(n)))throw new Error("Trying to redefine non-empty obj['"+i+"']");return}t[i]=Yn(n,r)}};G.prototype.object=function(e,t){var n=this;return Object.keys(e).forEach(function(r){var i=t===void 0?null:t[r],o=aa(r,n.separator).join(n.separator);o.indexOf(n.separator)!==-1?(n._fill(o.split(n.separator),e,e[r],i),delete e[r]):e[r]=Yn(e[r],i)}),e};G.prototype.str=function(e,t,n,r){var i=aa(e,this.separator).join(this.separator);return e.indexOf(this.separator)!==-1?this._fill(i.split(this.separator),n,t,r):n[e]=Yn(t,r),n};G.prototype.pick=function(e,t,n,r){var i,o,s,a,l;for(o=aa(e,this.separator),i=0;i<o.length;i++)if(a=eN(o[i],t),t&&typeof t=="object"&&a in t){if(i===o.length-1)return n?(s=t[a],r&&Array.isArray(t)?t.splice(a,1):delete t[a],Array.isArray(t)&&(l=o.slice(0,-1).join("."),this.cleanup.indexOf(l)===-1&&this.cleanup.push(l)),s):t[a];t=t[a]}else return;return n&&Array.isArray(t)&&(t=t.filter(function(u){return u!==void 0})),t};G.prototype.delete=function(e,t){return this.remove(e,t,!0)};G.prototype.remove=function(e,t,n){var r;if(this.cleanup=[],Array.isArray(e)){for(r=0;r<e.length;r++)this.pick(e[r],t,!0,n);return n||this._cleanup(t),t}else return this.pick(e,t,!0,n)};G.prototype._cleanup=function(e){var t,n,r,i;if(this.cleanup.length){for(n=0;n<this.cleanup.length;n++)r=this.cleanup[n].split("."),i=r.splice(0,-1).join("."),t=i?this.pick(i,e):e,t=t[r[0]].filter(function(o){return o!==void 0}),this.set(this.cleanup[n],t,e);this.cleanup=[]}};G.prototype.del=G.prototype.remove;G.prototype.move=function(e,t,n,r,i){return typeof r=="function"||Array.isArray(r)?this.set(t,Yn(this.pick(e,n,!0),r),n,i):(i=r,this.set(t,this.pick(e,n,!0),n,i)),n};G.prototype.transfer=function(e,t,n,r,i,o){return typeof i=="function"||Array.isArray(i)?this.set(t,Yn(this.pick(e,n,!0),i),r,o):(o=i,this.set(t,this.pick(e,n,!0),r,o)),r};G.prototype.copy=function(e,t,n,r,i,o){return typeof i=="function"||Array.isArray(i)?this.set(t,Yn(JSON.parse(JSON.stringify(this.pick(e,n,!1))),i),r,o):(o=i,this.set(t,this.pick(e,n,!1),r,o)),r};G.prototype.set=function(e,t,n,r){var i,o,s,a;if(typeof t>"u")return n;for(s=aa(e,this.separator),i=0;i<s.length;i++){if(a=s[i],i===s.length-1)if(r&&Bo(t)&&Bo(n[a]))for(o in t)np.call(t,o)&&(n[a][o]=t[o]);else if(r&&Array.isArray(n[a])&&Array.isArray(t))for(var l=0;l<t.length;l++)n[s[i]].push(t[l]);else n[a]=t;else(!np.call(n,a)||!Bo(n[a])&&!Array.isArray(n[a]))&&(/^\d+$/.test(s[i+1])?n[a]=[]:n[a]={});n=n[a]}return n};G.prototype.transform=function(e,t,n){return t=t||{},n=n||{},Object.keys(e).forEach((function(r){this.set(e[r],this.pick(r,t),n)}).bind(this)),n};G.prototype.dot=function(e,t,n){t=t||{},n=n||[];var r=Array.isArray(e);return Object.keys(e).forEach((function(i){var o=r&&this.useBrackets?"["+i+"]":i;if(oi(e[i])&&(Bo(e[i])&&!Lo(e[i])||Array.isArray(e[i])&&!this.keepArray&&e[i].length!==0))if(r&&this.useBrackets){var s=n[n.length-1]||"";return this.dot(e[i],t,n.slice(0,-1).concat(s+o))}else return this.dot(e[i],t,n.concat(o));else r&&this.useBrackets?t[n.join(this.separator).concat("["+i+"]")]=e[i]:t[n.concat(o).join(this.separator)]=e[i]}).bind(this)),t};G.pick=bt("pick");G.move=bt("move");G.transfer=bt("transfer");G.transform=bt("transform");G.copy=bt("copy");G.object=bt("object");G.str=bt("str");G.set=bt("set");G.delete=bt("delete");G.del=G.remove=bt("remove");G.dot=bt("dot");["override","overwrite"].forEach(function(e){Object.defineProperty(G,e,{get:function(){return Ir.override},set:function(t){Ir.override=!!t}})});["useArray","keepArray","useBrackets"].forEach(function(e){Object.defineProperty(G,e,{get:function(){return Ir[e]},set:function(t){Ir[e]=t}})});G._process=Yn;var iN=G;const zv={"message-input-label":"Benutzereingabe","message-input-placeholder":"Nachricht","message-input.actions.submit.label":"Nachricht senden","message-input.actions.export-transcript.label":"Konversation per E-Mail erhalten","message-input.actions.start-audio-recording.label":"Spracheingabe starten","message-input.actions.stop-audio-recording.label":"Spracheingabe stoppen","message-input.actions.submit-audio-recording.label":"Spracheingabe übermitteln","guest-bubble.label":"Ihre Nachricht","bot-bubble.label":"Nachricht des Chatbots","agent-bubble.label":"Nachricht des Live-Agenten","export-transcript.email.title":"Konversation per E-Mail versenden","export-transcript.email.description":"Geben Sie Ihre E-Mail-Adresse ein, um den Chatverlauf zu erhalten.","export-transcript.email.cancel":"Abbrechen","export-transcript.email.send":"Senden","export-transcript.email.placeholder":"Ihre E-Mail-Adresse","export-transcript.email.invalid":"Bitte gültige E-Mail-Adresse eingeben.","export-transcript.email.success":"Ich habe den Chatverlauf an Ihre E-Mail-Adresse gesendet.","export-transcript.pdf.title":"Konversation als PDF erhalten","export-transcript.pdf.description":"Laden Sie die Konversation als PDF herunter.","export-transcript.pdf.cancel":"Abbrechen","export-transcript.pdf.download":"Herunterladen","general-conditions.header":"**Nutzungsbedingungen**","general-conditions.body":`Bitte berücksichtigen Sie die folgenden Punkte:
|
|
99
99
|
|
|
100
100
|
- Der Chatverlauf wird im EU-Raum gespeichert und kann nur von autorisierten Personen eingesehen werden.
|
|
101
101
|
- Geben Sie im Chatfenster keine persönlichen Daten ein (Passwörter, Geburtsdatum usw.).`,"general-conditions.accept-conditions-note":"Mit der Verwendung des Chats erklären Sie sich mit den Nutzungsbedingungen einverstanden.","problem-report.action.mark":"Als fehlerhaft markieren","problem-report.action.unmark":"Markierung entfernen","block-user-input.title":"Bitte auf die Antwort des Chatbots warten.","conversation-rating.call-to-action.title":"Bewerten Sie diesen Chat","conversation-rating.overlay.title":"Wie zufrieden sind Sie mit diesem Chat?","conversation-rating.overlay.guest-feedback.input-placeholder":"Feedback bitte hier eingeben (optional)","conversation-rating.overlay.star.very-bad":"Sehr schlecht","conversation-rating.overlay.star.very-good":"Sehr gut","conversation-rating.overlay.bot-message.rate-feedback.value-1":"Oh, das tönt nicht gut. Bitte geben Sie mir doch ein schriftliches Feedback, damit ich dazulernen kann.","conversation-rating.overlay.bot-message.rate-feedback.value-2":"Oh, das tönt nicht gut. Bitte geben Sie mir doch ein schriftliches Feedback, damit ich dazulernen kann.","conversation-rating.overlay.bot-message.rate-feedback.value-3":"Durchschnitt ist nicht mein Ziel, was kann ich noch verbessern?","conversation-rating.overlay.bot-message.rate-feedback.value-4":"Knapp daneben ist auch vorbei. Was kann ich noch verbessern, um das nächste Mal alle Sterne zu erreichen?","conversation-rating.overlay.bot-message.rate-feedback.value-5":"Perfekt! Dann hoffe ich, dass ich Sie wieder einmal so gut beraten kann.","conversation-rating.overlay.bot-message.submit-feedback":"Vielen Dank für die Rückmeldung. Ich bin bestrebt, mich ständig zu verbessern.","conversation-rating.overlay.action.submit":"Bewertung senden","conversation-rating.overlay.action.close":"Zurück zum Chat","start-screen.body":"","start-screen.start-chat":"Chat starten"},oN={"message-input-label":"User input","message-input-placeholder":"Message","message-input.actions.submit.label":"Send message","message-input.actions.export-transcript.label":"Receive conversation by email","message-input.actions.start-audio-recording.label":"Start voice input","message-input.actions.stop-audio-recording.label":"Stop voice input","message-input.actions.submit-audio-recording.label":"Transmit voice input","guest-bubble.label":"Your message","bot-bubble.label":"Message from the chatbot","agent-bubble.label":"Message from the live agent","export-transcript.email.title":"Receive Conversation","export-transcript.email.description":"Enter your email address to receive the chat history.","export-transcript.email.cancel":"Cancel","export-transcript.email.send":"Send","export-transcript.email.placeholder":"Your email address","export-transcript.email.invalid":"Please enter a valid e-mail address.","export-transcript.email.success":"I have sent the chat history to your email address.","export-transcript.pdf.title":"Get conversation as PDF","export-transcript.pdf.description":"Download this conversation as PDF.","export-transcript.pdf.cancel":"Cancel","export-transcript.pdf.download":"Download","general-conditions.header":"**Terms of use**","general-conditions.body":`Please consider the following points:
|
|
@@ -108,4 +108,4 @@ For more details see https://formatjs.io/docs/getting-started/message-distributi
|
|
|
108
108
|
|
|
109
109
|
- La cronologia delle chat è memorizzata nell'area UE e può essere visualizzata solo da persone autorizzate.
|
|
110
110
|
- 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.","problem-report.action.mark":"Segna come errato","problem-report.action.unmark":"Rimuovere il marcatore","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.close":"Chiudere","start-screen.body":"","start-screen.start-chat":"Avviare la chat"},lN=["de","en","fr","it"],Uv={locale:"de",messages:zv},uN=(e,t)=>{if(lN.includes(e)){const n=cN(e),r=iN.dot(t);return{...n,...r}}return t},cN=e=>{switch(e.toString()){case"en":return oN;case"fr":return sN;case"it":return aN;default:return zv}},fN=(e=dN,t)=>{switch(t.type){case rf:return Object.assign({},e,{connectionState:an.CONNECTING});case of:return Object.assign({},e,{connectionState:an.CONNECTED});case sf:return Object.assign({},e,{connectionState:an.DISCONNECTED});case af:return Object.assign({},e,{connectionState:an.RECONNECTED});case lf:return Object.assign({},e,{sessionId:t.sessionId});case uf:return Object.assign({},e,{sessionId:t.payload.sessionId,userId:t.payload.userId});case zy:return Object.assign({},e,{connectionState:an.DISCONNECTED,sessionId:void 0});default:return e}},dN={connectionState:an.DISCONNECTED,sessionId:void 0,userId:void 0},hN=(e=tl,t)=>{switch(t.type){case U.ActionTypes.TYPING_ON:return Object.assign({},e,{isBotTyping:!0});case U.ActionTypes.TYPING_OFF:return Object.assign({},e,{isBotTyping:!1});case U.ActionTypes.MESSAGE_FROM_GUEST:case U.ActionTypes.MESSAGE_WITHOUT_ANALYSIS_FROM_GUEST:return rp(e,t.message);case U.ActionTypes.MESSAGE_TO_GUEST:vo(t);const n=Object.assign({},t.message,{_id:t.meta.actionId}),r=e.messages.filter(u=>u._id===t.meta.actionId).length>0;return Object.assign({},e,{isBotTyping:!1,messages:r?e.messages:e.messages.concat([n]),quickReplies:n.quickReplies?n.quickReplies:[]});case Xc:const i=t.messages;if(i.length>0){const u=i[i.length-1];return Object.assign({},tl,{messages:i,quickReplies:u.quickReplies?u.quickReplies:[]})}else return tl;case qc:return vo(t.message),e;case U.ActionTypes.EVENT_TO_GUEST:return vo(t.event),e;case Fy:return vo(t),e;case Kc:return Object.assign({},e,{speechSupport:!0});case Yc:return Object.assign({},e,{problemReportingEnabled:!0});case Jc:const o=new U.TextMessage(t.transcription,new U.GuestUser),s=Object.assign({},o,{_id:crypto.randomUUID()});return rp(e,s);case Zc:return Object.assign({},e,{transcriptExportEnabled:t.methods});case ef:return Object.assign({},e,{showGeneralConditions:!0});case U.ActionTypes.PROBLEM_REPORT_FROM_GUEST:const a=e.messages.map(u=>u._id===t.payload.actionId?Object.assign({},u,{problemReport:t.payload.problem}):u);return Object.assign({},e,{messages:a});case tf:const l={enabled:!0,rating:t.payload.rating};return Object.assign({},e,{conversationRating:l});case U.ActionTypes.CONVERSATION_RATING_FROM_GUEST:{const u={...e.conversationRating,rating:t.payload};return Object.assign({},e,{conversationRating:u})}default:return e}},rp=(e,t)=>{const n=e.messages[e.messages.length-1],r=(n==null?void 0:n.text)===t.text;return n&&n.sender.type===t.sender.type&&r?e:Object.assign({},e,{messages:e.messages.concat([t]),quickReplies:[]})},vo=e=>{var t;pN()?(t=window.top)==null||t.postMessage(e,"*"):e.type==="webclient.change.url"&&window.open(e.url)},pN=()=>typeof window<"u"&&window.self!==window.top,tl={messages:[],quickReplies:[],isBotTyping:!1,speechSupport:!1,problemReportingEnabled:!1,transcriptExportEnabled:{pdf:!1,email:!1},showGeneralConditions:!1,conversationRating:{enabled:!1}},$v=Mv({name:"intl",initialState:Uv,reducers:{updateIntl:(e,t)=>{e.locale=t.payload.language,e.messages=t.payload.messages}}}),{updateIntl:mN}=$v.actions,gN=$v.reducer,yN=Sv({chat:hN,startScreen:jO,connection:fN,intl:gN}),Hv="bf-webclient-state-last-saved-at",Gv="bf-webclient-state",vN=e=>{try{if(!SN())return;const t=ip(e,Hv);if(EN(t))return;{const n=ip(e,Gv);return n===null?void 0:JSON.parse(n)}}catch(t){console.error(t);return}},_N=(e,t)=>{try{const n=JSON.stringify(t);op(e,Gv,n);let r=new Date().toISOString();op(e,Hv,r)}catch(n){console.error(n)}},EN=e=>{if(e===null)return!1;let t=new Date(e);return t.setHours(t.getHours()+12),new Date>t},SN=()=>typeof localStorage<"u",ip=(e,t)=>localStorage.getItem(`${e}_${t}`),op=(e,t,n)=>localStorage.setItem(`${e}_${t}`,n),Lt=Object.create(null);Lt.open="0";Lt.close="1";Lt.ping="2";Lt.pong="3";Lt.message="4";Lt.upgrade="5";Lt.noop="6";const jo=Object.create(null);Object.keys(Lt).forEach(e=>{jo[Lt[e]]=e});const wu={type:"error",data:"parser error"},Vv=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Wv=typeof ArrayBuffer=="function",qv=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,xf=({type:e,data:t},n,r)=>Vv&&t instanceof Blob?n?r(t):sp(t,r):Wv&&(t instanceof ArrayBuffer||qv(t))?n?r(t):sp(new Blob([t]),r):r(Lt[e]+(t||"")),sp=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function ap(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let nl;function wN(e,t){if(Vv&&e.data instanceof Blob)return e.data.arrayBuffer().then(ap).then(t);if(Wv&&(e.data instanceof ArrayBuffer||qv(e.data)))return t(ap(e.data));xf(e,!1,n=>{nl||(nl=new TextEncoder),t(nl.encode(n))})}const lp="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",si=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<lp.length;e++)si[lp.charCodeAt(e)]=e;const bN=e=>{let t=e.length*.75,n=e.length,r,i=0,o,s,a,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),c=new Uint8Array(u);for(r=0;r<n;r+=4)o=si[e.charCodeAt(r)],s=si[e.charCodeAt(r+1)],a=si[e.charCodeAt(r+2)],l=si[e.charCodeAt(r+3)],c[i++]=o<<2|s>>4,c[i++]=(s&15)<<4|a>>2,c[i++]=(a&3)<<6|l&63;return u},xN=typeof ArrayBuffer=="function",Tf=(e,t)=>{if(typeof e!="string")return{type:"message",data:Xv(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:TN(e.substring(1),t)}:jo[n]?e.length>1?{type:jo[n],data:e.substring(1)}:{type:jo[n]}:wu},TN=(e,t)=>{if(xN){const n=bN(e);return Xv(n,t)}else return{base64:!0,data:e}},Xv=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},Qv="",CN=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,s)=>{xf(o,!1,a=>{r[s]=a,++i===n&&t(r.join(Qv))})})},kN=(e,t)=>{const n=e.split(Qv),r=[];for(let i=0;i<n.length;i++){const o=Tf(n[i],t);if(r.push(o),o.type==="error")break}return r};function ON(){return new TransformStream({transform(e,t){wN(e,n=>{const r=n.length;let i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);const o=new DataView(i.buffer);o.setUint8(0,126),o.setUint16(1,r)}else{i=new Uint8Array(9);const o=new DataView(i.buffer);o.setUint8(0,127),o.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(i[0]|=128),t.enqueue(i),t.enqueue(n)})}})}let rl;function _o(e){return e.reduce((t,n)=>t+n.length,0)}function Eo(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let i=0;i<t;i++)n[i]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function RN(e,t){rl||(rl=new TextDecoder);const n=[];let r=0,i=-1,o=!1;return new TransformStream({transform(s,a){for(n.push(s);;){if(r===0){if(_o(n)<1)break;const l=Eo(n,1);o=(l[0]&128)===128,i=l[0]&127,i<126?r=3:i===126?r=1:r=2}else if(r===1){if(_o(n)<2)break;const l=Eo(n,2);i=new DataView(l.buffer,l.byteOffset,l.length).getUint16(0),r=3}else if(r===2){if(_o(n)<8)break;const l=Eo(n,8),u=new DataView(l.buffer,l.byteOffset,l.length),c=u.getUint32(0);if(c>Math.pow(2,21)-1){a.enqueue(wu);break}i=c*Math.pow(2,32)+u.getUint32(4),r=3}else{if(_o(n)<i)break;const l=Eo(n,i);a.enqueue(Tf(o?l:rl.decode(l),t)),r=0}if(i===0||i>e){a.enqueue(wu);break}}}})}const Kv=4;function de(e){if(e)return NN(e)}function NN(e){for(var t in de.prototype)e[t]=de.prototype[t];return e}de.prototype.on=de.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};de.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};de.prototype.off=de.prototype.removeListener=de.prototype.removeAllListeners=de.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===t||r.fn===t){n.splice(i,1);break}return n.length===0&&delete this._callbacks["$"+e],this};de.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this};de.prototype.emitReserved=de.prototype.emit;de.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};de.prototype.hasListeners=function(e){return!!this.listeners(e).length};const tt=typeof self<"u"?self:typeof window<"u"?window:Function("return this")();function Yv(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const AN=tt.setTimeout,PN=tt.clearTimeout;function la(e,t){t.useNativeTimers?(e.setTimeoutFn=AN.bind(tt),e.clearTimeoutFn=PN.bind(tt)):(e.setTimeoutFn=tt.setTimeout.bind(tt),e.clearTimeoutFn=tt.clearTimeout.bind(tt))}const IN=1.33;function DN(e){return typeof e=="string"?MN(e):Math.ceil((e.byteLength||e.size)*IN)}function MN(e){let t=0,n=0;for(let r=0,i=e.length;r<i;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function FN(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function BN(e){let t={},n=e.split("&");for(let r=0,i=n.length;r<i;r++){let o=n[r].split("=");t[decodeURIComponent(o[0])]=decodeURIComponent(o[1])}return t}class LN extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class Cf extends de{constructor(t){super(),this.writable=!1,la(this,t),this.opts=t,this.query=t.query,this.socket=t.socket}onError(t,n,r){return super.emitReserved("error",new LN(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=Tf(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=FN(t);return n.length?"?"+n:""}}const Zv="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),bu=64,jN={};let up=0,So=0,cp;function fp(e){let t="";do t=Zv[e%bu]+t,e=Math.floor(e/bu);while(e>0);return t}function Jv(){const e=fp(+new Date);return e!==cp?(up=0,cp=e):e+"."+fp(up++)}for(;So<bu;So++)jN[Zv[So]]=So;let e0=!1;try{e0=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const zN=e0;function t0(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||zN))return new XMLHttpRequest}catch{}if(!t)try{return new tt[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}function UN(){}const $N=function(){return new t0({xdomain:!1}).responseType!=null}();class HN extends Cf{constructor(t){if(super(t),this.polling=!1,typeof location<"u"){const r=location.protocol==="https:";let i=location.port;i||(i=r?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||i!==t.port}const n=t&&t.forceBase64;this.supportsBinary=$N&&!n,this.opts.withCredentials&&(this.cookieJar=void 0)}get name(){return"polling"}doOpen(){this.poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};kN(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,CN(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=Jv()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}request(t={}){return Object.assign(t,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new Ft(this.uri(),t)}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class Ft extends de{constructor(t,n){super(),la(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.data=n.data!==void 0?n.data:null,this.create()}create(){var t;const n=Yv(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this.opts.xd;const r=this.xhr=new t0(n);try{r.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let i in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(i)&&r.setRequestHeader(i,this.opts.extraHeaders[i])}}catch{}if(this.method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this.opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(r.timeout=this.opts.requestTimeout),r.onreadystatechange=()=>{var i;r.readyState===3&&((i=this.opts.cookieJar)===null||i===void 0||i.parseCookies(r)),r.readyState===4&&(r.status===200||r.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof r.status=="number"?r.status:0)},0))},r.send(this.data)}catch(i){this.setTimeoutFn(()=>{this.onError(i)},0);return}typeof document<"u"&&(this.index=Ft.requestsCount++,Ft.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=UN,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Ft.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}Ft.requestsCount=0;Ft.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",dp);else if(typeof addEventListener=="function"){const e="onpagehide"in tt?"pagehide":"unload";addEventListener(e,dp,!1)}}function dp(){for(let e in Ft.requests)Ft.requests.hasOwnProperty(e)&&Ft.requests[e].abort()}const kf=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),wo=tt.WebSocket||tt.MozWebSocket,hp=!0,GN="arraybuffer",pp=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class VN extends Cf{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,r=pp?{}:Yv(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=hp&&!pp?n?new wo(t,n):new wo(t):new wo(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;xf(r,this.supportsBinary,o=>{const s={};try{hp&&this.ws.send(o)}catch{}i&&kf(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=Jv()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}check(){return!!wo}}class WN extends Cf{get name(){return"webtransport"}doOpen(){typeof WebTransport=="function"&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(t=>{const n=RN(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=ON();i.readable.pipeTo(t.writable),this.writer=i.writable.getWriter();const o=()=>{r.read().then(({done:a,value:l})=>{a||(this.onPacket(l),o())}).catch(a=>{})};o();const s={type:"open"};this.query.sid&&(s.data=`{"sid":"${this.query.sid}"}`),this.writer.write(s).then(()=>this.onOpen())})}))}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;this.writer.write(r).then(()=>{i&&kf(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this.transport)===null||t===void 0||t.close()}}const qN={websocket:VN,webtransport:WN,polling:HN},XN=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,QN=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function xu(e){const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=XN.exec(e||""),o={},s=14;for(;s--;)o[QN[s]]=i[s]||"";return n!=-1&&r!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=KN(o,o.path),o.queryKey=YN(o,o.query),o}function KN(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function YN(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}let n0=class rr extends de{constructor(t,n={}){super(),this.binaryType=GN,this.writeBuffer=[],t&&typeof t=="object"&&(n=t,t=null),t?(t=xu(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=xu(n.host).host),la(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,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},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=BN(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(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"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=Kv,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new qN[t](r)}open(){let t;if(this.opts.rememberUpgrade&&rr.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch{this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){let n=this.createTransport(t),r=!1;rr.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",g=>{if(!r)if(g.type==="pong"&&g.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;rr.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(c(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const y=new Error("probe error");y.transport=n.name,this.emitReserved("upgradeError",y)}}))};function o(){r||(r=!0,c(),n.close(),n=null)}const s=g=>{const y=new Error("probe error: "+g);y.transport=n.name,o(),this.emitReserved("upgradeError",y)};function a(){s("transport closed")}function l(){s("socket closed")}function u(g){n&&g.name!==n.name&&o()}const c=()=>{n.removeListener("open",i),n.removeListener("error",s),n.removeListener("close",a),this.off("close",l),this.off("upgrading",u)};n.once("open",i),n.once("error",s),n.once("close",a),this.once("close",l),this.once("upgrading",u),this.upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onOpen(){if(this.readyState="open",rr.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){let t=0;const n=this.upgrades.length;for(;t<n;t++)this.probe(this.upgrades[t])}}onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),this.resetPingTimeout(),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const n=new Error("server error");n.code=t.data,this.onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this.upgrades=this.filterUpgrades(t.upgrades),this.pingInterval=t.pingInterval,this.pingTimeout=t.pingTimeout,this.maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn(()=>{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),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 t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const i=this.writeBuffer[r].data;if(i&&(n+=DN(i)),r>0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(t,n,r){return this.sendPacket("message",t,n,r),this}send(t,n,r){return this.sendPacket("message",t,n,r),this}sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:t,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}onError(t){rr.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let r=0;const i=t.length;for(;r<i;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}};n0.protocol=Kv;function ZN(e,t="",n){let r=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),r=xu(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const o=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+o+":"+r.port+t,r.href=r.protocol+"://"+o+(n&&n.port===r.port?"":":"+r.port),r}const JN=typeof ArrayBuffer=="function",eA=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,r0=Object.prototype.toString,tA=typeof Blob=="function"||typeof Blob<"u"&&r0.call(Blob)==="[object BlobConstructor]",nA=typeof File=="function"||typeof File<"u"&&r0.call(File)==="[object FileConstructor]";function Of(e){return JN&&(e instanceof ArrayBuffer||eA(e))||tA&&e instanceof Blob||nA&&e instanceof File}function zo(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(zo(e[n]))return!0;return!1}if(Of(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return zo(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&zo(e[n]))return!0;return!1}function rA(e){const t=[],n=e.data,r=e;return r.data=Tu(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Tu(e,t){if(!e)return e;if(Of(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=Tu(e[r],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=Tu(e[r],t));return n}return e}function iA(e,t){return e.data=Cu(e.data,t),delete e.attachments,e}function Cu(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=Cu(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Cu(e[n],t));return e}const oA=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],sA=5;var z;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(z||(z={}));class aA{constructor(t){this.replacer=t}encode(t){return(t.type===z.EVENT||t.type===z.ACK)&&zo(t)?this.encodeAsBinary({type:t.type===z.EVENT?z.BINARY_EVENT:z.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===z.BINARY_EVENT||t.type===z.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=rA(t),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}function mp(e){return Object.prototype.toString.call(e)==="[object Object]"}class Rf extends de{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===z.BINARY_EVENT;r||n.type===z.BINARY_ACK?(n.type=r?z.EVENT:z.ACK,this.reconstructor=new lA(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(Of(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(z[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===z.BINARY_EVENT||r.type===z.BINARY_ACK){const o=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const s=t.substring(o,n);if(s!=Number(s)||t.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(s)}if(t.charAt(n+1)==="/"){const o=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(o,n)}else r.nsp="/";const i=t.charAt(n+1);if(i!==""&&Number(i)==i){const o=n+1;for(;++n;){const s=t.charAt(n);if(s==null||Number(s)!=s){--n;break}if(n===t.length)break}r.id=Number(t.substring(o,n+1))}if(t.charAt(++n)){const o=this.tryParse(t.substr(n));if(Rf.isPayloadValid(r.type,o))r.data=o;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch{return!1}}static isPayloadValid(t,n){switch(t){case z.CONNECT:return mp(n);case z.DISCONNECT:return n===void 0;case z.CONNECT_ERROR:return typeof n=="string"||mp(n);case z.EVENT:case z.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&oA.indexOf(n[0])===-1);case z.ACK:case z.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class lA{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=iA(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const uA=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Rf,Encoder:aA,get PacketType(){return z},protocol:sA},Symbol.toStringTag,{value:"Module"}));function mt(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const cA=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class i0 extends de{constructor(t,n,r){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=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[mt(t,"open",this.onopen.bind(this)),mt(t,"packet",this.onpacket.bind(this)),mt(t,"error",this.onerror.bind(this)),mt(t,"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(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){if(cA.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const r={type:z.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const s=this.ids++,a=n.pop();this._registerAckCallback(s,a),r.id=s}const i=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!i||!this.connected)||(this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(t,n){var r;const i=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(i===void 0){this.acks[t]=n;return}const o=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===t&&this.sendBuffer.splice(a,1);n.call(this,new Error("operation has timed out"))},i),s=(...a)=>{this.io.clearTimeoutFn(o),n.apply(this,a)};s.withError=!0,this.acks[t]=s}emitWithAck(t,...n){return new Promise((r,i)=>{const o=(s,a)=>s?i(s):r(a);o.withError=!0,n.push(o),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((i,...o)=>r!==this._queue[0]?void 0:(i!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...o)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:z.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case z.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.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 z.EVENT:case z.BINARY_EVENT:this.onevent(t);break;case z.ACK:case z.BINARY_ACK:this.onack(t);break;case z.DISCONNECT:this.ondisconnect();break;case z.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:z.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:z.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function Br(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Br.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0};Br.prototype.reset=function(){this.attempts=0};Br.prototype.setMin=function(e){this.ms=e};Br.prototype.setMax=function(e){this.max=e};Br.prototype.setJitter=function(e){this.jitter=e};class ku extends de{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,la(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Br({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||uA;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new n0(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=mt(n,"open",function(){r.onopen(),t&&t()}),o=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),t?t(a):this.maybeReconnectOnOpen()},s=mt(n,"error",o);if(this._timeout!==!1){const a=this._timeout,l=this.setTimeoutFn(()=>{i(),o(new Error("timeout")),n.close()},a);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}return this.subs.push(i),this.subs.push(s),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(mt(t,"ping",this.onping.bind(this)),mt(t,"data",this.ondata.bind(this)),mt(t,"error",this.onerror.bind(this)),mt(t,"close",this.onclose.bind(this)),mt(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){kf(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new i0(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Jr={};function Uo(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=ZN(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,s=Jr[i]&&o in Jr[i].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||s;let l;return a?l=new ku(r,t):(Jr[i]||(Jr[i]=new ku(r,t)),l=Jr[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(Uo,{Manager:ku,Socket:i0,io:Uo,connect:Uo});const fA=[U.ActionTypes.MESSAGE_TO_GUEST,U.ActionTypes.EVENT_TO_GUEST,U.ActionTypes.TYPING_ON,U.ActionTypes.TYPING_OFF,U.ActionTypes.RESTART_CHAT_REQUEST,...Mb,...Eb,"@@localize/SET_ACTIVE_LANGUAGE","@@localize/ADD_TRANSLATION_FOR_LANGUAGE"],dA=({dispatch:e,getState:t})=>n=>{let r=null;return i=>{let o=n(i);if(i.type===nf)r!=null&&r.disconnect(),e(Lb()),r=Uo(`/${i.clientName}/chat?${i.querystrings}`),r.on("action",e),r.on("connect",()=>e(jb())),r.on("disconnect",()=>e(zb())),r.on("reconnect",()=>e(Ub())),r.on("set-use-start-screen",s=>{e(s?FO():BO())}),r.on("set-translations",(s,a)=>{e(mN({language:s,messages:uN(s,a)}))}),r.on("enable-speech-support",()=>e(wb())),r.on("enable-problem-reporting",()=>e(bb())),r.on("enable-transcript-export",s=>e(Tb(s))),r.on("enable-conversation-rating",s=>e(Rb(s))),r.on("speech-transcription",s=>e(xb(s))),r.on("restore-client-state",s=>{e(Bb(s.sessionId)),e(Ab(s.messages))}),r.on("expand-window",({devices:s})=>e({type:Fy,devices:s})),r.on("show-general-conditions",()=>e(kb())),r.on("restart-chat",()=>{e(cf(i.clientName,i.querystrings))});else if(i.type===uf)r==null||r.emit("start-chat",i.payload);else if(i.type===_b)r==null||r.emit("get-started",JSON.stringify(i));else if(i.type===Qc)r==null||r.emit("audio-message",i.buffer);else if(i.type===U.ActionTypes.CONVERSATION_RATING_FROM_GUEST)r==null||r.emit("conversation-rating",i.payload);else if(i.type===By){const{connection:{sessionId:s}}=t();window.location.href=`/transcript-pdf/${s}`}else fA.indexOf(i.type)===-1&&i.meta===void 0&&r&&r.emit("action",JSON.stringify(i));return o}},o0=vy(),hA={...vN(o0),intl:Uv},Ou=gO({middleware:e=>e().concat(dA),reducer:yN,preloadedState:hA});Ou.subscribe(JR(()=>{const e=Ou.getState();_N(o0,{connection:e.connection,startScreen:e.startScreen})},1e3));const pA=document.getElementById("root"),mA=Og(pA);mA.render(_.jsx(jE,{store:Ou,children:_.jsx(XO,{})}));
|
|
111
|
-
//# sourceMappingURL=index-
|
|
111
|
+
//# sourceMappingURL=index-DTiiiazw.js.map
|