@botfabrik/engine-webclient 4.63.2 → 4.63.6

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.
@@ -0,0 +1 @@
1
+ @import"//fonts.googleapis.com/css?family=Roboto:400,300,700,500,100,200";html{font-family:Roboto,sans-serif}body{margin:0}._chatPage_1r3z6_10{display:flex;flex-direction:row;height:100vh;height:100svh}:root{--aspect-ratio: calc(16 / 9);--body-background-color: white;--brand-primary-color: rgb(114, 46, 209);--brand-secondary-color: white;--danger-color: #cd2147;--scrollbar-thumb-color: #adadad;--avatar-size: 2rem;--avatar-radius: 50%;--bot-avatar-background-color: transparent;--agent-avatar-background-color: transparent;--bubble-padding: .9em 1.3em;--bubble-margin-small: 3px;--bubble-margin-large: 1.2rem;--bubble-radius-large: 20px;--bubble-radius-small: 4px;--bot-bubble-background-color: white;--bot-bubble-text-color: #2e2e2e;--bot-bubble-border-color: #434343;--bot-bubble-border-width: 2px;--bot-bubble-top-left-radius: var(--bubble-radius-small);--bot-bubble-top-right-radius: var(--bubble-radius-large);--bot-bubble-bottom-right-radius: var(--bubble-radius-large);--bot-bubble-bottom-left-radius: var(--bubble-radius-small);--guest-bubble-background-color: var(--brand-primary-color);--guest-bubble-text-color: white;--guest-bubble-border-color: white;--guest-bubble-border-width: 0px;--guest-bubble-top-left-radius: var(--bubble-radius-large);--guest-bubble-top-right-radius: var(--bubble-radius-small);--guest-bubble-bottom-right-radius: var(--bubble-radius-small);--guest-bubble-bottom-left-radius: var(--bubble-radius-large)}::-webkit-scrollbar{width:8px;border:none}::-webkit-scrollbar-track{background:var(--body-background-color)}::-webkit-scrollbar-thumb{background:var(--scrollbar-thumb-color)}input::placeholder,textarea::placeholder{color:#666;opacity:1}._button_7qoxn_54{display:inline-block;font-family:inherit;font-size:1em;padding:.5em 1em;border-radius:.2rem;background-color:#fff;cursor:pointer;transition:all .2s linear;text-align:center}._buttonDefault_7qoxn_66{color:#000000d9;background-color:#fff;border:2px solid #adadad}._buttonDefault_7qoxn_66:hover{color:var(--brand-primary-color);border:2px solid var(--brand-primary-color)}._buttonDefault_7qoxn_66:disabled{cursor:not-allowed;opacity:.3}._buttonPrimary_7qoxn_80{color:var(--brand-secondary-color);background-color:var(--brand-primary-color);border:2px solid var(--brand-primary-color)}._buttonPrimary_7qoxn_80:hover{color:var(--brand-primary-color);background-color:var(--brand-secondary-color);border:2px solid var(--brand-primary-color)}._buttonPrimary_7qoxn_80:disabled{cursor:not-allowed;opacity:.3;color:var(--brand-secondary-color);background-color:var(--brand-primary-color)}svg{fill:currentColor}._accessabilityHidden_7qoxn_132{visibility:hidden}._chatwindow_1xq7n_1{position:relative;width:100%;height:100vh;max-width:48rem;margin-left:auto;margin-right:auto;overflow:hidden;background-color:var(--body-background-color)}._chatcontent_1xq7n_12{display:flex;flex-flow:column nowrap;width:100%;height:100vh}._messageContainer_1wdci_1{flex:1;overflow-y:scroll;overscroll-behavior:contain;padding-top:1rem;position:relative;-webkit-overflow-scrolling:touch}._messages_1wdci_10{position:relative;list-style:none;font-size:.9rem;line-height:1.4;padding:0 1rem;margin:0;overflow-wrap:break-word;word-wrap:break-word}@media (min-width: 36rem){._messageContainer_1wdci_1{padding-top:2rem}._messages_1wdci_10{font-size:1rem;line-height:1.8}}._generalConditionsContainer_1ijeb_1{margin-bottom:1.2rem;margin-left:1rem;margin-right:1rem}._generalConditions_1ijeb_1{transition:all .5s linear;background-color:var(--bot-bubble-background-color);color:var(--bot-bubble-text-color);padding:.9em 1.3em;font-size:.9rem}._generalConditionsHeader_1ijeb_15{display:flex;align-items:flex-end;justify-content:space-between;cursor:pointer}._generalConditionsHeader_1ijeb_15:focus{outline:none}._generalConditionsBody_1ijeb_25{display:flex;align-items:flex-end}._generalConditionsBody_1ijeb_25:focus{outline:none}._generalConditionsAccept_1ijeb_33{padding:.9em 1.3em;font-size:.9rem}._generalConditionsAccept_1ijeb_33:focus{outline:none}._message_xtsrt_5{--bubble-margin: var(--bubble-margin-small);margin-bottom:var(--bubble-margin);transition:border-radius .5s}._messageBot_xtsrt_11{display:flex;align-items:flex-end}._messageBot_xtsrt_11:not(._messageBotLast_xtsrt_15) ._avatar_xtsrt_15{visibility:hidden}._messageBotFirst_xtsrt_19{--bot-bubble-top-left-radius: var(--bubble-radius-large);--bot-bubble-top-right-radius: var(--bubble-radius-large);--bot-bubble-bottom-right-radius: var(--bubble-radius-large)}._messageBotLast_xtsrt_15{--bot-bubble-top-right-radius: var(--bubble-radius-large);--bot-bubble-bottom-left-radius: var(--bubble-radius-large);--bot-bubble-bottom-right-radius: var(--bubble-radius-large);--bubble-margin: var(--bubble-margin-large)}._messageBotAnimated_xtsrt_32{animation-duration:.25s;animation-timing-function:ease-in;animation-delay:0s;animation-iteration-count:1;animation-direction:normal;animation-fill-mode:forwards;animation-play-state:running;animation-name:_fadeInLeft_xtsrt_1}._messageGuest_xtsrt_43{display:flex;align-items:flex-end;justify-content:flex-end}._messageGuestFirst_xtsrt_49{--guest-bubble-top-left-radius: var(--bubble-radius-large);--guest-bubble-top-right-radius: var(--bubble-radius-large);--guest-bubble-bottom-left-radius: var(--bubble-radius-large)}._messageGuestLast_xtsrt_55{--guest-bubble-top-left-radius: var(--bubble-radius-large);--guest-bubble-bottom-left-radius: var(--bubble-radius-large);--guest-bubble-bottom-right-radius: var(--bubble-radius-large);--bubble-margin: var(--bubble-margin-large);margin-bottom:var(--bubble-margin)}._avatar_xtsrt_15{width:var(--avatar-size);height:var(--avatar-size);border-radius:var(--avatar-radius, 50%)}._botAvatar_xtsrt_69{background-color:var(--bot-avatar-background-color)}._agentAvatar_xtsrt_73{background-color:var(--agent-avatar-background-color)}._bubble_xtsrt_77{display:inline-block;max-width:calc(100% - 4.3rem);position:relative}._bubbleContent_xtsrt_83{padding:var(--bubble-padding);color:inherit;font-size:inherit}._bubbleContent_xtsrt_83 *>:first-child{margin-top:0}._bubbleContent_xtsrt_83 *>:last-child{margin-bottom:0}._bubbleContent_xtsrt_83 h1,._bubbleContent_xtsrt_83 h2,._bubbleContent_xtsrt_83 h3,._bubbleContent_xtsrt_83 h4,._bubbleContent_xtsrt_83 h5,._bubbleContent_xtsrt_83 p,._bubbleContent_xtsrt_83 a,._bubbleContent_xtsrt_83 ul,._bubbleContent_xtsrt_83 ol{color:inherit;margin-block-start:.4em;margin-block-end:.4em;margin-inline-start:0px;margin-inline-end:0px}._bubbleContent_xtsrt_83 h1{font-size:1.2rem;white-space:pre-wrap}._bubbleContent_xtsrt_83 h2{font-size:1.1rem;white-space:pre-wrap}._bubbleContent_xtsrt_83 h3,._bubbleContent_xtsrt_83 h4,._bubbleContent_xtsrt_83 h5{font-size:1rem;white-space:pre-wrap}._bubbleContent_xtsrt_83 a{text-decoration:underline;cursor:pointer}._bubbleContent_xtsrt_83 a:hover{opacity:.8}._bubbleContent_xtsrt_83 img{max-width:100%;margin-block-start:0;margin-block-end:0}._bubbleContent_xtsrt_83 ul{padding:0 0 0 1.1em}._bubbleContent_xtsrt_83 ul>li{list-style-type:disc}._bubbleContent_xtsrt_83 ol{padding:0 0 0 1.1em}._bubbleContent_xtsrt_83 ol>li{list-style-type:decimal}._bubbleContent_xtsrt_83 table{width:100%}._bubbleContent_xtsrt_83 td:not(:last-child){padding-right:1rem}._bubbleContent_xtsrt_83 hr{margin-top:1rem;margin-bottom:1rem;border-top:1px solid;border-left:0;border-bottom:0;border-right:0}._bubbleLeft_xtsrt_168{border-radius:var(--bot-bubble-top-left-radius) var(--bot-bubble-top-right-radius) var(--bot-bubble-bottom-right-radius) var(--bot-bubble-bottom-left-radius);border-color:var(--bot-bubble-border-color);border-width:var(--bot-bubble-border-width);border-style:solid;background-color:var(--bot-bubble-background-color);margin-left:1rem}._leftText_xtsrt_177{color:var(--bot-bubble-text-color)}._leftText_xtsrt_177 a{color:var(--bot-bubble-text-color)!important}._bubbleRight_xtsrt_184{border-radius:var(--guest-bubble-top-left-radius) var(--guest-bubble-top-right-radius) var(--guest-bubble-bottom-right-radius) var(--guest-bubble-bottom-left-radius);border-color:var(--guest-bubble-border-color);border-width:var(--guest-bubble-border-width);border-style:solid;background-color:var(--guest-bubble-background-color)}._rightText_xtsrt_192,._rightText_xtsrt_192 a{color:var(--guest-bubble-text-color)}@keyframes _fadeInLeft_xtsrt_1{0%{transform:translate(-100vw)}to{transform:translate(0)}}._problemReport_39r57_1{display:flex;flex-direction:column;align-self:center}._problemReportIcon_39r57_7{height:1rem;width:1rem;margin-left:1rem}._problemReportIconActive_39r57_13{cursor:pointer;opacity:1}._problemReportIconActive_39r57_13:hover{opacity:.5}._problemReportIconInactive_39r57_21{cursor:pointer;opacity:.5}._problemReportIconInactive_39r57_21:hover{opacity:1}._title_1mhh2_1{margin-top:0;margin-block-start:0}._subtitle_1mhh2_6{margin-top:.5rem;margin-bottom:.5rem}._buttons_1mhh2_11{margin-top:1rem;display:flex;flex-direction:row;flex-wrap:wrap;gap:.5rem}._button_1mhh2_11{font-size:.9em;margin:0;background-color:var(--bot-bubble-text-color);color:var(--bot-bubble-background-color);border:2px solid var(--bot-bubble-text-color);width:100%}._button_1mhh2_11:hover{color:var(--bot-bubble-text-color);background-color:var(--bot-bubble-background-color);border:2px solid var(--bot-bubble-text-color)}._imageContainer_1mhh2_33{display:flex}._image_1mhh2_33{height:100%;width:100%;object-fit:cover;border-radius:calc(var(--bot-bubble-top-left-radius) - var(--bot-bubble-border-width)) calc(var(--bot-bubble-top-right-radius) - var(--bot-bubble-border-width)) 0 0}._video_container_1mhh2_44{display:flex}._video_1mhh2_44{width:100%;height:100%;border-radius:calc(var(--bot-bubble-top-left-radius) - var(--bot-bubble-border-width)) calc(var(--bot-bubble-top-right-radius) - var(--bot-bubble-border-width)) 0 0}._only_1mhh2_54{border-radius:calc(var(--bot-bubble-top-left-radius) - var(--bot-bubble-border-width)) calc(var(--bot-bubble-top-right-radius) - var(--bot-bubble-border-width)) calc(var(--bot-bubble-bottom-right-radius) - var(--bot-bubble-border-width)) calc(var(--bot-bubble-bottom-left-radius) - var(--bot-bubble-border-width))}._text_1k7aq_1{overflow-wrap:break-word}._ticontainer_wftg7_1{padding:var(--bubble-padding)}._tiblock_wftg7_5{align-items:center;display:flex;height:1rem;margin:2.1px}._tidot_wftg7_12{background-color:var(--bot-bubble-text-color);animation:_mercuryTypingAnimation_wftg7_1 1s infinite ease-in-out;border-radius:3px;display:inline-block;height:6px;margin-right:3px;width:6px}@keyframes _mercuryTypingAnimation_wftg7_1{0%{transform:translateY(0)}28%{transform:translateY(-5px)}44%{transform:translateY(0)}}._tidot_wftg7_12:nth-child(1){animation-delay:50ms}._tidot_wftg7_12:nth-child(2){animation-delay:.15s}._tidot_wftg7_12:nth-child(3){animation-delay:.25s}._container_t5oqt_1{padding:.5rem;display:flex;justify-content:center;align-items:center;border-top:1px solid #bfbfbf;background-color:#fff;font-size:.7rem;color:#717171}._container_t5oqt_1 a{color:var(--brand-primary-color);text-decoration:none}._container_fgqz2_1{visibility:hidden;position:absolute;z-index:3000;padding:1rem;height:100%;width:100%;background-color:#fff;top:0;bottom:0;transform:translateY(100%);overflow-y:auto;overscroll-behavior:contain}._container_fgqz2_1 h1{font-size:1.6em}._container_fgqz2_1 h2{font-size:1em}._container_fgqz2_1 p{line-height:1.5}@keyframes _slide-in_fgqz2_1{0%{transform:translateY(100%);visibility:visible}to{transform:translateY(0);visibility:visible}}@keyframes _slide-out_fgqz2_1{0%{transform:translateY(0);visibility:visible}99%{visibility:visible}to{transform:translateY(100%);visibility:hidden}}._containerOpen_fgqz2_48{animation:_slide-in_fgqz2_1 .2s forwards}._containerClose_fgqz2_52{animation:_slide-out_fgqz2_1 .2s forwards}._formContainer_fgqz2_56{display:flex;flex-direction:column}._emailInput_fgqz2_61{box-sizing:border-box;margin:1rem 0 0;font-variant:tabular-nums;list-style:none;font-feature-settings:"tnum";position:relative;display:inline-block;width:100%;min-width:0;padding:4px 11px;color:#000000a6;font-size:14px;line-height:1.5715;background-color:#fff;background-image:none;border:1px solid #d9d9d9;border-radius:2px;transition:all .3s;outline:none}._emailInput_fgqz2_61:hover{border:1px solid var(--brand-primary-color)}._emailInput_fgqz2_61:focus{border:1px solid var(--brand-primary-color)}._description_fgqz2_90{font-size:.9rem;-webkit-hyphens:auto;hyphens:auto}._actions_fgqz2_95{margin-top:1rem;padding-bottom:3rem;display:flex;flex-direction:row;flex-wrap:wrap;justify-content:flex-end;gap:.5rem}._validationError_fgqz2_105{padding-top:.5em;color:var(--danger-color);font-size:.8em;height:1rem}._submitted_fgqz2_112{margin-top:3rem;padding:1rem;border:1px solid var(--brand-primary-color);border-radius:2px}._inputContainer_1px77_1{z-index:2000}._blockUserInput_rv0dg_1{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:left;position:relative;background-color:#fff;color:#717171;font-size:.9rem;border-top:1px solid #bfbfbf;padding:.6rem 1rem;animation:_append-animate_rv0dg_1 .2s ease-in;z-index:0}@keyframes _append-animate_rv0dg_1{0%{opacity:0;top:6rem}to{opacity:1;top:0}}._callToActionContainer_1t611_1{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;position:relative;background-color:#fff;border-top:1px solid #bfbfbf;padding:.6rem 1rem .3rem;animation:_append-animate_1t611_1 .2s ease-in;z-index:0}@keyframes _append-animate_1t611_1{0%{opacity:0;top:6rem}to{opacity:1;top:0}}._callToActionTitle_1t611_24{font-size:.9rem;color:#717171;margin-bottom:.2rem;padding-right:.5rem}._rateOverlay_1t611_31{visibility:hidden;position:absolute;z-index:3000;display:flex;flex-direction:column;justify-content:space-between;height:100%;width:100%;background-color:var(--body-background-color);top:0;bottom:0;transform:translateY(100%);overflow-y:auto;overscroll-behavior:contain}._rateOverlay_1t611_31 h2{font-size:1em;text-align:center}._rateOverlay_1t611_31 p{line-height:1.5}._rateOverlay_1t611_31 form{display:flex;flex:1;flex-direction:column;justify-content:space-between}._body_1t611_61{height:100%;display:flex;flex-direction:column;justify-content:space-between;padding:1rem}@keyframes _slide-in_1t611_1{0%{transform:translateY(100%);visibility:visible}to{transform:translateY(0);visibility:visible}}@keyframes _slide-out_1t611_1{0%{transform:translateY(0);visibility:visible}99%{visibility:visible}to{transform:translateY(100%);visibility:hidden}}._rateOverlayOpen_1t611_92{animation:_slide-in_1t611_1 .2s forwards}._rateOverlayClose_1t611_96{animation:_slide-out_1t611_1 .2s forwards}._footer_1t611_100{border-top:1px solid #bfbfbf;background-color:#fff}._footer_1t611_100 input{font-size:1rem;border:none;box-sizing:border-box;width:100%;outline-width:0;padding:1.3rem 1rem 1rem;text-overflow:ellipsis;color:#717171}._actions_1t611_115{display:flex;padding:.5rem;justify-content:flex-end;align-items:center;line-height:0}._actions_1t611_115 button{width:100%;font-size:.8rem}._bubbles_1t611_127{display:flex;flex-direction:column}@keyframes _appear_1t611_1{0%{opacity:0}66%{opacity:0}to{opacity:1}}@keyframes _fadeInLeft_1t611_1{0%{transform:translate(-3rem)}80%{transform:translate(-3rem)}to{transform:translate(0)}}._rateFeedbackBotBubble_1t611_154{display:flex;align-items:flex-end;margin:1rem 0}._rateFeedbackGuestBubble_1t611_160{display:flex;align-items:flex-end;justify-content:flex-end}._avatar_1t611_166{width:var(--avatar-size);height:var(--avatar-size);animation-duration:.5s;animation-timing-function:ease-in;animation-delay:0s;animation-iteration-count:1;animation-direction:normal;animation-fill-mode:forwards;animation-play-state:running;animation-name:_fadeInLeft_1t611_1}._bubble_1t611_127{padding:var(--bubble-padding);font-size:.9rem;animation-duration:1s;animation-delay:0s;animation-timing-function:ease;animation-iteration-count:1;animation-direction:normal;animation-fill-mode:forwards;animation-play-state:running;animation-name:_appear_1t611_1}._botBubble_1t611_192{border-radius:var(--bubble-radius-large);background-color:var(--bot-bubble-background-color);margin-left:1rem;color:var(--bot-bubble-text-color)}._botBubble_1t611_192 a{color:var(--bot-bubble-text-color)!important}._guestBubble_1t611_202{animation-duration:.25s;align-self:end;border-radius:var(--bubble-radius-large);background-color:var(--guest-bubble-background-color);color:var(--guest-bubble-text-color);margin-left:1rem;display:box;line-clamp:3;box-orient:vertical;overflow:hidden}._guestBubble_1t611_202 a{color:var(--guest-bubble-text-color)}._rateText_1t611_218{padding:.75rem;font-size:.9rem}._stars_1t611_223{box-sizing:border-box;font-variant:tabular-nums;font-feature-settings:"tnum";display:inline-block;margin:0;padding:0;color:#c4c4c4;line-height:unset;list-style:none;outline:none}._starsSmall_1t611_236{font-size:1.2rem}._starsLarge_1t611_240{font-size:2rem}._starsLarge_1t611_240 ._star_1t611_223:not(:last-child){margin-right:1.5rem}._star_1t611_223{display:inline-block;color:inherit;cursor:pointer}._star_1t611_223:not(:last-child){margin-right:8px}._starReadonly_1t611_257{cursor:inherit}._star_1t611_223>div{transition:all .3s,outline 0s}._starIcon_1t611_265{display:inline-block;color:inherit;font-style:normal;line-height:0;text-align:center;text-transform:none;text-rendering:optimizelegibility}._star_1t611_223 [aria-checked=true]{color:var(--brand-primary-color, #fadb14)}._star_1t611_223 [aria-checked=false]{color:#adadad}._starsDescriptionContainer_1t611_283{display:flex;flex-direction:column;width:fit-content;padding-top:1rem;padding-bottom:1rem;margin:auto}._starsDescription_1t611_283{display:flex;flex-direction:row;justify-content:space-between;font-size:.7rem;color:#000000a6}._inputWrapper_lbrof_5{display:flex;justify-content:center;align-items:center;line-height:0;border-top:1px solid #bfbfbf;background-color:#fff}._messageInputWrapper_lbrof_14{flex:1;margin-right:.5rem}._messageInput_lbrof_14{resize:none;font-size:1rem;font-family:inherit;border:none;height:calc(1em + 3rem);box-sizing:border-box;width:100%;outline-width:0;padding:1.3rem 1rem;text-overflow:ellipsis}._messageInput_lbrof_14:focus{outline:none}._buttons_lbrof_36{padding-right:.5rem;display:flex;justify-content:center;align-items:center}._button_lbrof_36[disabled]{opacity:.4}._button_lbrof_36{display:flex;align-items:center;justify-content:center;width:40px;height:40px;color:var(--brand-primary-color);background-color:var(--brand-secondary-color);cursor:pointer;-webkit-user-select:none;user-select:none;border-radius:50%;border:none;text-align:center}._button_lbrof_36 svg{margin:2px;height:2em;width:2em;fill:currentColor}._button_lbrof_36:hover,._button_lbrof_36:active,._button_lbrof_36:focus{border:none;outline:none;color:var(--brand-secondary-color);background-color:var(--brand-primary-color)}._button_lbrof_36:not(:last-child){margin-right:.5em}*{box-sizing:border-box}._audioRecorder_12g22_5{display:flex;margin-left:-5px}._recordButton_12g22_10{display:flex;align-items:center;justify-content:center;cursor:pointer;-webkit-user-select:none;user-select:none;width:40px;height:40px;border-radius:50%;border:none;text-align:center;color:var(--brand-primary-color);background-color:var(--brand-secondary-color)}._recordButton_12g22_10 svg{margin:2px;height:2em;width:2em;fill:currentColor}._recordButton_12g22_10:hover,._recordButton_12g22_10:active,._recordButton_12g22_10:focus{background-color:var(--brand-primary-color);color:var(--brand-secondary-color);border:none;outline:none}._submitButton_12g22_37{display:flex;align-items:center;justify-content:center;cursor:pointer;-webkit-user-select:none;user-select:none;width:40px;height:40px;border-radius:50%;border:none;text-align:center;color:var(--brand-primary-color);background-color:var(--brand-secondary-color)}._submitButton_12g22_37 svg{margin:2px;height:2em;width:2em;fill:currentColor}._submitButton_12g22_37:hover,._submitButton_12g22_37:active,._submitButton_12g22_37:focus{background-color:var(--brand-primary-color);color:var(--brand-secondary-color);border:none;outline:none}._cancelButton_12g22_64{display:flex;align-items:center;justify-content:center;cursor:pointer;-webkit-user-select:none;user-select:none;width:40px;height:40px;border-radius:50%;border:none;text-align:center;color:var(--brand-primary-color);background-color:var(--brand-secondary-color)}._cancelButton_12g22_64 svg{margin:2px;height:2em;width:2em;fill:currentColor}._cancelButton_12g22_64:hover,._cancelButton_12g22_64:active,._cancelButton_12g22_64:focus{background-color:var(--brand-primary-color);color:var(--brand-secondary-color);border:none;outline:none}._recorderIcon_12g22_91{width:1.3em;height:1.3em;border-radius:50%;animation:_pulse_12g22_1 2s infinite;margin:auto .6em}@keyframes _pulse_12g22_1{0%{background-color:#fff}40%{background-color:var(--danger-color)}60%{background-color:var(--danger-color)}to{background-color:#fff}}._spinning_12g22_113{width:40px;height:40px;padding:5px;display:block;margin:auto;color:var(--brand-primary-color);animation:_spin_12g22_113 1.2s linear infinite}@keyframes _spin_12g22_113{to{transform:rotate(360deg)}}._quickReplies_11l22_1{display:flex;flex-flow:row wrap;justify-content:flex-end;padding:.4rem 1rem;gap:.5rem}._quickReply_11l22_9{font-size:.8rem;background-color:var(--brand-secondary-color);color:var(--brand-primary-color);border:1px solid var(--brand-primary-color)}._quickReply_11l22_9:active,._quickReply_11l22_9:focus,._quickReply_11l22_9:hover{background-color:var(--brand-primary-color);color:var(--brand-secondary-color);border:1px solid var(--brand-secondary-color);outline:none}
@@ -77,7 +77,7 @@ Try polyfilling it using "@formatjs/intl-pluralrules"
77
77
  Try polyfilling it using "@formatjs/intl-relativetimeformat"
78
78
  `,Lt.MISSING_INTL_API));try{return Kw(e,t,i).format(n,r)}catch(s){e.onError(new ft("Error formatting relative time.",e.locale,s))}return String(n)}var Zw=["style","currency","unit","unitDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","currencyDisplay","currencySign","notation","signDisplay","unit","unitDisplay","numberingSystem","trailingZeroDisplay","roundingPriority","roundingIncrement","roundingMode"];function fy(e,t,n){var r=e.locale,i=e.formats,o=e.onError;n===void 0&&(n={});var s=n.format,a=s&&Dc(i,"number",s,o)||{},l=Yn(n,Zw,a);return t(r,l)}function Jw(e,t,n,r){r===void 0&&(r={});try{return fy(e,t,r).format(n)}catch(i){e.onError(new ft("Error formatting number.",e.locale,i))}return String(n)}function eS(e,t,n,r){r===void 0&&(r={});try{return fy(e,t,r).formatToParts(n)}catch(i){e.onError(new ft("Error formatting number.",e.locale,i))}return[]}function tS(e){var t=e?e[Object.keys(e)[0]]:void 0;return typeof t=="string"}function nS(e){e.onWarn&&e.defaultRichTextElements&&tS(e.messages||{})&&e.onWarn(`[@formatjs/intl] "defaultRichTextElements" was specified but "message" was not pre-compiled.
79
79
  Please consider using "@formatjs/cli" to pre-compile your messages for performance.
80
- For more details see https://formatjs.io/docs/getting-started/message-distribution`)}function rS(e,t){var n=Fw(t),r=N(N({},ay),e),i=r.locale,o=r.defaultLocale,s=r.onError;return i?!Intl.NumberFormat.supportedLocalesOf(i).length&&s?s(new Zd('Missing locale data for locale: "'.concat(i,'" in Intl.NumberFormat. Using default locale: "').concat(o,'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))):!Intl.DateTimeFormat.supportedLocalesOf(i).length&&s&&s(new Zd('Missing locale data for locale: "'.concat(i,'" in Intl.DateTimeFormat. Using default locale: "').concat(o,'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))):(s&&s(new Pw('"locale" was not configured, using "'.concat(o,'" as fallback. See https://formatjs.io/docs/react-intl/api#intlshape for more details'))),r.locale=r.defaultLocale||"en"),nS(r),N(N({},r),{formatters:n,formatNumber:Jw.bind(null,r,n.getNumberFormat),formatNumberToParts:eS.bind(null,r,n.getNumberFormat),formatRelativeTime:Yw.bind(null,r,n.getRelativeTimeFormat),formatDate:Bw.bind(null,r,n.getDateTimeFormat),formatDateToParts:zw.bind(null,r,n.getDateTimeFormat),formatTime:Lw.bind(null,r,n.getDateTimeFormat),formatDateTimeRange:jw.bind(null,r,n.getDateTimeFormat),formatTimeToParts:Uw.bind(null,r,n.getDateTimeFormat),formatPlural:Xw.bind(null,r,n.getPluralRules),formatMessage:su.bind(null,r,n),$t:su.bind(null,r,n),formatList:Ww.bind(null,r,n.getListFormat),formatListToParts:cy.bind(null,r,n.getListFormat),formatDisplayName:Hw.bind(null,r,n.getDisplayNames)})}function dy(e){$g(e,"[React Intl] Could not find required `intl` object. <IntlProvider> needs to exist in the component ancestry.")}var hy=N(N({},ay),{textComponent:A.Fragment});function iS(e){return function(t){return e(A.Children.toArray(t))}}function oS(e,t){if(e===t)return!0;if(!e||!t)return!1;var n=Object.keys(e),r=Object.keys(t),i=n.length;if(r.length!==i)return!1;for(var o=0;o<i;o++){var s=n[o];if(e[s]!==t[s]||!Object.prototype.hasOwnProperty.call(t,s))return!1}return!0}var Mc=typeof window<"u"&&!window.__REACT_INTL_BYPASS_GLOBAL_CONTEXT__?window.__REACT_INTL_CONTEXT__||(window.__REACT_INTL_CONTEXT__=A.createContext(null)):A.createContext(null);Mc.Consumer;var sS=Mc.Provider,aS=sS,lS=Mc;function Ys(){var e=A.useContext(lS);return dy(e),e}var au;(function(e){e.formatDate="FormattedDate",e.formatTime="FormattedTime",e.formatNumber="FormattedNumber",e.formatList="FormattedList",e.formatDisplayName="FormattedDisplayName"})(au||(au={}));var lu;(function(e){e.formatDate="FormattedDateParts",e.formatTime="FormattedTimeParts",e.formatNumber="FormattedNumberParts",e.formatList="FormattedListParts"})(lu||(lu={}));function py(e){var t=function(n){var r=Ys(),i=n.value,o=n.children,s=js(n,["value","children"]),a=typeof i=="string"?new Date(i||0):i,l=e==="formatDate"?r.formatDateToParts(a,s):r.formatTimeToParts(a,s);return o(l)};return t.displayName=lu[e],t}function Wi(e){var t=function(n){var r=Ys(),i=n.value,o=n.children,s=js(n,["value","children"]),a=r[e](i,s);if(typeof o=="function")return o(a);var l=r.textComponent||A.Fragment;return A.createElement(l,null,a)};return t.displayName=au[e],t}function my(e){return e&&Object.keys(e).reduce(function(t,n){var r=e[n];return t[n]=oy(r)?iS(r):r,t},{})}var nh=function(e,t,n,r){for(var i=[],o=4;o<arguments.length;o++)i[o-4]=arguments[o];var s=my(r),a=su.apply(void 0,Pt([e,t,n,s],i,!1));return Array.isArray(a)?A.Children.toArray(a):a},rh=function(e,t){var n=e.defaultRichTextElements,r=js(e,["defaultRichTextElements"]),i=my(n),o=rS(N(N(N({},hy),r),{defaultRichTextElements:i}),t),s={locale:o.locale,timeZone:o.timeZone,fallbackOnEmptyString:o.fallbackOnEmptyString,formats:o.formats,defaultLocale:o.defaultLocale,defaultFormats:o.defaultFormats,messages:o.messages,onError:o.onError,defaultRichTextElements:i};return N(N({},o),{formatMessage:nh.bind(null,s,o.formatters),$t:nh.bind(null,s,o.formatters)})};function $a(e){return{locale:e.locale,timeZone:e.timeZone,fallbackOnEmptyString:e.fallbackOnEmptyString,formats:e.formats,textComponent:e.textComponent,messages:e.messages,defaultLocale:e.defaultLocale,defaultFormats:e.defaultFormats,onError:e.onError,onWarn:e.onWarn,wrapRichTextChunksInFragment:e.wrapRichTextChunksInFragment,defaultRichTextElements:e.defaultRichTextElements}}var uS=function(e){ct(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.cache=ly(),n.state={cache:n.cache,intl:rh($a(n.props),n.cache),prevConfig:$a(n.props)},n}return t.getDerivedStateFromProps=function(n,r){var i=r.prevConfig,o=r.cache,s=$a(n);return oS(i,s)?null:{intl:rh(s,o),prevConfig:s}},t.prototype.render=function(){return dy(this.state.intl),A.createElement(aS,{value:this.state.intl},this.props.children)},t.displayName="IntlProvider",t.defaultProps=hy,t}(A.PureComponent);Wi("formatDate");Wi("formatTime");Wi("formatNumber");Wi("formatList");Wi("formatDisplayName");py("formatDate");py("formatTime");const cS="_chatPage_9ezu4_10",fS={chatPage:cS};var U={},uu={},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 gy={};Object.defineProperty(gy,"__esModule",{value:!0});var Fc={};Object.defineProperty(Fc,"__esModule",{value:!0});const dS=I,hS=(e,t)=>({type:dS.GUEST_FEEDBACK_RESPONSE,payload:{satisfaction:e,intent:t}});Fc.default=hS;var Bc={};Object.defineProperty(Bc,"__esModule",{value:!0});const pS=I,mS=e=>({type:pS.GUEST_CONNECTED,payload:{sessionId:e}});Bc.default=mS;var Lc={};Object.defineProperty(Lc,"__esModule",{value:!0});const gS=I,yS=e=>({type:gS.GUEST_DISCONNECTED,payload:{sessionId:e}});Lc.default=yS;var jc={},ne={};Object.defineProperty(ne,"__esModule",{value:!0});ne.getStringRepresentationFromMessage=ne.MessageTypeEnum=ne.AudioMessage=ne.FileMessage=ne.ImageMessage=ne.VideoMessage=ne.MarkdownMessage=ne.DetailMessage=ne.TextMessage=ne.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})}};ne.Message=Cn;let vS=class extends Cn{constructor(n,r){super(Oe.TEXT,r);V(this,"text");this.text=n}};ne.TextMessage=vS;let _S=class extends Cn{constructor(n,r){super(Oe.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)}};ne.DetailMessage=_S;let ES=class extends Cn{constructor(n,r,i){super(Oe.MARKDOWN,i);V(this,"markdown");V(this,"excerpt");V(this,"className");this.markdown=n,this.excerpt=r,this.className=""}setClassName(n){this.className=n}};ne.MarkdownMessage=ES;class wS extends Cn{constructor(n,r){super(Oe.VIDEO,r);V(this,"url");this.url=n}}ne.VideoMessage=wS;class SS extends Cn{constructor(n,r){super(Oe.IMAGE,r);V(this,"url");this.url=n}}ne.ImageMessage=SS;class bS extends Cn{constructor(n,r){super(Oe.FILE,r);V(this,"url");this.url=n}}ne.FileMessage=bS;class xS extends Cn{constructor(n,r){super(Oe.AUDIO,r);V(this,"url");this.url=n}}ne.AudioMessage=xS;var Oe;(function(e){e.TEXT="TEXT",e.DETAIL="DETAIL",e.MARKDOWN="MARKDOWN",e.VIDEO="VIDEO",e.IMAGE="IMAGE",e.FILE="FILE",e.AUDIO="AUDIO"})(Oe||(ne.MessageTypeEnum=Oe={}));const TS=e=>{switch(e.type){case Oe.TEXT:return e.text;case Oe.DETAIL:const n=e;return`${n.title} // ${n.subtitle}`;case Oe.MARKDOWN:return e.excerpt;case Oe.VIDEO:return`Video Url: ${e.url}`;case Oe.IMAGE:return`Image Url: ${e.url}`;case Oe.FILE:return`File Url: ${e.url}`;case Oe.AUDIO:return`Audio Url: ${e.url}`;default:throw new Error("Unknown message type "+e.type)}};ne.getStringRepresentationFromMessage=TS;var ze={};Object.defineProperty(ze,"__esModule",{value:!0});ze.UserType=ze.PersonUser=ze.GuestUser=ze.BotUser=ze.User=void 0;class Zs{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}}ze.User=Zs;class CS extends Zs{constructor(){super(Mi.BOT,null,"Chatbot","bot.svg")}}ze.BotUser=CS;class kS extends Zs{constructor(){super(Mi.GUEST,null,"Guest","visitor.svg")}}ze.GuestUser=kS;class OS extends Zs{constructor(t,n,r){super(Mi.PERSON,t,n,r)}}ze.PersonUser=OS;var Mi;(function(e){e.GUEST="GUEST",e.BOT="BOT",e.PERSON="PERSON"})(Mi||(ze.UserType=Mi={}));Object.defineProperty(jc,"__esModule",{value:!0});const RS=ne,NS=ze,AS=I,PS=e=>{const t=new RS.TextMessage(e,new NS.GuestUser);return{type:AS.MESSAGE_FROM_GUEST,message:t}};jc.default=PS;var zc={};Object.defineProperty(zc,"__esModule",{value:!0});const IS=ne,DS=ze,MS=I,FS=(e,t={})=>{const n=new IS.TextMessage(e,new DS.GuestUser);return{type:MS.MESSAGE_WITHOUT_ANALYSIS_FROM_GUEST,message:n,payload:t}};zc.default=FS;var Uc={};Object.defineProperty(Uc,"__esModule",{value:!0});const BS=I,LS=(e,t)=>({type:BS.PROBLEM_REPORT_FROM_GUEST,payload:{actionId:e,problem:t}});Uc.default=LS;var $c={};Object.defineProperty($c,"__esModule",{value:!0});const jS=I,zS=e=>({type:jS.NLU_REQUEST_EVENT,event:e});$c.default=zS;var Hc={};Object.defineProperty(Hc,"__esModule",{value:!0});const US=I,$S=e=>({type:US.MESSAGE_TO_GUEST,message:e});Hc.default=$S;(function(e){var t=q&&q.__createBinding||(Object.create?function(p,g,w,h){h===void 0&&(h=w);var d=Object.getOwnPropertyDescriptor(g,w);(!d||("get"in d?!g.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:function(){return g[w]}}),Object.defineProperty(p,h,d)}:function(p,g,w,h){h===void 0&&(h=w),p[h]=g[w]}),n=q&&q.__setModuleDefault||(Object.create?function(p,g){Object.defineProperty(p,"default",{enumerable:!0,value:g})}:function(p,g){p.default=g}),r=q&&q.__importStar||function(p){if(p&&p.__esModule)return p;var g={};if(p!=null)for(var w in p)w!=="default"&&Object.prototype.hasOwnProperty.call(p,w)&&t(g,p,w);return n(g,p),g},i=q&&q.__exportStar||function(p,g){for(var w in p)w!=="default"&&!Object.prototype.hasOwnProperty.call(g,w)&&t(g,p,w)},o=q&&q.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(e,"__esModule",{value:!0}),e.reportProblemFromGuest=e.feedbackFromGuestResponse=e.requestNLUEvent=e.receiveTextMessageWithoutAnalysisFromGuest=e.receiveTextMessageFromGuest=e.sendMessageToGuest=e.guestDisconnected=e.guestConnected=e.ActionTypes=void 0,e.ActionTypes=r(I),i(gy,e);const s=o(Fc);e.feedbackFromGuestResponse=s.default;const a=o(Bc);e.guestConnected=a.default;const l=o(Lc);e.guestDisconnected=l.default;const u=o(jc);e.receiveTextMessageFromGuest=u.default;const c=o(zc);e.receiveTextMessageWithoutAnalysisFromGuest=c.default;const m=o(Uc);e.reportProblemFromGuest=m.default;const v=o($c);e.requestNLUEvent=v.default;const f=o(Hc);e.sendMessageToGuest=f.default})(uu);var Ar={},yy={};Object.defineProperty(yy,"__esModule",{value:!0});var Js={};Object.defineProperty(Js,"__esModule",{value:!0});Js.NullableKnowledgeBaseAdapter=void 0;class HS{async upsertKnowledgeBase(t){throw new Error("Method not implemented.")}async findKnowledgeBaseByName(t){throw new Error("Method not implemented.")}async deleteKnowledgeBaseByName(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.")}}Js.NullableKnowledgeBaseAdapter=HS;var GS=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]}),VS=q&&q.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),WS=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)&&GS(t,e,n);return VS(t,e),t};Object.defineProperty(Ar,"__esModule",{value:!0});Ar.NullableCmsAdapter=Ar.KnowledgeBase=void 0;Ar.KnowledgeBase=WS(yy);const qS=Js;Ar.NullableCmsAdapter={knowledgeBase:new qS.NullableKnowledgeBaseAdapter};var cu={},vy={};Object.defineProperty(vy,"__esModule",{value:!0});var Dt={};Object.defineProperty(Dt,"__esModule",{value:!0});Dt.ButtonTypeEnum=Dt.PostbackButton=Dt.UrlButton=Dt.Button=void 0;class Gc{constructor(t,n){V(this,"title");V(this,"type");this.title=t,this.type=n}}Dt.Button=Gc;class XS extends Gc{constructor(n,r){super(n,ps.WEB_URL);V(this,"url");this.url=r}}Dt.UrlButton=XS;class QS extends Gc{constructor(n,r){super(n,ps.POSTBACK);V(this,"payload");this.payload=r}}Dt.PostbackButton=QS;var ps;(function(e){e.WEB_URL="web_url",e.POSTBACK="postback"})(ps||(Dt.ButtonTypeEnum=ps={}));var _y={};Object.defineProperty(_y,"__esModule",{value:!0});var ea={};Object.defineProperty(ea,"__esModule",{value:!0});ea.SatisfactionEnum=void 0;var ih;(function(e){e.GOOD="GOOD",e.BAD="BAD"})(ih||(ea.SatisfactionEnum=ih={}));(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(vy,e),n(Dt,e),n(_y,e),n(ea,e),n(ne,e),n(ze,e)})(cu);(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(uu,e),e.Actions=i(uu),e.CMS=i(Ar),r(cu,e),e.Model=i(cu)})(U);var Ey={exports:{}};/*!
80
+ For more details see https://formatjs.io/docs/getting-started/message-distribution`)}function rS(e,t){var n=Fw(t),r=N(N({},ay),e),i=r.locale,o=r.defaultLocale,s=r.onError;return i?!Intl.NumberFormat.supportedLocalesOf(i).length&&s?s(new Zd('Missing locale data for locale: "'.concat(i,'" in Intl.NumberFormat. Using default locale: "').concat(o,'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))):!Intl.DateTimeFormat.supportedLocalesOf(i).length&&s&&s(new Zd('Missing locale data for locale: "'.concat(i,'" in Intl.DateTimeFormat. Using default locale: "').concat(o,'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))):(s&&s(new Pw('"locale" was not configured, using "'.concat(o,'" as fallback. See https://formatjs.io/docs/react-intl/api#intlshape for more details'))),r.locale=r.defaultLocale||"en"),nS(r),N(N({},r),{formatters:n,formatNumber:Jw.bind(null,r,n.getNumberFormat),formatNumberToParts:eS.bind(null,r,n.getNumberFormat),formatRelativeTime:Yw.bind(null,r,n.getRelativeTimeFormat),formatDate:Bw.bind(null,r,n.getDateTimeFormat),formatDateToParts:zw.bind(null,r,n.getDateTimeFormat),formatTime:Lw.bind(null,r,n.getDateTimeFormat),formatDateTimeRange:jw.bind(null,r,n.getDateTimeFormat),formatTimeToParts:Uw.bind(null,r,n.getDateTimeFormat),formatPlural:Xw.bind(null,r,n.getPluralRules),formatMessage:su.bind(null,r,n),$t:su.bind(null,r,n),formatList:Ww.bind(null,r,n.getListFormat),formatListToParts:cy.bind(null,r,n.getListFormat),formatDisplayName:Hw.bind(null,r,n.getDisplayNames)})}function dy(e){$g(e,"[React Intl] Could not find required `intl` object. <IntlProvider> needs to exist in the component ancestry.")}var hy=N(N({},ay),{textComponent:A.Fragment});function iS(e){return function(t){return e(A.Children.toArray(t))}}function oS(e,t){if(e===t)return!0;if(!e||!t)return!1;var n=Object.keys(e),r=Object.keys(t),i=n.length;if(r.length!==i)return!1;for(var o=0;o<i;o++){var s=n[o];if(e[s]!==t[s]||!Object.prototype.hasOwnProperty.call(t,s))return!1}return!0}var Mc=typeof window<"u"&&!window.__REACT_INTL_BYPASS_GLOBAL_CONTEXT__?window.__REACT_INTL_CONTEXT__||(window.__REACT_INTL_CONTEXT__=A.createContext(null)):A.createContext(null);Mc.Consumer;var sS=Mc.Provider,aS=sS,lS=Mc;function Ys(){var e=A.useContext(lS);return dy(e),e}var au;(function(e){e.formatDate="FormattedDate",e.formatTime="FormattedTime",e.formatNumber="FormattedNumber",e.formatList="FormattedList",e.formatDisplayName="FormattedDisplayName"})(au||(au={}));var lu;(function(e){e.formatDate="FormattedDateParts",e.formatTime="FormattedTimeParts",e.formatNumber="FormattedNumberParts",e.formatList="FormattedListParts"})(lu||(lu={}));function py(e){var t=function(n){var r=Ys(),i=n.value,o=n.children,s=js(n,["value","children"]),a=typeof i=="string"?new Date(i||0):i,l=e==="formatDate"?r.formatDateToParts(a,s):r.formatTimeToParts(a,s);return o(l)};return t.displayName=lu[e],t}function Wi(e){var t=function(n){var r=Ys(),i=n.value,o=n.children,s=js(n,["value","children"]),a=r[e](i,s);if(typeof o=="function")return o(a);var l=r.textComponent||A.Fragment;return A.createElement(l,null,a)};return t.displayName=au[e],t}function my(e){return e&&Object.keys(e).reduce(function(t,n){var r=e[n];return t[n]=oy(r)?iS(r):r,t},{})}var nh=function(e,t,n,r){for(var i=[],o=4;o<arguments.length;o++)i[o-4]=arguments[o];var s=my(r),a=su.apply(void 0,Pt([e,t,n,s],i,!1));return Array.isArray(a)?A.Children.toArray(a):a},rh=function(e,t){var n=e.defaultRichTextElements,r=js(e,["defaultRichTextElements"]),i=my(n),o=rS(N(N(N({},hy),r),{defaultRichTextElements:i}),t),s={locale:o.locale,timeZone:o.timeZone,fallbackOnEmptyString:o.fallbackOnEmptyString,formats:o.formats,defaultLocale:o.defaultLocale,defaultFormats:o.defaultFormats,messages:o.messages,onError:o.onError,defaultRichTextElements:i};return N(N({},o),{formatMessage:nh.bind(null,s,o.formatters),$t:nh.bind(null,s,o.formatters)})};function $a(e){return{locale:e.locale,timeZone:e.timeZone,fallbackOnEmptyString:e.fallbackOnEmptyString,formats:e.formats,textComponent:e.textComponent,messages:e.messages,defaultLocale:e.defaultLocale,defaultFormats:e.defaultFormats,onError:e.onError,onWarn:e.onWarn,wrapRichTextChunksInFragment:e.wrapRichTextChunksInFragment,defaultRichTextElements:e.defaultRichTextElements}}var uS=function(e){ct(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.cache=ly(),n.state={cache:n.cache,intl:rh($a(n.props),n.cache),prevConfig:$a(n.props)},n}return t.getDerivedStateFromProps=function(n,r){var i=r.prevConfig,o=r.cache,s=$a(n);return oS(i,s)?null:{intl:rh(s,o),prevConfig:s}},t.prototype.render=function(){return dy(this.state.intl),A.createElement(aS,{value:this.state.intl},this.props.children)},t.displayName="IntlProvider",t.defaultProps=hy,t}(A.PureComponent);Wi("formatDate");Wi("formatTime");Wi("formatNumber");Wi("formatList");Wi("formatDisplayName");py("formatDate");py("formatTime");const cS="_chatPage_1r3z6_10",fS={chatPage:cS};var U={},uu={},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 gy={};Object.defineProperty(gy,"__esModule",{value:!0});var Fc={};Object.defineProperty(Fc,"__esModule",{value:!0});const dS=I,hS=(e,t)=>({type:dS.GUEST_FEEDBACK_RESPONSE,payload:{satisfaction:e,intent:t}});Fc.default=hS;var Bc={};Object.defineProperty(Bc,"__esModule",{value:!0});const pS=I,mS=e=>({type:pS.GUEST_CONNECTED,payload:{sessionId:e}});Bc.default=mS;var Lc={};Object.defineProperty(Lc,"__esModule",{value:!0});const gS=I,yS=e=>({type:gS.GUEST_DISCONNECTED,payload:{sessionId:e}});Lc.default=yS;var jc={},ne={};Object.defineProperty(ne,"__esModule",{value:!0});ne.getStringRepresentationFromMessage=ne.MessageTypeEnum=ne.AudioMessage=ne.FileMessage=ne.ImageMessage=ne.VideoMessage=ne.MarkdownMessage=ne.DetailMessage=ne.TextMessage=ne.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})}};ne.Message=Cn;let vS=class extends Cn{constructor(n,r){super(Oe.TEXT,r);V(this,"text");this.text=n}};ne.TextMessage=vS;let _S=class extends Cn{constructor(n,r){super(Oe.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)}};ne.DetailMessage=_S;let ES=class extends Cn{constructor(n,r,i){super(Oe.MARKDOWN,i);V(this,"markdown");V(this,"excerpt");V(this,"className");this.markdown=n,this.excerpt=r,this.className=""}setClassName(n){this.className=n}};ne.MarkdownMessage=ES;class wS extends Cn{constructor(n,r){super(Oe.VIDEO,r);V(this,"url");this.url=n}}ne.VideoMessage=wS;class SS extends Cn{constructor(n,r){super(Oe.IMAGE,r);V(this,"url");this.url=n}}ne.ImageMessage=SS;class bS extends Cn{constructor(n,r){super(Oe.FILE,r);V(this,"url");this.url=n}}ne.FileMessage=bS;class xS extends Cn{constructor(n,r){super(Oe.AUDIO,r);V(this,"url");this.url=n}}ne.AudioMessage=xS;var Oe;(function(e){e.TEXT="TEXT",e.DETAIL="DETAIL",e.MARKDOWN="MARKDOWN",e.VIDEO="VIDEO",e.IMAGE="IMAGE",e.FILE="FILE",e.AUDIO="AUDIO"})(Oe||(ne.MessageTypeEnum=Oe={}));const TS=e=>{switch(e.type){case Oe.TEXT:return e.text;case Oe.DETAIL:const n=e;return`${n.title} // ${n.subtitle}`;case Oe.MARKDOWN:return e.excerpt;case Oe.VIDEO:return`Video Url: ${e.url}`;case Oe.IMAGE:return`Image Url: ${e.url}`;case Oe.FILE:return`File Url: ${e.url}`;case Oe.AUDIO:return`Audio Url: ${e.url}`;default:throw new Error("Unknown message type "+e.type)}};ne.getStringRepresentationFromMessage=TS;var ze={};Object.defineProperty(ze,"__esModule",{value:!0});ze.UserType=ze.PersonUser=ze.GuestUser=ze.BotUser=ze.User=void 0;class Zs{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}}ze.User=Zs;class CS extends Zs{constructor(){super(Mi.BOT,null,"Chatbot","bot.svg")}}ze.BotUser=CS;class kS extends Zs{constructor(){super(Mi.GUEST,null,"Guest","visitor.svg")}}ze.GuestUser=kS;class OS extends Zs{constructor(t,n,r){super(Mi.PERSON,t,n,r)}}ze.PersonUser=OS;var Mi;(function(e){e.GUEST="GUEST",e.BOT="BOT",e.PERSON="PERSON"})(Mi||(ze.UserType=Mi={}));Object.defineProperty(jc,"__esModule",{value:!0});const RS=ne,NS=ze,AS=I,PS=e=>{const t=new RS.TextMessage(e,new NS.GuestUser);return{type:AS.MESSAGE_FROM_GUEST,message:t}};jc.default=PS;var zc={};Object.defineProperty(zc,"__esModule",{value:!0});const IS=ne,DS=ze,MS=I,FS=(e,t={})=>{const n=new IS.TextMessage(e,new DS.GuestUser);return{type:MS.MESSAGE_WITHOUT_ANALYSIS_FROM_GUEST,message:n,payload:t}};zc.default=FS;var Uc={};Object.defineProperty(Uc,"__esModule",{value:!0});const BS=I,LS=(e,t)=>({type:BS.PROBLEM_REPORT_FROM_GUEST,payload:{actionId:e,problem:t}});Uc.default=LS;var $c={};Object.defineProperty($c,"__esModule",{value:!0});const jS=I,zS=e=>({type:jS.NLU_REQUEST_EVENT,event:e});$c.default=zS;var Hc={};Object.defineProperty(Hc,"__esModule",{value:!0});const US=I,$S=e=>({type:US.MESSAGE_TO_GUEST,message:e});Hc.default=$S;(function(e){var t=q&&q.__createBinding||(Object.create?function(p,g,w,h){h===void 0&&(h=w);var d=Object.getOwnPropertyDescriptor(g,w);(!d||("get"in d?!g.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:function(){return g[w]}}),Object.defineProperty(p,h,d)}:function(p,g,w,h){h===void 0&&(h=w),p[h]=g[w]}),n=q&&q.__setModuleDefault||(Object.create?function(p,g){Object.defineProperty(p,"default",{enumerable:!0,value:g})}:function(p,g){p.default=g}),r=q&&q.__importStar||function(p){if(p&&p.__esModule)return p;var g={};if(p!=null)for(var w in p)w!=="default"&&Object.prototype.hasOwnProperty.call(p,w)&&t(g,p,w);return n(g,p),g},i=q&&q.__exportStar||function(p,g){for(var w in p)w!=="default"&&!Object.prototype.hasOwnProperty.call(g,w)&&t(g,p,w)},o=q&&q.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(e,"__esModule",{value:!0}),e.reportProblemFromGuest=e.feedbackFromGuestResponse=e.requestNLUEvent=e.receiveTextMessageWithoutAnalysisFromGuest=e.receiveTextMessageFromGuest=e.sendMessageToGuest=e.guestDisconnected=e.guestConnected=e.ActionTypes=void 0,e.ActionTypes=r(I),i(gy,e);const s=o(Fc);e.feedbackFromGuestResponse=s.default;const a=o(Bc);e.guestConnected=a.default;const l=o(Lc);e.guestDisconnected=l.default;const u=o(jc);e.receiveTextMessageFromGuest=u.default;const c=o(zc);e.receiveTextMessageWithoutAnalysisFromGuest=c.default;const m=o(Uc);e.reportProblemFromGuest=m.default;const v=o($c);e.requestNLUEvent=v.default;const f=o(Hc);e.sendMessageToGuest=f.default})(uu);var Ar={},yy={};Object.defineProperty(yy,"__esModule",{value:!0});var Js={};Object.defineProperty(Js,"__esModule",{value:!0});Js.NullableKnowledgeBaseAdapter=void 0;class HS{async upsertKnowledgeBase(t){throw new Error("Method not implemented.")}async findKnowledgeBaseByName(t){throw new Error("Method not implemented.")}async deleteKnowledgeBaseByName(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.")}}Js.NullableKnowledgeBaseAdapter=HS;var GS=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]}),VS=q&&q.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),WS=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)&&GS(t,e,n);return VS(t,e),t};Object.defineProperty(Ar,"__esModule",{value:!0});Ar.NullableCmsAdapter=Ar.KnowledgeBase=void 0;Ar.KnowledgeBase=WS(yy);const qS=Js;Ar.NullableCmsAdapter={knowledgeBase:new qS.NullableKnowledgeBaseAdapter};var cu={},vy={};Object.defineProperty(vy,"__esModule",{value:!0});var Dt={};Object.defineProperty(Dt,"__esModule",{value:!0});Dt.ButtonTypeEnum=Dt.PostbackButton=Dt.UrlButton=Dt.Button=void 0;class Gc{constructor(t,n){V(this,"title");V(this,"type");this.title=t,this.type=n}}Dt.Button=Gc;class XS extends Gc{constructor(n,r){super(n,ps.WEB_URL);V(this,"url");this.url=r}}Dt.UrlButton=XS;class QS extends Gc{constructor(n,r){super(n,ps.POSTBACK);V(this,"payload");this.payload=r}}Dt.PostbackButton=QS;var ps;(function(e){e.WEB_URL="web_url",e.POSTBACK="postback"})(ps||(Dt.ButtonTypeEnum=ps={}));var _y={};Object.defineProperty(_y,"__esModule",{value:!0});var ea={};Object.defineProperty(ea,"__esModule",{value:!0});ea.SatisfactionEnum=void 0;var ih;(function(e){e.GOOD="GOOD",e.BAD="BAD"})(ih||(ea.SatisfactionEnum=ih={}));(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(vy,e),n(Dt,e),n(_y,e),n(ea,e),n(ne,e),n(ze,e)})(cu);(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(uu,e),e.Actions=i(uu),e.CMS=i(Ar),r(cu,e),e.Model=i(cu)})(U);var Ey={exports:{}};/*!
81
81
  Copyright (c) 2018 Jed Watson.
82
82
  Licensed under the MIT License (MIT), see
83
83
  http://jedwatson.github.io/classnames
@@ -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"},zR=["de","en","fr","it"],Mv={locale:"de",messages:Dv},UR=(e,t)=>{if(zR.includes(e)){const n=$R(e),r=FR.dot(t);return{...n,...r}}return t},$R=e=>{switch(e.toString()){case"en":return BR;case"fr":return LR;case"it":return jR;default:return Dv}},HR=(e=GR,t)=>{switch(t.type){case ta:return Object.assign({},e,{sessionId:t.sessionId,userId:t.userId});case nf:return Object.assign({},e,{connectionState:Dn.CONNECTING});case rf:return Object.assign({},e,{connectionState:Dn.CONNECTED});case of:return Object.assign({},e,{connectionState:Dn.DISCONNECTED});case sf:return Object.assign({},e,{connectionState:Dn.RECONNECTED});case af:return Object.assign({},e,{sessionId:t.sessionId});case Dy:return Object.assign({},e,{connectionState:Dn.DISCONNECTED,sessionId:void 0});default:return e}},GR={connectionState:Dn.DISCONNECTED,sessionId:void 0,userId:void 0},VR=(e=nl,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 np(e,t.message);case U.ActionTypes.MESSAGE_TO_GUEST:_o(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({},nl,{messages:i,quickReplies:u.quickReplies?u.quickReplies:[]})}else return nl;case qc:return _o(t.message),e;case U.ActionTypes.EVENT_TO_GUEST:return _o(t.event),e;case Ay:return _o(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:mu()});return np(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}},np=(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:[]})},_o=e=>{var t;WR()?(t=window.top)==null||t.postMessage(e,"*"):e.type==="webclient.change.url"&&window.open(e.url)},WR=()=>typeof window<"u"&&window.self!==window.top,nl={messages:[],quickReplies:[],isBotTyping:!1,speechSupport:!1,problemReportingEnabled:!1,transcriptExportEnabled:{pdf:!1,email:!1},showGeneralConditions:!1,conversationRating:{enabled:!1}},Fv=gO({name:"intl",initialState:Mv,reducers:{updateIntl:(e,t)=>{e.locale=t.payload.language,e.messages=t.payload.messages}}}),{updateIntl:qR}=Fv.actions,XR=Fv.reducer,QR=yv({chat:VR,connection:HR,intl:XR}),Bv="bf-webclient-state-last-saved-at",Lv="bf-webclient-state",KR=e=>{try{if(!JR())return;const t=rp(e,Bv);if(ZR(t))return;{const n=rp(e,Lv);return n===null?void 0:JSON.parse(n)}}catch(t){console.error(t);return}},YR=(e,t)=>{try{const n=JSON.stringify(t);ip(e,Lv,n);let r=new Date().toISOString();ip(e,Bv,r)}catch(n){console.error(n)}},ZR=e=>{if(e===null)return!1;let t=new Date(e);return t.setHours(t.getHours()+12),new Date>t},JR=()=>typeof localStorage<"u",rp=(e,t)=>localStorage.getItem(`${e}_${t}`),ip=(e,t,n)=>localStorage.setItem(`${e}_${t}`,n),jt=Object.create(null);jt.open="0";jt.close="1";jt.ping="2";jt.pong="3";jt.message="4";jt.upgrade="5";jt.noop="6";const zo=Object.create(null);Object.keys(jt).forEach(e=>{zo[jt[e]]=e});const Tu={type:"error",data:"parser error"},jv=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",zv=typeof ArrayBuffer=="function",Uv=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Ef=({type:e,data:t},n,r)=>jv&&t instanceof Blob?n?r(t):op(t,r):zv&&(t instanceof ArrayBuffer||Uv(t))?n?r(t):op(new Blob([t]),r):r(jt[e]+(t||"")),op=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function sp(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let rl;function eN(e,t){if(jv&&e.data instanceof Blob)return e.data.arrayBuffer().then(sp).then(t);if(zv&&(e.data instanceof ArrayBuffer||Uv(e.data)))return t(sp(e.data));Ef(e,!1,n=>{rl||(rl=new TextEncoder),t(rl.encode(n))})}const ap="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ai=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<ap.length;e++)ai[ap.charCodeAt(e)]=e;const tN=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=ai[e.charCodeAt(r)],s=ai[e.charCodeAt(r+1)],a=ai[e.charCodeAt(r+2)],l=ai[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},nN=typeof ArrayBuffer=="function",wf=(e,t)=>{if(typeof e!="string")return{type:"message",data:$v(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:rN(e.substring(1),t)}:zo[n]?e.length>1?{type:zo[n],data:e.substring(1)}:{type:zo[n]}:Tu},rN=(e,t)=>{if(nN){const n=tN(e);return $v(n,t)}else return{base64:!0,data:e}},$v=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},Hv="",iN=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,s)=>{Ef(o,!1,a=>{r[s]=a,++i===n&&t(r.join(Hv))})})},oN=(e,t)=>{const n=e.split(Hv),r=[];for(let i=0;i<n.length;i++){const o=wf(n[i],t);if(r.push(o),o.type==="error")break}return r};function sN(){return new TransformStream({transform(e,t){eN(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 il;function Eo(e){return e.reduce((t,n)=>t+n.length,0)}function wo(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 aN(e,t){il||(il=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(Eo(n)<1)break;const l=wo(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(Eo(n)<2)break;const l=wo(n,2);i=new DataView(l.buffer,l.byteOffset,l.length).getUint16(0),r=3}else if(r===2){if(Eo(n)<8)break;const l=wo(n,8),u=new DataView(l.buffer,l.byteOffset,l.length),c=u.getUint32(0);if(c>Math.pow(2,21)-1){a.enqueue(Tu);break}i=c*Math.pow(2,32)+u.getUint32(4),r=3}else{if(Eo(n)<i)break;const l=wo(n,i);a.enqueue(wf(o?l:il.decode(l),t)),r=0}if(i===0||i>e){a.enqueue(Tu);break}}}})}const Gv=4;function de(e){if(e)return lN(e)}function lN(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 it=typeof self<"u"?self:typeof window<"u"?window:Function("return this")();function Vv(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const uN=it.setTimeout,cN=it.clearTimeout;function ca(e,t){t.useNativeTimers?(e.setTimeoutFn=uN.bind(it),e.clearTimeoutFn=cN.bind(it)):(e.setTimeoutFn=it.setTimeout.bind(it),e.clearTimeoutFn=it.clearTimeout.bind(it))}const fN=1.33;function dN(e){return typeof e=="string"?hN(e):Math.ceil((e.byteLength||e.size)*fN)}function hN(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 pN(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function mN(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 gN extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class Sf extends de{constructor(t){super(),this.writable=!1,ca(this,t),this.opts=t,this.query=t.query,this.socket=t.socket}onError(t,n,r){return super.emitReserved("error",new gN(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=wf(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=pN(t);return n.length?"?"+n:""}}const Wv="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),Cu=64,yN={};let lp=0,So=0,up;function cp(e){let t="";do t=Wv[e%Cu]+t,e=Math.floor(e/Cu);while(e>0);return t}function qv(){const e=cp(+new Date);return e!==up?(lp=0,up=e):e+"."+cp(lp++)}for(;So<Cu;So++)yN[Wv[So]]=So;let Xv=!1;try{Xv=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const vN=Xv;function Qv(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||vN))return new XMLHttpRequest}catch{}if(!t)try{return new it[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}function _N(){}const EN=function(){return new Qv({xdomain:!1}).responseType!=null}();class wN extends Sf{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=EN&&!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)};oN(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,iN(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]=qv()),!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 Bt(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 Bt extends de{constructor(t,n){super(),ca(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=Vv(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this.opts.xd;const r=this.xhr=new Qv(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=Bt.requestsCount++,Bt.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=_N,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Bt.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()}}Bt.requestsCount=0;Bt.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",fp);else if(typeof addEventListener=="function"){const e="onpagehide"in it?"pagehide":"unload";addEventListener(e,fp,!1)}}function fp(){for(let e in Bt.requests)Bt.requests.hasOwnProperty(e)&&Bt.requests[e].abort()}const bf=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),bo=it.WebSocket||it.MozWebSocket,dp=!0,SN="arraybuffer",hp=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class bN extends Sf{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=hp?{}:Vv(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=dp&&!hp?n?new bo(t,n):new bo(t):new bo(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;Ef(r,this.supportsBinary,o=>{const s={};try{dp&&this.ws.send(o)}catch{}i&&bf(()=>{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]=qv()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}check(){return!!bo}}class xN extends Sf{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=aN(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=sN();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&&bf(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this.transport)===null||t===void 0||t.close()}}const TN={websocket:bN,webtransport:xN,polling:wN},CN=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,kN=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function ku(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=CN.exec(e||""),o={},s=14;for(;s--;)o[kN[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=ON(o,o.path),o.queryKey=RN(o,o.query),o}function ON(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 RN(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}let Kv=class ir extends de{constructor(t,n={}){super(),this.binaryType=SN,this.writeBuffer=[],t&&typeof t=="object"&&(n=t,t=null),t?(t=ku(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=ku(n.host).host),ca(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=mN(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=Gv,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 TN[t](r)}open(){let t;if(this.opts.rememberUpgrade&&ir.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;ir.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",m=>{if(!r)if(m.type==="pong"&&m.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;ir.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 v=new Error("probe error");v.transport=n.name,this.emitReserved("upgradeError",v)}}))};function o(){r||(r=!0,c(),n.close(),n=null)}const s=m=>{const v=new Error("probe error: "+m);v.transport=n.name,o(),this.emitReserved("upgradeError",v)};function a(){s("transport closed")}function l(){s("socket closed")}function u(m){n&&m.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",ir.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){ir.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}};Kv.protocol=Gv;function NN(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=ku(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 AN=typeof ArrayBuffer=="function",PN=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,Yv=Object.prototype.toString,IN=typeof Blob=="function"||typeof Blob<"u"&&Yv.call(Blob)==="[object BlobConstructor]",DN=typeof File=="function"||typeof File<"u"&&Yv.call(File)==="[object FileConstructor]";function xf(e){return AN&&(e instanceof ArrayBuffer||PN(e))||IN&&e instanceof Blob||DN&&e instanceof File}function Uo(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Uo(e[n]))return!0;return!1}if(xf(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Uo(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Uo(e[n]))return!0;return!1}function MN(e){const t=[],n=e.data,r=e;return r.data=Ou(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Ou(e,t){if(!e)return e;if(xf(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]=Ou(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]=Ou(e[r],t));return n}return e}function FN(e,t){return e.data=Ru(e.data,t),delete e.attachments,e}function Ru(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]=Ru(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Ru(e[n],t));return e}const BN=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],LN=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 jN{constructor(t){this.replacer=t}encode(t){return(t.type===z.EVENT||t.type===z.ACK)&&Uo(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=MN(t),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}function pp(e){return Object.prototype.toString.call(e)==="[object Object]"}class Tf 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 zN(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(xf(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(Tf.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 pp(n);case z.DISCONNECT:return n===void 0;case z.CONNECT_ERROR:return typeof n=="string"||pp(n);case z.EVENT:case z.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&BN.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 zN{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=FN(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const UN=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Tf,Encoder:jN,get PacketType(){return z},protocol:LN},Symbol.toStringTag,{value:"Module"}));function yt(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const $N=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Zv 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=[yt(t,"open",this.onopen.bind(this)),yt(t,"packet",this.onpacket.bind(this)),yt(t,"error",this.onerror.bind(this)),yt(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($N.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 Lr(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}Lr.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};Lr.prototype.reset=function(){this.attempts=0};Lr.prototype.setMin=function(e){this.ms=e};Lr.prototype.setMax=function(e){this.max=e};Lr.prototype.setJitter=function(e){this.jitter=e};class Nu 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,ca(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 Lr({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||UN;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 Kv(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=yt(n,"open",function(){r.onopen(),t&&t()}),o=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),t?t(a):this.maybeReconnectOnOpen()},s=yt(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(yt(t,"ping",this.onping.bind(this)),yt(t,"data",this.ondata.bind(this)),yt(t,"error",this.onerror.bind(this)),yt(t,"close",this.onclose.bind(this)),yt(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){bf(()=>{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 Zv(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 ei={};function $o(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=NN(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,s=ei[i]&&o in ei[i].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||s;let l;return a?l=new Nu(r,t):(ei[i]||(ei[i]=new Nu(r,t)),l=ei[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign($o,{Manager:Nu,Socket:Zv,io:$o,connect:$o});const HN=[U.ActionTypes.MESSAGE_TO_GUEST,U.ActionTypes.EVENT_TO_GUEST,U.ActionTypes.TYPING_ON,U.ActionTypes.TYPING_OFF,U.ActionTypes.RESTART_CHAT_REQUEST,...Nb,...cb,"@@localize/SET_ACTIVE_LANGUAGE","@@localize/ADD_TRANSLATION_FOR_LANGUAGE"],GN=({dispatch:e,getState:t})=>n=>{let r=null;return i=>{let o=n(i);if(i.type===ta)r!=null&&r.disconnect(),e(Ib()),r=$o(`/${i.clientName}/chat?${i.querystrings}`),r.on("action",e),r.on("connect",()=>e(Db())),r.on("disconnect",()=>e(Mb())),r.on("reconnect",()=>e(Fb())),r.on("set-translations",(s,a)=>{e(qR({language:s,messages:UR(s,a)}))}),r.on("enable-speech-support",()=>e(db())),r.on("enable-problem-reporting",()=>e(hb())),r.on("enable-transcript-export",s=>e(mb(s))),r.on("enable-conversation-rating",s=>e(_b(s))),r.on("speech-transcription",s=>e(pb(s))),r.on("restore-client-state",s=>{e(Pb(s.sessionId)),e(Sb(s.messages))}),r.on("expand-window",({devices:s})=>e({type:Ay,devices:s})),r.on("show-general-conditions",()=>e(yb())),r.on("restart-chat",()=>{e(Fy(i.clientName,i.querystrings))});else if(i.type===ub)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===Py){const{connection:{sessionId:s}}=t();window.location.href=`/transcript-pdf/${s}`}else HN.indexOf(i.type)===-1&&i.meta===void 0&&r&&r.emit("action",JSON.stringify(i));return o}},Jv=mv(),VN={...KR(Jv),intl:Mv},Au=aO({middleware:e=>e().concat(GN),reducer:QR,preloadedState:VN});Au.subscribe(AR(()=>{const e=Au.getState();YR(Jv,{connection:e.connection})},1e3));const WN=document.getElementById("root"),qN=kg(WN);qN.render(_.jsx(DE,{store:Au,children:_.jsx(kk,{})}));
111
- //# sourceMappingURL=index-G8UZQkc2.js.map
111
+ //# sourceMappingURL=index-DSBDFhJn.js.map